// File: /workspace/github_cpp_makefile_star2_O1/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 0x33270
movl 0x8(%r14), %eax
movq %r15, 0x50(%rsp)
movl %eax, 0x8(%r15)
leaq 0x2face(%rip), %rax     # 0x46ce0
movq %rax, (%r14)
movq 0x10(%r14), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x17230
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1f793(%rip), %rsi     # 0x369d3
leaq 0x1f78d(%rip), %rdx     # 0x369d4
leaq 0x20(%rsp), %rdi
callq 0xc0a4
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x3494f
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x1727c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %bpl, %bpl
je 0x17611
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33270
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xc014
leaq 0x1f71d(%rip), %rsi     # 0x369d5
movq %rsp, %r14
movq %r14, %rdi
callq 0x70c0
movl %eax, %ebp
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x172da
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x2f9ff(%rip), %rax     # 0x46ce0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x17302
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %ebp, %ebp
je 0x17627
addq $0x10, 0x50(%rsp)
movq %rsp, %rbp
movl $0x28, %edi
callq 0x72b0
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
leaq 0x2fd15(%rip), %rcx     # 0x47040
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 0x31340
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq 0xa8(%rsp), %r8
movq 0xb0(%rsp), %r9
callq 0x1160e
movl $0x1, %r14d
testb %al, %al
je 0x175f3
movq 0x50(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x221f0
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x32f76
movq %r15, (%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xc014
movq %rbp, %rdi
leaq 0x1f616(%rip), %rsi     # 0x369d5
callq 0x70c0
movl %eax, %r14d
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x173dd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %r14d, %r14d
je 0x174a7
movq 0x38(%rsp), %rdx
testq %rdx, %rdx
je 0x174b2
movq %r15, (%rsp)
movq 0x30(%rsp), %rsi
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xc014
movq %rbp, %rdi
leaq 0x1f5d5(%rip), %rsi     # 0x369e7
callq 0x70c0
movl %eax, %r14d
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x17430
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %r14d, %r14d
je 0x174ef
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 0xc014
movl $0x12, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x1f42d(%rip), %rcx     # 0x368a7
callq 0x7320
leaq 0x78(%rsp), %r14
movq %r14, 0x68(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x174f7
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x174fe
movl $0x3, %r14d
jmp 0x175cb
movq %r15, (%rsp)
movq %rbp, %rdi
leaq 0x1f517(%rip), %rsi     # 0x369d7
leaq 0x1f51f(%rip), %rdx     # 0x369e6
callq 0xc0a4
movl 0x28(%rsp), %esi
movq %rbp, %rdi
callq 0x34811
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x175c5
movq 0x10(%rsp), %rsi
jmp 0x175bd
xorl %r14d, %r14d
jmp 0x175cb
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 0x1f820(%rip), %rsi     # 0x36d42
callq 0x7560
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x17548
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1754f
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 0x34811
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x17589
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x175a0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x175c5
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x72c0
movl $0x1, %r14d
leaq 0x2f70e(%rip), %rax     # 0x46ce0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x175f3
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x17602
callq 0x81ea
testl %r14d, %r14d
je 0x17313
cmpl $0x1, %r14d
jne 0x17669
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 0x32f76
leaq 0x2f69f(%rip), %rax     # 0x46ce0
movq %rax, (%r14)
movq 0x10(%r14), %rdi
leaq 0xd8(%rsp), %rax
movb $0x1, %bl
cmpq %rax, %rdi
je 0x17613
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17613
movb $0x1, %bl
jmp 0x17613
movq %rax, %rbx
leaq 0x2f669(%rip), %rax     # 0x46ce0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x17781
movq 0x40(%rsp), %rsi
jmp 0x1772f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x17743
movq 0x10(%rsp), %rsi
jmp 0x17711
jmp 0x17740
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x176d3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x176d3
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x176f4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x176f4
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x17743
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17743
jmp 0x17740
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x17781
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17781
movq %rax, %rbx
jmp 0x17781
jmp 0x17740
movq %rax, %rbx
leaq 0x2f596(%rip), %rax     # 0x46ce0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x17772
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x17772
jmp 0x1776f
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x17781
callq 0x81ea
movq %rbx, %rdi
callq 0x74f0
nop