// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: ArrayExprToken::parse(Tokenizer*, std::vector<std::shared_ptr<FunctionToken>, std::allocator<std::shared_ptr<FunctionToken>>> const&, std::vector<std::shared_ptr<GlobalVarToken>, std::allocator<std::shared_ptr<GlobalVarToken>>> const&, std::vector<std::shared_ptr<ParamToken>, std::allocator<std::shared_ptr<ParamToken>>> const&, std::vector<std::shared_ptr<LocalVarToken>, std::allocator<std::shared_ptr<LocalVarToken>>> const&)
bool ArrayExprToken::parse(
      Tokenizer *tokenizer,
      const std::vector<std::shared_ptr<FunctionToken>>& functions,
      const std::vector<std::shared_ptr<GlobalVarToken>>& globals,
      const std::vector<std::shared_ptr<ParamToken>>& parameters,
      const std::vector<std::shared_ptr<LocalVarToken>>& localVars) {
  _lineNum = tokenizer->peekNext().line();
  // Make sure the first token is a '{' symbol
  if (!_expect(tokenizer, "{")) {
    return false;
  }
  // Check if the next token is a closing brace, in which
  // case we don't need to check for expressions.
  if ("}" == tokenizer->peekNext().str()) {
    tokenizer->getNext();
    return true;
  }
  // Get any expressions we find, separated by commas
  while (true) {
    std::shared_ptr<ExprToken> expr(new ExprToken());
    if (!expr->parse(tokenizer, functions, globals, parameters, localVars)) {
      return false;
    }
    _exprs.push_back(expr);
    AtomToken next = tokenizer->getNext();
    if ("}" == next.str()) {
      break;
    } else if (next.empty()) {
      _error("Unexpected EOF.", next.line());
      return false;
    } else if ("," != next.str()) {
      _error("Unexpected token '" + next.str() + "'.", next.line());
      return false;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, 0x80(%rsp)
movq %r8, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x279a6
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
movq %r15, %rdi
callq 0x7b20
leaq 0x17df2(%rip), %rsi     # 0x299d3
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x9502
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x286c3
movl %eax, %ebp
leaq 0x18(%rsp), %rdi
callq 0x75c8
testb %bpl, %bpl
je 0x11e50
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x279a6
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x73e0
leaq 0x17d9d(%rip), %rdi     # 0x299d5
leaq 0x48(%rsp), %r15
movq %r15, %rsi
callq 0x97dd
movl %eax, %ebp
movq %r15, %rdi
callq 0x75c8
leaq 0x18(%rsp), %rdi
callq 0x7b20
testb %bpl, %bpl
je 0x11c7e
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2772c
movq %rbx, %rdi
callq 0x7b20
jmp 0x11d8e
addq $0x10, %rbx
leaq 0x8(%rsp), %r12
leaq 0x18(%rsp), %r13
leaq 0x48(%rsp), %rbp
pushq $0x28
popq %rdi
callq 0x72b0
orl $-0x1, 0x8(%rax)
leaq 0x2c3a4(%rip), %rcx     # 0x3e048
movq %rcx, (%rax)
movb $0x1, 0xc(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0xe(%rax)
movups %xmm0, 0x18(%rax)
movq %r12, %rdi
movq %rax, %rsi
callq 0x25cd0
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq 0x80(%rsp), %r9
callq 0xe5a8
testb %al, %al
je 0x11e46
movq %rbx, %rdi
movq %r12, %rsi
callq 0x186e8
movq %r13, %rdi
movq %r14, %rsi
callq 0x2772c
movq %rbp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x73e0
leaq 0x17cbe(%rip), %rdi     # 0x299d5
movq %rbp, %rsi
callq 0x97dd
movl %eax, %r15d
movq %rbp, %rdi
callq 0x75c8
testb %r15b, %r15b
jne 0x11d7a
cmpq $0x0, 0x30(%rsp)
je 0x11d95
movq %rbp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x73e0
leaq 0x17c9c(%rip), %rdi     # 0x299e7
movq %rbp, %rsi
callq 0x9976
movl %eax, %r15d
movq %rbp, %rdi
callq 0x75c8
testb %r15b, %r15b
jne 0x11dc3
movq %r13, %rdi
callq 0x7b20
leaq 0x10(%rsp), %rdi
callq 0x7a34
jmp 0x11c91
leaq 0x18(%rsp), %rdi
callq 0x7b20
leaq 0x10(%rsp), %rdi
callq 0x7a34
movb $0x1, %al
jmp 0x11e52
leaq 0x17c3b(%rip), %rsi     # 0x299d7
leaq 0x48(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x9502
movl 0x20(%rsp), %esi
leaq 0x48(%rsp), %rdi
callq 0x285f3
leaq 0x48(%rsp), %rdi
jmp 0x11e37
leaq 0xa8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x73e0
leaq 0x17acb(%rip), %rsi     # 0x298a7
leaq 0x88(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x1832f
leaq 0x17f4a(%rip), %rdx     # 0x29d42
leaq 0x48(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x9ad4
movl 0x20(%rsp), %esi
leaq 0x48(%rsp), %rdi
callq 0x285f3
leaq 0x48(%rsp), %rdi
callq 0x75c8
leaq 0x88(%rsp), %rdi
callq 0x75c8
leaq 0xa8(%rsp), %rdi
callq 0x75c8
leaq 0x18(%rsp), %rdi
callq 0x7b20
leaq 0x10(%rsp), %rdi
callq 0x7a34
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x75c8
jmp 0x11e76
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x75c8
jmp 0x11e88
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
jmp 0x11e9c
jmp 0x11eca
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x75c8
jmp 0x11ecd
jmp 0x11eca
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7b20
jmp 0x11ee8
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x75c8
jmp 0x11ee8
movq %rax, %rbx
jmp 0x11ee8
jmp 0x11eca
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7b20
jmp 0x11ede
jmp 0x11edb
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7a34
movq %rbx, %rdi
callq 0x7510