// File: rfotino[P]consolite-compiler/src/syntax.cpp
// Function: FunctionCallToken::output(Parser*)
void FunctionCallToken::output(Parser *parser) {
  // Check if the function is a builtin, in which case the assembly
  // output will look different (with no CALL instruction).
  if ("COLOR" == _funcName) {
    // Signature is "void COLOR(uint16 color)"
    _arguments[0]->output(parser, VarLocation("M"));
    parser->writeInst("COLOR M");
  } else if ("PIXEL" == _funcName) {
    // Signature is "void PIXEL(uint16 x, uint16 y)"
    _arguments[0]->output(parser, VarLocation("M"));
    _arguments[1]->output(parser, VarLocation("N"));
    parser->writeInst("PIXEL M N");
  } else if ("TIMERST" == _funcName) {
    // Signatue is "void TIMERST()"
    parser->writeInst("TIMERST");
  } else if ("TIME" == _funcName) {
    // Signature is "uint16 TIME()"
    parser->writeInst("TIME L");
  } else if ("INPUT" == _funcName) {
    // Signature is "uint16 INPUT(uint16 input_id)"
    _arguments[0]->output(parser, VarLocation("M"));
    parser->writeInst("INPUT L M");
  } else if ("RND" == _funcName) {
    // Signature is "uint16 RND()"
    parser->writeInst("RND L");
  } else {
    // Save registers A through D if we are using them as arguments.
    std::stack<std::string> savedRegisters;
    std::string reg = "A";
    for (size_t i = 0; i < 4 && i < _arguments.size(); i++, reg[0]++) {
      parser->writeInst("PUSH " + reg);
      savedRegisters.push(reg);
    }
    // Evaluate up to the first four arguments and store them in registers
    // A through D.
    reg = "A";
    for (size_t i = 0; i < 4 && i < _arguments.size(); i++, reg[0]++) {
      _arguments[i]->output(parser, VarLocation(reg));
    }
    // Push any overflow arguments onto the stack. In reverse order so that
    // it matches the callee's expectations of the order.
    for (int i = _arguments.size() - 1; 4 <= i; i--) {
      _arguments[i]->output(parser, VarLocation("L"));
      parser->writeInst("PUSH L");
    }
    // Call the function
    parser->writeInst("CALL " + _funcName);
    // Restore registers A through D if they were used as arguments.
    while (!savedRegisters.empty()) {
      parser->writeInst("POP " + savedRegisters.top());
      savedRegisters.pop();
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x540, %rsp            # imm = 0x540
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x3e8(%rbp)
addq $0x10, %rsi
leaq 0x4b900(%rip), %rdi     # 0x6f039
callq 0xd590
testb $0x1, %al
jne 0x23747
jmp 0x238cc
movq -0x3e8(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x33d60
movq %rax, %rdi
callq 0x33ae0
movq %rax, -0x400(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x3f8(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x8760
movq -0x3f0(%rbp), %rdx
leaq 0x4c01d(%rip), %rsi     # 0x6f7b0
leaq -0x58(%rbp), %rdi
callq 0xced0
jmp 0x2379e
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x33d80
jmp 0x237ad
movq -0x3f8(%rbp), %rsi
movq -0x400(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x22390
jmp 0x237c6
leaq -0x38(%rbp), %rdi
callq 0xe4c0
leaq -0x58(%rbp), %rdi
callq 0x8848
leaq -0x59(%rbp), %rdi
callq 0x8460
movq -0x10(%rbp), %rax
movq %rax, -0x410(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x8760
movq -0x408(%rbp), %rdx
leaq 0x4c334(%rip), %rsi     # 0x6fb41
leaq -0x90(%rbp), %rdi
callq 0xced0
jmp 0x2381b
movq -0x410(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xc600
jmp 0x23830
leaq -0x90(%rbp), %rdi
callq 0x8848
leaq -0x91(%rbp), %rdi
callq 0x8460
jmp 0x245a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23887
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2387e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xe4c0
leaq -0x58(%rbp), %rdi
callq 0x8848
leaq -0x59(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x238bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x8848
leaq -0x91(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq -0x3e8(%rbp), %rsi
addq $0x10, %rsi
leaq 0x4b76e(%rip), %rdi     # 0x6f04c
callq 0xd590
testb $0x1, %al
jne 0x238ec
jmp 0x23b96
movq -0x3e8(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x33d60
movq %rax, %rdi
callq 0x33ae0
movq %rax, -0x428(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0x8760
movq -0x418(%rbp), %rdx
leaq 0x4be75(%rip), %rsi     # 0x6f7b0
leaq -0xe0(%rbp), %rdi
callq 0xced0
jmp 0x23949
leaq -0xc0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x33d80
jmp 0x2395e
movq -0x420(%rbp), %rsi
movq -0x428(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x22390
jmp 0x2397a
leaq -0xc0(%rbp), %rdi
callq 0xe4c0
leaq -0xe0(%rbp), %rdi
callq 0x8848
leaq -0xe1(%rbp), %rdi
callq 0x8460
movq -0x3e8(%rbp), %rdi
addq $0x30, %rdi
movl $0x1, %esi
callq 0x33d60
movq %rax, %rdi
callq 0x33ae0
movq %rax, -0x440(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x438(%rbp)
leaq -0x131(%rbp), %rdi
movq %rdi, -0x430(%rbp)
callq 0x8760
movq -0x430(%rbp), %rdx
leaq 0x4be9a(%rip), %rsi     # 0x6f888
leaq -0x130(%rbp), %rdi
callq 0xced0
jmp 0x239fc
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x33d80
jmp 0x23a11
movq -0x438(%rbp), %rsi
movq -0x440(%rbp), %rdi
leaq -0x110(%rbp), %rdx
callq 0x22390
jmp 0x23a2d
leaq -0x110(%rbp), %rdi
callq 0xe4c0
leaq -0x130(%rbp), %rdi
callq 0x8848
leaq -0x131(%rbp), %rdi
callq 0x8460
movq -0x10(%rbp), %rax
movq %rax, -0x450(%rbp)
leaq -0x159(%rbp), %rdi
movq %rdi, -0x448(%rbp)
callq 0x8760
movq -0x448(%rbp), %rdx
leaq 0x4c0cc(%rip), %rsi     # 0x6fb49
leaq -0x158(%rbp), %rdi
callq 0xced0
jmp 0x23a8b
movq -0x450(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0xc600
jmp 0x23aa0
leaq -0x158(%rbp), %rdi
callq 0x8848
leaq -0x159(%rbp), %rdi
callq 0x8460
jmp 0x245a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23afd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23af1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xe4c0
leaq -0xe0(%rbp), %rdi
callq 0x8848
leaq -0xe1(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23b4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xe4c0
leaq -0x130(%rbp), %rdi
callq 0x8848
leaq -0x131(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23b85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x8848
leaq -0x159(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq -0x3e8(%rbp), %rsi
addq $0x10, %rsi
leaq 0x4b4ac(%rip), %rdi     # 0x6f054
callq 0xd590
testb $0x1, %al
jne 0x23bb6
jmp 0x23c59
movq -0x10(%rbp), %rax
movq %rax, -0x460(%rbp)
leaq -0x181(%rbp), %rdi
movq %rdi, -0x458(%rbp)
callq 0x8760
movq -0x458(%rbp), %rdx
leaq 0x4b472(%rip), %rsi     # 0x6f054
leaq -0x180(%rbp), %rdi
callq 0xced0
jmp 0x23bf0
movq -0x460(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0xc600
jmp 0x23c05
leaq -0x180(%rbp), %rdi
callq 0x8848
leaq -0x181(%rbp), %rdi
callq 0x8460
jmp 0x245a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23c48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x8848
leaq -0x181(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq -0x3e8(%rbp), %rsi
addq $0x10, %rsi
leaq 0x4b3f1(%rip), %rdi     # 0x6f05c
callq 0xd590
testb $0x1, %al
jne 0x23c79
jmp 0x23d1c
movq -0x10(%rbp), %rax
movq %rax, -0x470(%rbp)
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x468(%rbp)
callq 0x8760
movq -0x468(%rbp), %rdx
leaq 0x4beae(%rip), %rsi     # 0x6fb53
leaq -0x1a8(%rbp), %rdi
callq 0xced0
jmp 0x23cb3
movq -0x470(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xc600
jmp 0x23cc8
leaq -0x1a8(%rbp), %rdi
callq 0x8848
leaq -0x1a9(%rbp), %rdi
callq 0x8460
jmp 0x245a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23d0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x8848
leaq -0x1a9(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq -0x3e8(%rbp), %rsi
addq $0x10, %rsi
leaq 0x4b333(%rip), %rdi     # 0x6f061
callq 0xd590
testb $0x1, %al
jne 0x23d3c
jmp 0x23ee2
movq -0x3e8(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x33d60
movq %rax, %rdi
callq 0x33ae0
movq %rax, -0x488(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x480(%rbp)
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x478(%rbp)
callq 0x8760
movq -0x478(%rbp), %rdx
leaq 0x4ba25(%rip), %rsi     # 0x6f7b0
leaq -0x1f8(%rbp), %rdi
callq 0xced0
jmp 0x23d99
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x33d80
jmp 0x23dae
movq -0x480(%rbp), %rsi
movq -0x488(%rbp), %rdi
leaq -0x1d8(%rbp), %rdx
callq 0x22390
jmp 0x23dca
leaq -0x1d8(%rbp), %rdi
callq 0xe4c0
leaq -0x1f8(%rbp), %rdi
callq 0x8848
leaq -0x1f9(%rbp), %rdi
callq 0x8460
movq -0x10(%rbp), %rax
movq %rax, -0x498(%rbp)
leaq -0x221(%rbp), %rdi
movq %rdi, -0x490(%rbp)
callq 0x8760
movq -0x490(%rbp), %rdx
leaq 0x4bd40(%rip), %rsi     # 0x6fb5a
leaq -0x220(%rbp), %rdi
callq 0xced0
jmp 0x23e28
movq -0x498(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0xc600
jmp 0x23e3d
leaq -0x220(%rbp), %rdi
callq 0x8848
leaq -0x221(%rbp), %rdi
callq 0x8460
jmp 0x2459e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23e9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23e8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0xe4c0
leaq -0x1f8(%rbp), %rdi
callq 0x8848
leaq -0x1f9(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23ed1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x8848
leaq -0x221(%rbp), %rdi
callq 0x8460
jmp 0x245af
movq -0x3e8(%rbp), %rsi
addq $0x10, %rsi
leaq 0x4b17c(%rip), %rdi     # 0x6f070
callq 0xd590
testb $0x1, %al
jne 0x23f02
jmp 0x23fa5
movq -0x10(%rbp), %rax
movq %rax, -0x4a8(%rbp)
leaq -0x249(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x8760
movq -0x4a0(%rbp), %rdx
leaq 0x4bc36(%rip), %rsi     # 0x6fb64
leaq -0x248(%rbp), %rdi
callq 0xced0
jmp 0x23f3c
movq -0x4a8(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0xc600
jmp 0x23f51
leaq -0x248(%rbp), %rdi
callq 0x8848
leaq -0x249(%rbp), %rdi
callq 0x8460
jmp 0x2459c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23f94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x8848
leaq -0x249(%rbp), %rdi
callq 0x8460
jmp 0x245af
leaq -0x2a0(%rbp), %rdi
callq 0xe680
leaq -0x2c1(%rbp), %rdi
movq %rdi, -0x4b0(%rbp)
callq 0x8760
movq -0x4b0(%rbp), %rdx
leaq 0x4b919(%rip), %rsi     # 0x6f8eb
leaq -0x2c0(%rbp), %rdi
callq 0xced0
jmp 0x23fe0
leaq -0x2c1(%rbp), %rdi
callq 0x8460
movq $0x0, -0x2d0(%rbp)
xorl %eax, %eax
cmpq $0x4, -0x2d0(%rbp)
movb %al, -0x4b1(%rbp)
jae 0x2403d
movq -0x3e8(%rbp), %rdi
movq -0x2d0(%rbp), %rax
movq %rax, -0x4c0(%rbp)
addq $0x30, %rdi
callq 0x33db0
movq %rax, %rcx
movq -0x4c0(%rbp), %rax
cmpq %rcx, %rax
setb %al
movb %al, -0x4b1(%rbp)
movb -0x4b1(%rbp), %al
testb $0x1, %al
jne 0x2404c
jmp 0x24133
movq -0x10(%rbp), %rax
movq %rax, -0x4c8(%rbp)
leaq 0x4b0e5(%rip), %rsi     # 0x6f143
leaq -0x2f0(%rbp), %rdi
leaq -0x2c0(%rbp), %rdx
callq 0xdc30
jmp 0x24073
movq -0x4c8(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
callq 0xc600
jmp 0x24088
leaq -0x2f0(%rbp), %rdi
callq 0x8848
leaq -0x2a0(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x33490
jmp 0x240a9
jmp 0x240ab
movq -0x2d0(%rbp), %rax
incq %rax
movq %rax, -0x2d0(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x2c0(%rbp), %rdi
callq 0x8820
movq %rax, -0x4d0(%rbp)
jmp 0x240d5
movq -0x4d0(%rbp), %rax
movb (%rax), %cl
addb $0x1, %cl
movb %cl, (%rax)
jmp 0x23ff7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x2c1(%rbp), %rdi
callq 0x8460
jmp 0x2458e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x8848
jmp 0x24582
leaq 0x4b7b1(%rip), %rsi     # 0x6f8eb
leaq -0x2c0(%rbp), %rdi
callq 0x8580
jmp 0x24148
movq $0x0, -0x2f8(%rbp)
xorl %eax, %eax
cmpq $0x4, -0x2f8(%rbp)
movb %al, -0x4d1(%rbp)
jae 0x24199
movq -0x3e8(%rbp), %rdi
movq -0x2f8(%rbp), %rax
movq %rax, -0x4e0(%rbp)
addq $0x30, %rdi
callq 0x33db0
movq %rax, %rcx
movq -0x4e0(%rbp), %rax
cmpq %rcx, %rax
setb %al
movb %al, -0x4d1(%rbp)
movb -0x4d1(%rbp), %al
testb $0x1, %al
jne 0x241a8
jmp 0x24270
movq -0x3e8(%rbp), %rdi
addq $0x30, %rdi
movq -0x2f8(%rbp), %rsi
callq 0x33d60
movq %rax, %rdi
callq 0x33ae0
movq %rax, -0x4f0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x4e8(%rbp)
leaq -0x320(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x33d80
jmp 0x241ee
movq -0x4e8(%rbp), %rsi
movq -0x4f0(%rbp), %rdi
leaq -0x320(%rbp), %rdx
callq 0x22390
jmp 0x2420a
leaq -0x320(%rbp), %rdi
callq 0xe4c0
movq -0x2f8(%rbp), %rax
incq %rax
movq %rax, -0x2f8(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x2c0(%rbp), %rdi
callq 0x8820
movq %rax, -0x4f8(%rbp)
jmp 0x24240
movq -0x4f8(%rbp), %rax
movb (%rax), %cl
addb $0x1, %cl
movb %cl, (%rax)
jmp 0x24153
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x320(%rbp), %rdi
callq 0xe4c0
jmp 0x24582
movq -0x3e8(%rbp), %rdi
addq $0x30, %rdi
callq 0x33db0
subq $0x1, %rax
movl %eax, -0x324(%rbp)
movl $0x4, %eax
cmpl -0x324(%rbp), %eax
jg 0x24453
movq -0x3e8(%rbp), %rdi
addq $0x30, %rdi
movslq -0x324(%rbp), %rsi
callq 0x33d60
movq %rax, %rdi
callq 0x33ae0
movq %rax, -0x510(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x508(%rbp)
leaq -0x371(%rbp), %rdi
movq %rdi, -0x500(%rbp)
callq 0x8760
movq -0x500(%rbp), %rdx
leaq 0x4b87b(%rip), %rsi     # 0x6fb68
leaq -0x370(%rbp), %rdi
callq 0xced0
jmp 0x242fb
leaq -0x350(%rbp), %rdi
leaq -0x370(%rbp), %rsi
callq 0x33d80
jmp 0x24310
movq -0x508(%rbp), %rsi
movq -0x510(%rbp), %rdi
leaq -0x350(%rbp), %rdx
callq 0x22390
jmp 0x2432c
leaq -0x350(%rbp), %rdi
callq 0xe4c0
leaq -0x370(%rbp), %rdi
callq 0x8848
leaq -0x371(%rbp), %rdi
callq 0x8460
movq -0x10(%rbp), %rax
movq %rax, -0x520(%rbp)
leaq -0x399(%rbp), %rdi
movq %rdi, -0x518(%rbp)
callq 0x8760
movq -0x518(%rbp), %rdx
leaq 0x4b4bf(%rip), %rsi     # 0x6f83b
leaq -0x398(%rbp), %rdi
callq 0xced0
jmp 0x2438a
movq -0x520(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0xc600
jmp 0x2439f
leaq -0x398(%rbp), %rdi
callq 0x8848
leaq -0x399(%rbp), %rdi
callq 0x8460
movl -0x324(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x324(%rbp)
jmp 0x2428a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2440b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x243ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x350(%rbp), %rdi
callq 0xe4c0
leaq -0x370(%rbp), %rdi
callq 0x8848
leaq -0x371(%rbp), %rdi
callq 0x8460
jmp 0x24582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24442
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x8848
leaq -0x399(%rbp), %rdi
callq 0x8460
jmp 0x24582
movq -0x3e8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq %rax, -0x528(%rbp)
addq $0x10, %rdx
leaq 0x4b6fa(%rip), %rsi     # 0x6fb6a
leaq -0x3c0(%rbp), %rdi
callq 0xdc30
jmp 0x2447e
movq -0x528(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0xc600
jmp 0x24493
leaq -0x3c0(%rbp), %rdi
callq 0x8848
leaq -0x2a0(%rbp), %rdi
callq 0x32a20
movb %al, -0x529(%rbp)
jmp 0x244b3
movb -0x529(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x244c4
jmp 0x24568
movq -0x10(%rbp), %rax
movq %rax, -0x540(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x32a40
movq %rax, -0x538(%rbp)
jmp 0x244e4
movq -0x538(%rbp), %rdx
leaq 0x4ac36(%rip), %rsi     # 0x6f128
leaq -0x3e0(%rbp), %rdi
callq 0xdc30
jmp 0x24500
movq -0x540(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0xc600
jmp 0x24515
leaq -0x3e0(%rbp), %rdi
callq 0x8848
leaq -0x2a0(%rbp), %rdi
callq 0x32c00
jmp 0x2452f
jmp 0x2449f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x8848
jmp 0x24582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x3e0(%rbp), %rdi
callq 0x8848
jmp 0x24582
leaq -0x2c0(%rbp), %rdi
callq 0x8848
leaq -0x2a0(%rbp), %rdi
callq 0x10390
jmp 0x2459c
leaq -0x2c0(%rbp), %rdi
callq 0x8848
leaq -0x2a0(%rbp), %rdi
callq 0x10390
jmp 0x245af
jmp 0x2459e
jmp 0x245a0
jmp 0x245a2
jmp 0x245a4
jmp 0x245a6
addq $0x540, %rsp            # imm = 0x540
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x8750
nopl (%rax,%rax)