// File: /workspace/github_cpp_makefile_star2_O3/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 $0xe8, %rsp
movq %r9, 0xb0(%rsp)
movq %r8, 0xa8(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x32bec
movl 0x8(%r14), %eax
movq %r15, 0x50(%rsp)
movl %eax, 0x8(%r15)
leaq 0x2eeee(%rip), %rax     # 0x45d10
movq %rax, (%r14)
movq 0x10(%r14), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16e40
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1eb83(%rip), %rsi     # 0x359d3
leaq 0x1eb7d(%rip), %rdx     # 0x359d4
leaq 0x20(%rsp), %rdi
callq 0xbdee
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x342b6
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x16e8c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %bpl, %bpl
je 0x17221
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32bec
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xbd58
leaq 0x1eb0d(%rip), %rsi     # 0x359d5
movq %rsp, %r14
movq %r14, %rdi
callq 0x70c0
movl %eax, %ebp
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x16eea
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x2ee1f(%rip), %rax     # 0x45d10
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16f12
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %ebp, %ebp
je 0x17237
addq $0x10, 0x50(%rsp)
movq %rsp, %rbp
movl $0x28, %edi
callq 0x72b0
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
leaq 0x2f0fd(%rip), %rcx     # 0x46038
movq %rcx, (%rax)
movb $0x1, 0xc(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0xe(%rax)
movups %xmm0, 0x18(%rax)
movq %rax, 0x58(%rsp)
leaq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0x30c64
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq 0xa8(%rsp), %r8
movq 0xb0(%rsp), %r9
callq 0x1131a
movl $0x1, %r14d
testb %al, %al
je 0x17203
movq 0x50(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x21aba
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x32902
movq %r15, (%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xbd58
movq %rbp, %rdi
leaq 0x1ea06(%rip), %rsi     # 0x359d5
callq 0x70c0
movl %eax, %r14d
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x16fed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %r14d, %r14d
je 0x170b7
movq 0x38(%rsp), %rdx
testq %rdx, %rdx
je 0x170c2
movq %r15, (%rsp)
movq 0x30(%rsp), %rsi
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xbd58
movq %rbp, %rdi
leaq 0x1e9c5(%rip), %rsi     # 0x359e7
callq 0x70c0
movl %eax, %r14d
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x17040
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %r14d, %r14d
je 0x170ff
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0xbd58
movl $0x12, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x1e81d(%rip), %rcx     # 0x358a7
callq 0x7320
leaq 0x78(%rsp), %r14
movq %r14, 0x68(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x17107
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x1710e
movl $0x3, %r14d
jmp 0x171db
movq %r15, (%rsp)
movq %rbp, %rdi
leaq 0x1e907(%rip), %rsi     # 0x359d7
leaq 0x1e90f(%rip), %rdx     # 0x359e6
callq 0xbdee
movl 0x28(%rsp), %esi
movq %rbp, %rdi
callq 0x34178
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x171d5
movq 0x10(%rsp), %rsi
jmp 0x171cd
xorl %r14d, %r14d
jmp 0x171db
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x68(%rsp), %rdi
leaq 0x1ec10(%rip), %rsi     # 0x35d42
callq 0x7560
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x17158
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1715f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x28(%rsp), %esi
movq %rbp, %rdi
callq 0x34178
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x17199
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x171b0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x171d5
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x72c0
movl $0x1, %r14d
leaq 0x2eb2e(%rip), %rax     # 0x45d10
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x17203
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x17212
callq 0x8036
testl %r14d, %r14d
je 0x16f23
cmpl $0x1, %r14d
jne 0x17279
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32902
leaq 0x2eabf(%rip), %rax     # 0x45d10
movq %rax, (%r14)
movq 0x10(%r14), %rdi
leaq 0xd8(%rsp), %rax
movb $0x1, %bl
cmpq %rax, %rdi
je 0x17223
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17223
movb $0x1, %bl
jmp 0x17223
movq %rax, %rbx
leaq 0x2ea89(%rip), %rax     # 0x45d10
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x17391
movq 0x40(%rsp), %rsi
jmp 0x1733f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x17353
movq 0x10(%rsp), %rsi
jmp 0x17321
jmp 0x17350
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x172e3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x172e3
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x17304
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17304
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x17353
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17353
jmp 0x17350
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x17391
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17391
movq %rax, %rbx
jmp 0x17391
jmp 0x17350
movq %rax, %rbx
leaq 0x2e9b6(%rip), %rax     # 0x45d10
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x17382
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17382
jmp 0x1737f
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x17391
callq 0x8036
movq %rbx, %rdi
callq 0x74f0
nop