(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PIDDIR)
          op: assign_op.Equal
          rhs: {<'/var/run/samba'>}
          spids: [33]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:NMBDPID)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$PIDDIR') <'/nmbd.pid'>}
          spids: [36]
        )
      ]
    )
    (C {<unset>} {<TMPDIR>})
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<test>} {<-x>} {<'/usr/sbin/nmbd'>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
      ]
    )
    (C {<.>} {<'/lib/lsb/init-functions'>})
    (command.Case
      to_match: {($ Id.VSub_Number '$1')}
      arms: [
        (case_arm
          pat_list: [{<start>}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<init_is_upstart>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})]
                  spids: [81 86]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SERVER_ROLE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (command.Simple
                                words: [
                                  {<samba-tool>}
                                  {<testparm>}
                                  {<--parameter-name> <Id.Lit_Equals '='> (DQ <'server role'>)}
                                ]
                                redirects: [
                                  (redir
                                    op: <Id.Redir_Great '2>'>
                                    loc: (redir_loc.Fd fd:2)
                                    arg: {<'/dev/null'>}
                                  )
                                ]
                                do_fork: T
                              )
                              (C {<tail>} {<-1>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [97]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$SERVER_ROLE'))} 
                              {<Id.Lit_Equals '='>} {(DQ <'active directory domain controller'>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})]
                  spids: [122 139]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<-n>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              child: (C {<which>} {<testparm>})
                            )
                          } {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NMBD_DISABLED)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Simple
                                    words: [
                                      {<testparm>}
                                      {<-s>}
                                      {<--parameter-name> <Id.Lit_Equals '='> (SQ <'disable netbios'>)}
                                    ]
                                    redirects: [
                                      (redir
                                        op: <Id.Redir_Great '2>'>
                                        loc: (redir_loc.Fd fd:2)
                                        arg: {<'/dev/null'>}
                                      )
                                    ]
                                    do_fork: T
                                  )
                              )
                            }
                          spids: [171]
                        )
                      ]
                    )
                  ]
                  spids: [151 168]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NMBD_DISABLED'))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<Yes>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<log_daemon_msg>} {(DQ <'Starting NetBIOS name server'>)} {<nmbd>})
                    (C {<install>} {<-o>} {<root>} {<-g>} {<root>} {<-m>} {<755>} {<-d>} 
                      {($ Id.VSub_DollarName '$PIDDIR')}
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Pipeline
                                  children: [
                                    (C {<start-stop-daemon>} {<--start>} {<--quiet>} {<--oknodo>} 
                                      {<--exec>} {<'/usr/sbin/nmbd'>} {<-->} {<-D>}
                                    )
                                  ]
                                  negated: T
                                )
                              ]
                            )
                          action: [
                            (C {<log_end_msg>} {<1>})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [245 266]
                        )
                      ]
                    )
                    (C {<log_end_msg>} {<0>})
                  ]
                  spids: [193 209]
                )
              ]
            )
          ]
          spids: [77 78 291 -1]
        )
        (case_arm
          pat_list: [{<stop>}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<init_is_upstart>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})]
                  spids: [298 303]
                )
              ]
            )
            (C {<log_daemon_msg>} {(DQ <'Stopping NetBIOS name server'>)} {<nmbd>})
            (C {<start-stop-daemon>} {<--stop>} {<--quiet>} {<--pidfile>} 
              {($ Id.VSub_DollarName '$NMBDPID')}
            )
            (C {<sleep>} {<1>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName '$NMBDPID')} 
                              {<Id.Lit_RBracket ']'>}
                            )
                            (command.Pipeline
                              children: [
                                (command.Simple
                                  words: [
                                    {<ps>}
                                    {<h>}
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        child: (C {<cat>} {($ Id.VSub_DollarName '$NMBDPID')})
                                      )
                                    }
                                  ]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                              negated: T
                            )
                          ]
                        )
                      ]
                    )
                  action: [(C {<rm>} {<-f>} {($ Id.VSub_DollarName '$NMBDPID')})]
                  spids: [345 376]
                )
              ]
            )
            (C {<log_end_msg>} {<0>})
          ]
          spids: [294 295 404 -1]
        )
        (case_arm
          pat_list: [{<restart>} {<force-reload>}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<init_is_upstart>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})]
                  spids: [413 418]
                )
              ]
            )
            (C {($ Id.VSub_Number '$0')} {<stop>})
            (C {<sleep>} {<1>})
            (C {($ Id.VSub_Number '$0')} {<start>})
          ]
          spids: [407 410 444 -1]
        )
        (case_arm
          pat_list: [{<status>}]
          action: [
            (C {<status_of_proc>} {<-p>} {($ Id.VSub_DollarName '$NMBDPID')} {<'/usr/sbin/nmbd'>} {<nmbd>})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_QMark '$?')}
            )
          ]
          spids: [447 448 467 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (C {<echo>} {(DQ <'Usage: /etc/init.d/nmbd {start|stop|restart|force-reload|status}'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [470 471 486 -1]
        )
      ]
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)