(command.CommandList
  children: [
    (C {<Id.KW_Set set>} {<-e>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PATH)
          op: assign_op.Equal
          rhs: {(DQ <'/sbin:/bin'>)}
          spids: [34]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<Id.Lit_LBracket '['>} {<-d>} {<'/lib/ufw'>} {<Id.Lit_RBracket ']'>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
      ]
    )
    (C {<.>} {<'/lib/lsb/init-functions'>})
    (command.ForEach
      iter_name: s
      iter_words: [
        {(DQ <'/lib/ufw/ufw-init-functions'>)}
        {(DQ <'/etc/ufw/ufw.conf'>)}
        {(DQ <'/etc/default/ufw'>)}
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-s>} {(DQ ($ Id.VSub_DollarName '$s'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<.>} {(DQ ($ Id.VSub_DollarName '$s'))})]
                  spids: [83 96]
                )
              ]
              else_action: [
                (C {<log_failure_msg>} 
                  {(DQ <'Could not find '> ($ Id.VSub_DollarName '$s') <' (aborting)'>)}
                )
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:error)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [128]
        )
      ]
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number '$1'))}
      arms: [
        (case_arm
          pat_list: [{<start>}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$ENABLED'))} 
                              {<Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>}
                            )
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$ENABLED'))} 
                              {<Id.Lit_Equals '='>} {(DQ <YES>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<log_action_begin_msg>} {(DQ <'Starting firewall:'>)} {(DQ <ufw>)})
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:output)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: <Id.Left_Backtick '`'>
                                    child: (C {<ufw_start>})
                                  )
                                }
                              spids: [190]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:error)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                              spids: [199]
                            )
                          ]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$error'))} 
                                  {<Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<log_action_cont_msg>} 
                              {
                                (DQ <'Setting kernel variables ('> 
                                  ($ Id.VSub_DollarName '$IPT_SYSCTL') <')'>
                                )
                              }
                            )
                          ]
                          spids: [205 222]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                                  {(DQ ($ Id.VSub_DollarName '$output'))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.Pipeline
                              children: [
                                (C {<echo>} {(DQ ($ Id.VSub_DollarName '$output'))})
                                (command.WhileUntil
                                  keyword: <Id.KW_While while>
                                  cond: [
                                    (command.Sentence
                                      child: (C {<read>} {<line>})
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  body: 
                                    (command.DoGroup
                                      children: [
                                        (C {<log_action_cont_msg>} {(DQ ($ Id.VSub_DollarName '$line'))})
                                      ]
                                    )
                                )
                              ]
                              negated: F
                            )
                          ]
                          spids: [237 252]
                        )
                      ]
                    )
                  ]
                  spids: [143 176]
                )
              ]
              else_action: [
                (C {<log_action_begin_msg>} {(DQ <'Skip starting firewall:'>)} 
                  {(DQ <'ufw (not enabled)'>)}
                )
              ]
            )
            (C {<log_action_end_msg>} {($ Id.VSub_DollarName '$error')})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName '$error')}
            )
          ]
          spids: [139 140 314 -1]
        )
        (case_arm
          pat_list: [{<stop>}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$ENABLED'))} 
                              {<Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>}
                            )
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$ENABLED'))} 
                              {<Id.Lit_Equals '='>} {(DQ <YES>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<log_action_begin_msg>} {(DQ <'Stopping firewall:'>)} {(DQ <ufw>)})
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:output)
                              op: assign_op.Equal
                              rhs: 
                                {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<ufw_stop>}))}
                              spids: [367]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:error)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                              spids: [376]
                            )
                          ]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                                  {(DQ ($ Id.VSub_DollarName '$output'))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [(C {<log_action_cont_msg>} {(DQ ($ Id.VSub_DollarName '$output'))})]
                          spids: [382 397]
                        )
                      ]
                    )
                  ]
                  spids: [320 353]
                )
              ]
              else_action: [
                (C {<log_action_begin_msg>} {(DQ <'Skip stopping firewall:'>)} 
                  {(DQ <'ufw (not enabled)'>)}
                )
              ]
            )
            (C {<log_action_end_msg>} {($ Id.VSub_DollarName '$error')})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName '$error')}
            )
          ]
          spids: [316 317 437 -1]
        )
        (case_arm
          pat_list: [{<restart>} {<force-reload>}]
          action: [
            (C {<log_action_begin_msg>} {(DQ <'Reloading firewall:'>)} {(DQ <ufw>)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:output)
                      op: assign_op.Equal
                      rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<ufw_reload>}))}
                      spids: [456]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:error)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                      spids: [465]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                          {(DQ ($ Id.VSub_DollarName '$output'))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<log_action_cont_msg>} {(DQ ($ Id.VSub_DollarName '$output'))})]
                  spids: [471 486]
                )
              ]
            )
            (C {<log_action_end_msg>} {($ Id.VSub_DollarName '$error')})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName '$error')}
            )
          ]
          spids: [439 442 509 -1]
        )
        (case_arm
          pat_list: [{<status>}]
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:output)
                      op: assign_op.Equal
                      rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<ufw_status>}))}
                      spids: [515]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:error)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                      spids: [524]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                          {(DQ ($ Id.VSub_DollarName '$output'))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<log_action_cont_msg>} {(DQ ($ Id.VSub_DollarName '$output'))})]
                  spids: [530 545]
                )
              ]
            )
            (C {<log_action_end_msg>} {($ Id.VSub_DollarName '$error')})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName '$error')}
            )
          ]
          spids: [511 512 568 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (C {<echo>} {(DQ <'Usage: /etc/init.d/ufw {start|stop|restart|force-reload|status}'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [570 571 586 -1]
        )
      ]
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)