// File: /workspace/github_cpp_makefile_star2_O1/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: LocalVarToken::output(Parser*, std::shared_ptr<FunctionToken> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void LocalVarToken::output(Parser *parser,
			   const std::shared_ptr<FunctionToken>&,
			   const std::string&,
			   const std::string&,
			   const std::string&) {
  // If this is an array, store the address of the data in the variable's
  // location.
  if (_type.isArray()) {
    // Store the location of the array at the variable's location.
    if (this->isReg()) {
      // Store FP + _dataOffset in the variable's register.
      parser->writeInst("MOV " + this->getReg() + " FP");
      if (0 != _dataOffset) {
        parser->writeInst("MOVI L " + toHexStr(_dataOffset));
        parser->writeInst("ADD " + this->getReg() + " L");
      }
    } else {
      // Store FP + _offset in M
      parser->writeInst("MOV M FP");
      if (0 != _offset) {
        parser->writeInst("MOVI L " + toHexStr(_offset));
        parser->writeInst("ADD M L");
      }
      // Store FP + _dataOffset in N
      parser->writeInst("MOV N FP");
      if (0 != _dataOffset) {
        parser->writeInst("MOVI L " + toHexStr(_dataOffset));
        parser->writeInst("ADD N L");
      }
      // Store the data offset in the variable's location relative to
      // the frame pointer.
      parser->writeInst("STOR N M");
    }
  }
  // If there is no initial value, do nothing else.
  if (_initExprs.empty()) {
    return;
  }
  // Store initial values.
  if (_type.isArray()) {
    for (size_t i = 0; i < _initExprs.size(); i++) {
      // Output initial expressions for each element.
      _initExprs[i]->output(parser, VarLocation(_dataOffset + (DATA_SIZE * i)));
    }
  } else {
    // Output initial expression for the scalar, to either the register
    // or frame pointer offset.
    _initExprs[0]->output(parser, VarLocation(_reg, _offset));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x68(%rdi)
jne 0x200ca
movq 0x18(%r14), %rdx
testq %rdx, %rdx
je 0x1fb9a
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%r14), %rsi
addq %rsi, %rdx
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0xc014
leaq 0x165df(%rip), %rcx     # 0x36139
movl $0x4, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fc3d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1fc45
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x16e06(%rip), %rsi     # 0x369b1
leaq 0x16e07(%rip), %rdx     # 0x369b9
movq %rsp, %rdi
callq 0xc0a4
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1fbdb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movl 0x30(%r14), %eax
testl %eax, %eax
je 0x1ff61
movzwl %ax, %esi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x4, %edx
callq 0x33cd0
leaq 0x16c18(%rip), %rcx     # 0x3681b
movl $0x7, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fecc
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fed4
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1711e(%rip), %rsi     # 0x36d86
callq 0x7560
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fc93
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fc9a
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1fcd2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x1fce9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x1fd00
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movzwl 0xb0(%r14), %eax
testw %ax, %ax
je 0x200ca
movzwl %ax, %esi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x4, %edx
callq 0x33cd0
leaq 0x16aee(%rip), %rcx     # 0x3681b
movl $0x7, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
movq %rbp, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fd60
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fd67
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1fd9f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x1fdb6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x48(%rsp), %r15
movq %r12, (%r15)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xc014
leaq 0x170ae(%rip), %rcx     # 0x36e86
movl $0x4, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
movq %r13, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fe0d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1fe15
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x16c9f(%rip), %rsi     # 0x36ad7
callq 0x7560
movq %rbp, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fe5e
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fe65
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1fe9d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x1feb4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x200ca
movq 0x58(%rsp), %rsi
jmp 0x200c2
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1ff0c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ff27
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x16a86(%rip), %rsi     # 0x369ba
leaq 0x16a86(%rip), %rdx     # 0x369c1
callq 0xc0a4
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1ff61
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x16f1d(%rip), %rsi     # 0x36e8b
leaq 0x16f1e(%rip), %rdx     # 0x36e93
callq 0xc0a4
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1ff9b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movzwl 0xb0(%r14), %eax
testw %ax, %ax
je 0x20090
movzwl %ax, %esi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x4, %edx
callq 0x33cd0
leaq 0x16853(%rip), %rcx     # 0x3681b
movl $0x7, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fffb
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x20003
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2003b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20056
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x16e31(%rip), %rsi     # 0x36e94
leaq 0x16e31(%rip), %rdx     # 0x36e9b
callq 0xc0a4
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x20090
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1671b(%rip), %rsi     # 0x367b8
leaq 0x1671c(%rip), %rdx     # 0x367c0
callq 0xc0a4
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xadb2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x200ca
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x98(%r14), %rax
cmpq 0xa0(%r14), %rax
je 0x201c2
cmpb $0x1, 0x68(%r14)
jne 0x20173
movq 0x98(%r14), %rax
cmpq %rax, 0xa0(%r14)
je 0x201c2
leaq 0x10(%rsp), %r12
xorl %r13d, %r13d
movq %rsp, %r15
xorl %ebp, %ebp
movq (%rax,%r13,8), %rdi
movzwl 0xb0(%r14), %eax
addl %r13d, %eax
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movl %eax, 0x20(%rsp)
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1592e
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x20150
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
incq %rbp
movq 0x98(%r14), %rax
movq 0xa0(%r14), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x2, %r13
cmpq %rcx, %rbp
jb 0x2010a
jmp 0x201c2
movq (%rax), %r15
movl 0x30(%r14), %ebp
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0xc014
movl %ebp, 0x20(%r14)
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1592e
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x201c2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x202b1
jmp 0x20227
jmp 0x201e3
jmp 0x201fe
jmp 0x202b1
jmp 0x20227
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x20201
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x20201
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x2025d
jmp 0x202ca
jmp 0x202b1
jmp 0x20227
jmp 0x202b1
jmp 0x20227
jmp 0x202b1
movq %rax, %rbx
jmp 0x202ca
jmp 0x20266
jmp 0x20281
jmp 0x2029d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x20253
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x20253
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x202ca
movq 0x38(%rsp), %rsi
jmp 0x202c2
jmp 0x202b1
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x20284
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x20284
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x202a0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x202a0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x202ca
movq 0x58(%rsp), %rsi
jmp 0x202c2
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x202ca
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rbx, %rdi
callq 0x74f0