(command.CommandList
  children: [
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} 
          {
            (braced_var_sub
              token: <Id.VSub_Name VARIABLES_QUEUE_SH>
              suffix_op: (suffix_op.Unary tok:<Id.VTest_Plus '+'> arg_word:{<true>})
            )
          } {<Id.Lit_RBracket ']'>}
        )
        (command.ControlFlow token:<Id.ControlFlow_Return return>)
      ]
    )
    (C {<declare>} {<-g>} {<Id.Lit_VarLike 'VARIABLES_QUEUE_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 
      {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <type> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> 
        <define>
      } {<ArrayQueue>} {<ArrayList>}
    )
    (command.ShFunction
      name: 'variable::ArrayQueue::new'
      body: 
        (BraceGroup
          children: [
            (C {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <new>} {<ArrayQueue>} 
              {(DQ (${ Id.VSub_At '@'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: 'variable::ArrayQueue::enqueue'
      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::ArrayQueue::enqueue '> (${ Id.VSub_At '@'))})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [167 182]
                )
              ]
            )
            (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))} {<ArrayQueue>}
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<stderr>} 
                      {
                        (DQ <'Variable ['> (${ Id.VSub_Name token) 
                          <'] is not of type ArrayQueue (actual type ['> (${ Id.VSub_Name RESULT) <'])'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [209 231]
                )
              ]
            )
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayList> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <append>
              } {(DQ (${ Id.VSub_At '@'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: 'variable::ArrayQueue::dequeue'
      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::ArrayList::isEmpty_c '> (${ Id.VSub_At '@'))})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [299 314]
                )
              ]
            )
            (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))} {<ArrayQueue>}
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<stderr>} 
                      {
                        (DQ <'Variable ['> (${ Id.VSub_Name token) 
                          <'] is not of type ArrayQueue (actual type ['> (${ Id.VSub_Name RESULT) <'])'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [341 363]
                )
              ]
            )
            (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 dequeue from an empty queue'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [390 408]
                )
              ]
            )
            (command.Sentence
              child: 
                (C 
                  {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayQueue> <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: [497]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: 'variable::ArrayQueue::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))} {<ArrayQueue>}
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<stderr>} 
                      {
                        (DQ <'Variable ['> (${ Id.VSub_Name token) 
                          <'] is not of type ArrayQueue (actual type ['> (${ Id.VSub_Name RESULT) <'])'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [542 564]
                )
              ]
            )
            (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 queue'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [591 605]
                )
              ]
            )
            (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: [644]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: '_variable::ArrayQueue::peek_p'
      body: 
        (BraceGroup
          children: [
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayQueue> <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: [697 711]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayQueue> <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: [738]
            )
          ]
        )
      ]
    )
    (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 ':'> <ArrayQueue> <Id.Lit_Colon ':'> 
            <Id.Lit_Colon ':'> <enqueue>
          } {(${ 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 ':'> <ArrayQueue> <Id.Lit_Colon ':'> 
            <Id.Lit_Colon ':'> <enqueue>
          } {(${ 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 ':'> <ArrayQueue> <Id.Lit_Colon ':'> 
            <Id.Lit_Colon ':'> <enqueue>
          } {(${ Id.VSub_Name vCode)} {(${ Id.VSub_Name RESULT)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayQueue> <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 <first>)} 
          {(DQ ($ Id.VSub_DollarName '$RESULT'))} {(DQ <'queue:peek first'>)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayQueue> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <dequeue>
              } {($ 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 <first>)} 
          {(DQ ($ Id.VSub_DollarName '$RESULT'))} {(DQ <'queue::dequeue first'>)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayQueue> <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 <'queue:peek second'>)}
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C 
              {<variable> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <ArrayQueue> <Id.Lit_Colon ':'> 
                <Id.Lit_Colon ':'> <dequeue>
              } {($ 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 <'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: [1014 1044]
        )
      ]
    )
  ]
)