(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH)
          op: assign_op.Equal
          rhs: 
            {<'/sbin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> <'/bin'> <Id.Lit_Colon ':'> 
              <'/usr/bin'>
            }
          spids: [31]
        )
      ]
      redirects: []
    )
    (C {<.>} {<'/lib/lsb/init-functions'>})
    (command.ShFunction
      name: report_unkillable
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/share/apport/unkillable_shutdown'>} 
                  {<Id.Lit_RBracket ']'>}
                )
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} 
                                  {<'/etc/default/apport'>} {<Id.Lit_RBracket ']'>}
                                )
                                (command.Pipeline
                                  children: [
                                    (C {<grep>} {<-q>} {(SQ <'^enabled[[:space:]]*=[[:space:]]*1'>)} 
                                      {<'/etc/default/apport'>}
                                    )
                                  ]
                                  negated: T
                                  stderr_indices: []
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [69 96]
                )
              ]
              else_action: []
              redirects: []
            )
            (C {<'/usr/share/apport/unkillable_shutdown'>} {($ Id.VSub_DollarName OMITPIDS)})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: upstart_killed_jobs
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [(C {<initctl>} {<list>}) (C {<grep>} {(SQ <'stop/killed'>)})]
              negated: F
              stderr_indices: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: upstart_jobs
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [
                (C {<initctl>} {<list>})
                (C {<grep>} {<-E>} {(SQ <'(start/|stop/killed)'>)})
                (C {<sed>} {<-n>} {<-e>} {(DQ <'/process [0-9]/s/.*process //p'>)})
              ]
              negated: F
              stderr_indices: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: do_stop
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OMITPIDS='> name:OMITPIDS)
                  op: assign_op.Equal
                  rhs: (rhs_word.Empty)
                  spids: [180]
                )
              ]
              redirects: []
            )
            (command.ForEach
              iter_names: [omitfile]
              iterable: (for_iter.Words words:[{<'/run/sendsigs.omit'>}])
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-e>} {($ Id.VSub_DollarName omitfile)} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ForEach
                              iter_names: [pid]
                              iterable: 
                                (for_iter.Words
                                  words: [
                                    {
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<cat>} {($ Id.VSub_DollarName omitfile)})
                                        right: <Id.Eof_RParen _>
                                      )
                                    }
                                  ]
                                )
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'OMITPIDS='>
                                              name: OMITPIDS
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (braced_var_sub
                                                  left: <Id.Left_DollarBrace '${'>
                                                  token: <Id.VSub_Name OMITPIDS>
                                                  var_name: OMITPIDS
                                                  suffix_op: 
                                                    (suffix_op.Unary
                                                      op: <Id.VTest_ColonPlus _>
                                                      arg_word: 
                                                        {($ Id.VSub_DollarName OMITPIDS) <' '>}
                                                    )
                                                  right: <Id.Right_DollarBrace '}'>
                                                ) <'-o '> ($ Id.VSub_DollarName pid)
                                              )
                                            }
                                          spids: [226]
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                )
                              redirects: []
                            )
                          ]
                          spids: [196 207]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (command.ForEach
              iter_names: [omitdir]
              iterable: (for_iter.Words words:[{<'/run/sendsigs.omit.d'>}])
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ (${ Id.VSub_Name omitdir))} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ForEach
                              iter_names: [pidfile]
                              iterable: 
                                (for_iter.Words
                                  words: [{(DQ (${ Id.VSub_Name omitdir) <'/'>) <Id.Lit_Star '*'>}]
                                )
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.AndOr
                                      ops: [Id.Op_DPipe]
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                                          {(DQ ($ Id.VSub_DollarName pidfile))} {<Id.Lit_RBracket ']'>}
                                        )
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Continue continue>
                                        )
                                      ]
                                    )
                                    (command.ForEach
                                      iter_names: [pid]
                                      iterable: 
                                        (for_iter.Words
                                          words: [
                                            {
                                              (command_sub
                                                left_token: <Id.Left_DollarParen '$('>
                                                child: (C {<cat>} {($ Id.VSub_DollarName pidfile)})
                                                right: <Id.Eof_RParen _>
                                              )
                                            }
                                          ]
                                        )
                                      body: 
                                        (command.DoGroup
                                          children: [
                                            (command.ShAssignment
                                              pairs: [
                                                (assign_pair
                                                  lhs: 
                                                    (sh_lhs_expr.Name
                                                      left: <Id.Lit_VarLike 'OMITPIDS='>
                                                      name: OMITPIDS
                                                    )
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (DQ 
                                                        (braced_var_sub
                                                          left: <Id.Left_DollarBrace '${'>
                                                          token: <Id.VSub_Name OMITPIDS>
                                                          var_name: OMITPIDS
                                                          suffix_op: 
                                                            (suffix_op.Unary
                                                              op: <Id.VTest_ColonPlus _>
                                                              arg_word: 
                                                                {($ Id.VSub_DollarName OMITPIDS) 
                                                                  <' '>
                                                                }
                                                            )
                                                          right: <Id.Right_DollarBrace '}'>
                                                        ) <'-o '> ($ Id.VSub_DollarName pid)
                                                      )
                                                    }
                                                  spids: [340]
                                                )
                                              ]
                                              redirects: []
                                            )
                                          ]
                                        )
                                      redirects: []
                                    )
                                  ]
                                )
                              redirects: []
                            )
                          ]
                          spids: [273 288]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-x>} {<'/sbin/initctl'>} {<Id.Lit_RBracket ']'>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ForEach
                      iter_names: [pid]
                      iterable: 
                        (for_iter.Words
                          words: [
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<upstart_jobs>})
                                right: <Id.Eof_RParen _>
                              )
                            }
                          ]
                        )
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'OMITPIDS='>
                                      name: OMITPIDS
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          left: <Id.Left_DollarBrace '${'>
                                          token: <Id.VSub_Name OMITPIDS>
                                          var_name: OMITPIDS
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op: <Id.VTest_ColonPlus _>
                                              arg_word: {($ Id.VSub_DollarName OMITPIDS) <' '>}
                                            )
                                          right: <Id.Right_DollarBrace '}'>
                                        ) <'-o '> ($ Id.VSub_DollarName pid)
                                      )
                                    }
                                  spids: [406]
                                )
                              ]
                              redirects: []
                            )
                          ]
                        )
                      redirects: []
                    )
                  ]
                  spids: [378 389]
                )
              ]
              else_action: []
              redirects: []
            )
            (C {<sync>})
            (C {<log_action_begin_msg>} {(DQ <'Asking all remaining processes to terminate'>)})
            (C {<killall5>} {<-15>} {($ Id.VSub_DollarName OMITPIDS)})
            (C {<log_action_end_msg>} {<0>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'alldead='> name:alldead)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                  spids: [476]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OMITPIDS0='> name:OMITPIDS0)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName OMITPIDS))}
                  spids: [481]
                )
              ]
              redirects: []
            )
            (command.ForEach
              iter_names: [seq]
              iterable: 
                (for_iter.Words
                  words: [{<1>} {<2>} {<3>} {<4>} {<5>} {<6>} {<7>} {<8>} {<9>} {<10>}]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OMITPIDS='> name:OMITPIDS)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OMITPIDS0))}
                          spids: [517]
                        )
                      ]
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-x>} {<'/sbin/initctl'>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ForEach
                              iter_names: [pid]
                              iterable: 
                                (for_iter.Words
                                  words: [
                                    {
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<upstart_jobs>})
                                        right: <Id.Eof_RParen _>
                                      )
                                    }
                                  ]
                                )
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'OMITPIDS='>
                                              name: OMITPIDS
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (braced_var_sub
                                                  left: <Id.Left_DollarBrace '${'>
                                                  token: <Id.VSub_Name OMITPIDS>
                                                  var_name: OMITPIDS
                                                  suffix_op: 
                                                    (suffix_op.Unary
                                                      op: <Id.VTest_ColonPlus _>
                                                      arg_word: 
                                                        {($ Id.VSub_DollarName OMITPIDS) <' '>}
                                                    )
                                                  right: <Id.Right_DollarBrace '}'>
                                                ) <'-o '> ($ Id.VSub_DollarName pid)
                                              )
                                            }
                                          spids: [588]
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                )
                              redirects: []
                            )
                          ]
                          spids: [560 571]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: (C {<killall5>} {<-18>} {($ Id.VSub_DollarName OMITPIDS)})
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<Id.Lit_Colon ':'>})]
                          spids: [607 617]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'alldead='> name:alldead)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [626]
                            )
                          ]
                          redirects: []
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Break break>
                        )
                      ]
                      redirects: []
                    )
                    (C {<sleep>} {<1>})
                  ]
                )
              redirects: []
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<upstart_killed_jobs>})
                                right: <Id.Eof_RParen _>
                              )
                            )
                          } {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'seq='> name:seq)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: {($ Id.VSub_DollarName seq)}
                                    right: {<Id.Lit_Digits 1>}
                                  )
                              )
                            }
                          spids: [697]
                        )
                      ]
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName seq)} {<-ge>} 
                                      {<300>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)]
                          spids: [706 720]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (C {<sleep>} {<1>})
                  ]
                )
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName alldead))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<log_action_begin_msg>} {(DQ <'Killing all remaining processes'>)})
                    (C {<killall5>} {<-9>} {($ Id.VSub_DollarName OMITPIDS)})
                    (C {<log_action_end_msg>} {<1>})
                  ]
                  spids: [740 754]
                )
              ]
              else_action: [
                (C {<log_action_begin_msg>} 
                  {(DQ <'All processes ended within '> ($ Id.VSub_DollarName seq) <' seconds'>)}
                )
                (C {<log_action_end_msg>} {<0>})
              ]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number 1))}
      arms: [
        (case_arm pat_list:[{<start>} {<status>}] action:[] spids:[814 817 824 -1])
        (case_arm
          pat_list: [{<restart>} {<reload>} {<force-reload>}]
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'Error: argument \''> ($ Id.VSub_Number 1) <'\' not supported'>)}]
              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:{<3>})
          ]
          spids: [827 832 852 -1]
        )
        (case_arm pat_list:[{<stop>}] action:[(C {<do_stop>})] spids:[855 856 862 -1])
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number 0) <' start|stop'>)}]
              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:{<3>})
          ]
          spids: [865 866 886 -1]
        )
      ]
      redirects: []
    )
    (C {<Id.Lit_Colon ':'>})
  ]
)