(command.CommandList
  children: [
    (C {<trap>} {(DQ )} {<INT>} {<TERM>} {<QUIT>} {<TSTP>} {<ABRT>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'USAGE='> name:USAGE)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'usage: '> ($ Id.VSub_Number 0) 
                <' [-s|-f|-i|-I] devicename [-A|-D][username][zonename][zonepath]'>
              )
            }
          spids: [195]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH)
          op: assign_op.Equal
          rhs: {(DQ <'/usr/bin:/usr/sbin'>)}
          spids: [202]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'WDWMSG='> name:WDWMSG)
          op: assign_op.Equal
          rhs: {(DQ <'/etc/security/lib/wdwmsg'>)}
          spids: [207]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MODE='> name:MODE)
          op: assign_op.Equal
          rhs: {(DQ <allocate>)}
          spids: [212]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} 
                      {
                        (command_sub
                          left_token: <Id.Left_Backtick '`'>
                          child: (C {<basename>} {($ Id.VSub_Number 0)})
                          right: <Id.Backtick_Right '`'>
                        )
                      } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                      {
                        (command_sub
                          left_token: <Id.Left_Backtick '`'>
                          child: (C {<basename>} {($ Id.VSub_Number 0)} {<.windowing>})
                          right: <Id.Backtick_Right '`'>
                        )
                      } {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'WINDOWING='> name:WINDOWING)
                  op: assign_op.Equal
                  rhs: {(DQ <yes>)}
                  spids: [249]
                )
              ]
              redirects: []
            )
          ]
          spids: [218 246]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'WINDOWING='> name:WINDOWING)
              op: assign_op.Equal
              rhs: {(DQ <no>)}
              spids: [257]
            )
          ]
          redirects: []
        )
      ]
      redirects: []
    )
    (command.ShFunction
      name: msg
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName WINDOWING))} 
                              {<Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName MODE)} 
                                      {<Id.Lit_Equals '='>} {(DQ <allocate>)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TITLE='> name:TITLE)
                                  op: assign_op.Equal
                                  rhs: {(DQ <'Audio Device Allocation'>)}
                                  spids: [320]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [302 317]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TITLE='> name:TITLE)
                              op: assign_op.Equal
                              rhs: {(DQ <'Audio Device Dellocation'>)}
                              spids: [329]
                            )
                          ]
                          redirects: []
                        )
                      ]
                      redirects: []
                    )
                    (C {($ Id.VSub_DollarName WDWMSG)} {(DQ ($ Id.VSub_Star '*'))} 
                      {(DQ ($ Id.VSub_DollarName TITLE))} {<OK>}
                    )
                  ]
                  spids: [282 299]
                )
              ]
              else_action: [(C {<echo>} {(DQ ($ Id.VSub_Star '*'))})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: fail_msg
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName MODE))} 
                              {<Id.Lit_Equals '='>} {(DQ <allocate>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<msg>} 
                      {
                        (DQ ($ Id.VSub_Number 0) <': Allocate of '> ($ Id.VSub_DollarName DEVICE) 
                          <' failed.'>
                        )
                      }
                    )
                  ]
                  spids: [375 392]
                )
              ]
              else_action: [
                (C {<msg>} 
                  {
                    (DQ ($ Id.VSub_Number 0) <': Deallocate of '> ($ Id.VSub_DollarName DEVICE) 
                      <' failed.'>
                    )
                  }
                )
              ]
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: (condition.Shell commands:[(C {<getopts>} {<ifsI>} {<c>})])
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName c)}
              arms: [
                (case_arm
                  pat_list: [{<i>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FLAG='> name:FLAG)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName c)}
                          spids: [464]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [460 461 466 -1]
                )
                (case_arm
                  pat_list: [{<f>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FLAG='> name:FLAG)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName c)}
                          spids: [473]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [469 470 475 -1]
                )
                (case_arm
                  pat_list: [{<s>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FLAG='> name:FLAG)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName c)}
                          spids: [482]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [478 479 484 -1]
                )
                (case_arm
                  pat_list: [{<I>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FLAG='> name:FLAG)
                          op: assign_op.Equal
                          rhs: {<i>}
                          spids: [491]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'silent='> name:silent)
                          op: assign_op.Equal
                          rhs: {<y>}
                          spids: [495]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [487 488 497 -1]
                )
                (case_arm
                  pat_list: [{(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'> ch:'?')}]
                  action: [
                    (C {<msg>} {($ Id.VSub_DollarName USAGE)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [500 501 511 -1]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (C {<shift>} 
      {
        (command_sub
          left_token: <Id.Left_Backtick '`'>
          child: (C {<expr>} {($ Id.VSub_DollarName OPTIND)} {<->} {<1>})
          right: <Id.Backtick_Right '`'>
        )
      }
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DEVICE='> name:DEVICE)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 1)}
          spids: [534]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number 2))} {<Id.Lit_Equals '='>} 
                      {(DQ <-A>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MODE='> name:MODE)
                  op: assign_op.Equal
                  rhs: {(DQ <allocate>)}
                  spids: [557]
                )
              ]
              redirects: []
            )
          ]
          spids: [537 554]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number 2))} {<Id.Lit_Equals '='>} 
                      {(DQ <-D>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MODE='> name:MODE)
                  op: assign_op.Equal
                  rhs: {(DQ <deallocate>)}
                  spids: [582]
                )
              ]
              redirects: []
            )
          ]
          spids: [562 579]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName MODE))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <allocate>)} {<-a>} {(DQ ($ Id.VSub_DollarName MODE))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                      {(DQ <deallocate>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<msg>} {($ Id.VSub_DollarName USAGE)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [589 620]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ZONENAME='> name:ZONENAME)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 4)}
          spids: [634]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ZONEPATH='> name:ZONEPATH)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 5)}
          spids: [637]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SAVEDIR='> name:SAVEDIR)
          op: assign_op.Equal
          rhs: {<'/etc/security/audio'>}
          spids: [640]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MAP='> name:MAP)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<dminfo>} {<-v>} {<-n>} {($ Id.VSub_DollarName DEVICE)})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [643]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DEVICE='> name:DEVICE)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {($ Id.VSub_DollarName MAP)})
                      (C {<cut>} {<-f1>} {<-d> <Id.Lit_Colon ':'>})
                    ]
                    negated: F
                    stderr_indices: []
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [656]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TYPE='> name:TYPE)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {($ Id.VSub_DollarName MAP)})
                      (C {<cut>} {<-f2>} {<-d> <Id.Lit_Colon ':'>})
                    ]
                    negated: F
                    stderr_indices: []
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [674]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FILES='> name:FILES)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {($ Id.VSub_DollarName MAP)})
                      (C {<cut>} {<-f3>} {<-d> <Id.Lit_Colon ':'>})
                    ]
                    negated: F
                    stderr_indices: []
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [692]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(${ Id.VSub_Name SAVEDIR)} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<'/usr/bin/mkdir'>} {<-m>} {<0755>} {<-p>} {(${ Id.VSub_Name SAVEDIR)})
                (C {<fail_msg>})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<'/usr/bin/chown'>} {<root> <Id.Lit_Colon ':'> <sys>} {(${ Id.VSub_Name SAVEDIR)})
                (C {<fail_msg>})
              ]
            )
          ]
          spids: [711 725]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.ForEach
      iter_names: [d]
      iterable: (for_iter.Words words:[{($ Id.VSub_DollarName FILES)}])
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_Backtick '`'>
                          child: 
                            (C {<expr>} {($ Id.VSub_DollarName d)} {<Id.Lit_Colon ':'>} 
                              {(SQ <'/dev/mixer[0-9][0-9]*'>)}
                            )
                          right: <Id.Backtick_Right '`'>
                        )
                      )
                    }
                  spids: [773]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName x))} {<-ne>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DEVNM='> name:DEVNM)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName d)}
                          spids: [810]
                        )
                      ]
                      redirects: []
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Break break>)
                  ]
                  spids: [791 807]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SAVEFILE='> name:SAVEFILE)
          op: assign_op.Equal
          rhs: 
            {
              (DQ (${ Id.VSub_Name SAVEDIR) <'/'> 
                (command_sub
                  left_token: <Id.Left_Backtick '`'>
                  child: (C {<basename>} {(${ Id.VSub_Name DEVNM)})
                  right: <Id.Backtick_Right '`'>
                )
              )
            }
          spids: [821]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name FLAG))} {<Id.Lit_Equals '='>} {(DQ <i>)} 
                  {<-a>} {<Id.KW_Bang '!'>} {<-r>} {(DQ (${ Id.VSub_Name SAVEFILE))} {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<'/usr/bin/audioctl'>} {<save-controls>} {<-d>} {(${ Id.VSub_Name DEVNM)} {<-f>} 
                  {(${ Id.VSub_Name SAVEFILE)}
                )
                (C {<fail_msg>})
              ]
            )
          ]
          spids: [839 869]
        )
      ]
      else_action: [
        (command.AndOr
          ops: [Id.Op_DPipe]
          children: [
            (C {<'/usr/bin/audioctl'>} {<load-controls>} {<-d>} {(${ Id.VSub_Name DEVNM)} 
              {(${ Id.VSub_Name SAVEFILE)}
            )
            (C {<fail_msg>})
          ]
        )
      ]
      redirects: []
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)