(command.CommandList
  children: [
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} 
          {
            (braced_var_sub
              token: <Id.VSub_Name VARIABLES_STACK_SH>
              suffix_op: (suffix_op.Unary tok:<Id.VTest_Plus '+'> arg_word:{<isset>})
            )
          } {<Id.Lit_RBracket ']'>}
        )
        (command.ControlFlow token:<Id.ControlFlow_Return return>)
      ]
    )
    (C {<declare>} {<-g>} {<Id.Lit_VarLike 'VARIABLES_STACK_SH='> <true>})
    (C {<.>} 
      {
        (braced_var_sub
          token: <Id.VSub_Name BASH_SOURCE>
          suffix_op: 
            (suffix_op.Unary
              tok: <Id.VOp1_Percent '%'>
              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
            )
        ) <'/common.sh'>
      }
    )
    (C {<.>} 
      {
        (braced_var_sub
          token: <Id.VSub_Name BASH_SOURCE>
          suffix_op: 
            (suffix_op.Unary
              tok: <Id.VOp1_Percent '%'>
              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
            )
        ) <'/logger.sh'>
      }
    )
    (C {<.>} 
      {
        (braced_var_sub
          token: <Id.VSub_Name BASH_SOURCE>
          suffix_op: 
            (suffix_op.Unary
              tok: <Id.VOp1_Percent '%'>
              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
            )
        ) <'/variables.sh'>
      }
    )
    (C {<.>} 
      {
        (braced_var_sub
          token: <Id.VSub_Name BASH_SOURCE>
          suffix_op: 
            (suffix_op.Unary
              tok: <Id.VOp1_Percent '%'>
              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
            )
        ) <'/variables.atom.sh'>
      }
    )
    (C {<.>} 
      {
        (braced_var_sub
          token: <Id.VSub_Name BASH_SOURCE>
          suffix_op: 
            (suffix_op.Unary
              tok: <Id.VOp1_Percent '%'>
              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
            )
        ) <'/variables.arraylist.sh'>
      }
    )
    (C {<.>} 
      {
        (braced_var_sub
          token: <Id.VSub_Name BASH_SOURCE>
          suffix_op: 
            (suffix_op.Unary
              tok: <Id.VOp1_Percent '%'>
              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
            )
        ) <'/variables.queue.sh'>
      }
    )
    (C 
      {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <type> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> 
        <define>
      } {<ArrayStack>} {<ArrayList>}
    )
    (command.ShFunction
      name: 'variable::ArrayStack::new'
      body: 
        (BraceGroup
          children: [
            (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <new>} {<ArrayStack>} 
              {(DQ (${ Id.VSub_At '@'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: 'variable::ArrayStack::push'
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(${ Id.VSub_Name VARIABLES_DEBUG)}
                                  right: {<1>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Sentence
                      child: (C {<stderr>} {(DQ <'variable::ArrayStack::push '> (${ Id.VSub_At '@'))})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [181 196]
                )
              ]
            )
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayList> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <prepend>
              } {(DQ (${ Id.VSub_At '@'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: 'variable::ArrayStack::pop'
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(${ Id.VSub_Name VARIABLES_DEBUG)}
                                  right: {<1>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Sentence
                      child: (C {<stderr>} {(DQ <'variable::ArrayStack::pop '> (${ Id.VSub_At '@'))})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [253 268]
                )
              ]
            )
            (C {<declare>} {<Id.Lit_VarLike 'token='> (DQ (${ Id.VSub_Number 1))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (C 
                                  {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <type> 
                                    <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <instanceOf>
                                  } {(DQ (${ Id.VSub_Name token))} {<ArrayStack>}
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <type>} 
                      {(DQ (${ Id.VSub_Name token))}
                    )
                    (C {<stderr>} 
                      {
                        (DQ <'Variable ['> (${ Id.VSub_Name token) 
                          <'] is not of type ArrayStack (actual type ['> (${ Id.VSub_Name RESULT) <'])'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [295 317]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C 
                              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayList> 
                                <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <isEmpty_c>
                              } {(DQ (${ Id.VSub_Name token))}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<stderr>} {(DQ <'Cannot pop from an empty stack'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [356 374]
                )
              ]
            )
            (command.Sentence
              child: 
                (C 
                  {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
                    <Id.Lit_Colon ':'> <peek>
                  } {(DQ (${ Id.VSub_Name token))}
                )
              terminator: <Id.Op_Semi _>
            )
            (C {<declare>} {<Id.Lit_VarLike 'result='> ($ Id.VSub_DollarName '$RESULT')})
            (command.Sentence
              child: 
                (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <type>} 
                  {($ Id.VSub_DollarName '$token')}
                )
              terminator: <Id.Op_Semi _>
            )
            (C {<declare>} {<Id.Lit_VarLike 'type='> ($ Id.VSub_DollarName '$RESULT')})
            (command.Sentence
              child: 
                (C 
                  {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayList> <Id.Lit_Colon ':'> 
                    <Id.Lit_Colon ':'> <rest>
                  } {($ Id.VSub_DollarName '$token')}
                )
              terminator: <Id.Op_Semi _>
            )
            (C {<declare>} {<Id.Lit_VarLike 'value='> ($ Id.VSub_DollarName '$RESULT')})
            (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <set>} 
              {(DQ ($ Id.VSub_DollarName '$token'))} {(DQ ($ Id.VSub_DollarName '$type'))} {(DQ ($ Id.VSub_DollarName '$value'))}
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RESULT)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name result))}
                  spids: [466]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: 'variable::ArrayStack::peek'
      body: 
        (BraceGroup
          children: [
            (C {<declare>} {<Id.Lit_VarLike 'token='> (DQ (${ Id.VSub_Number 1))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (C 
                                  {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <type> 
                                    <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <instanceOf>
                                  } {(DQ (${ Id.VSub_Name token))} {<ArrayStack>}
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <type>} 
                      {(DQ (${ Id.VSub_Name token))}
                    )
                    (C {<stderr>} 
                      {
                        (DQ <'Variable ['> (${ Id.VSub_Name token) 
                          <'] is not of type ArrayStack (actual type ['> (${ Id.VSub_Name RESULT) <'])'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [511 533]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C 
                              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayList> 
                                <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <isEmpty_c>
                              } {($ Id.VSub_DollarName '$token')}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<stderr>} {(DQ <'Cannot peek from an empty stack'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [572 586]
                )
              ]
            )
            (command.Sentence
              child: 
                (C 
                  {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayList> <Id.Lit_Colon ':'> 
                    <Id.Lit_Colon ':'> <first>
                  } {($ Id.VSub_DollarName '$token')}
                )
              terminator: <Id.Op_Semi _>
            )
            (C {<declare>} {<Id.Lit_VarLike 'result='> ($ Id.VSub_DollarName '$RESULT')})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RESULT)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name result))}
                  spids: [622]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: '_variable::ArrayStack::peek_p'
      body: 
        (BraceGroup
          children: [
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <peek>
              } {(DQ (${ Id.VSub_At '@'))}
            )
            (C {<echo>} {(DQ ($ Id.VSub_DollarName '$RESULT'))})
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Number '$0')} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {($ Id.VSub_DollarName '$BASH_SOURCE')} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
          spids: [673 687]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <new>
              }
            )
          terminator: <Id.Op_Semi _>
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:vCode)
              op: assign_op.Equal
              rhs: {(${ Id.VSub_Name RESULT)}
              spids: [715]
            )
          ]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <new>} {<String>} {(DQ <first>)})
          terminator: <Id.Op_Semi _>
        )
        (C 
          {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
            <Id.Lit_Colon ':'> <push>
          } {(${ Id.VSub_Name vCode)} {(${ Id.VSub_Name RESULT)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <new>} {<String>} {(DQ <second>)})
          terminator: <Id.Op_Semi _>
        )
        (C 
          {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
            <Id.Lit_Colon ':'> <push>
          } {(${ Id.VSub_Name vCode)} {(${ Id.VSub_Name RESULT)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <new>} {<String>} {(DQ <third>)})
          terminator: <Id.Op_Semi _>
        )
        (C 
          {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
            <Id.Lit_Colon ':'> <push>
          } {(${ Id.VSub_Name vCode)} {(${ Id.VSub_Name RESULT)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <peek>
              } {($ Id.VSub_DollarName '$vCode')}
            )
          terminator: <Id.Op_Semi _>
        )
        (command.Sentence
          child: 
            (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <value>} 
              {(DQ (${ Id.VSub_Name RESULT))}
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<assert> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <equals>} {(DQ <third>)} 
          {(DQ ($ Id.VSub_DollarName '$RESULT'))} {(DQ <'stack::peek first'>)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <pop>
              } {($ Id.VSub_DollarName '$vCode')}
            )
          terminator: <Id.Op_Semi _>
        )
        (command.Sentence
          child: 
            (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <value>} 
              {(DQ (${ Id.VSub_Name RESULT))}
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<assert> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <equals>} {(DQ <third>)} 
          {(DQ ($ Id.VSub_DollarName '$RESULT'))} {(DQ <'stack::pop first'>)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <peek>
              } {($ Id.VSub_DollarName '$vCode')}
            )
          terminator: <Id.Op_Semi _>
        )
        (command.Sentence
          child: 
            (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <value>} 
              {(DQ (${ Id.VSub_Name RESULT))}
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<assert> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <equals>} {(DQ <second>)} 
          {(DQ ($ Id.VSub_DollarName '$RESULT'))} {(DQ <'stack::peek second'>)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayStack> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <pop>
              } {($ Id.VSub_DollarName '$vCode')}
            )
          terminator: <Id.Op_Semi _>
        )
        (command.Sentence
          child: 
            (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <value>} 
              {(DQ (${ Id.VSub_Name RESULT))}
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<assert> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <equals>} {(DQ <second>)} 
          {(DQ (${ Id.VSub_Name RESULT))} {(DQ <'queue::dequeue second'>)}
        )
      ]
    )
    (C {<assert> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <report>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (braced_var_sub
                              token: <Id.VSub_Number 1>
                              suffix_op: (suffix_op.Unary tok:<Id.VTest_Plus '+'> arg_word:{<isset>})
                            )
                          } {<Id.Lit_RBracket ']'>}
                        )
                        (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number '$1'))} 
                          {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {(DQ <debug>)} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <printMetadata>})]
          spids: [992 1022]
        )
      ]
    )
  ]
)