(command.CommandList
  children: [
    (command.ShFunction
      name: alarm_not_supported
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              words: [{<echo>} {<org.freedesktop.Hal.Device.SystemPowerManagement.AlarmNotSupported>}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {<Waking>} {<the>} {<system>} {<up>} {<is>} {<not>} {<supported>}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: unsupported
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              words: [{<echo>} {<org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported>}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {<No>} {<suspend>} {<method>} {<found>}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (C {<read>} {<seconds_to_sleep>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName seconds_to_sleep)} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<alarm_not_supported>})]
          spids: [101 118]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-x>} {(DQ <'/usr/sbin/uadmin'>)} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<'/usr/sbin/uadmin'>} {<3>} {<20>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RET='> name:RET)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [151]
                )
              ]
              redirects: []
            )
          ]
          spids: [126 140]
        )
      ]
      else_action: [(C {<unsupported>})]
      redirects: []
    )
    (command.ForEach
      iter_names: [type]
      iterable: (for_iter.Words words:[{<button>} {<battery>} {<ac_adapter>}])
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'devices='> name:devices)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (C {<hal-find-by-capability>} {<--capability>} {($ Id.VSub_DollarName type)})
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [180]
                )
              ]
              redirects: []
            )
            (command.ForEach
              iter_names: [device]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName devices)}])
              body: 
                (command.DoGroup
                  children: [
                    (C {<dbus-send>} {<--system>} {<--print-reply>} 
                      {<--dest> <Id.Lit_Equals '='> <org.freedesktop.Hal>} {($ Id.VSub_DollarName device)} {<org.freedesktop.Hal.Device.Rescan>}
                    )
                  ]
                )
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{($ Id.VSub_DollarName RET)})
  ]
)