// File: /workspace/github_cpp_makefile_star2_O3/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: GlobalVarToken::output(Parser*)
void GlobalVarToken::output(Parser *parser) {
  // Write out a label for the global variable.
  parser->writeln(_name + ":");
  if (_type.isArray()) {
    // The address for the array's elements will be the current byte
    // position plus the instruction size.
    parser->writeData(toHexStr(parser->getBytePos() + INST_SIZE), 1);
    // Write out the array's elements as hex values.
    std::string dataOutput;
    for (size_t i = 0; i < _arrayValues.size(); i++) {
      dataOutput += toHexStr(_arrayValues[i]);
      if (i + 1 < _arrayValues.size()) {
        dataOutput += " ";
      }
    }
    parser->writeData(dataOutput, _arrayValues.size());
  } else {
    // Not an array, just write out the single hex value.
    parser->writeData(toHexStr(_value), 1);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x70(%rdi), %rsi
movq 0x78(%rdi), %rdx
addq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0xbd58
leaq 0x1f5fb(%rip), %rsi     # 0x37670
movq %r15, %rdi
callq 0x7560
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xaff2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1809e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
cmpb $0x1, 0x68(%r14)
jne 0x181ab
movl 0x290(%rbx), %eax
addl $0x4, %eax
movzwl %ax, %esi
movq %rsp, %r15
movq %r15, %rdi
movl $0x4, %edx
callq 0x33681
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xb0e2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x180eb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rbx, 0x20(%rsp)
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq 0x98(%r14), %rax
movq 0xa0(%r14), %rdx
subq %rax, %rdx
je 0x181f8
leaq 0x38(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x28(%rsp), %r15
movq %rsp, %r12
leaq 0x1d016(%rip), %r13     # 0x35145
movzwl (%rax,%rbx,2), %esi
movq %r15, %rdi
movl $0x4, %edx
callq 0x33681
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r12, %rdi
callq 0x70d0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x18169
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x72c0
incq %rbx
movq 0x98(%r14), %rax
movq 0xa0(%r14), %rdx
subq %rax, %rdx
sarq %rdx
cmpq %rdx, %rbx
jae 0x181a4
movq %r12, %rdi
movq %r13, %rsi
callq 0x7560
movq 0x98(%r14), %rax
movq 0xa0(%r14), %rdx
subq %rax, %rdx
sarq %rdx
cmpq %rdx, %rbx
jb 0x1812f
jmp 0x181fb
movzwl 0x92(%r14), %esi
movq %rsp, %r14
movq %r14, %rdi
movl $0x4, %edx
callq 0x33681
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xb0e2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x181e9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
sarq %rdx
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0xb0e2
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
jne 0x181dc
jmp 0x181e9
jmp 0x18230
jmp 0x18220
jmp 0x18220
jmp 0x18220
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x1825d
jmp 0x1826a
jmp 0x18230
movq %rax, %rbx
jmp 0x1824f
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1824f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x72c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1826a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rbx, %rdi
callq 0x74f0