(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:signal)
          op: assign_op.Equal
          rhs: {(DQ <-INT>)}
          spids: [24]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:user)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [32]
        )
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tty)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [36]
        )
        (assign_pair
          lhs: (sh_lhs_expr.Name name:donothing)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [40]
        )
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: (C {<getopts>} {(DQ <'s:u:t:n'>)} {<opt>})
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$opt'))}
              arms: [
                (case_arm
                  pat_list: [{<s>}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:signal)
                              op: assign_op.Equal
                              rhs: {(DQ <-> ($ Id.VSub_DollarName '$OPTARG'))}
                              spids: [79]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [75 77 86 -1]
                )
                (case_arm
                  pat_list: [{<u>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                                      {(DQ ($ Id.VSub_DollarName '$tty'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {
                                  (DQ ($ Id.VSub_Number '$0') 
                                    <': error: -u and -t are mutually exclusive.'>
                                  )
                                }
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_GreatAnd '>&'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<2>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [93 109]
                        )
                      ]
                    )
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:user)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_DollarName '$OPTARG')}
                              spids: [135]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [89 91 139 -1]
                )
                (case_arm
                  pat_list: [{<t>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                                      {(DQ ($ Id.VSub_DollarName '$user'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {
                                  (DQ ($ Id.VSub_Number '$0') 
                                    <': error: -u and -t are mutually exclusive.'>
                                  )
                                }
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_GreatAnd '>&'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<2>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [146 162]
                        )
                      ]
                    )
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:tty)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_Number '$2')}
                              spids: [184]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [142 144 188 -1]
                )
                (case_arm
                  pat_list: [{<n>}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:donothing)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [195]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [191 193 199 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_QMark '?'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'Usage: '> ($ Id.VSub_Number '$0') 
                            <' [-s signal] [-u user|-t tty] [-n] pattern'>
                          )
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [202 204 -1 223]
                )
              ]
            )
          ]
        )
    )
    (C {<shift>} 
      {
        (word_part.ArithSub
          anode: 
            (arith_expr.Binary
              op_id: Id.Arith_Minus
              left: {($ Id.VSub_DollarName '$OPTIND')}
              right: {<Id.Lit_Digits 1>}
            )
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'Usage: '> ($ Id.VSub_Number '$0') 
                    <' [-s signal] [-u user|-t tty] [-n] pattern'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [248 262]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                      {(DQ ($ Id.VSub_DollarName '$tty'))} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pids)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<ps>} {<cu>} {<-t>} {($ Id.VSub_DollarName '$tty')})
                              (C {<awk>} 
                                {
                                  (DQ <'/ '> ($ Id.VSub_Number '$1') <Id.Lit_Dollar '$'> <'/ { print '> 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\$'>
                                    ) <'2 }'>
                                  )
                                }
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [310]
                )
              ]
            )
          ]
          spids: [291 307]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                      {(DQ ($ Id.VSub_DollarName '$user'))} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pids)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<ps>} {<cu>} {<-U>} {($ Id.VSub_DollarName '$user')})
                              (C {<awk>} 
                                {
                                  (DQ <'/ '> ($ Id.VSub_Number '$1') <Id.Lit_Dollar '$'> <'/ { print '> 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\$'>
                                    ) <'2 }'>
                                  )
                                }
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [353]
                )
              ]
            )
          ]
          spids: [334 350]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:pids)
              op: assign_op.Equal
              rhs: 
                {
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Pipeline
                        children: [
                          (C {<ps>} {<cu>} {<-U>} 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name USER>
                                suffix_op: 
                                  (suffix_op.Unary
                                    tok: <Id.VTest_ColonHyphen ':-'>
                                    arg_word: {<LOGNAME>}
                                  )
                              )
                            }
                          )
                          (C {<awk>} 
                            {
                              (DQ <'/ '> ($ Id.VSub_Number '$1') <Id.Lit_Dollar '$'> <'/ { print '> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\$'>
                                ) <'2 }'>
                              )
                            }
                          )
                        ]
                        negated: F
                      )
                  )
                }
              spids: [380]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$pids'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Sentence
              child: 
                (command.Simple
                  words: [
                    {<echo>}
                    {
                      (DQ ($ Id.VSub_Number '$0') <': no processes match pattern '> 
                        ($ Id.VSub_Number '$1')
                      )
                    }
                  ]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [414 428]
        )
      ]
    )
    (command.ForEach
      iter_name: pid
      iter_words: [{($ Id.VSub_DollarName '$pids')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$donothing')} {<-eq>} 
                              {<1>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ <'kill '> ($ Id.VSub_DollarName '$signal') <' '> 
                          ($ Id.VSub_DollarName '$pid')
                        )
                      }
                    )
                  ]
                  spids: [473 487]
                )
              ]
              else_action: [
                (C {<kill>} {($ Id.VSub_DollarName '$signal')} {($ Id.VSub_DollarName '$pid')})
              ]
            )
          ]
        )
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)