// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/src/vmir.c
// Function: vmir_load
int
vmir_load(ir_unit_t *iu, const uint8_t *u8, int len)
{
  bcbitstream_t bs = {0};
  bs.rdata = u8;
  bs.bytes_length = len;


  TAILQ_INIT(&iu->iu_functions_with_bodies);

  if(setjmp(iu->iu_parser_jmp)) {
    iu_cleanup(iu);
    return VMIR_ERR_LOAD_ERROR;
  }

#ifdef VMIR_VM_JIT
  jit_init(iu);
#endif

  const uint32_t magic = read_bits(&bs, 32);
  // crosss....cogbee
  read_bits(&bs, 32*5);
  iu->iu_data_ptr = 4096;
  switch(magic) {

  case 0x6d736100: // WebAssembly
    iu->iu_mode = VMIR_WASM;
    wasm_parse_module(iu, u8 + 4, u8 + len);
    break;

  case 0xdec04342: // LLVM Bitcode
  case 0x0b17c0de: // LLVM Bitcode
    // WebAssembly need memory at 0. Bitcode don't really.
    ir_parse_blocks(iu, 2, NULL, NULL, &bs);
    break;
  default:
    return VMIR_ERR_NOT_BITCODE;
  }

  free(iu->iu_text_alloc);

#ifdef VMIR_VM_JIT
  jit_seal_code(iu);
#endif
  iu->iu_heap_start = VMIR_ALIGN(iu->iu_data_ptr, 4096);
  iu->iu_stats.data_size = iu->iu_heap_start;

  vmir_heap_init(iu);

  initialize_globals(iu, iu->iu_mem);

  libc_initialize(iu);

  iu->iu_vm_funcs  = calloc(VECTOR_LEN(&iu->iu_functions), sizeof(void *));
  iu->iu_function_table = calloc(VECTOR_LEN(&iu->iu_functions), sizeof(void *));
  
  for(int i = 0; i < VECTOR_LEN(&iu->iu_functions); i++) {
    ir_function_t *f = VECTOR_ITEM(&iu->iu_functions, i);

    iu->iu_vm_funcs[i]  = f->if_vm_text;
    iu->iu_function_table[i] = f->if_ext_func;
    if(f->if_used && f->if_vm_text == NULL && f->if_ext_func == NULL) {
      vmir_log(iu, VMIR_LOG_ERROR, "....Function %s() is not defined", f->if_name);
      if(!(iu->iu_debug_flags & VMIR_DBG_IGNORE_UNRESOLVED_FUNCTIONS)) {
        parser_error(iu, "Function %s() is not defined", f->if_name);
      }
    }
  }

  run_global_ctors(iu);

  iu_cleanup(iu);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movl %edx, 0x68(%rsp)
andq $0x0, 0x1a8(%rdi)
leaq 0x1a8(%rdi), %rax
movq %rax, 0x1b0(%rdi)
addq $0x370, %rdi            # imm = 0x370
callq 0x32e0
testl %eax, %eax
je 0xa29f
movq %rbx, %rdi
callq 0xb41e
pushq $-0x2
popq %rax
jmp 0xb1b5
leaq 0x60(%rsp), %r12
pushq $0x20
popq %rsi
movq %r12, %rdi
callq 0xb602
movl %eax, %r15d
movq %r12, %rdi
movl $0xa0, %esi
callq 0xb602
movl $0x1000, 0x88(%rbx)     # imm = 0x1000
cmpl $0xdec04342, %r15d      # imm = 0xDEC04342
je 0xae49
cmpl $0xb17c0de, %r15d       # imm = 0xB17C0DE
je 0xae49
cmpl $0x6d736100, %r15d      # imm = 0x6D736100
jne 0xae62
movl $0x1, 0x64(%rbx)
leaq 0x4(%r14), %r12
movslq %ebp, %r15
addq %r14, %r15
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
xorl %ecx, %ecx
cmpl $0x8, %ebp
jl 0xa327
movl 0x4(%r14), %ecx
addq $0x8, %r14
movq %r14, 0x18(%rsp)
movq %r14, %r12
leaq 0x163ad(%rip), %rdx     # 0x206db
xorl %eax, %eax
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x3fc2
movq 0x168(%rbx), %rdi
movq 0x170(%rbx), %r14
leaq 0x1(%r14), %r13
cmpq 0x178(%rbx), %r13
jbe 0xa378
leaq (,%r13,2), %rax
movq %rax, 0x178(%rbx)
imulq $0x50, %r13, %rsi
callq 0x33c0
movq %rax, 0x168(%rbx)
movq %rax, %rdi
movq %r13, 0x170(%rbx)
imulq $0x28, %r14, %rax
movl $0x1, (%rdi,%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdi,%rax)
movups %xmm0, 0x14(%rdi,%rax)
andl $0x0, 0x24(%rdi,%rax)
movq 0x168(%rbx), %rdi
movq 0x170(%rbx), %r14
leaq 0x1(%r14), %r13
cmpq 0x178(%rbx), %r13
jbe 0xa3dc
leaq (,%r13,2), %rax
movq %rax, 0x178(%rbx)
imulq $0x50, %r13, %rsi
callq 0x33c0
xorps %xmm0, %xmm0
movq %rax, 0x168(%rbx)
movq %rax, %rdi
movq %r13, 0x170(%rbx)
imulq $0x28, %r14, %rax
movl $0x5, (%rdi,%rax)
movups %xmm0, 0x4(%rdi,%rax)
movups %xmm0, 0x14(%rdi,%rax)
andl $0x0, 0x24(%rdi,%rax)
movq 0x168(%rbx), %rdi
movq 0x170(%rbx), %r14
leaq 0x1(%r14), %r13
cmpq 0x178(%rbx), %r13
jbe 0xa43a
leaq (,%r13,2), %rax
movq %rax, 0x178(%rbx)
imulq $0x50, %r13, %rsi
callq 0x33c0
movq %rax, 0x168(%rbx)
movq %rax, %rdi
movq %r13, 0x170(%rbx)
imulq $0x28, %r14, %rax
movl $0x6, (%rdi,%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdi,%rax)
movups %xmm0, 0x14(%rdi,%rax)
andl $0x0, 0x24(%rdi,%rax)
movq 0x168(%rbx), %rdi
movq 0x170(%rbx), %r14
leaq 0x1(%r14), %r13
cmpq 0x178(%rbx), %r13
jbe 0xa49e
leaq (,%r13,2), %rax
movq %rax, 0x178(%rbx)
imulq $0x50, %r13, %rsi
callq 0x33c0
xorps %xmm0, %xmm0
movq %rax, 0x168(%rbx)
movq %rax, %rdi
movq %r13, 0x170(%rbx)
imulq $0x28, %r14, %rax
movl $0x8, (%rdi,%rax)
movups %xmm0, 0x4(%rdi,%rax)
movups %xmm0, 0x14(%rdi,%rax)
andl $0x0, 0x24(%rdi,%rax)
movq 0x168(%rbx), %rdi
movq 0x170(%rbx), %r14
leaq 0x1(%r14), %r13
cmpq 0x178(%rbx), %r13
jbe 0xa4fc
leaq (,%r13,2), %rax
movq %rax, 0x178(%rbx)
imulq $0x50, %r13, %rsi
callq 0x33c0
movq %rax, 0x168(%rbx)
movq %rax, %rdi
movq %r13, 0x170(%rbx)
imulq $0x28, %r14, %rax
movl $0x9, (%rdi,%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdi,%rax)
movups %xmm0, 0x14(%rdi,%rax)
andl $0x0, 0x24(%rdi,%rax)
movq 0x168(%rbx), %rdi
movq 0x170(%rbx), %r14
leaq 0x1(%r14), %r13
cmpq 0x178(%rbx), %r13
jbe 0xa560
leaq (,%r13,2), %rax
movq %rax, 0x178(%rbx)
imulq $0x50, %r13, %rsi
callq 0x33c0
xorps %xmm0, %xmm0
movq %rax, 0x168(%rbx)
movq %rax, %rdi
movq %r13, 0x170(%rbx)
imulq $0x28, %r14, %rax
movl $0x3, (%rdi,%rax)
movups %xmm0, 0x4(%rdi,%rax)
movups %xmm0, 0x14(%rdi,%rax)
andl $0x0, 0x24(%rdi,%rax)
movq 0x168(%rbx), %rdi
movq 0x170(%rbx), %r14
leaq 0x1(%r14), %r13
cmpq 0x178(%rbx), %r13
jbe 0xa5be
leaq (,%r13,2), %rax
movq %rax, 0x178(%rbx)
imulq $0x50, %r13, %rsi
callq 0x33c0
movq %rax, 0x168(%rbx)
movq %rax, %rdi
movq %r13, 0x170(%rbx)
imulq $0x28, %r14, %rax
movl $0x4, (%rdi,%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdi,%rax)
andl $0x0, 0x24(%rdi,%rax)
movups %xmm0, 0x14(%rdi,%rax)
cmpq %r15, %r12
jae 0xae69
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0xe21c
movl %eax, %r15d
movq %r14, %rdi
callq 0xe21c
movl %eax, %eax
addq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
cmpl $0xb, %r15d
ja 0xab2f
movl %r15d, %eax
leaq 0x14521(%rip), %rcx     # 0x1eb44
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe252
movq %rax, %r15
xorl %eax, %eax
movq %rbx, %rdi
pushq $0x3
popq %rsi
leaq 0x160a2(%rip), %rdx     # 0x206eb
movq %r15, %rcx
callq 0x3fc2
movq %r15, %rdi
callq 0x3030
jmp 0xab46
movq %r14, %rdi
callq 0xe21c
movl %eax, %ebp
subl $0x1, %ebp
jb 0xab46
movq %rbx, %rdi
leaq 0x18(%rsp), %r14
movq %r14, %rsi
callq 0xe252
movq %rax, 0x30(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe252
movq %rax, %r12
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq %rcx, %rax
jae 0xb270
movzbl (%rax), %edx
movl %edx, %esi
leaq 0x1(%rax), %rdx
movq %rdx, 0x18(%rsp)
cmpq $0x3, %rsi
ja 0xb274
leaq 0x144ae(%rip), %rdi     # 0x1eb74
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
leaq 0x18(%rsp), %rdi
callq 0xe21c
movq 0x580(%rbx), %rcx
cltq
movl (%rcx,%rax,4), %r14d
pushq $0x1
popq %rdi
movl $0x90, %esi
callq 0x32f0
movq %rax, %r15
addq $0x48, %rax
movq %rax, 0x50(%r15)
movl %r14d, 0x10(%r15)
movq 0x2e0(%rbx), %r14
movl %r14d, 0x34(%r15)
movq %r12, %rdi
callq 0x34d0
movq %rax, 0x20(%r15)
leaq 0x1(%r14), %r13
movq 0x2d8(%rbx), %rdi
cmpq 0x2e8(%rbx), %r13
jbe 0xa752
leaq (,%r13,2), %rax
movq %rax, 0x2e8(%rbx)
movq %r13, %rsi
shlq $0x4, %rsi
callq 0x33c0
movq %rax, 0x2d8(%rbx)
movq %rax, %rdi
movq %r13, 0x2e0(%rbx)
movq %r15, (%rdi,%r14,8)
cmpq $0x0, 0x70(%r15)
jne 0xa77e
movq %r15, %rdi
callq 0xe325
testl %eax, %eax
jne 0xa77e
movq 0x20(%r15), %rdi
movq 0x48(%rbx), %rsi
callq *(%rbx)
movq %rax, 0x70(%r15)
movq 0x30(%rsp), %rdi
callq 0x3030
movq %r12, %rdi
callq 0x3030
jmp 0xa668
movq %r14, %rdi
callq 0xe21c
movl %eax, %ebp
subl $0x1, %ebp
jb 0xab46
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0xe21c
testl %eax, %eax
jne 0xb1e1
movq %r14, %rdi
callq 0xe21c
xorl %ecx, %ecx
leaq 0x163df(%rip), %rdi     # 0x20bad
movl %eax, %esi
movl %ecx, %eax
callq 0x3190
jmp 0xa79f
movq %r14, %rdi
callq 0xe21c
movl %eax, 0x4c(%rsp)
xorl %ebp, %ebp
cmpl 0x4c(%rsp), %ebp
je 0xab46
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0xb213
movb (%rax), %cl
incq %rax
movq %rax, 0x18(%rsp)
movl %ecx, %eax
cmpb $0x60, %cl
leaq 0x18(%rsp), %r12
jne 0xb215
movq %r12, %rdi
callq 0xe21c
movslq %eax, %r14
movl %eax, 0x48(%rsp)
leaq (,%r14,4), %rdi
callq 0x3380
movq %rax, %r13
movl %r14d, %eax
testl %r14d, %r14d
movl $0x0, %ecx
cmovlel %ecx, %eax
movl %eax, %r14d
movl %ecx, %r15d
cmpq %r15, %r14
je 0xa868
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe2cb
movl %eax, (%r13,%r15,4)
incq %r15
jmp 0xa84e
movq %r12, %rdi
callq 0xe21c
cmpl $0x1, %eax
ja 0xb236
testl %eax, %eax
je 0xa88d
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe2cb
movl %eax, %r14d
jmp 0xa890
xorl %r14d, %r14d
movq 0x580(%rbx), %rdi
movq 0x588(%rbx), %r15
leaq 0x1(%r15), %r12
cmpq 0x590(%rbx), %r12
jbe 0xa8cd
leaq (%r12,%r12), %rax
movq %rax, 0x590(%rbx)
leaq (,%r12,8), %rsi
callq 0x33c0
movq %rax, 0x580(%rbx)
movq %rax, %rdi
movq %r12, 0x588(%rbx)
movq 0x170(%rbx), %r12
movl %r12d, (%rdi,%r15,4)
leaq 0x1(%r12), %r15
movq 0x168(%rbx), %rdi
cmpq 0x178(%rbx), %r15
jbe 0xa912
leaq (%r15,%r15), %rax
movq %rax, 0x178(%rbx)
imulq $0x50, %r15, %rsi
callq 0x33c0
movq %rax, 0x168(%rbx)
movq %rax, %rdi
movq %r15, 0x170(%rbx)
imulq $0x28, %r12, %rax
movl $0xc, (%rdi,%rax)
movq %r13, 0x8(%rdi,%rax)
movl %r14d, 0x10(%rdi,%rax)
movl 0x48(%rsp), %ecx
movl %ecx, 0x14(%rdi,%rax)
andl $0x0, 0x18(%rdi,%rax)
incl %ebp
jmp 0xa7e7
movq %r14, %rdi
callq 0xe21c
movl %eax, %ebp
subl $0x1, %ebp
jb 0xab46
movq %rbx, %rdi
leaq 0x18(%rsp), %r14
movq %r14, %rsi
callq 0xe2cb
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
pushq $0x1
popq %rdx
callq 0xe37f
movl %eax, %r13d
movq %r14, %rdi
callq 0xe21c
movl %eax, 0x44(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
movl %r13d, %edx
xorl %ecx, %ecx
movl %ecx, %r8d
movl %ecx, %r9d
callq 0xe425
movl %eax, %r15d
movq 0x598(%rbx), %rdi
movq 0x5a0(%rbx), %r14
leaq 0x1(%r14), %r12
cmpq 0x5a8(%rbx), %r12
jbe 0xa9d9
leaq (%r12,%r12), %rax
movq %rax, 0x5a8(%rbx)
movq %r12, %rsi
shlq $0x4, %rsi
callq 0x33c0
movq %rax, 0x598(%rbx)
movq %rax, %rdi
movl %r13d, %eax
movl %r15d, %r13d
movq %r12, 0x5a0(%rbx)
movl %r15d, (%rdi,%r14,8)
movl %eax, 0x4(%rdi,%r14,8)
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0xe4e9
movq %rbx, %rdi
callq 0xe55e
movq %rax, %r15
movq 0x2f0(%rbx), %rdi
movq 0x2f8(%rbx), %r14
leaq 0x1(%r14), %r12
cmpq 0x300(%rbx), %r12
jbe 0xaa43
leaq (%r12,%r12), %rax
movq %rax, 0x300(%rbx)
movq %r12, %rsi
shlq $0x4, %rsi
callq 0x33c0
movq %rax, 0x2f0(%rbx)
movq %rax, %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x38(%rsp)
movq %r12, 0x2f8(%rbx)
movl %r13d, (%rdi,%r14,8)
movl %r15d, 0x4(%rdi,%r14,8)
xorl %r14d, %r14d
movl %r14d, %edi
movq %rbx, %rsi
movl %r13d, %edx
callq 0xea40
movq %rbx, %rdi
movl %eax, %esi
callq 0xc540
movq %rax, %r15
movq %rax, 0x58(%rsp)
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0xea40
movq 0x5a0(%rbx), %rdx
decq %rdx
movl %r14d, %eax
leaq 0x16124(%rip), %rdi     # 0x20bc6
movq %r15, %rsi
movl 0x38(%rsp), %ecx
callq 0x3190
jmp 0xa94c
movq %r14, %rdi
callq 0xe21c
movl %eax, %ebp
subl $0x1, %ebp
jb 0xab46
movq %rbx, %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0xe252
movq %rax, %r12
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0xb1fe
movzbl (%rax), %r14d
incq %rax
movq %rax, 0x18(%rsp)
movq %r15, %rdi
callq 0xe21c
cmpl $0x2, %r14d
je 0xab25
testl %r14d, %r14d
jne 0xb396
movq 0x2d8(%rbx), %rcx
cltq
movq (%rcx,%rax,8), %r14
movq %r12, %rdi
callq 0x34d0
movq %rax, 0x20(%r14)
movq %r12, %rdi
callq 0x3030
jmp 0xaabd
xorl %eax, %eax
movq %rbx, %rdi
pushq $0x1
popq %rsi
leaq 0x15bc7(%rip), %rdx     # 0x20705
movl %r15d, %ecx
callq 0x3fc2
movq 0x50(%rsp), %r12
movq %r12, 0x18(%rsp)
movq 0x20(%rsp), %r15
jmp 0xa5e2
movq %r14, %rdi
callq 0xe21c
movl %eax, %ebp
subl $0x1, %ebp
jb 0xab46
leaq 0x18(%rsp), %rdi
callq 0xe21c
movq 0x580(%rbx), %rcx
movl %eax, %eax
movl (%rcx,%rax,4), %r14d
pushq $0x1
popq %rdi
movl $0x90, %esi
callq 0x32f0
movq %rax, %r12
addq $0x48, %rax
andq $0x0, 0x48(%r12)
movq %rax, 0x50(%r12)
movl %r14d, 0x10(%r12)
movq 0x2e0(%rbx), %r14
movl %r14d, 0x34(%r12)
andq $0x0, (%r12)
movq 0x1b0(%rbx), %rax
movq %rax, 0x8(%r12)
movq %r12, (%rax)
movq %r12, 0x1b0(%rbx)
leaq 0x1(%r14), %r15
movq 0x2d8(%rbx), %rdi
cmpq 0x2e8(%rbx), %r15
jbe 0xac00
leaq (%r15,%r15), %rax
movq %rax, 0x2e8(%rbx)
movq %r15, %rsi
shlq $0x4, %rsi
callq 0x33c0
movq %rax, 0x2d8(%rbx)
movq %rax, %rdi
movq %r15, 0x2e0(%rbx)
movq %r12, (%rdi,%r14,8)
jmp 0xab64
movq %r14, %rdi
callq 0xe21c
movl %eax, %ebp
subl $0x1, %ebp
jb 0xab46
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0xb1c4
movb (%rax), %cl
incq %rax
movq %rax, 0x18(%rsp)
cmpb $0x70, %cl
jne 0xb1c4
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0xe21c
testl %eax, %eax
jne 0xb253
movq %r14, %rdi
callq 0xe21c
xorl %ecx, %ecx
leaq 0x15f0a(%rip), %rdi     # 0x20b76
movl %eax, %esi
movl %ecx, %eax
callq 0x3190
jmp 0xac1a
movq %r14, %rdi
callq 0xe21c
movl %eax, %r14d
subl $0x1, %r14d
jb 0xab46
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0xe21c
movl %eax, %r15d
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe4e9
movq %rbx, %rdi
callq 0xe55e
movl %eax, %esi
movq %rbx, %rdi
callq 0x102f1
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14006
movl %eax, %r12d
movl 0x19c(%rbx), %esi
movq %rbx, %rdi
callq 0xe127
movq %r13, %rdi
callq 0xe21c
movl %eax, %r13d
movl %eax, %eax
testl %r15d, %r15d
je 0xacf0
movl %eax, %ebp
movq 0x18(%rsp), %r15
jmp 0xad22
movl %r12d, %ecx
movl %ecx, %edi
addq 0x20(%rbx), %rdi
movq 0x18(%rsp), %r15
movl %eax, %ebp
movq %r15, %rsi
movq %rbp, %rdx
callq 0x3360
movl 0x88(%rbx), %eax
addl %r12d, %r13d
cmpl %r13d, %eax
cmoval %eax, %r13d
movl %r13d, 0x88(%rbx)
addq %rbp, %r15
movq %r15, 0x18(%rsp)
jmp 0xac82
movq %r14, %rdi
callq 0xe21c
movl %eax, %r12d
movq 0x1a8(%rbx), %rsi
movq %rsi, 0x1c0(%rbx)
subl $0x1, %r12d
jb 0xab46
andq $0x0, 0x5d0(%rbx)
movl 0x198(%rbx), %eax
movl %eax, 0x19c(%rbx)
movq %rbx, %rdi
callq 0xf009
movl 0x198(%rbx), %eax
movl %eax, 0x3c(%rsp)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0xe21c
movq %r14, %rdi
callq 0xe21c
movl %eax, %r13d
movq 0x1c0(%rbx), %rdi
xorl %eax, %eax
movl %eax, %r15d
movq %r15, %rsi
leaq 0x1607a(%rip), %rdx     # 0x20e20
callq 0xf0c5
movq %rax, %rbp
movq 0x1c0(%rbx), %r8
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
movl %r13d, %ecx
callq 0xf0eb
movq 0x1c0(%rbx), %rdi
movq %rbp, %rsi
leaq 0x16052(%rip), %rdx     # 0x20e29
callq 0xf0c5
movq %rax, %r13
movq %rbp, %rdi
movq %rax, %rsi
callq 0xf294
movq %rsp, %rax
orl $-0x1, 0x8(%rax)
andl $0x0, (%rax)
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
movl 0x3c(%rsp), %ecx
movq %r15, %r8
pushq $0x2
popq %r9
callq 0xf2af
testq %rax, %rax
je 0xae1d
movq %rax, %rsi
movq %rbx, %rdi
callq 0xfcac
movq 0x1c0(%rbx), %rsi
movq %rbx, %rdi
callq 0xfcfa
movl 0x19c(%rbx), %esi
movq %rbx, %rdi
callq 0xe127
movq 0x1c0(%rbx), %rax
movq (%rax), %rsi
jmp 0xad41
xorl %eax, %eax
movl %eax, %ecx
pushq $0x2
popq %rsi
leaq 0x60(%rsp), %r8
movq %rbx, %rdi
movq %rcx, %rdx
callq 0xb679
jmp 0xae8b
pushq $-0x1
jmp 0xa299
movl $0xfff, %eax            # imm = 0xFFF
addl 0x88(%rbx), %eax
andl $0xfffff000, %eax       # imm = 0xFFFFF000
addl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x88(%rbx)
movq 0x20(%rbx), %rcx
movl %eax, 0x4(%rcx)
movq 0x438(%rbx), %rdi
callq 0x3030
movl $0xfff, %eax            # imm = 0xFFF
addl 0x88(%rbx), %eax
andl $0xfffff000, %eax       # imm = 0xFFFFF000
movl %eax, %ecx
movl %eax, 0x8c(%rbx)
movl %eax, 0x600(%rbx)
movl 0xa4(%rbx), %edx
movq 0x20(%rbx), %rsi
leaq (%rsi,%rcx), %rdi
movq %rdi, 0x90(%rbx)
leaq (%rsi,%rcx), %r8
addq $0x10, %r8
subl %eax, %edx
addl $-0x10, %edx
movl %edx, 0x4(%r8)
movl $0xf4eef4ee, (%r8)      # imm = 0xF4EEF4EE
leaq (%rsi,%rcx), %rax
addq $0x18, %rax
andq $0x0, (%rax)
movq %rdi, 0x8(%rax)
movq %r8, -0x18(%rax)
movq %rax, -0x10(%rax)
movq 0x20(%rbx), %r15
xorl %eax, %eax
movl %eax, %r12d
cmpq %r12, 0x2f8(%rbx)
jbe 0xaf4f
movq 0x2f0(%rbx), %r13
movl (%r13,%r12,8), %esi
movq %rbx, %rdi
callq 0x102f1
movq %rax, %r14
movl 0x4(%r13,%r12,8), %esi
movq %rbx, %rdi
callq 0x102f1
movq 0x30(%r14), %rcx
movl 0x10(%rcx), %edx
movl 0x28(%rcx), %ecx
movl %ecx, %esi
addq %r15, %rsi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x1c72e
incq %r12
jmp 0xaf03
orl $-0x1, 0xe8(%rbx)
cmpq $0x0, 0xc8(%rbx)
jne 0xaf6e
leaq 0x1fde9(%rip), %rax     # 0x2ad50
movq %rax, 0xc8(%rbx)
leaq 0x183b4(%rip), %rsi     # 0x23329
leaq 0x153e4(%rip), %rdx     # 0x20360
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %ecx
callq 0xd5b4
movq %rax, 0xb0(%rbx)
leaq 0x1839d(%rip), %rsi     # 0x23334
leaq 0x15d87(%rip), %r14     # 0x20d25
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0xd5b4
movq %rax, 0xb8(%rbx)
leaq 0x18387(%rip), %rsi     # 0x23340
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0xd5b4
movq %rax, 0xc0(%rbx)
movq 0xb0(%rbx), %rdx
xorl %r15d, %r15d
movl %r15d, %r12d
testq %rdx, %rdx
je 0xafe6
movl %edx, %r12d
subl 0x20(%rbx), %r12d
movq 0xb8(%rbx), %rdx
testq %rdx, %rdx
je 0xaff9
movl %edx, %r15d
subl 0x20(%rbx), %r15d
xorl %ebp, %ebp
movl %ebp, %edx
testq %rax, %rax
je 0xb007
subl 0x20(%rbx), %eax
movl %eax, %edx
movl %edx, 0x40(%rsp)
cmpl 0x198(%rbx), %ebp
jge 0xb081
movq %rbx, %rdi
movl %ebp, %esi
callq 0x102f1
cmpl $0x2, (%rax)
jne 0xb07d
movq 0x30(%rax), %r14
movq 0x20(%r14), %r13
testq %r13, %r13
je 0xb07d
movq %r13, %rdi
leaq 0x182f5(%rip), %rsi     # 0x2332e
callq 0x3300
movl %r12d, %ecx
testl %eax, %eax
je 0xb072
movq %r13, %rdi
leaq 0x182ea(%rip), %rsi     # 0x23339
callq 0x3300
movl %r15d, %ecx
testl %eax, %eax
je 0xb072
movq %r13, %rdi
leaq 0x182e0(%rip), %rsi     # 0x23345
callq 0x3300
movl 0x40(%rsp), %ecx
testl %eax, %eax
jne 0xb07d
movq 0x20(%rbx), %rax
movl 0x28(%r14), %edx
movl %ecx, (%rax,%rdx)
incl %ebp
jmp 0xb00b
movq 0x2e0(%rbx), %r15
pushq $0x8
popq %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x32f0
movq %rax, 0x28(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x32f0
movq %rax, 0x30(%rbx)
xorl %r12d, %r12d
movl %r12d, %ecx
leaq 0x1504d(%rip), %r14     # 0x20104
pushq $0x1
popq %rbp
movq %r15, %rax
movq %rcx, %r15
cmpq %r15, %rax
jbe 0xb122
movq 0x2d8(%rbx), %rcx
movq (%rcx,%r15,8), %r13
movq 0x60(%r13), %rcx
movq 0x28(%rbx), %rdx
movq %rcx, (%rdx,%r15,8)
movq 0x70(%r13), %rcx
movq 0x30(%rbx), %rdx
movq %rcx, (%rdx,%r15,8)
cmpb $0x0, 0x29(%r13)
je 0xb11d
orq 0x60(%r13), %rcx
jne 0xb11d
movq 0x20(%r13), %rcx
movl %r12d, %eax
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x3fc2
testb $-0x80, 0x100(%rbx)
je 0xb3e3
movq 0x2e0(%rbx), %rax
incq %r15
jmp 0xb0c0
xorl %ebp, %ebp
leaq 0x1823a(%rip), %r14     # 0x23365
cmpl 0x198(%rbx), %ebp
jge 0xb1ab
movq %rbx, %rdi
movl %ebp, %esi
callq 0x102f1
cmpl $0x2, (%rax)
jne 0xb15b
movq 0x30(%rax), %r15
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0xb15b
movq %r14, %rsi
callq 0x3300
testl %eax, %eax
je 0xb15f
incl %ebp
jmp 0xb12b
movl 0x2c(%r15), %eax
xorl %ebp, %ebp
pushq $0xc
popq %rcx
movl %ebp, %edx
divl %ecx
imulq $0xc, %rax, %r14
movl %ebp, %r12d
cmpq %r12, %r14
je 0xb1ab
movl 0x28(%r15), %eax
addq 0x20(%rbx), %rax
movl 0x4(%r12,%rax), %eax
cmpq %rax, 0x2e0(%rbx)
jbe 0xb1a5
movq 0x2d8(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movl %ebp, %edx
movl %ebp, %eax
movq %rbx, %rdi
callq 0x3bce
addq $0xc, %r12
jmp 0xb173
movq %rbx, %rdi
callq 0xb41e
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15553(%rip), %rsi     # 0x2071e
leaq 0x1595e(%rip), %rcx     # 0x20b30
xorl %eax, %eax
movq %rbx, %rdi
movl $0x165, %edx            # imm = 0x165
callq 0xbed2
leaq 0x15536(%rip), %rsi     # 0x2071e
leaq 0x1599f(%rip), %rcx     # 0x20b8e
xorl %eax, %eax
movq %rbx, %rdi
movl $0x17b, %edx            # imm = 0x17B
callq 0xbed2
leaq 0x18(%rsp), %rdi
callq 0xe21c
movl $0xff, %r8d
jmp 0xb399
movb $-0x1, %al
movzbl %al, %r8d
leaq 0x154fe(%rip), %rsi     # 0x2071e
leaq 0x15525(%rip), %rcx     # 0x2074c
xorl %eax, %eax
movq %rbx, %rdi
movl $0xd4, %edx
callq 0xbed2
leaq 0x154e1(%rip), %rsi     # 0x2071e
leaq 0x15526(%rip), %rcx     # 0x2076a
xorl %eax, %eax
movq %rbx, %rdi
movl $0xe3, %edx
callq 0xbed2
leaq 0x154c4(%rip), %rsi     # 0x2071e
leaq 0x158f7(%rip), %rcx     # 0x20b58
xorl %eax, %eax
movq %rbx, %rdi
movl $0x169, %edx            # imm = 0x169
callq 0xbed2
movb $-0x1, %al
jmp 0xb276
movl %esi, %eax
movzbl %al, %r8d
movq %rsp, %rax
movq %r12, (%rax)
leaq 0x15497(%rip), %rsi     # 0x2071e
leaq 0x15524(%rip), %rcx     # 0x207b2
xorl %eax, %eax
movq %rbx, %rdi
movl $0x152, %edx            # imm = 0x152
movq 0x30(%rsp), %r9
callq 0xbed2
cmpq %rcx, %rdx
jae 0xb37c
movb 0x1(%rax), %cl
addq $0x2, %rax
movq %rax, 0x18(%rsp)
cmpb $0x70, %cl
jne 0xb37c
leaq 0x18(%rsp), %rdi
callq 0xe21c
testl %eax, %eax
jne 0xb404
leaq 0x18(%rsp), %rdi
callq 0xe21c
movq %rsp, %rcx
movl %eax, (%rcx)
leaq 0x15436(%rip), %rsi     # 0x2071e
leaq 0x15770(%rip), %rcx     # 0x20a5f
xorl %eax, %eax
movq %rbx, %rdi
movl $0x119, %edx            # imm = 0x119
jmp 0xb3d6
leaq 0x18(%rsp), %rdi
callq 0xe21c
testl %eax, %eax
jne 0xb3be
leaq 0x18(%rsp), %rdi
callq 0xe21c
movq %rsp, %rcx
movl %eax, (%rcx)
leaq 0x153f8(%rip), %rsi     # 0x2071e
leaq 0x15789(%rip), %rcx     # 0x20ab6
xorl %eax, %eax
movq %rbx, %rdi
movl $0x128, %edx            # imm = 0x128
jmp 0xb3d6
leaq 0x18(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe2cb
movl %eax, %ebp
movq %r14, %rdi
callq 0xe21c
movzbl %bpl, %ecx
movq %rsp, %rdx
movl %eax, 0x8(%rdx)
movl %ecx, (%rdx)
leaq 0x153b5(%rip), %rsi     # 0x2071e
leaq 0x15780(%rip), %rcx     # 0x20af0
xorl %eax, %eax
movq %rbx, %rdi
movl $0x133, %edx            # imm = 0x133
jmp 0xb3d6
leaq 0x1539b(%rip), %rsi     # 0x2071e
leaq 0x1568a(%rip), %rcx     # 0x20a14
xorl %eax, %eax
movq %rbx, %rdi
movl $0x110, %edx            # imm = 0x110
jmp 0xb3d6
movl %r14d, %r8d
movq %rsp, %rcx
movl %eax, (%rcx)
leaq 0x15379(%rip), %rsi     # 0x2071e
leaq 0x15a42(%rip), %rcx     # 0x20dee
xorl %eax, %eax
movq %rbx, %rdi
movl $0x1a1, %edx            # imm = 0x1A1
movq %r12, %r9
callq 0xbed2
leaq 0x15359(%rip), %rsi     # 0x2071e
leaq 0x156c4(%rip), %rcx     # 0x20a90
xorl %eax, %eax
movq %rbx, %rdi
movl $0x124, %edx            # imm = 0x124
movq 0x30(%rsp), %r8
movq %r12, %r9
callq 0xbed2
movq 0x20(%r13), %r8
leaq 0x14d37(%rip), %rsi     # 0x20125
leaq 0x14d13(%rip), %rcx     # 0x20108
xorl %eax, %eax
movq %rbx, %rdi
movl $0x3c3, %edx            # imm = 0x3C3
callq 0xbed2
leaq 0x15313(%rip), %rsi     # 0x2071e
leaq 0x15628(%rip), %rcx     # 0x20a3a
xorl %eax, %eax
movq %rbx, %rdi
movl $0x115, %edx            # imm = 0x115
jmp 0xb3d6