// File: /workspace/github_c_makefile_star2_O0/mrkite[P]regs/src/main.cc
// Function: main
int main(int argc, char **argv) {
  API api(iigs_dat, iigs_dat_len);

  struct arguments arguments;
  arguments.filename = "";
  arguments.keyword = nullptr;
  arguments.org = 0;
  arguments.flags = 0;
  argp_parse(&argp, argc, argv, 0, 0, &arguments);

  if (arguments.keyword) {
    api.search(arguments.keyword, arguments.org);
    return 0;
  }

  // load map if it exists
  Map map(arguments.filename, arguments.org);
  OMF omf;
  if (!omf.load(arguments.filename, map.org)) {
    std::cerr << "Failed to load " << arguments.filename << std::endl;
    return -1;
  }
  auto segments = omf.get();
  if (map.needsEntry()) {
    for (auto &s : segments) {
      if ((s.kind & 0x1f) == 0) {  // first code
        map.addEntry(s.mapped + s.entry, arguments.flags);
        break;
      }
    }
  }

  // note that we save the map here.. before we add a bunch of symbols
  // from the api
  map.save();


  auto prints = std::make_shared<Fingerprints>();
  for (auto s : api.symbols) {
    if (s.second->kind == symbol::isFunction) {
      auto f = std::static_pointer_cast<symbol::Function>(s.second);
      if (f->signature.size() >= 2) {
        if (f->signature[0] >= 0) {  // tool
          // ldx tool, jsl e1/0000
          std::vector<uint8_t> sig = { 0xa2, 0x00, 0x00,
            0x22, 0x00, 0x00, 0xe1 };
          sig[1] = f->signature[0];
          sig[2] = f->signature[1];
          prints->add(sig, f->name);
        } else if (f->signature[0] == -1) {  // p16/gsos
          // jsl e1/00a8
          std::vector<uint8_t> sig = { 0x22, 0xa8, 0x00, 0xe1, 0x00, 0x00 };
          sig[4] = f->signature[2] & 0xff;
          sig[5] = f->signature[2] >> 8;
          prints->add(sig, f->name, f->signature[1] & 0xff);
        } else if (f->signature[0] == -2) {  // p8
          // jsr bf00
          std::vector<uint8_t> sig = { 0x20, 0x00, 0xbf, 0x00 };
          sig[3] = f->signature[2];
          prints->add(sig, f->name, f->signature[1] & 0xff);
        } else if (f->signature[0] == -3) {  // smartport
          // jsr c50d
          std::vector<uint8_t> sig5 = { 0x20, 0x0d, 0xc5, 0x00 };
          std::vector<uint8_t> sig7 = { 0x20, 0x0d, 0xc7, 0x00 };
          sig5[3] = f->signature[2];
          sig7[3] = f->signature[2];
          prints->add(sig5, f->name, f->signature[1]);
          prints->add(sig7, f->name, f->signature[1]);
        } else if (f->signature[0] == -4) {  // symbol
          map.addSymbol(f->signature[1], f->name);
        }
      }
    }
  }

  Disassembler d(prints, map.getSymbols(), map.b);
  d.disassemble(segments, map.getEntries());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x580, %rsp            # imm = 0x580
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl 0x7fd95(%rip), %edx     # 0x865e4
leaq 0x50aba(%rip), %rsi     # 0x57310
leaq -0x70(%rbp), %rdi
callq 0x22100
leaq 0x339d0(%rip), %rax     # 0x3a236
movq %rax, -0x88(%rbp)
movq $0x0, -0x78(%rbp)
movl $0x0, -0x80(%rbp)
movl $0x0, -0x7c(%rbp)
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x7fd67(%rip), %rdi     # 0x865f8
xorl %ecx, %ecx
movl %ecx, %r8d
leaq -0x88(%rbp), %r9
callq 0x60d0
jmp 0x68a4
cmpq $0x0, -0x78(%rbp)
je 0x6986
movq -0x78(%rbp), %rax
movq %rax, -0x478(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x470(%rbp)
callq 0x6560
movq -0x478(%rbp), %rsi
movq -0x470(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x7c00
jmp 0x68e9
movl -0x80(%rbp), %edx
leaq -0x70(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x238f0
jmp 0x68fe
leaq -0xb8(%rbp), %rdi
callq 0x61e0
leaq -0xb9(%rbp), %rdi
callq 0x6350
movl $0x0, -0x4(%rbp)
movl $0x1, -0xc0(%rbp)
jmp 0x77f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x78d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x6975
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x61e0
leaq -0xb9(%rbp), %rdi
callq 0x6350
jmp 0x78d6
movq -0x88(%rbp), %rsi
movl -0x80(%rbp), %edx
leaq -0x138(%rbp), %rdi
callq 0x129e0
jmp 0x699e
leaq -0x160(%rbp), %rdi
callq 0xb0f0
jmp 0x69ac
movq -0x88(%rbp), %rsi
movl -0x138(%rbp), %edx
leaq -0x160(%rbp), %rdi
callq 0xb1a0
movb %al, -0x479(%rbp)
jmp 0x69cd
movb -0x479(%rbp), %al
testb $0x1, %al
jne 0x6a6e
jmp 0x69dd
movq 0x50604(%rip), %rdi     # 0x56fe8
leaq 0x33634(%rip), %rsi     # 0x3a01f
callq 0x62f0
movq %rax, -0x488(%rbp)
jmp 0x69f9
movq -0x488(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x62f0
movq %rax, -0x490(%rbp)
jmp 0x6a15
movq -0x490(%rbp), %rdi
movq 0x50585(%rip), %rsi     # 0x56fa8
callq 0x6330
jmp 0x6a2a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xc0(%rbp)
jmp 0x77db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x78ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x78be
leaq -0x178(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0xd220
jmp 0x6a83
leaq -0x138(%rbp), %rdi
callq 0x13970
movb %al, -0x491(%rbp)
jmp 0x6a97
movb -0x491(%rbp), %al
testb $0x1, %al
jne 0x6aa6
jmp 0x6b67
leaq -0x178(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rdi
callq 0x7cb0
movq %rax, -0x188(%rbp)
movq -0x180(%rbp), %rdi
callq 0x7ce0
movq %rax, -0x190(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x7d10
testb $0x1, %al
jne 0x6af3
jmp 0x6b65
leaq -0x188(%rbp), %rdi
callq 0x7d50
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movswl 0x10(%rax), %eax
andl $0x1f, %eax
cmpl $0x0, %eax
jne 0x6b52
movq -0x198(%rbp), %rcx
movl 0x20(%rcx), %eax
movl 0x60(%rcx), %esi
addl %eax, %esi
movl -0x7c(%rbp), %edx
leaq -0x138(%rbp), %rdi
callq 0x139f0
jmp 0x6b39
jmp 0x6b65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x78b2
jmp 0x6b54
leaq -0x188(%rbp), %rdi
callq 0x7d70
jmp 0x6ada
jmp 0x6b67
leaq -0x138(%rbp), %rdi
callq 0x13150
jmp 0x6b75
leaq -0x1a8(%rbp), %rdi
callq 0x7d90
jmp 0x6b83
leaq -0x70(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rdi
callq 0x7e00
movq %rax, -0x1b8(%rbp)
movq -0x1b0(%rbp), %rdi
callq 0x7e30
movq %rax, -0x1c0(%rbp)
leaq -0x1b8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x7e60
testb $0x1, %al
jne 0x6bd0
jmp 0x76ec
leaq -0x1b8(%rbp), %rdi
callq 0x7e90
movq %rax, %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x7eb0
jmp 0x6bed
leaq -0x1f0(%rbp), %rdi
addq $0x20, %rdi
callq 0x7ef0
cmpl $0x6, 0x24(%rax)
jne 0x76cf
leaq -0x1f0(%rbp), %rsi
addq $0x20, %rsi
leaq -0x200(%rbp), %rdi
callq 0x7f10
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
callq 0x7f80
cmpq $0x2, %rax
jb 0x76a4
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7fa0
cmpl $0x0, (%rax)
jl 0x6e6b
movb $-0x5e, -0x22f(%rbp)
movb $0x0, -0x22e(%rbp)
movb $0x0, -0x22d(%rbp)
movb $0x22, -0x22c(%rbp)
movb $0x0, -0x22b(%rbp)
movb $0x0, -0x22a(%rbp)
movb $-0x1f, -0x229(%rbp)
leaq -0x22f(%rbp), %rax
movq %rax, -0x228(%rbp)
movq $0x7, -0x220(%rbp)
leaq -0x230(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x7fc0
movq -0x4a0(%rbp), %rcx
movq -0x228(%rbp), %rsi
movq -0x220(%rbp), %rdx
leaq -0x218(%rbp), %rdi
callq 0x7fe0
jmp 0x6ce5
leaq -0x230(%rbp), %rdi
callq 0x8060
leaq -0x200(%rbp), %rdi
movq %rdi, -0x4b0(%rbp)
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7fa0
movb (%rax), %al
movb %al, -0x4c9(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x4c0(%rbp)
movl $0x1, %esi
movq %rsi, -0x4c8(%rbp)
callq 0x8080
movb -0x4c9(%rbp), %cl
movq -0x4b0(%rbp), %rdi
movb %cl, (%rax)
callq 0x7f60
movq -0x4c8(%rbp), %rsi
movq %rax, %rdi
addq $0x50, %rdi
callq 0x7fa0
movq -0x4c0(%rbp), %rdi
movb (%rax), %al
movb %al, -0x4b1(%rbp)
movl $0x2, %esi
callq 0x8080
movb -0x4b1(%rbp), %cl
movb %cl, (%rax)
leaq -0x1a8(%rbp), %rdi
callq 0x80a0
movq -0x4b0(%rbp), %rdi
movq %rax, -0x4a8(%rbp)
callq 0x7f60
movq %rax, %rsi
leaq -0x250(%rbp), %rdi
callq 0x6170
jmp 0x6db3
movq -0x4a8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x250(%rbp), %rdx
xorl %ecx, %ecx
callq 0x21ec0
jmp 0x6dd1
leaq -0x250(%rbp), %rdi
callq 0x61e0
leaq -0x218(%rbp), %rdi
callq 0x80c0
jmp 0x76a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x78a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x8060
jmp 0x76b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x6e5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x61e0
leaq -0x218(%rbp), %rdi
callq 0x80c0
jmp 0x76b2
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7fa0
cmpl $-0x1, (%rax)
jne 0x7098
movb $0x22, -0x27e(%rbp)
movb $-0x58, -0x27d(%rbp)
movb $0x0, -0x27c(%rbp)
movb $-0x1f, -0x27b(%rbp)
movb $0x0, -0x27a(%rbp)
movb $0x0, -0x279(%rbp)
leaq -0x27e(%rbp), %rax
movq %rax, -0x278(%rbp)
movq $0x6, -0x270(%rbp)
leaq -0x27f(%rbp), %rdi
movq %rdi, -0x4d8(%rbp)
callq 0x7fc0
movq -0x4d8(%rbp), %rcx
movq -0x278(%rbp), %rsi
movq -0x270(%rbp), %rdx
leaq -0x268(%rbp), %rdi
callq 0x7fe0
jmp 0x6f09
leaq -0x27f(%rbp), %rdi
callq 0x8060
leaq -0x200(%rbp), %rdi
movq %rdi, -0x4e8(%rbp)
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
movl $0x2, %esi
movq %rsi, -0x500(%rbp)
callq 0x7fa0
movb (%rax), %al
movb %al, -0x501(%rbp)
leaq -0x268(%rbp), %rdi
movq %rdi, -0x4f8(%rbp)
movl $0x4, %esi
callq 0x8080
movb -0x501(%rbp), %cl
movq -0x4e8(%rbp), %rdi
movb %cl, (%rax)
callq 0x7f60
movq -0x500(%rbp), %rsi
movq %rax, %rdi
addq $0x50, %rdi
callq 0x7fa0
movq -0x4f8(%rbp), %rdi
movb 0x1(%rax), %al
movb %al, -0x4e9(%rbp)
movl $0x5, %esi
callq 0x8080
movb -0x4e9(%rbp), %cl
movb %cl, (%rax)
leaq -0x1a8(%rbp), %rdi
callq 0x80a0
movq -0x4e8(%rbp), %rdi
movq %rax, -0x4e0(%rbp)
callq 0x7f60
movq %rax, %rsi
leaq -0x2a0(%rbp), %rdi
callq 0x6170
jmp 0x6fd9
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
movl $0x1, %esi
callq 0x7fa0
movq -0x4e0(%rbp), %rdi
movzbl (%rax), %ecx
leaq -0x268(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
callq 0x21ec0
jmp 0x7015
leaq -0x2a0(%rbp), %rdi
callq 0x61e0
leaq -0x268(%rbp), %rdi
callq 0x80c0
jmp 0x76a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x27f(%rbp), %rdi
callq 0x8060
jmp 0x76b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7087
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x61e0
leaq -0x268(%rbp), %rdi
callq 0x80c0
jmp 0x76b2
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7fa0
cmpl $-0x2, (%rax)
jne 0x7268
movb $0x20, -0x2cc(%rbp)
movb $0x0, -0x2cb(%rbp)
movb $-0x41, -0x2ca(%rbp)
movb $0x0, -0x2c9(%rbp)
leaq -0x2cc(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq $0x4, -0x2c0(%rbp)
leaq -0x2cd(%rbp), %rdi
movq %rdi, -0x510(%rbp)
callq 0x7fc0
movq -0x510(%rbp), %rcx
movq -0x2c8(%rbp), %rsi
movq -0x2c0(%rbp), %rdx
leaq -0x2b8(%rbp), %rdi
callq 0x7fe0
jmp 0x7128
leaq -0x2cd(%rbp), %rdi
callq 0x8060
leaq -0x200(%rbp), %rdi
movq %rdi, -0x520(%rbp)
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
movl $0x2, %esi
callq 0x7fa0
movb (%rax), %al
movb %al, -0x521(%rbp)
leaq -0x2b8(%rbp), %rdi
movl $0x3, %esi
callq 0x8080
movb -0x521(%rbp), %cl
movb %cl, (%rax)
leaq -0x1a8(%rbp), %rdi
callq 0x80a0
movq -0x520(%rbp), %rdi
movq %rax, -0x518(%rbp)
callq 0x7f60
movq %rax, %rsi
leaq -0x2f0(%rbp), %rdi
callq 0x6170
jmp 0x71a9
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
movl $0x1, %esi
callq 0x7fa0
movq -0x518(%rbp), %rdi
movzbl (%rax), %ecx
leaq -0x2b8(%rbp), %rsi
leaq -0x2f0(%rbp), %rdx
callq 0x21ec0
jmp 0x71e5
leaq -0x2f0(%rbp), %rdi
callq 0x61e0
leaq -0x2b8(%rbp), %rdi
callq 0x80c0
jmp 0x769e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x2cd(%rbp), %rdi
callq 0x8060
jmp 0x76b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x7257
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x61e0
leaq -0x2b8(%rbp), %rdi
callq 0x80c0
jmp 0x76b2
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7fa0
cmpl $-0x3, (%rax)
jne 0x75cf
movb $0x20, -0x31c(%rbp)
movb $0xd, -0x31b(%rbp)
movb $-0x3b, -0x31a(%rbp)
movb $0x0, -0x319(%rbp)
leaq -0x31c(%rbp), %rax
movq %rax, -0x318(%rbp)
movq $0x4, -0x310(%rbp)
leaq -0x31d(%rbp), %rdi
movq %rdi, -0x530(%rbp)
callq 0x7fc0
movq -0x530(%rbp), %rcx
movq -0x318(%rbp), %rsi
movq -0x310(%rbp), %rdx
leaq -0x308(%rbp), %rdi
callq 0x7fe0
jmp 0x72f8
leaq -0x31d(%rbp), %rdi
callq 0x8060
movb $0x20, -0x34c(%rbp)
movb $0xd, -0x34b(%rbp)
movb $-0x39, -0x34a(%rbp)
movb $0x0, -0x349(%rbp)
leaq -0x34c(%rbp), %rax
movq %rax, -0x348(%rbp)
movq $0x4, -0x340(%rbp)
leaq -0x34d(%rbp), %rdi
movq %rdi, -0x538(%rbp)
callq 0x7fc0
movq -0x538(%rbp), %rcx
movq -0x348(%rbp), %rsi
movq -0x340(%rbp), %rdx
leaq -0x338(%rbp), %rdi
callq 0x7fe0
jmp 0x736f
leaq -0x34d(%rbp), %rdi
callq 0x8060
leaq -0x200(%rbp), %rdi
movq %rdi, -0x548(%rbp)
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
movl $0x2, %esi
movq %rsi, -0x560(%rbp)
callq 0x7fa0
movb (%rax), %al
movb %al, -0x561(%rbp)
leaq -0x308(%rbp), %rdi
movl $0x3, %esi
movq %rsi, -0x558(%rbp)
callq 0x8080
movb -0x561(%rbp), %cl
movq -0x548(%rbp), %rdi
movb %cl, (%rax)
callq 0x7f60
movq -0x560(%rbp), %rsi
movq %rax, %rdi
addq $0x50, %rdi
callq 0x7fa0
movq -0x558(%rbp), %rsi
movb (%rax), %al
movb %al, -0x549(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x8080
movb -0x549(%rbp), %cl
movb %cl, (%rax)
leaq -0x1a8(%rbp), %rdi
callq 0x80a0
movq -0x548(%rbp), %rdi
movq %rax, -0x540(%rbp)
callq 0x7f60
movq %rax, %rsi
leaq -0x370(%rbp), %rdi
callq 0x6170
jmp 0x7440
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
movl $0x1, %esi
callq 0x7fa0
movq -0x540(%rbp), %rdi
movzbl (%rax), %ecx
leaq -0x308(%rbp), %rsi
leaq -0x370(%rbp), %rdx
callq 0x21ec0
jmp 0x747c
leaq -0x370(%rbp), %rdi
callq 0x61e0
leaq -0x1a8(%rbp), %rdi
callq 0x80a0
movq %rax, -0x570(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rsi
leaq -0x390(%rbp), %rdi
callq 0x6170
jmp 0x74b8
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
movl $0x1, %esi
callq 0x7fa0
movq -0x570(%rbp), %rdi
movzbl (%rax), %ecx
leaq -0x338(%rbp), %rsi
leaq -0x390(%rbp), %rdx
callq 0x21ec0
jmp 0x74f4
leaq -0x390(%rbp), %rdi
callq 0x61e0
leaq -0x338(%rbp), %rdi
callq 0x80c0
leaq -0x308(%rbp), %rdi
callq 0x80c0
jmp 0x769c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x31d(%rbp), %rdi
callq 0x8060
jmp 0x76b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x34d(%rbp), %rdi
callq 0x8060
jmp 0x75be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x75b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x370(%rbp), %rdi
callq 0x61e0
jmp 0x75b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x61e0
leaq -0x338(%rbp), %rdi
callq 0x80c0
leaq -0x308(%rbp), %rdi
callq 0x80c0
jmp 0x76b2
leaq -0x200(%rbp), %rdi
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7fa0
cmpl $-0x4, (%rax)
jne 0x769a
leaq -0x200(%rbp), %rdi
movq %rdi, -0x580(%rbp)
callq 0x7f60
movq %rax, %rdi
addq $0x50, %rdi
movl $0x1, %esi
callq 0x7fa0
movq -0x580(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x574(%rbp)
callq 0x7f60
movq %rax, %rsi
leaq -0x3b0(%rbp), %rdi
callq 0x6170
jmp 0x763d
movl -0x574(%rbp), %esi
leaq -0x138(%rbp), %rdi
leaq -0x3b0(%rbp), %rdx
callq 0x13a30
jmp 0x7658
leaq -0x3b0(%rbp), %rdi
callq 0x61e0
jmp 0x769a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x76b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x61e0
jmp 0x76b2
jmp 0x769c
jmp 0x769e
jmp 0x76a0
jmp 0x76a2
jmp 0x76a4
leaq -0x200(%rbp), %rdi
callq 0x8120
jmp 0x76cf
leaq -0x200(%rbp), %rdi
callq 0x8120
leaq -0x1f0(%rbp), %rdi
callq 0x8140
jmp 0x78a6
leaq -0x1f0(%rbp), %rdi
callq 0x8140
leaq -0x1b8(%rbp), %rdi
callq 0x8170
jmp 0x6bb4
leaq -0x408(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x81a0
leaq -0x438(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x139c0
jmp 0x7714
movzbl -0x134(%rbp), %ecx
leaq -0x3f8(%rbp), %rdi
leaq -0x408(%rbp), %rsi
leaq -0x438(%rbp), %rdx
callq 0x1a430
jmp 0x7737
leaq -0x438(%rbp), %rdi
callq 0x81d0
leaq -0x408(%rbp), %rdi
callq 0x81f0
leaq -0x450(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x8210
jmp 0x7764
leaq -0x468(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x13990
jmp 0x7779
leaq -0x3f8(%rbp), %rdi
leaq -0x450(%rbp), %rsi
leaq -0x468(%rbp), %rdx
callq 0x1a500
jmp 0x7795
leaq -0x468(%rbp), %rdi
callq 0x8300
leaq -0x450(%rbp), %rdi
callq 0x8360
leaq -0x3f8(%rbp), %rdi
callq 0x83c0
leaq -0x1a8(%rbp), %rdi
callq 0x81f0
leaq -0x178(%rbp), %rdi
callq 0x8360
movl $0x0, -0xc0(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x83f0
leaq -0x138(%rbp), %rdi
callq 0x8420
leaq -0x70(%rbp), %rdi
callq 0x8460
movl -0x4(%rbp), %eax
addq $0x580, %rsp            # imm = 0x580
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x783a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x81d0
leaq -0x408(%rbp), %rdi
callq 0x81f0
jmp 0x78a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x789a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x788e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x468(%rbp), %rdi
callq 0x8300
leaq -0x450(%rbp), %rdi
callq 0x8360
leaq -0x3f8(%rbp), %rdi
callq 0x83c0
leaq -0x1a8(%rbp), %rdi
callq 0x81f0
leaq -0x178(%rbp), %rdi
callq 0x8360
leaq -0x160(%rbp), %rdi
callq 0x83f0
leaq -0x138(%rbp), %rdi
callq 0x8420
leaq -0x70(%rbp), %rdi
callq 0x8460
movq -0x90(%rbp), %rdi
callq 0x6540
nopl (%rax,%rax)