(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PATH)
          op: assign_op.Equal
          rhs: {(/sbin) (Id.Lit_Other ':') (/bin)}
          spids: [31]
        )
      ]
    )
    (C {(.)} {(/lib/init/vars.sh)})
    (C {(.)} {(/lib/lsb/init-functions)})
    (command.ShFunction
      name: do_stop
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} 
                  {(Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')}
                )
                (C {(log_action_begin_msg)} {(DQ ('Mounting root filesystem read-only'))})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(Id.Lit_LBracket '[')} {(-f)} {(/var/run/init.upgraded)} {(Id.Lit_RBracket ']')})
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:old_map)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:102)
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(cat)} {(/proc/1/maps)})]
                                  )
                              )
                            }
                          spids: [101]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:map)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$old_map')}
                          spids: [111]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [(C {(telinit)} {(u)}) (C {(Id.Lit_Other ':')})]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:i)
                          op: assign_op.Equal
                          rhs: {(0)}
                          spids: [124]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:timeout)
                          op: assign_op.Equal
                          rhs: {(5)}
                          spids: [128]
                        )
                      ]
                    )
                    (command.WhileUntil
                      keyword: (Token id:Id.KW_While val:while span_id:132)
                      cond: [
                        (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$map'))} 
                          {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_DollarName '$old_map'))} {(Id.Lit_RBracket ']')}
                        )
                      ]
                      body: 
                        (command.DoGroup
                          children: [
                            (C {(sleep)} {(1)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:map)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: 
                                          (Token
                                            id: Id.Left_DollarParen
                                            val: '$('
                                            span_id: 158
                                          )
                                        command_list: 
                                          (command.CommandList
                                            children: [(C {(cat)} {(/proc/1/maps)})]
                                          )
                                      )
                                    }
                                  spids: [157]
                                )
                              ]
                            )
                            (C {(/usr/bin/logger)} {(DQ ('waiting for init to respawn'))})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:i)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: 
                                              (arith_expr.VarRef
                                                token: 
                                                  (Token
                                                    id: Id.Lit_ArithVarLike
                                                    val: i
                                                    span_id: 176
                                                  )
                                              )
                                            right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                          )
                                      )
                                    }
                                  spids: [174]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$i')} {(-eq)} 
                                          {($ Id.VSub_DollarName '$timeout')} {(Id.Lit_RBracket ']')}
                                        )
                                      terminator: (Token id:Id.Op_Semi val:';' span_id:195)
                                    )
                                  ]
                                  action: [
                                    (command.ControlFlow
                                      token: (Token id:Id.ControlFlow_Break val:break span_id:200)
                                    )
                                  ]
                                  spids: [183 197]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$map'))} 
                                  {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_DollarName '$old_map'))} {(Id.Lit_RBracket ']')}
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:226)
                            )
                          ]
                          action: [
                            (C {(/usr/bin/logger)} 
                              {
                                (DQ ('FAIL: init failed to respawn in ') 
                                  ($ Id.VSub_DollarName '$timeout') (' seconds - unmounting anyway')
                                )
                              }
                            )
                          ]
                          spids: [210 228]
                        )
                      ]
                      else_action: [
                        (C {(/usr/bin/logger)} 
                          {
                            (DQ ('SUCCESS: init respawned after ') ($ Id.VSub_DollarName '$i') 
                              (' seconds (within ') ($ Id.VSub_DollarName '$timeout') (' seconds timeout)')
                            )
                          }
                        )
                      ]
                    )
                  ]
                  spids: [87 98]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:MOUNT_FORCE_OPT)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [261]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(Id.Lit_LBracket '[')} 
                  {
                    (DQ 
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:267)
                        command_list: (command.CommandList children:[(C {(uname)} {(-s)})])
                      )
                    )
                  } {(Id.Lit_Equals '=')} {(DQ (GNU/kFreeBSD))} {(Id.Lit_RBracket ']')}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:MOUNT_FORCE_OPT)
                      op: assign_op.Equal
                      rhs: {(-f)}
                      spids: [284]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {(mount)}
                    {($ Id.VSub_DollarName '$MOUNT_FORCE_OPT')}
                    {(-n)}
                    {(-o)}
                    {(remount) (Id.Lit_Comma ',') (ro)}
                    {(-t)}
                    {(dummytype)}
                    {(dummydev)}
                    {(/)}
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'2>' span_id:324)
                      fd: 2
                      arg_word: {(/dev/null)}
                    )
                  ]
                )
                (command.Simple
                  words: [
                    {(mount)}
                    {($ Id.VSub_DollarName '$MOUNT_FORCE_OPT')}
                    {(-n)}
                    {(-o)}
                    {(remount) (Id.Lit_Comma ',') (ro)}
                    {(dummydev)}
                    {(/)}
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'2>' span_id:347)
                      fd: 2
                      arg_word: {(/dev/null)}
                    )
                  ]
                )
                (C {(mount)} {($ Id.VSub_DollarName '$MOUNT_FORCE_OPT')} {(-n)} {(-o)} 
                  {(remount) (Id.Lit_Comma ',') (ro)} {(/)}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ES)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [369]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} 
                  {(Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')}
                )
                (C {(log_action_end_msg)} {($ Id.VSub_DollarName '$ES')})
              ]
            )
          ]
        )
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number '$1'))}
      arms: [
        (case_arm pat_list:[{(start)} {(status)}] spids:[403 406 413 -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.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:432)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:436)
              arg_word: {(3)}
            )
          ]
          spids: [416 421 441 -1]
        )
        (case_arm pat_list:[{(stop)}] action:[(C {(do_stop)})] spids:[444 445 451 -1])
        (case_arm
          pat_list: [{(Id.Lit_Star '*')}]
          action: [
            (command.Simple
              words: [{(echo)} {(DQ ('Usage: ') ($ Id.VSub_Number '$0') (' start|stop'))}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:466)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:470)
              arg_word: {(3)}
            )
          ]
          spids: [454 455 475 -1]
        )
      ]
    )
    (C {(Id.Lit_Other ':')})
  ]
)