(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PATH)
          op: assign_op.Equal
          rhs: 
            {<'/sbin'> <Id.Lit_Colon ':'> <'/bin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> 
              <'/usr/bin'>
            }
          spids: [67]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DESC)
          op: assign_op.Equal
          rhs: {<bluetooth>}
          spids: [76]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DAEMON)
          op: assign_op.Equal
          rhs: {<'/usr/sbin/bluetoothd'>}
          spids: [80]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:HCIATTACH)
          op: assign_op.Equal
          rhs: {<'/usr/bin/hciattach'>}
          spids: [83]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BLUETOOTH_ENABLED)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [87]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:HID2HCI_ENABLED)
          op: assign_op.Equal
          rhs: {<1>}
          spids: [90]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:HID2HCI_UNDO)
          op: assign_op.Equal
          rhs: {<1>}
          spids: [93]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SDPTOOL)
          op: assign_op.Equal
          rhs: {<'/usr/bin/sdptool'>}
          spids: [97]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:NOPLUGIN_OPTION)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [110]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSD_OPTIONS)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'--oknodo --quiet --exec '> ($ Id.VSub_DollarName '$DAEMON') <' -- '> 
                ($ Id.VSub_DollarName '$NOPLUGIN_OPTION')
              )
            }
          spids: [114]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<test>} {<-f>} {($ Id.VSub_DollarName '$DAEMON')})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [(C {<test>} {<-f>} {<'/etc/default/bluetooth'>}) (C {<.>} {<'/etc/default/bluetooth'>})]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [(C {<test>} {<-f>} {<'/etc/default/rcS'>}) (C {<.>} {<'/etc/default/rcS'>})]
    )
    (C {<.>} {<'/lib/lsb/init-functions'>})
    (C {<set>} {<-e>})
    (command.ShFunction
      name: run_sdptool
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<IFS>} {<o>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {<-x>} {($ Id.VSub_DollarName '$SDPTOOL')})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$SDPTOOL_OPTIONS'))})
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:IFS)
                          op: assign_op.Equal
                          rhs: {(DQ <';'>)}
                          spids: [234]
                        )
                      ]
                    )
                    (command.ForEach
                      iter_name: o
                      iter_words: [{($ Id.VSub_DollarName '$SDPTOOL_OPTIONS')}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:IFS)
                                  op: assign_op.Equal
                                  rhs: {(DQ <' '>)}
                                  spids: [257]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} 
                                              {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {($ Id.VSub_DollarName '$SDPTOOL')} 
                                      {($ Id.VSub_DollarName '$o')}
                                    )
                                  ]
                                  spids: [263 279]
                                )
                              ]
                              else_action: [
                                (command.Simple
                                  words: [
                                    {($ Id.VSub_DollarName '$SDPTOOL')}
                                    {($ Id.VSub_DollarName '$o')}
                                  ]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                    (redir
                                      op: <Id.Redir_GreatAnd '2>&'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<1>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                            )
                          ]
                        )
                    )
                  ]
                  spids: [217 231]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: hci_input
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<log_progress_msg>} 
                  {
                    (DQ 
                      <
'switching to HID/HCI no longer done in init script, see /usr/share/doc/bluez/NEWS.Debian.gz'
                      >
                    )
                  }
                )
                (C {<Id.Lit_Colon ':'>})
              ]
            )
          ]
        )
    )
    (C {<alias>} {<Id.Lit_VarLike 'enable_hci_input='> <hci_input>})
    (C {<alias>} {<Id.Lit_VarLike 'disable_hci_input='> <hci_input>})
    (command.Case
      to_match: {($ Id.VSub_Number '$1')}
      arms: [
        (case_arm
          pat_list: [{<start>}]
          action: [
            (C {<log_daemon_msg>} {(DQ <'Starting '> ($ Id.VSub_DollarName '$DESC'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<test>} {(DQ ($ Id.VSub_DollarName '$BLUETOOTH_ENABLED'))} 
                              {<Id.Lit_Equals '='>} {<0>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<log_progress_msg>} {(DQ <'disabled. see /etc/default/bluetooth'>)})
                    (C {<log_end_msg>} {<0>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [362 375]
                )
              ]
            )
            (C {<start-stop-daemon>} {<--start>} {<--background>} {($ Id.VSub_DollarName '$SSD_OPTIONS')})
            (C {<log_progress_msg>} 
              {
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_Name DAEMON>
                    suffix_op: 
                      (suffix_op.Unary
                        tok: <Id.VOp1_DPound '##'>
                        arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>}
                      )
                  )
                )
              }
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [(C {<run_sdptool>}) (C {<Id.Lit_Colon ':'>})]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<test>} {(DQ ($ Id.VSub_DollarName '$HID2HCI_ENABLED'))} 
                              {<Id.Lit_Equals '='>} {<1>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<enable_hci_input>})]
                  spids: [429 442]
                )
              ]
            )
            (C {<log_end_msg>} {<0>})
          ]
          spids: [349 350 457 -1]
        )
        (case_arm
          pat_list: [{<stop>}]
          action: [
            (C {<log_daemon_msg>} {(DQ <'Stopping '> ($ Id.VSub_DollarName '$DESC'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<test>} {(DQ ($ Id.VSub_DollarName '$BLUETOOTH_ENABLED'))} 
                              {<Id.Lit_Equals '='>} {<0>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<log_progress_msg>} {(DQ <disabled.>)})
                    (C {<log_end_msg>} {<0>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [472 485]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<test>} {(DQ ($ Id.VSub_DollarName '$HID2HCI_UNDO'))} 
                              {<Id.Lit_Equals '='>} {<1>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<disable_hci_input>})]
                  spids: [508 521]
                )
              ]
            )
            (C {<start-stop-daemon>} {<--stop>} {($ Id.VSub_DollarName '$SSD_OPTIONS')})
            (C {<log_progress_msg>} {(DQ (${ Id.VSub_Name DAEMON))})
            (C {<log_end_msg>} {<0>})
          ]
          spids: [460 461 551 -1]
        )
        (case_arm
          pat_list: [{<restart>} {<force-reload>}]
          action: [
            (C {($ Id.VSub_Number '$0')} {<stop>})
            (C {<sleep>} {<1>})
            (C {($ Id.VSub_Number '$0')} {<start>})
          ]
          spids: [554 557 575 -1]
        )
        (case_arm
          pat_list: [{<status>}]
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (C {<status_of_proc>} {(DQ ($ Id.VSub_DollarName '$DAEMON'))} 
                  {(DQ ($ Id.VSub_DollarName '$DESC'))}
                )
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Exit exit>
                  arg_word: {($ Id.VSub_QMark '$?')}
                )
              ]
            )
          ]
          spids: [578 579 605 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:N)
                  op: assign_op.Equal
                  rhs: {<'/etc/init.d/bluetooth'>}
                  spids: [612]
                )
              ]
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'Usage: '> ($ Id.VSub_DollarName '$N') 
                    <' {start|stop|restart|force-reload|status}'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [608 609 633 -1]
        )
      ]
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)