(command.CommandList
  children: [
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:PATH)
          op: Equal
          rhs: {(/sbin) (Lit_Other ':') (/bin)}
        )
      ]
    )
    (C {(.)} {(/lib/init/vars.sh)})
    (C {(.)} {(/lib/lsb/init-functions)})
    (command.FuncDef
      name: do_stop
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} {(Lit_Other '=')} {(no)} 
                  {(Lit_RBracket ']')}
                )
                (C {(log_action_begin_msg)} {(DQ ('Mounting root filesystem read-only'))})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_LBracket '[')} {(-f)} {(/var/run/init.upgraded)} {(Lit_RBracket ']')})
                  ]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:old_map)
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(cat)} {(/proc/1/maps)})]
                                  )
                              )
                            }
                        )
                      ]
                    )
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:map)
                          op: Equal
                          rhs: {($ VSub_DollarName '$old_map')}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [(C {(telinit)} {(u)}) (C {(Lit_Other ':')})]
                    )
                    (command.Assignment
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:i) op:Equal rhs:{(0)})]
                    )
                    (command.Assignment
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:timeout) op:Equal rhs:{(5)})]
                    )
                    (command.WhileUntil
                      keyword: <KW_While while>
                      cond: [
                        (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$map'))} {(Lit_Other '=')} 
                          {(DQ ($ VSub_DollarName '$old_map'))} {(Lit_RBracket ']')}
                        )
                      ]
                      body: 
                        (command.DoGroup
                          children: [
                            (C {(sleep)} {(1)})
                            (command.Assignment
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:map)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.CommandSub
                                        left_token: <Left_DollarParen '$('>
                                        command_list: 
                                          (command.CommandList
                                            children: [(C {(cat)} {(/proc/1/maps)})]
                                          )
                                      )
                                    }
                                )
                              ]
                            )
                            (C {(/usr/bin/logger)} {(DQ ('waiting for init to respawn'))})
                            (command.Assignment
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:i)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Arith_Plus
                                            left: (arith_expr.VarRef token:<Lit_ArithVarLike i>)
                                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                          )
                                      )
                                    }
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {(Lit_LBracket '[')} {($ VSub_DollarName '$i')} {(-eq)} 
                                          {($ VSub_DollarName '$timeout')} {(Lit_RBracket ']')}
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [(command.ControlFlow token:<ControlFlow_Break break>)]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$map'))} 
                                  {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$old_map'))} {(Lit_RBracket ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(/usr/bin/logger)} 
                              {
                                (DQ ('FAIL: init failed to respawn in ') 
                                  ($ VSub_DollarName '$timeout') (' seconds - unmounting anyway')
                                )
                              }
                            )
                          ]
                        )
                      ]
                      else_action: [
                        (C {(/usr/bin/logger)} 
                          {
                            (DQ ('SUCCESS: init respawned after ') ($ VSub_DollarName '$i') 
                              (' seconds (within ') ($ VSub_DollarName '$timeout') (' seconds timeout)')
                            )
                          }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:MOUNT_FORCE_OPT) op:Equal rhs:(word.Empty))]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_LBracket '[')} 
                  {
                    (DQ 
                      (word_part.CommandSub
                        left_token: <Left_DollarParen '$('>
                        command_list: (command.CommandList children:[(C {(uname)} {(-s)})])
                      )
                    )
                  } {(Lit_Other '=')} {(DQ (GNU/kFreeBSD))} {(Lit_RBracket ']')}
                )
                (command.Assignment
                  pairs: [(assign_pair lhs:(lhs_expr.LhsName name:MOUNT_FORCE_OPT) op:Equal rhs:{(-f)})]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DPipe Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {(mount)}
                    {($ VSub_DollarName '$MOUNT_FORCE_OPT')}
                    {(-n)}
                    {(-o)}
                    {(remount) (Lit_Comma ',') (ro)}
                    {(-t)}
                    {(dummytype)}
                    {(dummydev)}
                    {(/)}
                  ]
                  redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                )
                (command.Simple
                  words: [
                    {(mount)}
                    {($ VSub_DollarName '$MOUNT_FORCE_OPT')}
                    {(-n)}
                    {(-o)}
                    {(remount) (Lit_Comma ',') (ro)}
                    {(dummydev)}
                    {(/)}
                  ]
                  redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                )
                (C {(mount)} {($ VSub_DollarName '$MOUNT_FORCE_OPT')} {(-n)} {(-o)} 
                  {(remount) (Lit_Comma ',') (ro)} {(/)}
                )
              ]
            )
            (command.Assignment
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:ES) op:Equal rhs:{($ VSub_QMark '$?')})]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} {(Lit_Other '=')} {(no)} 
                  {(Lit_RBracket ']')}
                )
                (C {(log_action_end_msg)} {($ VSub_DollarName '$ES')})
              ]
            )
          ]
        )
    )
    (command.Case
      to_match: {(DQ ($ VSub_Number '$1'))}
      arms: [
        (case_arm pat_list:[{(start)} {(status)}])
        (case_arm
          pat_list: [{(restart)} {(reload)} {(force-reload)}]
          action: [
            (command.Simple
              words: [{(echo)} {(DQ ("Error: argument '") ($ VSub_Number '$1') ("' not supported"))}]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)})
          ]
        )
        (case_arm pat_list:[{(stop)}] action:[(C {(do_stop)})])
        (case_arm
          pat_list: [{(Lit_Star '*')}]
          action: [
            (command.Simple
              words: [{(echo)} {(DQ ('Usage: ') ($ VSub_Number '$0') (' start|stop'))}]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)})
          ]
        )
      ]
    )
    (C {(Lit_Other ':')})
  ]
)