(command.CommandList
  children: [
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:PATH)
          op: Equal
          rhs: {(/sbin) (Lit_Other ':') (/bin) (Lit_Other ':') (/usr/sbin) (Lit_Other ':') (/usr/bin)}
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:DESC)
          op: Equal
          rhs: {(DQ ('Avahi mDNS/DNS-SD Daemon'))}
        )
      ]
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:NAME) op:Equal rhs:{(DQ (avahi-daemon))})]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:DAEMON)
          op: Equal
          rhs: {(DQ (/usr/sbin/) ($ VSub_DollarName '$NAME'))}
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:SCRIPTNAME)
          op: Equal
          rhs: {(/etc/init.d/) ($ VSub_DollarName '$NAME')}
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(test)} {(-x)} {($ VSub_DollarName '$DAEMON')})
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
      ]
    )
    (C {(.)} {(/lib/lsb/init-functions)})
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-f)} {(/etc/default/avahi-daemon)})
        (C {(.)} {(/etc/default/avahi-daemon)})
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:DISABLE_TAG)
          op: Equal
          rhs: {(DQ (/var/run/avahi-daemon/disabled-for-unicast-local))}
        )
      ]
    )
    (command.FuncDef
      name: d_start
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {($ VSub_DollarName '$DAEMON')} {(-c)})
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
            )
            (command.Sentence
              child: 
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(Lit_LBracket '[')} {(-e)} {($ VSub_DollarName '$DISABLE_TAG')} {(-a)} 
                              {(DQ ($ VSub_DollarName '$AVAHI_DAEMON_DETECT_LOCAL'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (0))} {(Lit_RBracket ']')}
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (C {(log_warning_msg)} 
                          {(DQ ('avahi-daemon disabled because there is a unicast .local domain'))}
                        )
                        (command.Sentence
                          child: (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
                          terminator: <Op_Semi ';'>
                        )
                      ]
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
            (C {($ VSub_DollarName '$DAEMON')} {(-D)})
          ]
        )
    )
    (command.FuncDef
      name: d_stop
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {($ VSub_DollarName '$DAEMON')} {(-c)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {($ VSub_DollarName '$DAEMON')} {(-k)})]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: d_reload
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {($ VSub_DollarName '$DAEMON')} {(-c)})
                (C {($ VSub_DollarName '$DAEMON')} {(-r)})
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: d_status
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (C {($ VSub_DollarName '$DAEMON')} {(-c)})
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {(echo)} {(DQ ($ VSub_DollarName '$DESC') (' is running'))})
                      terminator: <Op_Semi ';'>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {(echo)} {(DQ ($ VSub_DollarName '$DESC') (' is not running'))})
                      terminator: <Op_Semi ';'>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.Case
      to_match: {(DQ ($ VSub_Number '$1'))}
      arms: [
        (case_arm
          pat_list: [{(start)}]
          action: [
            (C {(log_daemon_msg)} {(DQ ('Starting ') ($ VSub_DollarName '$DESC'))} 
              {(DQ ($ VSub_DollarName '$NAME'))}
            )
            (C {(d_start)})
            (C {(log_end_msg)} {($ VSub_QMark '$?')})
          ]
        )
        (case_arm
          pat_list: [{(stop)}]
          action: [
            (C {(log_daemon_msg)} {(DQ ('Stopping ') ($ VSub_DollarName '$DESC'))} 
              {(DQ ($ VSub_DollarName '$NAME'))}
            )
            (C {(d_stop)})
            (C {(log_end_msg)} {($ VSub_QMark '$?')})
          ]
        )
        (case_arm
          pat_list: [{(reload)} {(force-reload)}]
          action: [
            (C {(log_daemon_msg)} {(DQ ('Reloading services for ') ($ VSub_DollarName '$DESC'))} 
              {(DQ ($ VSub_DollarName '$NAME'))}
            )
            (C {(d_reload)})
            (C {(log_end_msg)} {($ VSub_QMark '$?')})
          ]
        )
        (case_arm
          pat_list: [{(restart)}]
          action: [
            (C {(log_daemon_msg)} {(DQ ('Restarting ') ($ VSub_DollarName '$DESC'))} 
              {(DQ ($ VSub_DollarName '$NAME'))}
            )
            (C {(d_stop)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_LBracket '[')} {(DQ ($ VSub_QMark '$?'))} {(-eq)} {(0)} 
                          {(Lit_RBracket ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(d_start)}) (C {(log_end_msg)} {($ VSub_QMark '$?')})]
                )
              ]
              else_action: [(C {(log_end_msg)} {(1)})]
            )
          ]
        )
        (case_arm pat_list:[{(status)}] action:[(C {(d_status)})])
        (case_arm
          pat_list: [{(Lit_Star '*')}]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('Usage: ') ($ VSub_DollarName '$SCRIPTNAME') 
                    (' {start|stop|restart|force-reload|reload|status}')
                  )
                }
              ]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)})
          ]
        )
      ]
    )
    (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)