(command.CommandList
  children: [
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:user)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                  spids: [7]
                )
              ]
            )
          terminator: <Id.Op_Semi _>
        )
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:tty)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                  spids: [12]
                )
              ]
            )
          terminator: <Id.Op_Semi _>
        )
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:showpid)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [17]
                )
              ]
            )
          terminator: <Id.Op_Semi _>
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:niceval)
              op: assign_op.Equal
              rhs: {(DQ <'+1'>)}
              spids: [21]
            )
          ]
        )
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: (C {<getopts>} {(DQ <'n:u:t:p'>)} {<opt>})
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName '$opt')}
              arms: [
                (case_arm
                  pat_list: [{<n>}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:niceval)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))}
                              spids: [55]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [51 53 61 -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: [68 84]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:user)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$OPTARG')}
                          spids: [106]
                        )
                      ]
                    )
                  ]
                  spids: [64 66 109 -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: [116 132]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:tty)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$OPTARG')}
                          spids: [154]
                        )
                      ]
                    )
                  ]
                  spids: [112 114 157 -1]
                )
                (case_arm
                  pat_list: [{<p>}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:showpid)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [164]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [160 162 168 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_QMark '?'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'Usage: '> ($ Id.VSub_Number '$0') 
                            <' [-n niceval] [-u user|-t tty] [-p] pattern'>
                          )
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'Default niceval change is '> 
                            (word_part.EscapedLiteral
                              token: <Id.Lit_EscapedChar '\\"'>
                            ) ($ Id.VSub_DollarName '$niceval') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                            <' (plus is lower'>
                          )
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {<echo>}
                        {(DQ <'priority, minus is higher, but only root can go below 0)'>)}
                      ]
                      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: [171 173 -1 217]
                )
              ]
            )
          ]
        )
    )
    (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') 
                    <' [-n niceval] [-u user|-t tty] [-p] 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: [236 250]
        )
      ]
    )
    (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:pid)
                  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') <'/ { print '> 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\\\'>
                                    ) ($ Id.VSub_Number '$2') <' }'>
                                  )
                                }
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [291]
                )
              ]
            )
          ]
          spids: [272 288]
        )
        (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:pid)
                  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') <'/ { print '> 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\\\'>
                                    ) ($ Id.VSub_Number '$2') <' }'>
                                  )
                                }
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [334]
                )
              ]
            )
          ]
          spids: [315 331]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:pid)
              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') <'/ { print '> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\$'>
                                ) <'2 }'>
                              )
                            }
                          )
                        ]
                        negated: F
                      )
                  )
                }
              spids: [361]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$pid'))} 
                      {<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: [391 405]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Pipeline
                                children: [
                                  (C {<echo>} {($ Id.VSub_DollarName '$pid')})
                                  (C {<grep>} {(SQ <' '>)})
                                ]
                                negated: F
                              )
                          )
                        )
                      } {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} 
              {
                (DQ ($ Id.VSub_Number '$0') <': more than one process matches pattern '> 
                  (${ Id.VSub_Number 1) <':'>
                )
              }
            )
            (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:runme)
                          op: assign_op.Equal
                          rhs: {(DQ <'ps cu -t '> ($ Id.VSub_DollarName '$tty'))}
                          spids: [488]
                        )
                      ]
                    )
                  ]
                  spids: [469 485]
                )
                (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:runme)
                          op: assign_op.Equal
                          rhs: {(DQ <'ps cu -U '> ($ Id.VSub_DollarName '$user'))}
                          spids: [514]
                        )
                      ]
                    )
                  ]
                  spids: [495 511]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:runme)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ <'ps cu -U '> 
                            (braced_var_sub
                              token: <Id.VSub_Name USER>
                              suffix_op: 
                                (suffix_op.Unary
                                  tok: <Id.VTest_ColonHyphen ':-'>
                                  arg_word: {<LOGNAME>}
                                )
                            )
                          )
                        }
                      spids: [524]
                    )
                  ]
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<eval>} {($ Id.VSub_DollarName '$runme')})
                (C {<awk>} 
                  {
                    (DQ <'/ '> ($ Id.VSub_Number '$1') <'/ { printf '> 
                      (word_part.EscapedLiteral
                        token: <Id.Lit_EscapedChar '\\"'>
                      ) <'  user %-8.8s  pid %-6.6s  job %s'> <Id.Lit_BadBackslash '\\'> <n> 
                      (word_part.EscapedLiteral
                        token: <Id.Lit_EscapedChar '\\"'>
                      ) <', '> <'      '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'1,'> 
                      (word_part.EscapedLiteral
                        token: <Id.Lit_EscapedChar '\\$'>
                      ) <'2,'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'11 }'>
                    )
                  }
                )
              ]
              negated: F
            )
            (C {<echo>} {(DQ <'Use -u user or -t tty to narrow down your selection criteria.'>)})
          ]
          spids: [425 453]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$showpid')} {<-eq>} {<1>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<echo>} {($ Id.VSub_DollarName '$pid')})]
          spids: [575 589]
        )
      ]
      else_action: [
        (C {<'/bin/echo'>} {<-n>} 
          {(DQ <'Renicing job '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>))}
        )
        (C {<'/bin/echo'>} {<-n>} 
          {
            (command_sub
              left_token: <Id.Left_DollarParen '$('>
              child: 
                (command.Pipeline
                  children: [
                    (C {<ps>} {<cp>} {($ Id.VSub_DollarName '$pid')})
                    (C {<sed>} {(SQ <'s/ [ ]*/ /g'>)})
                    (C {<tail>} {<-1>})
                    (C {<cut>} {<-d> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\ '>)} 
                      {<-f6->}
                    )
                  ]
                  negated: F
                )
            )
          }
        )
        (C {<echo>} 
          {
            (DQ (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' ('> 
              ($ Id.VSub_DollarName '$pid') <')'>
            )
          }
        )
        (C {<renice>} {($ Id.VSub_DollarName '$niceval')} {($ Id.VSub_DollarName '$pid')})
      ]
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)