// File: /workspace/github_cpp_makefile_star2_O3/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: FunctionToken::output(Parser*)
void FunctionToken::output(Parser *parser) {
  // Check if this is a builtin function, in which case we should
  // do nothing.
  if (isBuiltin(_name)) {
    return;
  }
  // Create an end label for the function, so if we return we can jump
  // to it without having to unwind the stack each time.
  std::string endLabel = parser->getUnusedLabel(_name + "_end");
  // Create a label for the function so that we can CALL it.
  parser->writeln(_name + ":");
  // Assign registers or stack positions to parameters. Parameters can
  // be stored in registers "A" through "D", and if there are more than
  // 4 parameters they will be stored on the stack before the return
  // address. The return address is stored at FP, so the first
  // overflow parameter will be stored at -2, the next at -4, etc.
  std::string reg = "A";
  int offset = -ADDRESS_SIZE;
  int numOverflowParams = 0;
  for (auto param : _parameters) {
    if (reg[0] <= 'D') {
      param->setReg(reg);
      reg[0]++;
    } else {
      param->setOffset(offset);
      offset -= DATA_SIZE;
      numOverflowParams++;
    }
  }
  // Assign registers or stack positions to local variables. Local
  // variables can be stored in registers "E" through "K", and if there
  // are more local variables than can fit in registers we store them
  // as frame pointer offsets. The offset starts at 0 and increases from
  // there.
  reg = "E";
  offset = 0;
  int extraParamOffset = 0;
  for (auto local : _localVars) {
    if (reg[0] <= 'K' && local->canBeReg()) {
      local->setReg(reg);
      // This is a callee-saved register, push it onto the stack and
      // make a note that we need to pop it later.
      parser->writeInst("PUSH " + reg);
      _savedRegisters.push(reg);
      extraParamOffset -= DATA_SIZE;
      // Increment the register
      reg[0]++;
    } else {
      local->setOffset(offset);
      offset += DATA_SIZE;
    }
    // If this is an array, reserve space for the array's data.
    if (local->type().isArray()) {
      // The data offset is at the current stack offset + DATA_SIZE.
      // We must add DATA_SIZE because the stack pointer points at an
      // address that's in use, and we want the next unused address.
      local->setDataOffset(offset + DATA_SIZE);
      offset += local->type().arraySize() * DATA_SIZE;
    }
  }
  // Save the previous value of the frame pointer.
  parser->writeInst("PUSH FP");
  _savedRegisters.push("FP");
  extraParamOffset -= DATA_SIZE;
  // Set the frame pointer to the stack's current location.
  parser->writeInst("MOV FP SP");
  // Store parameters on the stack if they are currently stored in
  // registers but are flagged as needing their own address. Also fix
  // offset for parameters on the stack based on the number of saved
  // registers.
  for (auto param : _parameters) {
    if (param->isReg() && !param->canBeReg()) {
      parser->writeInst("PUSH " + param->getReg());
      param->setOffset(offset);
      offset += DATA_SIZE;
    } else if (!param->isReg()) {
      param->setOffset(param->getOffset() + extraParamOffset);
    }
  }
  // Reserve space for the local variable storage on the stack.
  if (0 < offset) {
    parser->writeInst("MOVI L " + toHexStr(offset));
    parser->writeInst("ADD SP L");
  }

  // Outputs initial values of local variables.
  for (auto local : _localVars) {
    local->output(parser);
  }

  // Assign assembly-level labels to all label declarations.
  for (auto label : _labels) {
    std::string asmLabel = parser->getUnusedLabel(_name + "_" + label->name());
    label->setAsmLabel(asmLabel);
  }

  // Output assembly code for the rest of the statement types.
  for (auto statement : _statements) {
    statement->output(parser, shared_from_this(), endLabel);
  }

  // Unwind the stack, popping the saved registers, then return.
  // We have a label here so that when we have return statements
  // they can jump here without having to unwind the stack in
  // multiple places.
  parser->writeln(endLabel + ":");
  parser->writeInst("MOV SP FP");
  while (!_savedRegisters.empty()) {
    parser->writeInst("POP " + _savedRegisters.top());
    _savedRegisters.pop();
  }
  // If there are overflow parameters, pop them off the stack in
  // addition to jumping to the return address.
  if (0 < numOverflowParams) {
    parser->writeInst("RET " + toHexStr(numOverflowParams * DATA_SIZE, 2));
  } else {
    parser->writeInst("RET");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, 0x40(%rsp)
movq %rdi, %r12
addq $0x58, %rdi
callq 0x339f0
testb %al, %al
jne 0x1bbb9
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x58(%r12), %rsi
movq 0x60(%r12), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xbd58
leaq 0x1b109(%rip), %rsi     # 0x35edb
movq %rbx, %rdi
callq 0x7560
leaq 0x108(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq 0x40(%rsp), %rsi
callq 0xa73a
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ae08
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
movq 0x58(%r12), %rsi
movq 0x60(%r12), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x1c847(%rip), %rsi     # 0x37670
leaq 0x8(%rsp), %rdi
callq 0x7560
leaq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xaff2
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ae59
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0xe0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1a9ef(%rip), %rsi     # 0x3585b
leaq 0x1a9e9(%rip), %rdx     # 0x3585c
leaq 0xd0(%rsp), %rdi
callq 0xbdee
movq 0x78(%r12), %r15
movq %r12, 0x70(%rsp)
movq 0x80(%r12), %r12
cmpq %r12, %r15
je 0x1af22
movl $0x0, 0x84(%rsp)
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
leaq 0xd0(%rsp), %rbx
movq 0x2c0de(%rip), %r13     # 0x46f98
movq (%r15), %rdi
movq 0x8(%r15), %r14
testq %r14, %r14
je 0x1aed8
cmpb $0x0, (%r13)
je 0x1aed3
incl 0x8(%r14)
jmp 0x1aed8
lock
incl 0x8(%r14)
movq 0xd0(%rsp), %rax
cmpb $0x44, (%rax)
jg 0x1aefd
addq $0x10, %rdi
movq %rbx, %rsi
callq 0x71a0
movq 0xd0(%rsp), %rax
incb (%rax)
jmp 0x1af0a
movl %ebp, 0x30(%rdi)
addl $-0x2, %ebp
incl 0x84(%rsp)
testq %r14, %r14
je 0x1af17
movq %r14, %rdi
callq 0x8036
addq $0x10, %r15
cmpq %r12, %r15
jne 0x1aeba
jmp 0x1af2d
movl $0x0, 0x84(%rsp)
leaq 0xd0(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x1a91f(%rip), %rcx     # 0x3585f
xorl %ebx, %ebx
movl $0x1, %r8d
xorl %esi, %esi
callq 0x7450
movq 0x70(%rsp), %r15
movq 0x90(%r15), %r12
movq 0x98(%r15), %rax
movq %rax, 0x100(%rsp)
cmpq %rax, %r12
je 0x1b186
leaq 0xf0(%r15), %rax
movq %rax, 0xf8(%rsp)
leaq 0x28(%rsp), %r14
xorl %ebx, %ebx
leaq 0xd0(%rsp), %r13
leaq 0x8(%rsp), %rbp
movl $0x0, 0x6c(%rsp)
movq (%r12), %r15
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x1afc1
movq 0x2bfe5(%rip), %rcx     # 0x46f98
cmpb $0x0, (%rcx)
je 0x1afbd
incl 0x8(%rax)
jmp 0x1afc1
lock
incl 0x8(%rax)
movq %rax, 0xa8(%rsp)
movq 0xd0(%rsp), %rax
cmpb $0x4b, (%rax)
jg 0x1b048
cmpb $0x1, 0x90(%r15)
jne 0x1b048
leaq 0x10(%r15), %rdi
movq %r13, %rsi
callq 0x71a0
movq %rbp, %rdi
leaq 0x1a159(%rip), %rsi     # 0x3514f
movq %r13, %rdx
callq 0xb692
movq 0x40(%rsp), %rdi
movq %rbp, %rsi
callq 0xab5a
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1b027
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0xf8(%rsp), %rdi
movq %r13, %rsi
callq 0x3030c
addl $-0x2, 0x6c(%rsp)
movq 0xd0(%rsp), %rax
incb (%rax)
jmp 0x1b04f
movl %ebx, 0x30(%r15)
addl $0x2, %ebx
movq %rbx, 0x78(%rsp)
movq %r12, 0xf0(%rsp)
movq %rbp, %r12
movl 0x40(%r15), %eax
movl %eax, 0x10(%rsp)
leaq 0x2ace2(%rip), %rbp     # 0x45d50
movq %rbp, 0x8(%rsp)
movq %r14, 0x18(%rsp)
movq 0x48(%r15), %rsi
movq 0x50(%r15), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %rdi
callq 0xbd58
movq %r14, %rax
movl 0x68(%r15), %r14d
movl %r14d, 0x38(%rsp)
movq %rbp, 0x8(%rsp)
movq 0x18(%rsp), %rdi
cmpq %rax, %rdi
je 0x1b0b5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x72c0
testb $0x1, %r14b
je 0x1b141
movq 0x78(%rsp), %rax
addl $0x2, %eax
movw %ax, 0xb0(%r15)
movl 0x40(%r15), %eax
movl %eax, 0x10(%rsp)
leaq 0x2ac72(%rip), %rbx     # 0x45d50
movq %rbx, 0x8(%rsp)
leaq 0x28(%rsp), %r14
movq %r14, 0x18(%rsp)
movq 0x48(%r15), %rsi
movq 0x50(%r15), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %rdi
callq 0xbd58
movl 0x68(%r15), %ebp
movl %ebp, 0x38(%rsp)
movq %rbx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
movq %r12, %r15
movq 0xf0(%rsp), %r12
je 0x1b131
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x72c0
shrl $0x10, %ebp
movq 0x78(%rsp), %rbx
leal (%rbx,%rbp,2), %ebx
movq %r15, %rbp
jmp 0x1b156
leaq 0x28(%rsp), %r14
movq 0x78(%rsp), %rbx
movq %r12, %rbp
movq 0xf0(%rsp), %r12
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b168
callq 0x8036
addq $0x10, %r12
cmpq 0x100(%rsp), %r12
jne 0x1af9e
addl $-0x2, 0x6c(%rsp)
movq 0x70(%rsp), %r15
jmp 0x1b18e
movl $0xfffffffe, 0x6c(%rsp) # imm = 0xFFFFFFFE
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r14
movq %r14, (%rdi)
leaq 0x1abe0(%rip), %rsi     # 0x35d82
leaq 0x1abe0(%rip), %rdx     # 0x35d89
callq 0xbdee
leaq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b1d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x1aba4(%rip), %rsi     # 0x35d87
leaq 0x1ab9f(%rip), %rdx     # 0x35d89
callq 0xbdee
leaq 0xf0(%r15), %r12
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x2f9b6
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b21a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x1ab61(%rip), %rsi     # 0x35d8a
leaq 0x1ab63(%rip), %rdx     # 0x35d93
callq 0xbdee
leaq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xab5a
movq %r12, 0xa8(%rsp)
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b263
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x78(%r15), %r13
movq 0x80(%r15), %rbp
cmpq %rbp, %r13
je 0x1b3b0
leaq 0x48(%rsp), %r14
movq (%r13), %r12
movq 0x8(%r13), %r15
testq %r15, %r15
je 0x1b2a0
movq 0x2bd08(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x1b29b
incl 0x8(%r15)
jmp 0x1b2a0
lock
incl 0x8(%r15)
movq 0x18(%r12), %rdx
testq %rdx, %rdx
je 0x1b314
cmpb $0x0, 0x90(%r12)
jne 0x1b391
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x10(%r12), %rsi
addq %rsi, %rdx
movq %r14, %rdi
callq 0xbd58
movl $0x5, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x19e68(%rip), %rcx     # 0x3514f
callq 0x7320
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b31f
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1b325
movl 0x6c(%rsp), %eax
addl %eax, 0x30(%r12)
jmp 0x1b391
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xab5a
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1b368
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1b384
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movl %ebx, 0x30(%r12)
addl $0x2, %ebx
leaq 0x48(%rsp), %r14
testq %r15, %r15
je 0x1b3a3
movq %r15, %rdi
callq 0x8036
leaq 0x48(%rsp), %r14
addq $0x10, %r13
cmpq %rbp, %r13
jne 0x1b27c
testl %ebx, %ebx
movq 0x70(%rsp), %r14
jle 0x1b4b1
movzwl %bx, %esi
leaq 0x48(%rsp), %rdi
movl $0x4, %edx
callq 0x33681
leaq 0x1a445(%rip), %rcx     # 0x3581b
leaq 0x48(%rsp), %rdi
movl $0x7, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
leaq 0x18(%rsp), %rbx
movq %rbx, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b412
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1b418
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b455
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b470
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x1a915(%rip), %rsi     # 0x35d94
leaq 0x1a916(%rip), %rdx     # 0x35d9c
callq 0xbdee
leaq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b4b1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x90(%r14), %r13
movq 0x98(%r14), %rbp
cmpq %rbp, %r13
je 0x1b604
leaq 0x1ac00(%rip), %r12     # 0x360cf
leaq 0x88(%rsp), %rbx
movq (%r13), %r14
movq 0x8(%r13), %r15
testq %r15, %r15
je 0x1b4fb
movq 0x2baad(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x1b4f6
incl 0x8(%r15)
jmp 0x1b4fb
lock
incl 0x8(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0xbdee
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0xbdee
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0xbdee
movq (%r14), %rax
movq %r14, %rdi
movq 0x40(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x48(%rsp), %r8
movq %rbx, %r9
callq *0x8(%rax)
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x1b5a0
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1b5bc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1b5d8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b5ea
callq 0x8036
testq %r15, %r15
je 0x1b5f7
movq %r15, %rdi
callq 0x8036
addq $0x10, %r13
cmpq %rbp, %r13
jne 0x1b4d7
movq 0x70(%rsp), %rax
movq 0xa8(%rax), %rbp
movq 0xb0(%rax), %rax
movq %rax, 0x78(%rsp)
cmpq %rax, %rbp
je 0x1b825
leaq 0x98(%rsp), %r14
leaq 0x58(%rsp), %rbx
leaq 0x88(%rsp), %r13
movq (%rbp), %r15
movq 0x8(%rbp), %r12
testq %r12, %r12
je 0x1b660
movq 0x2b94a(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x1b65a
incl 0x8(%r12)
jmp 0x1b660
lock
incl 0x8(%r12)
movq %r14, 0x88(%rsp)
movq 0x70(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xbd58
movq %r13, %rdi
leaq 0x1a713(%rip), %rsi     # 0x35d9d
callq 0x7560
leaq 0xc0(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
addq %rsi, %rdx
leaq 0xb0(%rsp), %rdi
callq 0xbd58
movq 0x88(%rsp), %rcx
movl $0xf, %edi
cmpq %r14, %rcx
je 0x1b6d1
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %r8
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x1b711
movl $0xf, %edi
leaq 0xc0(%rsp), %r9
cmpq %r9, %rsi
je 0x1b70c
movq 0xc0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1b71b
movq %r13, %rdi
callq 0x70d0
jmp 0x1b72c
leaq 0xb0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
movq %rbx, 0x48(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x1b74c
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x1b752
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xa73a
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b79a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x1b7bf
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b7dc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x72c0
addq $0x30, %r15
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x71a0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1b809
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
testq %r12, %r12
je 0x1b816
movq %r12, %rdi
callq 0x8036
addq $0x10, %rbp
cmpq 0x78(%rsp), %rbp
jne 0x1b63a
movq 0x70(%rsp), %rax
movq 0xd8(%rax), %rbx
movq 0xe0(%rax), %rbp
cmpq %rbp, %rbx
je 0x1b94d
movq 0x70(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x78(%rsp)
leaq 0x1a879(%rip), %r13     # 0x360cf
leaq 0x48(%rsp), %r14
movq (%rbx), %r12
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x1b87e
movq 0x2b72a(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x1b879
incl 0x8(%r15)
jmp 0x1b87e
lock
incl 0x8(%r15)
leaq 0x88(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x31260
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r13, %rdx
callq 0xbdee
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %r13, %rdx
callq 0xbdee
movq (%r12), %rax
movq %r12, %rdi
movq 0x40(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x108(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %r14, %r9
callq *0x8(%rax)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1b905
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1b921
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x1b933
callq 0x8036
testq %r15, %r15
je 0x1b940
movq %r15, %rdi
callq 0x8036
addq $0x10, %rbx
cmpq %rbp, %rbx
jne 0x1b85b
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r12
movq %r12, (%rdi)
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x1bcf7(%rip), %rsi     # 0x37670
leaq 0x8(%rsp), %rdi
callq 0x7560
movq 0x70(%rsp), %r13
movq 0xa8(%rsp), %rbp
leaq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xaff2
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b9b6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x1a3da(%rip), %rsi     # 0x35d9f
leaq 0x1a3dc(%rip), %rdx     # 0x35da8
callq 0xbdee
leaq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b9f7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x120(%r13), %rdx
cmpq 0x100(%r13), %rdx
je 0x1ba7b
movl $0x200, %r15d           # imm = 0x200
leaq 0x19720(%rip), %rbx     # 0x35134
leaq 0x8(%rsp), %r14
cmpq 0x128(%r13), %rdx
jne 0x1ba30
movq 0x138(%r13), %rax
movq -0x8(%rax), %rdx
addq %r15, %rdx
addq $-0x20, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb692
movq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ba63
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rbp, %rdi
callq 0x30170
movq 0x120(%r13), %rdx
cmpq 0x100(%r13), %rdx
jne 0x1ba19
movl 0x84(%rsp), %eax
testl %eax, %eax
jle 0x1bad8
addl %eax, %eax
movzwl %ax, %esi
leaq 0x48(%rsp), %rdi
movl $0x2, %edx
callq 0x33681
leaq 0x1a308(%rip), %rcx     # 0x35da9
leaq 0x48(%rsp), %rdi
movl $0x4, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7320
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1bb13
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1bb1b
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x1a2c7(%rip), %rsi     # 0x35dae
leaq 0x1a2c3(%rip), %rdx     # 0x35db1
callq 0xbdee
leaq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1bb73
movq 0x18(%rsp), %rsi
jmp 0x1bb6b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1bb58
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1bb73
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x1bb98
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1bbb9
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x72c0
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1bd72
jmp 0x1bd6a
movq %rax, %r13
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x1bc13
jmp 0x1bc25
jmp 0x1bc22
jmp 0x1bd6a
movq %rax, %r13
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
jne 0x1bd83
jmp 0x1bf2f
jmp 0x1bd6a
movq %rax, %r13
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1bc25
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1bc25
movq %rax, %r13
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1bf2f
movq 0x58(%rsp), %rsi
jmp 0x1bd88
jmp 0x1bd6a
jmp 0x1bd72
jmp 0x1bd6a
jmp 0x1bd72
jmp 0x1bd72
jmp 0x1bd6a
jmp 0x1bc6d
jmp 0x1bd6a
jmp 0x1bc6d
jmp 0x1bd6a
movq %rax, %r13
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x1bd83
jmp 0x1bf2f
jmp 0x1bd6a
jmp 0x1bd6a
jmp 0x1bcac
jmp 0x1bc91
movq %rax, %r13
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1bf54
movq 0x18(%rsp), %rsi
jmp 0x1bf4c
movq %rax, %r13
jmp 0x1bf54
jmp 0x1bcb6
movq %rax, %r13
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1bf75
movq 0x18(%rsp), %rsi
jmp 0x1bf6d
movq %rax, %r13
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1bf17
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1bf17
jmp 0x1bf14
jmp 0x1bd95
movq %rax, %r13
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1bd27
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1bd27
movq %rax, %r13
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1bf0a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1bf0a
jmp 0x1bf14
jmp 0x1bf14
movq %rax, %r13
testq %r14, %r14
je 0x1bf2f
movq %r14, %rdi
jmp 0x1bf2a
movq %rax, %r13
jmp 0x1bf2f
movq %rax, %r13
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1bf2f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1bf2f
movq %rax, %r13
jmp 0x1bf0a
movq %rax, %r13
jmp 0x1bde2
movq %rax, %r13
jmp 0x1bdc6
movq %rax, %r13
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1bdc6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1bde2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x90(%rsp), %rdi
jmp 0x1bf00
movq %rax, %r13
jmp 0x1be78
jmp 0x1bdf9
movq %rax, %r13
jmp 0x1be42
movq %rax, %r13
jmp 0x1be1d
movq %rax, %r13
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1be1d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x1be42
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x1be78
movq 0x98(%rsp), %rsi
jmp 0x1be70
movq %rax, %r13
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1be78
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
testq %r12, %r12
je 0x1bf2f
movq %r12, %rdi
jmp 0x1bf2a
movq %rax, %r13
jmp 0x1bef8
movq %rax, %r13
jmp 0x1bedc
movq %rax, %r13
jmp 0x1bec0
movq %rax, %r13
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x1bec0
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1bedc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1bef8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x1bf0a
callq 0x8036
testq %r15, %r15
je 0x1bf2f
movq %r15, %rdi
jmp 0x1bf2a
movq %rax, %r13
cmpq $0x0, 0xa8(%rsp)
je 0x1bf2f
movq 0xa8(%rsp), %rdi
callq 0x8036
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x1bf54
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1bf75
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %r13, %rdi
callq 0x74f0
nop