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