// File: /workspace/github_cpp_makefile_star2_O3/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: TypeToken::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 TypeToken::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) {
  AtomToken typeName = tokenizer->getNext();
  if (!isType(typeName.str())) {
    _error("Invalid type '" + typeName.str() + "'.", typeName.line());
    return false;
  }
  _lineNum = typeName.line();
  _name = typeName.str();
  if ("[" == tokenizer->peekNext().str()) {
    tokenizer->getNext();
    _isArray = true;
    ExprToken expr;
    if (!expr.parse(tokenizer, functions, globals, parameters, localVars)) {
      return false;
    }
    if (!expr.isConst()) {
      _error("Array size must be known at compile time.", expr.line());
      return false;
    }
    _arraySize = expr.val();
    if (!_expect(tokenizer, "]")) {
      return false;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movq %rcx, %rbp
movq %rdx, 0x50(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x32902
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0xbd58
leaq 0x20(%rsp), %rdi
callq 0x3414a
movl %eax, %r15d
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x10e6d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %r15b, %r15b
je 0x10f4d
movl 0x70(%rsp), %eax
movl %eax, 0x8(%r14)
leaq 0x20(%rsp), %rdi
movq %r12, (%rdi)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x10(%r14), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x7370
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x10ec1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x32bec
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xbd58
leaq 0x24701(%rip), %rsi     # 0x355f4
movq %rsp, %r12
movq %r12, %rdi
callq 0x70c0
movl %eax, %r15d
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x10f17
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x34df2(%rip), %r12     # 0x45d10
leaq 0x40(%rsp), %rax
movq %r12, -0x20(%rax)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10f3d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %r15d, %r15d
je 0x11011
movb $0x1, %bl
jmp 0x111d1
leaq 0xa8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0xbd58
leaq 0x248ec(%rip), %rcx     # 0x35869
leaq 0x98(%rsp), %rdi
movl $0xe, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x10fba
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x10fc1
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x24d60(%rip), %rsi     # 0x35d42
callq 0x7560
movq %r12, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x11108
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x11110
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
callq 0x32902
leaq 0xd8(%rsp), %rax
movq %r12, -0x20(%rax)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11046
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x72c0
movb $0x1, %al
movb %al, 0x30(%r14)
leaq 0x20(%rsp), %rdi
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x34fd9(%rip), %r15     # 0x46038
movq %r15, (%rdi)
movb %al, 0xc(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0xe(%rdi)
movups %xmm0, 0x18(%rdi)
movq %rbx, %rsi
movq 0x50(%rsp), %rdx
movq %rbp, %rcx
movq 0x58(%rsp), %r8
movq 0x60(%rsp), %r9
callq 0x1131a
testb %al, %al
je 0x111c1
cmpb $0x0, 0x2c(%rsp)
je 0x11181
movzwl 0x2e(%rsp), %eax
movw %ax, 0x32(%r14)
movq %rsp, %rdi
leaq 0x10(%rsp), %r14
movq %r14, (%rdi)
leaq 0x247e9(%rip), %rsi     # 0x358a2
leaq 0x247e3(%rip), %rdx     # 0x358a3
callq 0xbdee
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x342b6
movl %eax, %ebx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x110ed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x30(%rsp), %rdi
movq %r15, -0x10(%rdi)
callq 0x219de
testb %bl, %bl
jne 0x10f46
jmp 0x111cf
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x70(%rsp), %esi
callq 0x34178
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1114c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x11162
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x111cf
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x111cf
movq %rsp, %rdi
leaq 0x10(%rsp), %r14
movq %r14, (%rdi)
leaq 0x246e5(%rip), %rsi     # 0x35878
leaq 0x24707(%rip), %rdx     # 0x358a1
callq 0xbdee
movl 0x28(%rsp), %esi
movq %rsp, %rdi
callq 0x34178
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x111c1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x30(%rsp), %rdi
movq %r15, -0x10(%rdi)
callq 0x219de
xorl %ebx, %ebx
leaq 0x34b38(%rip), %rax     # 0x45d10
leaq 0x88(%rsp), %rcx
movq %rax, -0x20(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x111fd
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x72c0
movl %ebx, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11213
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x11235
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x11235
jmp 0x11232
jmp 0x11232
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
movq %r15, -0x10(%rdi)
callq 0x219de
jmp 0x112e6
jmp 0x112e3
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1126c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1126c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x112aa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x112aa
movq %rax, %rbx
leaq 0x34a82(%rip), %rax     # 0x45d10
leaq 0x40(%rsp), %rcx
movq %rax, -0x20(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x112e6
movq 0x40(%rsp), %rsi
jmp 0x112d9
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x112e6
movq 0xa8(%rsp), %rsi
jmp 0x112d9
jmp 0x112e3
jmp 0x112e3
jmp 0x112e3
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x112e6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x112e6
movq %rax, %rbx
leaq 0x34a23(%rip), %rax     # 0x45d10
leaq 0x88(%rsp), %rcx
movq %rax, -0x20(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x11312
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rbx, %rdi
callq 0x74f0