(command.CommandList
  children: [
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(Lit_Other '[')} 
          {
            (word_part.BracedVarSub
              token: <VSub_Name VARIABLES_STACK_SH>
              suffix_op: (suffix_op.StringUnary op_id:VTest_Plus arg_word:{(isset)})
            )
          } {(Lit_Other ']')}
        )
        (command.ControlFlow token:<ControlFlow_Return return>)
      ]
    )
    (command.Assignment
      keyword: Assign_Declare
      flags: [-g]
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:VARIABLES_STACK_SH) op:Equal rhs:{(true)})]
    )
    (C {(.)} 
      {
        (word_part.BracedVarSub
          token: <VSub_Name BASH_SOURCE>
          suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')})
        ) (/common.sh)
      }
    )
    (C {(.)} 
      {
        (word_part.BracedVarSub
          token: <VSub_Name BASH_SOURCE>
          suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')})
        ) (/logger.sh)
      }
    )
    (C {(.)} 
      {
        (word_part.BracedVarSub
          token: <VSub_Name BASH_SOURCE>
          suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')})
        ) (/variables.sh)
      }
    )
    (C {(.)} 
      {
        (word_part.BracedVarSub
          token: <VSub_Name BASH_SOURCE>
          suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')})
        ) (/variables.atom.sh)
      }
    )
    (C {(.)} 
      {
        (word_part.BracedVarSub
          token: <VSub_Name BASH_SOURCE>
          suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')})
        ) (/variables.arraylist.sh)
      }
    )
    (C {(.)} 
      {
        (word_part.BracedVarSub
          token: <VSub_Name BASH_SOURCE>
          suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')})
        ) (/variables.queue.sh)
      }
    )
    (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (define)} 
      {(ArrayStack)} {(ArrayList)}
    )
    (command.FuncDef
      name: 'variable::ArrayStack::new'
      body: 
        (command.BraceGroup
          children: [
            (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(ArrayStack)} {(DQ (${ VSub_At '@'))})
          ]
        )
    )
    (command.FuncDef
      name: 'variable::ArrayStack::push'
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {(${ VSub_Name VARIABLES_DEBUG)}
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Sentence
                      child: (C {(stderr)} {(DQ ('variable::ArrayStack::push ') (${ VSub_At '@'))})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
              ]
            )
            (C 
              {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayList) (Lit_Other ':') (Lit_Other ':') 
                (prepend)
              } {(DQ (${ VSub_At '@'))}
            )
          ]
        )
    )
    (command.FuncDef
      name: 'variable::ArrayStack::pop'
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {(${ VSub_Name VARIABLES_DEBUG)}
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Sentence
                      child: (C {(stderr)} {(DQ ('variable::ArrayStack::pop ') (${ VSub_At '@'))})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_Declare
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:token)
                  op: Equal
                  rhs: {(DQ (${ VSub_Number 1))}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C 
                              {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') 
                                (Lit_Other ':') (instanceOf)
                              } {(DQ (${ VSub_Name token))} {(ArrayStack)}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(variable) (Lit_Other ':') (Lit_Other ':') (type)} {(DQ (${ VSub_Name token))})
                    (C {(stderr)} 
                      {
                        (DQ ('Variable [') (${ VSub_Name token) 
                          ('] is not of type ArrayStack (actual type [') (${ VSub_Name RESULT) ('])')
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C 
                          {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayList) (Lit_Other ':') 
                            (Lit_Other ':') (isEmpty_c)
                          } {(DQ (${ VSub_Name token))}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(stderr)} {(DQ ('Cannot pop from an empty stack'))})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.Sentence
              child: 
                (C 
                  {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') 
                    (Lit_Other ':') (peek)
                  } {(DQ (${ VSub_Name token))}
                )
              terminator: <Op_Semi ';'>
            )
            (command.Assignment
              keyword: Assign_Declare
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:result)
                  op: Equal
                  rhs: {($ VSub_DollarName '$RESULT')}
                )
              ]
            )
            (command.Sentence
              child: 
                (C {(variable) (Lit_Other ':') (Lit_Other ':') (type)} {($ VSub_DollarName '$token')})
              terminator: <Op_Semi ';'>
            )
            (command.Assignment
              keyword: Assign_Declare
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:type)
                  op: Equal
                  rhs: {($ VSub_DollarName '$RESULT')}
                )
              ]
            )
            (command.Sentence
              child: 
                (C 
                  {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayList) (Lit_Other ':') (Lit_Other ':') 
                    (rest)
                  } {($ VSub_DollarName '$token')}
                )
              terminator: <Op_Semi ';'>
            )
            (command.Assignment
              keyword: Assign_Declare
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:value)
                  op: Equal
                  rhs: {($ VSub_DollarName '$RESULT')}
                )
              ]
            )
            (C {(variable) (Lit_Other ':') (Lit_Other ':') (set)} {(DQ ($ VSub_DollarName '$token'))} 
              {(DQ ($ VSub_DollarName '$type'))} {(DQ ($ VSub_DollarName '$value'))}
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:RESULT)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name result))}
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: 'variable::ArrayStack::peek'
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Declare
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:token)
                  op: Equal
                  rhs: {(DQ (${ VSub_Number 1))}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C 
                              {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') 
                                (Lit_Other ':') (instanceOf)
                              } {(DQ (${ VSub_Name token))} {(ArrayStack)}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(variable) (Lit_Other ':') (Lit_Other ':') (type)} {(DQ (${ VSub_Name token))})
                    (C {(stderr)} 
                      {
                        (DQ ('Variable [') (${ VSub_Name token) 
                          ('] is not of type ArrayStack (actual type [') (${ VSub_Name RESULT) ('])')
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C 
                          {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayList) (Lit_Other ':') 
                            (Lit_Other ':') (isEmpty_c)
                          } {($ VSub_DollarName '$token')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(stderr)} {(DQ ('Cannot peek from an empty stack'))})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.Sentence
              child: 
                (C 
                  {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayList) (Lit_Other ':') (Lit_Other ':') 
                    (first)
                  } {($ VSub_DollarName '$token')}
                )
              terminator: <Op_Semi ';'>
            )
            (command.Assignment
              keyword: Assign_Declare
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:result)
                  op: Equal
                  rhs: {($ VSub_DollarName '$RESULT')}
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:RESULT)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name result))}
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: '_variable::ArrayStack::peek_p'
      body: 
        (command.BraceGroup
          children: [
            (C 
              {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') 
                (peek)
              } {(DQ (${ VSub_At '@'))}
            )
            (C {(echo)} {(DQ ($ VSub_DollarName '$RESULT'))})
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_Number '$0')} {(KW_Bang '!') (Lit_Other '=')} 
                  {($ VSub_DollarName '$BASH_SOURCE')} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(command.ControlFlow token:<ControlFlow_Return return>)]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') 
                (new)
              }
            )
          terminator: <Op_Semi ';'>
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:vCode) op:Equal rhs:{(${ VSub_Name RESULT)})]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(String)} {(DQ (first))})
          terminator: <Op_Semi ';'>
        )
        (C 
          {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') (push)} {(${ VSub_Name vCode)} {(${ VSub_Name RESULT)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(String)} {(DQ (second))})
          terminator: <Op_Semi ';'>
        )
        (C 
          {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') (push)} {(${ VSub_Name vCode)} {(${ VSub_Name RESULT)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(String)} {(DQ (third))})
          terminator: <Op_Semi ';'>
        )
        (C 
          {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') (push)} {(${ VSub_Name vCode)} {(${ VSub_Name RESULT)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') 
                (peek)
              } {($ VSub_DollarName '$vCode')}
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name RESULT))})
          terminator: <Op_Semi ';'>
        )
        (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ (third))} 
          {(DQ ($ VSub_DollarName '$RESULT'))} {(DQ ('stack::peek first'))}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') 
                (pop)
              } {($ VSub_DollarName '$vCode')}
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name RESULT))})
          terminator: <Op_Semi ';'>
        )
        (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ (third))} 
          {(DQ ($ VSub_DollarName '$RESULT'))} {(DQ ('stack::pop first'))}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') 
                (peek)
              } {($ VSub_DollarName '$vCode')}
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name RESULT))})
          terminator: <Op_Semi ';'>
        )
        (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ (second))} 
          {(DQ ($ VSub_DollarName '$RESULT'))} {(DQ ('stack::peek second'))}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {(variable) (Lit_Other ':') (Lit_Other ':') (ArrayStack) (Lit_Other ':') (Lit_Other ':') 
                (pop)
              } {($ VSub_DollarName '$vCode')}
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name RESULT))})
          terminator: <Op_Semi ';'>
        )
        (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ (second))} 
          {(DQ (${ VSub_Name RESULT))} {(DQ ('queue::dequeue second'))}
        )
      ]
    )
    (C {(assert) (Lit_Other ':') (Lit_Other ':') (report)})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.AndOr
                  ops: [Op_DAmp]
                  children: [
                    (C {(Lit_Other '[')} 
                      {
                        (word_part.BracedVarSub
                          token: <VSub_Number 1>
                          suffix_op: (suffix_op.StringUnary op_id:VTest_Plus arg_word:{(isset)})
                        )
                      } {(Lit_Other ']')}
                    )
                    (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=') (Lit_Other '=')} 
                      {(DQ (debug))} {(Lit_Other ']')}
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(variable) (Lit_Other ':') (Lit_Other ':') (printMetadata)})]
        )
      ]
    )
  ]
)