// File: /workspace/github_c_makefile_star2_O0/mrkite[P]regs/src/omf.cc
// Function: OMF::relocSegments()
bool OMF::relocSegments() {
  for (auto &seg : segments) {
    auto done = false;
    auto pc = seg.mapped;
    auto data = std::vector<uint8_t>(seg.length);
    handle->seek(seg.offset);
    while (!done) {
      auto opcode = handle->r8();
      switch (opcode) {
        case DONE:
          done = true;
          break;
        case RELOC:
          {
            auto numBytes = handle->r8();
            auto bitShift = static_cast<int8_t>(handle->r8());
            auto offset = handle->r32();
            auto subOffset = handle->r32() + seg.mapped;
            if (bitShift < 0) {
              subOffset >>= -bitShift;
            } else {
              subOffset <<= bitShift;
            }
            patch(data, offset, numBytes, subOffset);
          }
          break;
        case INTERSEG:
          {
            auto numBytes = handle->r8();
            auto bitShift = static_cast<int8_t>(handle->r8());
            auto offset = handle->r32();
            handle->skip(2);  // filenum
            auto segnum = handle->r16();
            auto subOffset = handle->r32();
            for (auto &sub : segments) {
              if (sub.segnum == segnum) {
                subOffset += sub.mapped;
                break;
              }
            }
            if (bitShift < 0) {
              subOffset >>= -bitShift;
            } else {
              subOffset <<= bitShift;
            }
            patch(data, offset, numBytes, subOffset);
          }
          break;
        case DS:
          pc += handle->r32();  // filled with zeros
          break;
        case LCONST:
          {
            auto count = handle->r32();
            auto v = handle->readBytes(count);
            std::copy(v.begin(), v.end(), data.begin() + (pc - seg.mapped));
            pc += count;
          }
          break;
        case cRELOC:
          {
            auto numBytes = handle->r8();
            auto bitShift = static_cast<int8_t>(handle->r8());
            auto offset = handle->r16();
            auto subOffset = handle->r16() + seg.mapped;
            if (bitShift < 0) {
              subOffset >>= -bitShift;
            } else {
              subOffset <<= bitShift;
            }
            patch(data, offset, numBytes, subOffset);
          }
          break;
        case cINTERSEG:
          {
            auto numBytes = handle->r8();
            auto bitShift = static_cast<int8_t>(handle->r8());
            auto offset = handle->r16();
            auto segnum = handle->r8();
            int32_t subOffset = handle->r16();
            for (auto &sub : segments) {
              if (sub.segnum == segnum) {
                subOffset += sub.mapped;
                break;
              }
            }
            if (bitShift < 0) {
              subOffset >>= -bitShift;
            } else {
              subOffset <<= bitShift;
            }
            patch(data, offset, numBytes, subOffset);
          }
          break;
        case SUPER:
          {
            auto superLen = handle->r32();
            superLen += handle->tell();
            auto superType = handle->r8();
            int32_t superPage = 0;
            while (handle->tell() < superLen) {
              auto numOfs = handle->r8();
              if (numOfs & 0x80) {
                superPage += 256 * (numOfs & 0x7f);
                continue;
              }
              auto subHandle = TheHandle::createFromArray(data);
              for (auto o = 0; o <= numOfs; o++) {
                auto offset = superPage | handle->r8();
                uint8_t numBytes = 0;
                subHandle->seek(offset);
                int32_t subOffset = subHandle->r16();
                if (superType == 0 || superType == 1) {
                  subOffset += seg.mapped;
                  numBytes = superType + 2;
                } else if (superType < 14) {  // INTERSEG1-12
                  auto segnum = subHandle->r8();
                  for (auto &sub : segments) {
                    if (sub.segnum == segnum) {
                      subOffset += sub.mapped;
                      break;
                    }
                  }
                  numBytes = 3;
                } else if (superType < 26) {  // INTERSEG13-14
                  auto segnum = superType - 13;
                  for (auto &sub : segments) {
                    if (sub.segnum == segnum) {
                      subOffset += sub.mapped;
                      break;
                    }
                  }
                  numBytes = 2;
                } else {  // INTERSEG25-36
                  auto segnum = superType - 25;
                  for (auto &sub : segments) {
                    if (sub.segnum == segnum) {
                      subOffset += sub.mapped;
                      break;
                    }
                  }
                  subOffset >>= 16;
                  numBytes = 2;
                }
                patch(data, offset, numBytes, subOffset);
              }
              superPage += 256;
            }
          }
          break;
        default:
          if (opcode < 0xe0) {
            auto v = handle->readBytes(opcode);
            std::copy(v.begin(), v.end(), data.begin() + (pc - seg.mapped));
            pc += opcode;
          } else {
            fprintf(stderr, "Unknown segment opcode: $%02x\n", opcode);
            return false;
          }
          break;
      }
    }
    if (seg.isJump()) {  // patch jumptable
      for (int i = 8; i < seg.length - 14; i += 14) {
        uint16_t segnum = data[i + 4] | (data[i + 5] << 8);
        int32_t subOffset = data[i + 6] | (data[i + 7] << 8) |
            (data[i + 8] << 16) | (data[i + 9] << 24);
        for (auto &sub : segments) {
          if (sub.segnum == segnum) {
            subOffset += sub.mapped;
            break;
          }
        }
        patch(data, i + 11, 3, subOffset);
      }
    }
    seg.data = TheHandle::createFromArray(data);
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x250(%rbp)
addq $0x10, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7cb0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7ce0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7d10
testb $0x1, %al
jne 0xbc82
jmp 0xcd7d
leaq -0x20(%rbp), %rdi
callq 0x7d50
movq %rax, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x30(%rbp), %rax
movl 0x60(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movslq 0x8(%rax), %rax
movq %rax, -0x260(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x7fc0
movq -0x260(%rbp), %rsi
movq -0x258(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0xd630
jmp 0xbcd5
leaq -0x51(%rbp), %rdi
callq 0x8060
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x12210
jmp 0xbcfc
jmp 0xbcfe
movb -0x31(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xbd0c
jmp 0xcb0d
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x261(%rbp)
jmp 0xbd28
movb -0x261(%rbp), %al
movb %al, -0x65(%rbp)
movzbl -0x65(%rbp), %eax
movl %eax, -0x268(%rbp)
testl %eax, %eax
je 0xbdf8
jmp 0xbd45
movl -0x268(%rbp), %eax
subl $0xe2, %eax
je 0xbe01
jmp 0xbd58
movl -0x268(%rbp), %eax
subl $0xe3, %eax
je 0xbee5
jmp 0xbd6b
movl -0x268(%rbp), %eax
subl $0xf1, %eax
je 0xc09e
jmp 0xbd7e
movl -0x268(%rbp), %eax
subl $0xf2, %eax
je 0xc0cb
jmp 0xbd91
movl -0x268(%rbp), %eax
subl $0xf5, %eax
je 0xc1e0
jmp 0xbda4
movl -0x268(%rbp), %eax
subl $0xf6, %eax
je 0xc2f7
jmp 0xbdb7
movl -0x268(%rbp), %eax
subl $0xf7, %eax
je 0xc4d1
jmp 0xc9e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x8060
jmp 0xcd8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xcd72
movb $0x1, -0x31(%rbp)
jmp 0xcb08
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x269(%rbp)
jmp 0xbe1d
movq -0x250(%rbp), %rdi
movb -0x269(%rbp), %al
movb %al, -0x66(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x26a(%rbp)
jmp 0xbe42
movq -0x250(%rbp), %rdi
movb -0x26a(%rbp), %al
movb %al, -0x67(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11e90
movl %eax, -0x270(%rbp)
jmp 0xbe67
movq -0x250(%rbp), %rdi
movl -0x270(%rbp), %eax
movl %eax, -0x6c(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11e90
movl %eax, -0x274(%rbp)
jmp 0xbe8c
movl -0x274(%rbp), %eax
movq -0x30(%rbp), %rcx
addl 0x60(%rcx), %eax
movl %eax, -0x70(%rbp)
movsbl -0x67(%rbp), %eax
cmpl $0x0, %eax
jge 0xbeb7
movsbl -0x67(%rbp), %eax
xorl %ecx, %ecx
subl %eax, %ecx
movl -0x70(%rbp), %eax
shrl %cl, %eax
movl %eax, -0x70(%rbp)
jmp 0xbec3
movsbl -0x67(%rbp), %ecx
movl -0x70(%rbp), %eax
shll %cl, %eax
movl %eax, -0x70(%rbp)
movq -0x250(%rbp), %rdi
movl -0x6c(%rbp), %edx
movzbl -0x66(%rbp), %ecx
movl -0x70(%rbp), %r8d
leaq -0x50(%rbp), %rsi
callq 0xd1b0
jmp 0xbee0
jmp 0xcb08
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x275(%rbp)
jmp 0xbf01
movq -0x250(%rbp), %rdi
movb -0x275(%rbp), %al
movb %al, -0x71(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x276(%rbp)
jmp 0xbf26
movq -0x250(%rbp), %rdi
movb -0x276(%rbp), %al
movb %al, -0x72(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11e90
movl %eax, -0x27c(%rbp)
jmp 0xbf4b
movq -0x250(%rbp), %rdi
movl -0x27c(%rbp), %eax
movl %eax, -0x78(%rbp)
callq 0xd2c0
movq %rax, %rdi
movl $0x2, %esi
callq 0x12230
jmp 0xbf6f
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x27e(%rbp)
jmp 0xbf8c
movq -0x250(%rbp), %rdi
movw -0x27e(%rbp), %ax
movw %ax, -0x7a(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11e90
movl %eax, -0x284(%rbp)
jmp 0xbfb3
movq -0x250(%rbp), %rax
movl -0x284(%rbp), %ecx
movl %ecx, -0x80(%rbp)
addq $0x10, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x7cb0
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0x7ce0
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x7d10
testb $0x1, %al
jne 0xc00d
jmp 0xc055
leaq -0x90(%rbp), %rdi
callq 0x7d50
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movswl 0x1c(%rax), %eax
movzwl -0x7a(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc045
movq -0xa0(%rbp), %rax
movl 0x60(%rax), %eax
addl -0x80(%rbp), %eax
movl %eax, -0x80(%rbp)
jmp 0xc055
jmp 0xc047
leaq -0x90(%rbp), %rdi
callq 0x7d70
jmp 0xbff4
movsbl -0x72(%rbp), %eax
cmpl $0x0, %eax
jge 0xc070
movsbl -0x72(%rbp), %eax
xorl %ecx, %ecx
subl %eax, %ecx
movl -0x80(%rbp), %eax
shrl %cl, %eax
movl %eax, -0x80(%rbp)
jmp 0xc07c
movsbl -0x72(%rbp), %ecx
movl -0x80(%rbp), %eax
shll %cl, %eax
movl %eax, -0x80(%rbp)
movq -0x250(%rbp), %rdi
movl -0x78(%rbp), %edx
movzbl -0x71(%rbp), %ecx
movl -0x80(%rbp), %r8d
leaq -0x50(%rbp), %rsi
callq 0xd1b0
jmp 0xc099
jmp 0xcb08
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11e90
movl %eax, -0x288(%rbp)
jmp 0xc0ba
movl -0x288(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0xcb08
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11e90
movl %eax, -0x28c(%rbp)
jmp 0xc0e7
movq -0x250(%rbp), %rdi
movl -0x28c(%rbp), %eax
movl %eax, -0xa4(%rbp)
callq 0xd2c0
movq %rax, %rsi
movl -0xa4(%rbp), %edx
leaq -0xc0(%rbp), %rdi
callq 0x12150
jmp 0xc116
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0xd710
movq -0x2a0(%rbp), %rdi
movq %rax, -0xc8(%rbp)
callq 0xd740
movq %rax, -0xd0(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xd710
movq %rax, -0xe0(%rbp)
movl -0x38(%rbp), %eax
movq -0x30(%rbp), %rcx
movl 0x60(%rcx), %ecx
subl %ecx, %eax
movslq %eax, %rsi
leaq -0xe0(%rbp), %rdi
callq 0xd770
movq %rax, -0xd8(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0xd6a0
movq %rax, -0x298(%rbp)
jmp 0xc198
movq -0x298(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl -0xa4(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x80c0
jmp 0xcb08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x80c0
jmp 0xcd72
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2a1(%rbp)
jmp 0xc1fc
movq -0x250(%rbp), %rdi
movb -0x2a1(%rbp), %al
movb %al, -0xe9(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2a2(%rbp)
jmp 0xc224
movq -0x250(%rbp), %rdi
movb -0x2a2(%rbp), %al
movb %al, -0xea(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x2a4(%rbp)
jmp 0xc24d
movq -0x250(%rbp), %rdi
movw -0x2a4(%rbp), %ax
movw %ax, -0xec(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x2a6(%rbp)
jmp 0xc278
movw -0x2a6(%rbp), %ax
movzwl %ax, %eax
movq -0x30(%rbp), %rcx
addl 0x60(%rcx), %eax
movl %eax, -0xf0(%rbp)
movsbl -0xea(%rbp), %eax
cmpl $0x0, %eax
jge 0xc2b6
movsbl -0xea(%rbp), %eax
xorl %ecx, %ecx
subl %eax, %ecx
movl -0xf0(%rbp), %eax
sarl %cl, %eax
movl %eax, -0xf0(%rbp)
jmp 0xc2cb
movsbl -0xea(%rbp), %ecx
movl -0xf0(%rbp), %eax
shll %cl, %eax
movl %eax, -0xf0(%rbp)
movq -0x250(%rbp), %rdi
movzwl -0xec(%rbp), %edx
movzbl -0xe9(%rbp), %ecx
movl -0xf0(%rbp), %r8d
leaq -0x50(%rbp), %rsi
callq 0xd1b0
jmp 0xc2f2
jmp 0xcb08
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2a7(%rbp)
jmp 0xc313
movq -0x250(%rbp), %rdi
movb -0x2a7(%rbp), %al
movb %al, -0xf1(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2a8(%rbp)
jmp 0xc33b
movq -0x250(%rbp), %rdi
movb -0x2a8(%rbp), %al
movb %al, -0xf2(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x2aa(%rbp)
jmp 0xc364
movq -0x250(%rbp), %rdi
movw -0x2aa(%rbp), %ax
movw %ax, -0xf4(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2ab(%rbp)
jmp 0xc38e
movq -0x250(%rbp), %rdi
movb -0x2ab(%rbp), %al
movb %al, -0xf5(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x2ae(%rbp)
jmp 0xc3b7
movq -0x250(%rbp), %rax
movw -0x2ae(%rbp), %cx
movzwl %cx, %ecx
movl %ecx, -0xfc(%rbp)
addq $0x10, %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
callq 0x7cb0
movq %rax, -0x110(%rbp)
movq -0x108(%rbp), %rdi
callq 0x7ce0
movq %rax, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x7d10
testb $0x1, %al
jne 0xc418
jmp 0xc469
leaq -0x110(%rbp), %rdi
callq 0x7d50
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movswl 0x1c(%rax), %eax
movzbl -0xf5(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc459
movq -0x120(%rbp), %rax
movl 0x60(%rax), %eax
addl -0xfc(%rbp), %eax
movl %eax, -0xfc(%rbp)
jmp 0xc469
jmp 0xc45b
leaq -0x110(%rbp), %rdi
callq 0x7d70
jmp 0xc3ff
movsbl -0xf2(%rbp), %eax
cmpl $0x0, %eax
jge 0xc490
movsbl -0xf2(%rbp), %eax
xorl %ecx, %ecx
subl %eax, %ecx
movl -0xfc(%rbp), %eax
sarl %cl, %eax
movl %eax, -0xfc(%rbp)
jmp 0xc4a5
movsbl -0xf2(%rbp), %ecx
movl -0xfc(%rbp), %eax
shll %cl, %eax
movl %eax, -0xfc(%rbp)
movq -0x250(%rbp), %rdi
movzwl -0xf4(%rbp), %edx
movzbl -0xf1(%rbp), %ecx
movl -0xfc(%rbp), %r8d
leaq -0x50(%rbp), %rsi
callq 0xd1b0
jmp 0xc4cc
jmp 0xcb08
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11e90
movl %eax, -0x2b4(%rbp)
jmp 0xc4ed
movq -0x250(%rbp), %rdi
movl -0x2b4(%rbp), %eax
movl %eax, -0x124(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11e70
movq %rax, -0x2c0(%rbp)
jmp 0xc516
movq -0x250(%rbp), %rdi
movq -0x2c0(%rbp), %rcx
movl -0x124(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x124(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2c1(%rbp)
jmp 0xc547
movb -0x2c1(%rbp), %al
movb %al, -0x125(%rbp)
movl $0x0, -0x12c(%rbp)
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11e70
movq %rax, -0x2d0(%rbp)
jmp 0xc57a
movq -0x2d0(%rbp), %rax
movl -0x124(%rbp), %ecx
cmpq %rcx, %rax
jge 0xc9dd
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2d1(%rbp)
jmp 0xc5ac
movb -0x2d1(%rbp), %al
movb %al, -0x12d(%rbp)
movzbl -0x12d(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xc5e7
movzbl -0x12d(%rbp), %eax
andl $0x7f, %eax
shll $0x8, %eax
addl -0x12c(%rbp), %eax
movl %eax, -0x12c(%rbp)
jmp 0xc55d
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x11b10
jmp 0xc5f9
movl $0x0, -0x144(%rbp)
movl -0x144(%rbp), %eax
movzbl -0x12d(%rbp), %ecx
cmpl %ecx, %eax
jg 0xc9bb
movq -0x250(%rbp), %rdi
movl -0x12c(%rbp), %eax
movl %eax, -0x2d8(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2d2(%rbp)
jmp 0xc640
movl -0x2d8(%rbp), %eax
movb -0x2d2(%rbp), %cl
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, -0x148(%rbp)
movb $0x0, -0x149(%rbp)
leaq -0x140(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
movslq -0x148(%rbp), %rsi
callq 0x12210
jmp 0xc67b
leaq -0x140(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x2da(%rbp)
jmp 0xc698
movw -0x2da(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0x150(%rbp)
movzbl -0x125(%rbp), %eax
cmpl $0x0, %eax
je 0xc6c0
movzbl -0x125(%rbp), %eax
cmpl $0x1, %eax
jne 0xc705
movq -0x30(%rbp), %rax
movl 0x60(%rax), %eax
addl -0x150(%rbp), %eax
movl %eax, -0x150(%rbp)
movzbl -0x125(%rbp), %eax
addl $0x2, %eax
movb %al, -0x149(%rbp)
jmp 0xc97f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x8b80
jmp 0xcd72
movzbl -0x125(%rbp), %eax
cmpl $0xe, %eax
jge 0xc7eb
leaq -0x140(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x2db(%rbp)
jmp 0xc731
movq -0x250(%rbp), %rax
movb -0x2db(%rbp), %cl
movb %cl, -0x151(%rbp)
addq $0x10, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rdi
callq 0x7cb0
movq %rax, -0x168(%rbp)
movq -0x160(%rbp), %rdi
callq 0x7ce0
movq %rax, -0x170(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x7d10
testb $0x1, %al
jne 0xc78e
jmp 0xc7df
leaq -0x168(%rbp), %rdi
callq 0x7d50
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movswl 0x1c(%rax), %eax
movzbl -0x151(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc7cf
movq -0x178(%rbp), %rax
movl 0x60(%rax), %eax
addl -0x150(%rbp), %eax
movl %eax, -0x150(%rbp)
jmp 0xc7df
jmp 0xc7d1
leaq -0x168(%rbp), %rdi
callq 0x7d70
jmp 0xc775
movb $0x3, -0x149(%rbp)
jmp 0xc97d
movzbl -0x125(%rbp), %eax
cmpl $0x1a, %eax
jge 0xc8b6
movq -0x250(%rbp), %rax
movzbl -0x125(%rbp), %ecx
subl $0xd, %ecx
movl %ecx, -0x17c(%rbp)
addq $0x10, %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rdi
callq 0x7cb0
movq %rax, -0x190(%rbp)
movq -0x188(%rbp), %rdi
callq 0x7ce0
movq %rax, -0x198(%rbp)
leaq -0x190(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x7d10
testb $0x1, %al
jne 0xc85c
jmp 0xc8aa
leaq -0x190(%rbp), %rdi
callq 0x7d50
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rax
movswl 0x1c(%rax), %eax
cmpl -0x17c(%rbp), %eax
jne 0xc89a
movq -0x1a0(%rbp), %rax
movl 0x60(%rax), %eax
addl -0x150(%rbp), %eax
movl %eax, -0x150(%rbp)
jmp 0xc8aa
jmp 0xc89c
leaq -0x190(%rbp), %rdi
callq 0x7d70
jmp 0xc843
movb $0x2, -0x149(%rbp)
jmp 0xc97b
movq -0x250(%rbp), %rax
movzbl -0x125(%rbp), %ecx
subl $0x19, %ecx
movl %ecx, -0x1a4(%rbp)
addq $0x10, %rax
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rdi
callq 0x7cb0
movq %rax, -0x1b8(%rbp)
movq -0x1b0(%rbp), %rdi
callq 0x7ce0
movq %rax, -0x1c0(%rbp)
leaq -0x1b8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x7d10
testb $0x1, %al
jne 0xc917
jmp 0xc965
leaq -0x1b8(%rbp), %rdi
callq 0x7d50
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movswl 0x1c(%rax), %eax
cmpl -0x1a4(%rbp), %eax
jne 0xc955
movq -0x1c8(%rbp), %rax
movl 0x60(%rax), %eax
addl -0x150(%rbp), %eax
movl %eax, -0x150(%rbp)
jmp 0xc965
jmp 0xc957
leaq -0x1b8(%rbp), %rdi
callq 0x7d70
jmp 0xc8fe
movl -0x150(%rbp), %eax
sarl $0x10, %eax
movl %eax, -0x150(%rbp)
movb $0x2, -0x149(%rbp)
jmp 0xc97d
jmp 0xc97f
movq -0x250(%rbp), %rdi
movl -0x148(%rbp), %edx
movzbl -0x149(%rbp), %ecx
movl -0x150(%rbp), %r8d
leaq -0x50(%rbp), %rsi
callq 0xd1b0
jmp 0xc9a5
jmp 0xc9a7
movl -0x144(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x144(%rbp)
jmp 0xc603
movl -0x12c(%rbp), %eax
addl $0x100, %eax            # imm = 0x100
movl %eax, -0x12c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x8b80
jmp 0xc55d
jmp 0xcb08
movzbl -0x65(%rbp), %eax
cmpl $0xe0, %eax
jge 0xcad7
movq -0x250(%rbp), %rdi
callq 0xd2c0
movq %rax, %rsi
movzbl -0x65(%rbp), %edx
leaq -0x1e0(%rbp), %rdi
callq 0x12150
jmp 0xca12
leaq -0x1e0(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0xd710
movq -0x2f0(%rbp), %rdi
movq %rax, -0x1e8(%rbp)
callq 0xd740
movq %rax, -0x1f0(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xd710
movq %rax, -0x200(%rbp)
movl -0x38(%rbp), %eax
movq -0x30(%rbp), %rcx
movl 0x60(%rcx), %ecx
subl %ecx, %eax
movslq %eax, %rsi
leaq -0x200(%rbp), %rdi
callq 0xd770
movq %rax, -0x1f8(%rbp)
movq -0x1e8(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
callq 0xd6a0
movq %rax, -0x2e8(%rbp)
jmp 0xca94
movq -0x2e8(%rbp), %rax
movq %rax, -0x208(%rbp)
movzbl -0x65(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x80c0
jmp 0xcb06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x80c0
jmp 0xcd72
movq 0x4a4ea(%rip), %rax     # 0x56fc8
movq (%rax), %rdi
movzbl -0x65(%rbp), %edx
leaq 0x2d772(%rip), %rsi     # 0x3a25e
movb $0x0, %al
callq 0x6450
movb $0x0, -0x1(%rbp)
movl $0x1, -0x20c(%rbp)
jmp 0xcd4b
jmp 0xcb08
jmp 0xbcfe
movq -0x30(%rbp), %rdi
callq 0xb180
testb $0x1, %al
jne 0xcb1f
jmp 0xcd0f
movl $0x8, -0x210(%rbp)
movl -0x210(%rbp), %eax
movq -0x30(%rbp), %rcx
movl 0x8(%rcx), %ecx
subl $0xe, %ecx
cmpl %ecx, %eax
jge 0xcd0d
movl -0x210(%rbp), %eax
addl $0x4, %eax
movslq %eax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x8080
movzbl (%rax), %eax
movl %eax, -0x300(%rbp)
movl -0x210(%rbp), %eax
addl $0x5, %eax
movslq %eax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x8080
movq %rax, %rcx
movl -0x300(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, -0x212(%rbp)
movl -0x210(%rbp), %eax
addl $0x6, %eax
movslq %eax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x8080
movzbl (%rax), %eax
movl %eax, -0x2fc(%rbp)
movl -0x210(%rbp), %eax
addl $0x7, %eax
movslq %eax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x8080
movq %rax, %rcx
movl -0x2fc(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x2f8(%rbp)
movl -0x210(%rbp), %eax
addl $0x8, %eax
movslq %eax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x8080
movq %rax, %rcx
movl -0x2f8(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x2f4(%rbp)
movl -0x210(%rbp), %eax
addl $0x9, %eax
movslq %eax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x8080
movl -0x2f4(%rbp), %ecx
movq %rax, %rdx
movq -0x250(%rbp), %rax
movzbl (%rdx), %edx
shll $0x18, %edx
orl %edx, %ecx
movl %ecx, -0x218(%rbp)
addq $0x10, %rax
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rdi
callq 0x7cb0
movq %rax, -0x228(%rbp)
movq -0x220(%rbp), %rdi
callq 0x7ce0
movq %rax, -0x230(%rbp)
leaq -0x228(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x7d10
testb $0x1, %al
jne 0xcc7f
jmp 0xccd0
leaq -0x228(%rbp), %rdi
callq 0x7d50
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movswl 0x1c(%rax), %eax
movzwl -0x212(%rbp), %ecx
cmpl %ecx, %eax
jne 0xccc0
movq -0x238(%rbp), %rax
movl 0x60(%rax), %eax
addl -0x218(%rbp), %eax
movl %eax, -0x218(%rbp)
jmp 0xccd0
jmp 0xccc2
leaq -0x228(%rbp), %rdi
callq 0x7d70
jmp 0xcc66
movq -0x250(%rbp), %rdi
movl -0x210(%rbp), %edx
addl $0xb, %edx
movl -0x218(%rbp), %r8d
leaq -0x50(%rbp), %rsi
movl $0x3, %ecx
callq 0xd1b0
jmp 0xccf7
jmp 0xccf9
movl -0x210(%rbp), %eax
addl $0xe, %eax
movl %eax, -0x210(%rbp)
jmp 0xcb29
jmp 0xcd0f
leaq -0x248(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x11b10
jmp 0xcd21
movq -0x30(%rbp), %rdi
addq $0x50, %rdi
leaq -0x248(%rbp), %rsi
callq 0xd290
leaq -0x248(%rbp), %rdi
callq 0x8b80
movl $0x0, -0x20c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x80c0
movl -0x20c(%rbp), %eax
testl %eax, %eax
je 0xcd62
jmp 0xcd60
jmp 0xcd81
jmp 0xcd64
leaq -0x20(%rbp), %rdi
callq 0x7d70
jmp 0xbc6c
leaq -0x50(%rbp), %rdi
callq 0x80c0
jmp 0xcd8f
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x6540
nopl (%rax,%rax)