(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Pound '#'))} {<-lt>} {(DQ <2>)} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'Usage:   '> 
                    (command_sub
                      left_token: <Id.Left_Backtick '`'>
                      child: (C {<basename>} {($ Id.VSub_Number 0)})
                      right: <Id.Backtick_Right '`'>
                    ) <' timeout_in_seconds command'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'Example: '> 
                    (command_sub
                      left_token: <Id.Left_Backtick '`'>
                      child: (C {<basename>} {($ Id.VSub_Number 0)})
                      right: <Id.Backtick_Right '`'>
                    ) <' 2 sleep 3 || echo timeout'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [81 98]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.ShFunction
      name: cleanup
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {<trap>} {<->} {<ALRM>})
            (command.Simple
              words: [{<kill>} {<-ALRM>} {($ Id.VSub_DollarName a)}]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              more_env: []
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.Simple
                  words: [{<kill>} {($ Id.VSub_Bang '!')}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  more_env: []
                  do_fork: T
                )
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<124>})
              ]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: watchit
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {<trap>} {(DQ <cleanup>)} {<ALRM>})
            (command.Sentence
              child: (C {<sleep>} {($ Id.VSub_Number 1)})
              terminator: <Id.Op_Amp _>
            )
            (C {<wait>})
            (C {<kill>} {<-ALRM>} {($ Id.VSub_Dollar '$')})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {<watchit>} {($ Id.VSub_Number 1)})
          terminator: <Id.Op_Amp _>
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'a='> name:a)
              op: assign_op.Equal
              rhs: {($ Id.VSub_Bang '!')}
              spids: [235]
            )
          ]
          redirects: []
        )
      ]
    )
    (C {<shift>})
    (C {<trap>} {(DQ <cleanup>)} {<ALRM>} {<INT>})
    (command.CommandList
      children: [
        (command.Sentence child:(C {(DQ ($ Id.VSub_At '@'))}) terminator:<Id.Op_Amp _>)
        (command.Sentence child:(C {<wait>} {($ Id.VSub_Bang '!')}) terminator:<Id.Op_Semi _>)
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RET='> name:RET)
              op: assign_op.Equal
              rhs: {($ Id.VSub_QMark '?')}
              spids: [269]
            )
          ]
          redirects: []
        )
      ]
    )
    (C {<kill>} {<-ALRM>} {($ Id.VSub_DollarName a)})
    (C {<wait>} {($ Id.VSub_DollarName a)})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{($ Id.VSub_DollarName RET)})
  ]
)