// File: CMU-SAFARI[P]SMLA/src/Main.cpp
// Function: main
int main(int argc, const char *argv[])
{
    if (argc < 2) {
        printf("Usage: %s <configs-file> --mode=cpu,dram [--stats <filename>] <trace-filename1> <trace-filename2>\n"
            "Example: %s ramulator-configs.cfg --mode=cpu cpu.trace cpu.trace\n", argv[0], argv[0]);
        return 0;
    }

    Config configs(argv[1]);

    const std::string& standard = configs["standard"];
    assert(standard != "" || "DRAM standard should be specified.");

    const char *trace_type = strstr(argv[2], "=");
    trace_type++;
    if (strcmp(trace_type, "cpu") == 0) {
      configs.add("trace_type", "CPU");
    } else if (strcmp(trace_type, "dram") == 0) {
      configs.add("trace_type", "DRAM");
    } else {
      printf("invalid trace type: %s\n", trace_type);
      assert(false);
    }

    int trace_start = 3;
    string stats_out;
    if (strcmp(argv[3], "--stats") == 0) {
      Stats::statlist.output(argv[4]);
      stats_out = argv[4];
      trace_start = 5;
    } else {
      Stats::statlist.output(standard+".stats");
      stats_out = standard + string(".stats");
    }
    std::vector<const char*> files(&argv[trace_start], &argv[argc]);
    configs.set_core_num(argc - trace_start);

		if (standard == "WideIO") {
      WideIO* wio = new WideIO(configs["org"], configs["speed"]);
      start_run(configs, wio, files);
    } 
		else if (standard == "SMLA_CIO") {
      SMLA_CIO* scio = new SMLA_CIO(configs["org"], configs["speed"]);
      start_run(configs, scio, files);
    }
		else if (standard == "SMLA_DIO") {
      SMLA_DIO* sdio = new SMLA_DIO(configs["org"], configs["speed"]);
      start_run(configs, sdio, files);
    }

    printf("Simulation done. Statistics written to %s\n", stats_out.c_str());

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x500, %rsp            # imm = 0x500
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x7867
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x929cc(%rip), %rdi     # 0x9a220
movb $0x0, %al
callq 0x6070
movl $0x0, -0x4(%rbp)
jmp 0x8744
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x438(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0x430(%rbp)
callq 0x65c0
movq -0x438(%rbp), %rsi
movq -0x430(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x8760
jmp 0x78a2
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x69b10
jmp 0x78b1
leaq -0x80(%rbp), %rdi
callq 0x6668
leaq -0x81(%rbp), %rdi
callq 0x63b0
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x440(%rbp)
callq 0x65c0
movq -0x440(%rbp), %rdx
leaq 0x929dd(%rip), %rsi     # 0x9a2c4
leaq -0xe0(%rbp), %rdi
callq 0x8760
jmp 0x78f5
leaq -0xc0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x8810
jmp 0x790e
leaq -0xe0(%rbp), %rdi
callq 0x6668
leaq -0xe1(%rbp), %rdi
callq 0x63b0
leaq -0xc0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
leaq 0x92ad2(%rip), %rsi     # 0x9a414
callq 0x88f0
movb %al, -0x441(%rbp)
jmp 0x794f
movb -0x441(%rbp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x442(%rbp)
jne 0x796e
jmp 0x7964
movb $0x1, %al
movb %al, -0x442(%rbp)
jmp 0x796e
movb -0x442(%rbp), %al
testb $0x1, %al
jne 0x797a
jmp 0x797f
jmp 0x7a38
leaq 0x9296a(%rip), %rdi     # 0x9a2f0
leaq 0x9299a(%rip), %rsi     # 0x9a327
movl $0x85, %edx
leaq 0x9299b(%rip), %rcx     # 0x9a334
callq 0x6270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x79cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x6668
leaq -0x81(%rbp), %rdi
callq 0x63b0
jmp 0x8750
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7a10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x6668
leaq -0xe1(%rbp), %rdi
callq 0x63b0
jmp 0x8739
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x872d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x95e15(%rip), %rsi     # 0x9d85c
callq 0x60f0
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rdi
leaq 0x928de(%rip), %rsi     # 0x9a351
callq 0x6470
cmpl $0x0, %eax
jne 0x7b9c
leaq -0x111(%rbp), %rdi
movq %rdi, -0x450(%rbp)
callq 0x65c0
movq -0x450(%rbp), %rdx
leaq 0x928b3(%rip), %rsi     # 0x9a355
leaq -0x110(%rbp), %rdi
callq 0x8760
jmp 0x7ab0
leaq -0x139(%rbp), %rdi
movq %rdi, -0x458(%rbp)
callq 0x65c0
movq -0x458(%rbp), %rdx
leaq 0x9288f(%rip), %rsi     # 0x9a360
leaq -0x138(%rbp), %rdi
callq 0x8760
jmp 0x7adf
leaq -0x60(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x138(%rbp), %rdx
callq 0x8920
jmp 0x7af8
leaq -0x138(%rbp), %rdi
callq 0x6668
leaq -0x139(%rbp), %rdi
callq 0x63b0
leaq -0x110(%rbp), %rdi
callq 0x6668
leaq -0x111(%rbp), %rdi
callq 0x63b0
jmp 0x7d0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7b8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7b73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x6668
leaq -0x139(%rbp), %rdi
callq 0x63b0
leaq -0x110(%rbp), %rdi
callq 0x6668
leaq -0x111(%rbp), %rdi
callq 0x63b0
jmp 0x872d
movq -0xf0(%rbp), %rdi
leaq 0x927ba(%rip), %rsi     # 0x9a364
callq 0x6470
cmpl $0x0, %eax
jne 0x7cd3
leaq -0x161(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x65c0
movq -0x460(%rbp), %rdx
leaq 0x9277c(%rip), %rsi     # 0x9a355
leaq -0x160(%rbp), %rdi
callq 0x8760
jmp 0x7be7
leaq -0x189(%rbp), %rdi
movq %rdi, -0x468(%rbp)
callq 0x65c0
movq -0x468(%rbp), %rdx
leaq 0x9367c(%rip), %rsi     # 0x9b284
leaq -0x188(%rbp), %rdi
callq 0x8760
jmp 0x7c16
leaq -0x60(%rbp), %rdi
leaq -0x160(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0x8920
jmp 0x7c2f
leaq -0x188(%rbp), %rdi
callq 0x6668
leaq -0x189(%rbp), %rdi
callq 0x63b0
leaq -0x160(%rbp), %rdi
callq 0x6668
leaq -0x161(%rbp), %rdi
callq 0x63b0
jmp 0x7d09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7caa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x6668
leaq -0x189(%rbp), %rdi
callq 0x63b0
leaq -0x160(%rbp), %rdi
callq 0x6668
leaq -0x161(%rbp), %rdi
callq 0x63b0
jmp 0x872d
movq -0xf0(%rbp), %rsi
leaq 0x92688(%rip), %rdi     # 0x9a369
xorl %eax, %eax
callq 0x6070
jmp 0x7cea
leaq 0x92690(%rip), %rdi     # 0x9a381
leaq 0x9262f(%rip), %rsi     # 0x9a327
movl $0x8f, %edx
leaq 0x92630(%rip), %rcx     # 0x9a334
callq 0x6270
jmp 0x7d0b
movl $0x3, -0x190(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x6460
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x92657(%rip), %rsi     # 0x9a387
callq 0x6470
cmpl $0x0, %eax
jne 0x7e28
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x478(%rbp)
leaq -0x1d1(%rbp), %rdi
movq %rdi, -0x470(%rbp)
callq 0x65c0
movq -0x478(%rbp), %rsi
movq -0x470(%rbp), %rdx
leaq -0x1d0(%rbp), %rdi
callq 0x8760
jmp 0x7d7c
leaq 0xdb6f5(%rip), %rdi     # 0xe3478
leaq -0x1d0(%rbp), %rsi
callq 0x89f0
jmp 0x7d91
leaq -0x1d0(%rbp), %rdi
callq 0x6668
leaq -0x1d1(%rbp), %rdi
callq 0x63b0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x6450
jmp 0x7dbf
movl $0x5, -0x190(%rbp)
jmp 0x7f5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7e00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x6668
leaq -0x1d1(%rbp), %rdi
callq 0x63b0
jmp 0x8721
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8721
movq -0xa0(%rbp), %rsi
leaq 0x92559(%rip), %rdx     # 0x9a38f
leaq -0x1f8(%rbp), %rdi
callq 0x8a80
jmp 0x7e44
leaq 0xdb62d(%rip), %rdi     # 0xe3478
leaq -0x1f8(%rbp), %rsi
callq 0x89f0
jmp 0x7e59
leaq -0x1f8(%rbp), %rdi
callq 0x6668
movq -0xa0(%rbp), %rax
movq %rax, -0x488(%rbp)
leaq -0x239(%rbp), %rdi
movq %rdi, -0x480(%rbp)
callq 0x65c0
movq -0x480(%rbp), %rdx
leaq 0x924fb(%rip), %rsi     # 0x9a38f
leaq -0x238(%rbp), %rdi
callq 0x8760
jmp 0x7ea2
movq -0x488(%rbp), %rsi
leaq -0x218(%rbp), %rdi
leaq -0x238(%rbp), %rdx
callq 0x8b00
jmp 0x7ebe
leaq -0x1b0(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x6410
leaq -0x218(%rbp), %rdi
callq 0x6668
leaq -0x238(%rbp), %rdi
callq 0x6668
leaq -0x239(%rbp), %rdi
callq 0x63b0
jmp 0x7f5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x6668
jmp 0x8721
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7f4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x6668
leaq -0x239(%rbp), %rdi
callq 0x63b0
jmp 0x8721
movq -0x10(%rbp), %rax
movslq -0x190(%rbp), %rcx
leaq (%rax,%rcx,8), %rcx
movq %rcx, -0x4a0(%rbp)
movslq -0x8(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x498(%rbp)
leaq -0x259(%rbp), %rdi
movq %rdi, -0x490(%rbp)
callq 0x8b50
movq -0x4a0(%rbp), %rsi
movq -0x498(%rbp), %rdx
movq -0x490(%rbp), %rcx
leaq -0x258(%rbp), %rdi
callq 0x8b70
jmp 0x7fb8
leaq -0x259(%rbp), %rdi
callq 0x8bf0
movl -0x8(%rbp), %esi
movl -0x190(%rbp), %eax
subl %eax, %esi
leaq -0x60(%rbp), %rdi
callq 0x8c10
jmp 0x7fda
movq -0xa0(%rbp), %rdi
leaq 0x923ae(%rip), %rsi     # 0x9a396
callq 0x8c30
movb %al, -0x4a1(%rbp)
jmp 0x7ff5
movb -0x4a1(%rbp), %al
testb $0x1, %al
jne 0x8004
jmp 0x824d
movl $0x2780, %edi           # imm = 0x2780
callq 0x6350
movq %rax, -0x4b0(%rbp)
jmp 0x8017
movb $0x1, -0x2f2(%rbp)
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x4b8(%rbp)
callq 0x65c0
movq -0x4b8(%rbp), %rdx
leaq 0x9235e(%rip), %rsi     # 0x9a39d
leaq -0x2a8(%rbp), %rdi
callq 0x8760
jmp 0x804d
leaq -0x288(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0x8810
jmp 0x8066
leaq -0x2f1(%rbp), %rdi
movq %rdi, -0x4c0(%rbp)
callq 0x65c0
movq -0x4c0(%rbp), %rdx
leaq 0x9231a(%rip), %rsi     # 0x9a3a1
leaq -0x2f0(%rbp), %rdi
callq 0x8760
jmp 0x8095
leaq -0x2d0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x2f0(%rbp), %rdx
callq 0x8810
jmp 0x80ae
movq -0x4b0(%rbp), %rdi
leaq -0x288(%rbp), %rsi
leaq -0x2d0(%rbp), %rdx
callq 0x8f3e0
jmp 0x80ca
movb $0x0, -0x2f2(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x6668
leaq -0x2f0(%rbp), %rdi
callq 0x6668
leaq -0x2f1(%rbp), %rdi
callq 0x63b0
leaq -0x288(%rbp), %rdi
callq 0x6668
leaq -0x2a8(%rbp), %rdi
callq 0x6668
leaq -0x2a9(%rbp), %rdi
callq 0x63b0
movq -0x4b0(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rsi
leaq -0x60(%rbp), %rdi
leaq -0x258(%rbp), %rdx
callq 0x8c60
jmp 0x8140
jmp 0x86c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x259(%rbp), %rdi
callq 0x8bf0
jmp 0x8721
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8715
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8220
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8214
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x81fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x81f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x6668
leaq -0x2f0(%rbp), %rdi
callq 0x6668
leaq -0x2f1(%rbp), %rdi
callq 0x63b0
leaq -0x288(%rbp), %rdi
callq 0x6668
leaq -0x2a8(%rbp), %rdi
callq 0x6668
leaq -0x2a9(%rbp), %rdi
callq 0x63b0
testb $0x1, -0x2f2(%rbp)
jne 0x8237
jmp 0x8248
movq -0x4b0(%rbp), %rdi
movl $0x2780, %esi           # imm = 0x2780
callq 0x6360
jmp 0x8715
movq -0xa0(%rbp), %rdi
leaq 0x9214c(%rip), %rsi     # 0x9a3a7
callq 0x8c30
movb %al, -0x4c1(%rbp)
jmp 0x8268
movb -0x4c1(%rbp), %al
testb $0x1, %al
jne 0x8277
jmp 0x8486
movl $0x2780, %edi           # imm = 0x2780
callq 0x6350
movq %rax, -0x4d0(%rbp)
jmp 0x828a
movb $0x1, -0x38a(%rbp)
leaq -0x341(%rbp), %rdi
movq %rdi, -0x4d8(%rbp)
callq 0x65c0
movq -0x4d8(%rbp), %rdx
leaq 0x920eb(%rip), %rsi     # 0x9a39d
leaq -0x340(%rbp), %rdi
callq 0x8760
jmp 0x82c0
leaq -0x320(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x340(%rbp), %rdx
callq 0x8810
jmp 0x82d9
leaq -0x389(%rbp), %rdi
movq %rdi, -0x4e0(%rbp)
callq 0x65c0
movq -0x4e0(%rbp), %rdx
leaq 0x920a7(%rip), %rsi     # 0x9a3a1
leaq -0x388(%rbp), %rdi
callq 0x8760
jmp 0x8308
leaq -0x368(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x388(%rbp), %rdx
callq 0x8810
jmp 0x8321
movq -0x4d0(%rbp), %rdi
leaq -0x320(%rbp), %rsi
leaq -0x368(%rbp), %rdx
callq 0x75ab0
jmp 0x833d
movb $0x0, -0x38a(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x6668
leaq -0x388(%rbp), %rdi
callq 0x6668
leaq -0x389(%rbp), %rdi
callq 0x63b0
leaq -0x320(%rbp), %rdi
callq 0x6668
leaq -0x340(%rbp), %rdi
callq 0x6668
leaq -0x341(%rbp), %rdi
callq 0x63b0
movq -0x4d0(%rbp), %rax
movq %rax, -0x300(%rbp)
movq -0x300(%rbp), %rsi
leaq -0x60(%rbp), %rdi
leaq -0x258(%rbp), %rdx
callq 0x9110
jmp 0x83b3
jmp 0x86be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8459
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x844d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8435
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8429
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x6668
leaq -0x388(%rbp), %rdi
callq 0x6668
leaq -0x389(%rbp), %rdi
callq 0x63b0
leaq -0x320(%rbp), %rdi
callq 0x6668
leaq -0x340(%rbp), %rdi
callq 0x6668
leaq -0x341(%rbp), %rdi
callq 0x63b0
testb $0x1, -0x38a(%rbp)
jne 0x8470
jmp 0x8481
movq -0x4d0(%rbp), %rdi
movl $0x2780, %esi           # imm = 0x2780
callq 0x6360
jmp 0x8715
movq -0xa0(%rbp), %rdi
leaq 0x91f1c(%rip), %rsi     # 0x9a3b0
callq 0x8c30
movb %al, -0x4e1(%rbp)
jmp 0x84a1
movb -0x4e1(%rbp), %al
testb $0x1, %al
jne 0x84b0
jmp 0x86bc
movl $0x2780, %edi           # imm = 0x2780
callq 0x6350
movq %rax, -0x4f0(%rbp)
jmp 0x84c3
movb $0x1, -0x422(%rbp)
leaq -0x3d9(%rbp), %rdi
movq %rdi, -0x4f8(%rbp)
callq 0x65c0
movq -0x4f8(%rbp), %rdx
leaq 0x91eb2(%rip), %rsi     # 0x9a39d
leaq -0x3d8(%rbp), %rdi
callq 0x8760
jmp 0x84f9
leaq -0x3b8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x3d8(%rbp), %rdx
callq 0x8810
jmp 0x8512
leaq -0x421(%rbp), %rdi
movq %rdi, -0x500(%rbp)
callq 0x65c0
movq -0x500(%rbp), %rdx
leaq 0x91e6e(%rip), %rsi     # 0x9a3a1
leaq -0x420(%rbp), %rdi
callq 0x8760
jmp 0x8541
leaq -0x400(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x420(%rbp), %rdx
callq 0x8810
jmp 0x855a
movq -0x4f0(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
leaq -0x400(%rbp), %rdx
callq 0x82140
jmp 0x8576
movb $0x0, -0x422(%rbp)
leaq -0x400(%rbp), %rdi
callq 0x6668
leaq -0x420(%rbp), %rdi
callq 0x6668
leaq -0x421(%rbp), %rdi
callq 0x63b0
leaq -0x3b8(%rbp), %rdi
callq 0x6668
leaq -0x3d8(%rbp), %rdi
callq 0x6668
leaq -0x3d9(%rbp), %rdi
callq 0x63b0
movq -0x4f0(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x398(%rbp), %rsi
leaq -0x60(%rbp), %rdi
leaq -0x258(%rbp), %rdx
callq 0x95c0
jmp 0x85ec
jmp 0x86bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8692
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8686
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x866e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8662
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x400(%rbp), %rdi
callq 0x6668
leaq -0x420(%rbp), %rdi
callq 0x6668
leaq -0x421(%rbp), %rdi
callq 0x63b0
leaq -0x3b8(%rbp), %rdi
callq 0x6668
leaq -0x3d8(%rbp), %rdi
callq 0x6668
leaq -0x3d9(%rbp), %rdi
callq 0x63b0
testb $0x1, -0x422(%rbp)
jne 0x86a9
jmp 0x86ba
movq -0x4f0(%rbp), %rdi
movl $0x2780, %esi           # imm = 0x2780
callq 0x6360
jmp 0x8715
jmp 0x86be
jmp 0x86c0
leaq -0x1b0(%rbp), %rdi
callq 0x61a0
movq %rax, %rsi
leaq 0x91ce3(%rip), %rdi     # 0x9a3b9
xorl %eax, %eax
callq 0x6070
jmp 0x86df
movl $0x0, -0x4(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x9a70
leaq -0x1b0(%rbp), %rdi
callq 0x6668
leaq -0xc0(%rbp), %rdi
callq 0x6668
leaq -0x60(%rbp), %rdi
callq 0x9ad0
jmp 0x8744
leaq -0x258(%rbp), %rdi
callq 0x9a70
leaq -0x1b0(%rbp), %rdi
callq 0x6668
leaq -0xc0(%rbp), %rdi
callq 0x6668
leaq -0x60(%rbp), %rdi
callq 0x9ad0
jmp 0x8750
movl -0x4(%rbp), %eax
addq $0x500, %rsp            # imm = 0x500
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x65b0
nopl (%rax)