(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_LBracket '[')} {(DQ ($ VSub_Pound '$#'))} {(-lt)} {(DQ (2))} {(Lit_RBracket ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('Usage:   ') 
                    (command_sub
                      left_token: <Left_Backtick '`'>
                      command_list: 
                        (command.CommandList
                          children: [(C {(basename)} {($ VSub_Number '$0')})]
                        )
                    ) (' timeout_in_seconds command')
                  )
                }
              ]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('Example: ') 
                    (command_sub
                      left_token: <Left_Backtick '`'>
                      command_list: 
                        (command.CommandList
                          children: [(C {(basename)} {($ VSub_Number '$0')})]
                        )
                    ) (' 2 sleep 3 || echo timeout')
                  )
                }
              ]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
        )
      ]
    )
    (command.ShFunction
      name: cleanup
      body: 
        (command.BraceGroup
          children: [
            (C {(trap)} {(-)} {(ALRM)})
            (command.Simple
              words: [{(kill)} {(-ALRM)} {($ VSub_DollarName '$a')}]
              redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.Simple
                  words: [{(kill)} {($ VSub_Bang '$!')}]
                  redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                )
                (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(124)})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: watchit
      body: 
        (command.BraceGroup
          children: [
            (C {(trap)} {(DQ (cleanup))} {(ALRM)})
            (command.Sentence
              child: (C {(sleep)} {($ VSub_Number '$1')})
              terminator: <Op_Amp '&'>
            )
            (C {(wait)})
            (C {(kill)} {(-ALRM)} {($ VSub_Dollar '$$')})
          ]
        )
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {(watchit)} {($ VSub_Number '$1')})
          terminator: <Op_Amp '&'>
        )
        (command.ShAssignment
          pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:a) op:Equal rhs:{($ VSub_Bang '$!')})]
        )
      ]
    )
    (C {(shift)})
    (C {(trap)} {(DQ (cleanup))} {(ALRM)} {(INT)})
    (command.CommandList
      children: [
        (command.Sentence child:(C {(DQ ($ VSub_At '$@'))}) terminator:<Op_Amp '&'>)
        (command.Sentence child:(C {(wait)} {($ VSub_Bang '$!')}) terminator:<Op_Semi ';'>)
        (command.ShAssignment
          pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:RET) op:Equal rhs:{($ VSub_QMark '$?')})]
        )
      ]
    )
    (C {(kill)} {(-ALRM)} {($ VSub_DollarName '$a')})
    (C {(wait)} {($ VSub_DollarName '$a')})
    (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_DollarName '$RET')})
  ]
)