// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_wasm_parser.c
// Function: wasm_parse_block
static ir_bb_t *
wasm_parse_block(ir_unit_t *iu, ir_bb_t *ib,
                 wasm_bytestream_t *wbs, uint32_t local_var_base,
                 label_stack_frame_t *parent, int type, int depth,
                 int yield_value)
{
  unsigned int local_var;
  uint8_t rettype;
  ir_bb_t *exitblock = NULL;
  label_stack_frame_t lsf;
  lsf.parent = parent;

  switch(type) {
  case WASM_OP_BLOCK:
    lsf.label = bb_add_named(iu->iu_current_function, ib, "Block exit");
    exitblock = lsf.label;
    break;

  case WASM_OP_LOOP:
    lsf.label = bb_add_named(iu->iu_current_function, ib, "Loop start");
    unconditional_branch(ib, lsf.label);
    ib = lsf.label;
    break;

  case WASM_OP_IF:
    lsf.label = bb_add_named(iu->iu_current_function, ib, "False");
    exitblock = lsf.label;
    ir_instr_br_t *i = instr_add(ib, sizeof(ir_instr_br_t), IR_IC_BR);
    ib = bb_add_named(iu->iu_current_function, ib, "True");
    i->true_branch = ib->ib_id;
    i->false_branch = lsf.label->ib_id;
    i->condition =  vstack_pop(iu);
    break;

  default:
    abort();
  }

  while(wbs->ptr < wbs->end) {

    uint8_t code = wbs_get_byte(wbs);
    //    printf("%*.scode=%x @ 0x%zx\n", depth * 2, "", code, wbs->ptr - wbs->start);
    if(code == 0xb)
      break;

    switch(code) {
    case WASM_OP_BLOCK:
    case WASM_OP_LOOP:
    case WASM_OP_IF:
      rettype = wasm_parse_value_type(iu, wbs);
      int yielded = rettype ? value_alloc_temporary(iu, rettype).value : -1;
      ib = wasm_parse_block(iu, ib, wbs, local_var_base, &lsf, code, depth + 1,
                            yielded);
      if(yielded != -1)
        vstack_push_value(iu, yielded);
      break;

    case 0x0:
      wasm_unreachable(iu, ib);
      code = wbs_get_byte(wbs);
      while(code == 0)
        code = wbs_get_byte(wbs);
      if(code == 0xb) {
        if(depth == 0)
          return NULL;
        return exitblock;
      } else if(code != WASM_OP_ELSE) {
        parser_error(iu, "unreachable not followed by block termination");
      }
      // fallthru
    case WASM_OP_ELSE:
      if(yield_value != -1)
        wasm_set_local(iu, ib, yield_value);
      lsf.label = bb_add_named(iu->iu_current_function, ib, "Else exit");
      unconditional_branch(ib, lsf.label);
      ib = exitblock;
      exitblock = lsf.label;
      break;


    case 1:
      break;

    case 0xf:  // Return
      wasm_return(iu, ib);
      ib = bb_add_named(iu->iu_current_function, ib, "Return split");
      break;
    case 0xc:  // branch
    case 0xd:  // br_if
      ib = wasm_branch(iu, ib, code, wbs_get_vu32(wbs), &lsf);
      break;
    case 0xe:  // br_table
      ib = wasm_branch_table(iu, ib, wbs, &lsf);
      break;
    case 0x10:
    case 0x11:
      wasm_call(iu, ib, wbs, code == 0x11);
      break;
    case 0x1a:
      vstack_pop(iu);
      break;
    case 0x1b:
      wasm_select(iu, ib);
      break;
    case 0x20:
      vstack_push_value(iu, wbs_get_vu32(wbs) + local_var_base);
      break;
    case 0x21:
      wasm_set_local(iu, ib, wbs_get_vu32(wbs) + local_var_base);
      break;
    case 0x22:
      local_var = wbs_get_vu32(wbs) + local_var_base;
      wasm_set_local(iu, ib, local_var);
      vstack_push_value(iu, local_var);
      break;
    case 0x23:
      wasm_load_global(iu, ib, VECTOR_ITEM(&iu->iu_wasm_globalvar_map,
                                           wbs_get_vu32(wbs)));
      break;
    case 0x24:
      wasm_store_global(iu, ib, VECTOR_ITEM(&iu->iu_wasm_globalvar_map,
                                            wbs_get_vu32(wbs)));
      break;
    case 0x28 ... 0x35:
      wasm_load(iu, ib, code, wbs);
      break;
    case 0x36 ... 0x3e:
      wasm_store(iu, ib, code, wbs);
      break;
    case 0x41 ... 0x44:
      wasm_const(iu, code, wbs);
      break;
    case 0x45 ... 0x66:
      wasm_cmp(iu, ib, code);
      break;
    case 0x67 ... 0xa6:
      wasm_numeric(iu, ib, code);
      break;
    case 0xa7 ... 0xbf:
      wasm_convert(iu, ib, code);
      break;

    default:
      function_print(iu, iu->iu_current_function, "faildump");
      parser_error(iu, "Can't handle opcode 0x%x", code);
    }
  }

  if(yield_value != -1)
    wasm_set_local(iu, ib, yield_value);

  if(exitblock) {
    unconditional_branch(ib, exitblock);
    return exitblock;
  }
  return ib;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, 0x1c(%rsp)
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
movq %r8, 0x28(%rsp)
movabsq $-0xfffffff8, %rbx      # imm = 0xFFFFFFFF00000008
cmpl $0x4, %r9d
movq %rdi, 0x8(%rsp)
je 0x1073b
cmpl $0x3, %r9d
je 0x106bd
cmpl $0x2, %r9d
jne 0x118a7
movq 0x1c0(%r13), %rdi
movq %r12, (%rsp)
movq %r12, %rsi
callq 0x11efe
movq %rax, %r15
leaq 0x155dd(%rip), %rdi     # 0x25c87
callq 0x34d0
movq %rax, 0x50(%r15)
movq %r15, 0x20(%rsp)
jmp 0x107f0
movq 0x1c0(%r13), %rdi
movq %r12, %rsi
callq 0x11efe
movq %rax, %r13
leaq 0x155bc(%rip), %rdi     # 0x25c92
callq 0x34d0
movq %rax, 0x50(%r13)
movq %r13, 0x20(%rsp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
xorl %r15d, %r15d
movq %r15, 0x20(%rax)
movq %rbx, 0x28(%rax)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x30(%rax)
movq %r12, 0x10(%rax)
movq %r15, (%rax)
movq 0x18(%r12), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rdx)
movq %rax, 0x18(%r12)
movl 0x28(%r13), %edx
movq 0x8(%rsp), %r13
movl %edx, 0x60(%rax)
movl %ecx, 0x58(%rax)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
jmp 0x107f0
movq 0x1c0(%r13), %rdi
movq %r12, %rsi
callq 0x11efe
movq %rax, %r15
leaq 0x15549(%rip), %rdi     # 0x25c9d
callq 0x34d0
movq %rax, 0x50(%r15)
movq %r15, 0x20(%rsp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movq %rax, %r13
xorl %eax, %eax
movq %rax, 0x20(%r13)
movq %rbx, 0x28(%r13)
movl $0xffffffff, 0x30(%r13) # imm = 0xFFFFFFFF
movq %r12, 0x10(%r13)
movq %rax, (%r13)
movq 0x18(%r12), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x18(%r12)
movq 0x8(%rsp), %rax
movq 0x1c0(%rax), %rdi
movq %r12, %rsi
callq 0x11efe
movq %rax, %rbx
leaq 0x154e6(%rip), %rdi     # 0x25ca3
callq 0x34d0
movq %rax, 0x50(%rbx)
movq %rbx, (%rsp)
movl 0x28(%rbx), %eax
movl %eax, 0x60(%r13)
movq 0x20(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, 0x64(%r13)
movq 0x8(%rsp), %rdi
callq 0xf524
movq %rax, 0x58(%r13)
movq 0x8(%rsp), %r13
movl 0x90(%rsp), %eax
incl %eax
movq %rax, 0x50(%rsp)
movq %r15, %r12
movq (%r14), %rcx
movq 0x8(%r14), %rax
cmpq %rax, %rcx
jae 0x117cf
movzbl (%rcx), %r15d
incq %rcx
movq %rcx, (%r14)
movl $0x4, %ebx
cmpl $0xb, %r15d
je 0x10fc9
cmpl $0xbf, %r15d
ja 0x1192c
xorl %ebx, %ebx
movl %r15d, %ecx
leaq 0x135ad(%rip), %rdx     # 0x23df0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl %r15d, %eax
addl $-0x67, %eax
cmpl $0x3c, %eax
ja 0x118e4
leaq 0x1388e(%rip), %rcx     # 0x240f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %ebp, %ebp
jmp 0x10c3f
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %rbp
xorl %eax, %eax
movq %rax, 0x20(%rbp)
movabsq $-0xfffffff9, %rcx      # imm = 0xFFFFFFFF00000007
movq %rcx, 0x28(%rbp)
movl $0xffffffff, 0x30(%rbp) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%rbp)
movq %rax, (%rbp)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%rbp)
movq %rbp, (%rax)
movq %rbp, 0x18(%rcx)
movl %r15d, %eax
addl $-0x45, %eax
cmpl $0x21, %eax
ja 0x118fc
leaq 0x13914(%rip), %rcx     # 0x241e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x20, %r15d
jmp 0x10f91
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movq %rax, %r13
xorl %eax, %eax
movq %rax, 0x20(%r13)
movabsq $-0xfffffffd, %rcx      # imm = 0xFFFFFFFF00000003
movq %rcx, 0x28(%r13)
movl $0xffffffff, 0x30(%r13) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%r13)
movq %rax, (%r13)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x18(%rcx)
movl %r15d, %eax
addb $0x59, %al
cmpb $0x19, %al
jae 0x11856
movzbl %al, %eax
shll $0x2, %eax
leaq 0x140f5(%rip), %rcx     # 0x24a3c
movl (%rax,%rcx), %ebp
leaq 0x1414f(%rip), %rcx     # 0x24aa0
movl (%rax,%rcx), %eax
movl %eax, 0x60(%r13)
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xf524
movq %rax, 0x58(%r13)
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x12256
movq 0x2c(%r13), %rsi
movq %r15, %r13
movq %r15, %rdi
jmp 0x10fc4
leal -0x28(%r15), %ecx
cmpb $0xe, %cl
jae 0x1188d
movzbl %cl, %ecx
leaq 0x14034(%rip), %rdx     # 0x249d0
movb (%rcx,%rdx), %dl
movb %dl, 0x10(%rsp)
shll $0x2, %ecx
leaq 0x13feb(%rip), %rdx     # 0x24998
movl (%rcx,%rdx), %edx
movl %edx, 0x30(%rsp)
leaq 0x14025(%rip), %rdx     # 0x249e0
movl (%rcx,%rdx), %ecx
movl %ecx, 0x38(%rsp)
movq (%r14), %rcx
cmpq %rax, %rcx
jae 0x109d9
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
movq %rcx, (%r14)
setns %dl
jmp 0x109db
xorl %edx, %edx
testb %dl, %dl
je 0x109c5
movq (%r14), %rdx
xorl %ebp, %ebp
xorl %ecx, %ecx
movb $-0x1, %sil
cmpq %rax, %rdx
jae 0x109f7
movb (%rdx), %sil
incq %rdx
movq %rdx, (%r14)
movl %esi, %edi
andb $0x7f, %dil
movzbl %dil, %edi
shll %cl, %edi
orl %edi, %ebp
addl $0x7, %ecx
testb %sil, %sil
js 0x109e6
movl $0x1, %edi
movl $0x78, %esi
callq 0x32f0
movq %rax, %r15
xorl %ebx, %ebx
movq %rbx, 0x20(%rax)
movabsq $-0xfffffffc, %rax      # imm = 0xFFFFFFFF00000004
movq %rax, 0x28(%r15)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x30(%r15)
movq (%rsp), %rcx
movq %rcx, 0x10(%r15)
movq %rbx, (%r15)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%rcx)
movq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0xf524
movq %rax, 0x58(%r15)
movl %ebp, 0x60(%r15)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x64(%r15)
movb 0x10(%rsp), %al
movb %al, 0x74(%r15)
movl 0x30(%rsp), %eax
movl %eax, 0x70(%r15)
movq %r13, %rdi
movl 0x38(%rsp), %esi
jmp 0x10caa
movl %r15d, %ecx
addb $-0x36, %cl
cmpb $0x9, %cl
jae 0x118ac
movzbl %cl, %ecx
leaq 0x13f6f(%rip), %rdx     # 0x24a18
movl (%rdx,%rcx,4), %ecx
movl %ecx, 0x10(%rsp)
movq (%r14), %rcx
cmpq %rax, %rcx
jae 0x10ac7
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
movq %rcx, (%r14)
setns %dl
jmp 0x10ac9
xorl %edx, %edx
testb %dl, %dl
je 0x10ab3
movq (%r14), %rdx
xorl %r13d, %r13d
xorl %ecx, %ecx
movb $-0x1, %sil
cmpq %rax, %rdx
jae 0x10ae6
movb (%rdx), %sil
incq %rdx
movq %rdx, (%r14)
movl %esi, %edi
andb $0x7f, %dil
movzbl %dil, %edi
shll %cl, %edi
orl %edi, %r13d
addl $0x7, %ecx
testb %sil, %sil
js 0x10ad5
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %r15
xorl %ebx, %ebx
movq %rbx, 0x20(%rax)
movabsq $-0xfffffffb, %rax      # imm = 0xFFFFFFFF00000005
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%r15)
movq %rbx, (%r15)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%rcx)
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0xf524
movq %rax, 0x60(%r15)
movq %rbp, %rdi
callq 0xf524
movq %rax, 0x58(%r15)
movl 0x10(%rsp), %eax
movl %eax, 0x64(%r15)
movl %r13d, 0x68(%r15)
movq %rbp, %r13
jmp 0x10fc9
movl $0x2, %ebp
jmp 0x10c3f
movl $0x4, %ebp
jmp 0x10c3f
movl $0x1, %ebp
jmp 0x10c3f
movq %r13, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0xf7ed
jmp 0x10fc9
movq %r13, %rdi
movq %r14, %rsi
callq 0xf23d
movl %eax, %ebp
andl $0xff, %ebp
je 0x11067
movq %r13, %rdi
callq 0xf5a0
movq %r13, %rdx
movl %eax, %r13d
movq 0x180(%rdx), %rax
movslq %r13d, %rcx
movq (%rax,%rcx,8), %rax
movl $0x4, (%rax)
movl $0xffffffff, 0x38(%rax) # imm = 0xFFFFFFFF
movl %ebp, 0x24(%rax)
movq %rdx, %rbp
jmp 0x11070
movl $0xb, %ebp
jmp 0x10c3f
movl $0x7, %ebp
jmp 0x10c3f
movl $0x6, %ebp
jmp 0x10c3f
movl $0x5, %ebp
jmp 0x10c3f
movl $0xd, %ebp
jmp 0x10c3f
movl $0x9, %ebp
jmp 0x10c3f
movl $0xa, %ebp
jmp 0x10c3f
movl $0x3, %ebp
jmp 0x10c3f
movl $0x8, %ebp
jmp 0x10c3f
movl $0xc, %ebp
jmp 0x10c3f
movl $0xe, %ebp
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %r15
xorl %ebx, %ebx
movq %rbx, 0x20(%rax)
movabsq $-0xfffffffe, %rax      # imm = 0xFFFFFFFF00000002
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%r15)
movq %rbx, (%r15)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%rcx)
movq %r13, %rdi
callq 0xf524
movq %rax, 0x64(%r15)
movq %r13, %rdi
callq 0xf524
movq %rax, 0x5c(%r15)
movl %ebp, 0x58(%r15)
movl 0x60(%r15), %esi
movq %r13, %rdi
movq %r15, %rdx
callq 0x12256
movq 0x2c(%r15), %rsi
jmp 0x10fc1
movq (%r14), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
cmpl $0x11, %r15d
jne 0x10d01
movb $-0x1, %dil
cmpq %rax, %rdx
jae 0x10cd9
movb (%rdx), %dil
incq %rdx
movq %rdx, (%r14)
movl %edi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %esi
addl $0x7, %ecx
testb %dil, %dil
js 0x10cc8
movq 0x580(%r13), %rax
movslq %esi, %rcx
movl (%rax,%rcx,4), %ebp
jmp 0x10d6b
movb $-0x1, %dil
cmpq %rax, %rdx
jae 0x10d12
movb (%rdx), %dil
incq %rdx
movq %rdx, (%r14)
movl %edi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %esi
addl $0x7, %ecx
testb %dil, %dil
js 0x10d01
movq 0x2d8(%r13), %rax
movslq %esi, %rcx
movq (%rax,%rcx,8), %r13
movl 0x10(%r13), %ebp
movq 0x8(%rsp), %rdi
callq 0xf5a0
movq 0x8(%rsp), %rcx
movq 0x180(%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rax
movl $0x1, (%rax)
movl %ebp, 0x24(%rax)
movq %r13, 0x30(%rax)
movq 0x8(%rsp), %r13
movl %ebp, %r8d
cmpq %r8, 0x170(%r13)
jbe 0x118cc
movq 0x168(%r13), %rax
leaq (%r8,%r8,4), %rcx
movq %r13, %rbp
movq %rax, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movslq 0x14(%rax,%rcx,8), %r13
leaq (%r13,%r13,2), %rax
movq %rax, 0x40(%rsp)
leaq 0x70(,%rax,4), %rsi
movl $0x1, %edi
callq 0x32f0
movq %rax, %rsi
xorl %eax, %eax
movq %rax, 0x20(%rsi)
movabsq $-0xfffffff6, %rcx      # imm = 0xFFFFFFFF0000000A
movq %rcx, 0x28(%rsi)
movl $0xffffffff, 0x30(%rsi) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%rsi)
movq %rax, (%rsi)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%rsi)
movq %rsi, (%rax)
movq %rsi, 0x18(%rcx)
cmpl $0x11, %r15d
movq %rsi, 0x10(%rsp)
jne 0x1170a
movq %rbp, %rdi
callq 0xf524
movq 0x10(%rsp), %rsi
movq %rax, 0x58(%rsi)
movq (%r14), %rcx
movq 0x8(%r14), %rax
cmpq %rax, %rcx
jae 0x10e27
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
movq %rcx, (%r14)
setns %dl
jmp 0x10e29
xorl %edx, %edx
testb %dl, %dl
je 0x10e13
jmp 0x11715
movq (%r14), %rdx
xorl %ebx, %ebx
xorl %ecx, %ecx
movb $-0x1, %sil
cmpq %rax, %rdx
jae 0x10e4a
movb (%rdx), %sil
incq %rdx
movq %rdx, (%r14)
movl %esi, %edi
andb $0x7f, %dil
movzbl %dil, %edi
shll %cl, %edi
orl %edi, %ebx
addl $0x7, %ecx
testb %sil, %sil
js 0x10e39
movq 0x1c0(%r13), %rdi
movq (%rsp), %rbp
movq %rbp, %rsi
callq 0x11efe
movq %rax, %r13
leaq 0x14e79(%rip), %rdi     # 0x25cf6
callq 0x34d0
movq %r13, 0x10(%rsp)
movq %rax, 0x50(%r13)
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movq %rax, %r13
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movabsq $-0xfffffff8, %rax      # imm = 0xFFFFFFFF00000008
movq %rax, 0x28(%r13)
movl $0xffffffff, 0x30(%r13) # imm = 0xFFFFFFFF
movq %rbp, 0x10(%r13)
movq %rcx, (%r13)
movq 0x18(%rbp), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x18(%rbp)
leaq 0x20(%rsp), %rax
testl %ebx, %ebx
jle 0x10ee1
movq 0x8(%rax), %rax
decl %ebx
jne 0x10ed9
movq (%rax), %rax
movl 0x28(%rax), %eax
movl %eax, 0x60(%r13)
xorl %ebx, %ebx
cmpl $0xd, %r15d
je 0x11797
cmpl $0xc, %r15d
jne 0x10f05
movl $0xffffffff, 0x58(%r13) # imm = 0xFFFFFFFF
movq %r12, %r15
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %r13
jmp 0x10fcc
movl $0x3, %r15d
jmp 0x10f91
movl $0x2, %r15d
jmp 0x10f91
movl $0x1, %r15d
jmp 0x10f91
movl $0x28, %r15d
jmp 0x10f91
movl $0x22, %r15d
jmp 0x10f91
movl $0xe, %r15d
jmp 0x10f91
movl $0x5, %r15d
jmp 0x10f91
movl $0x21, %r15d
jmp 0x10f91
movl $0x29, %r15d
jmp 0x10f91
movl $0x25, %r15d
jmp 0x10f91
movl $0x24, %r15d
jmp 0x10f91
movl $0x26, %r15d
jmp 0x10f91
movl $0x4, %r15d
jmp 0x10f91
movl $0x23, %r15d
jmp 0x10f91
movl $0x27, %r15d
movq %r13, %rdi
callq 0xf524
movq %rax, 0x64(%rbp)
movq %r13, %rdi
callq 0xf524
movq %rax, 0x5c(%rbp)
movl %r15d, 0x58(%rbp)
movq %r13, %rdi
movl $0x1, %esi
movq %rbp, %rdx
callq 0x12256
movq 0x2c(%rbp), %rsi
movq %r13, %rdi
callq 0xf999
movq %r12, %r15
testl %ebx, %ebx
je 0x107fe
jmp 0x117c3
movq %r13, %rdi
movq (%rsp), %rsi
movl $0x1ca, %edx            # imm = 0x1CA
movl $0x3, %ecx
jmp 0x1105b
movq %r13, %rdi
movq (%rsp), %rsi
movl $0x1f8, %edx            # imm = 0x1F8
jmp 0x11056
movq %r13, %rdi
movq (%rsp), %rsi
movl $0x1be, %edx            # imm = 0x1BE
movl $0x4, %ecx
jmp 0x1105b
movq %r13, %rdi
movq (%rsp), %rsi
movl $0x1f4, %edx            # imm = 0x1F4
jmp 0x11043
movq %r13, %rdi
movq (%rsp), %rsi
movl $0x1f5, %edx            # imm = 0x1F5
jmp 0x11043
movq %r13, %rdi
movq (%rsp), %rsi
movl $0x1f7, %edx            # imm = 0x1F7
jmp 0x11056
movq %r13, %rdi
movq (%rsp), %rsi
movl $0x1f6, %edx            # imm = 0x1F6
movl $0x1, %ecx
jmp 0x1105b
movq %r13, %rdi
movq (%rsp), %rsi
movl $0x1f9, %edx            # imm = 0x1F9
movl $0x2, %ecx
callq 0x1229b
xorl %ebx, %ebx
jmp 0x10fc9
movq %r13, %rbp
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq %rbp, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
movl 0x1c(%rsp), %ecx
leaq 0x20(%rsp), %r8
movl %r15d, %r9d
pushq %r13
pushq 0x58(%rsp)
callq 0x10644
addq $0x10, %rsp
movq %rax, (%rsp)
cmpl $-0x1, %r13d
je 0x110aa
movq %rbp, %rdi
movl %r13d, %esi
callq 0x12015
movq %r12, %r15
movq %rbp, %r13
jmp 0x10fcc
movq 0x598(%r13), %rdx
movq (%r14), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movb $-0x1, %r8b
cmpq %rax, %rdi
jae 0x110d4
movb (%rdi), %r8b
incq %rdi
movq %rdi, (%r14)
movl %r8d, %r9d
andb $0x7f, %r9b
movzbl %r9b, %r9d
shll %cl, %r9d
orl %r9d, %esi
addl $0x7, %ecx
testb %r8b, %r8b
js 0x110c3
movl %esi, %eax
movq (%rdx,%rax,8), %r15
movl %r15d, %eax
cmpq %rax, 0x188(%r13)
jbe 0x11914
movq %r15, %rbp
shrq $0x20, %rbp
movq 0x180(%r13), %rcx
movq (%rcx,%rax,8), %rax
movq 0x30(%rax), %rax
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
movl $0x1, %edi
movl $0x78, %esi
callq 0x32f0
movq %rax, %r13
xorl %ebx, %ebx
movq %rbx, 0x20(%rax)
movabsq $-0xfffffffc, %rax      # imm = 0xFFFFFFFF00000004
movq %rax, 0x28(%r13)
movl $0xffffffff, 0x30(%r13) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%r13)
movq %rbx, (%r13)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x18(%rcx)
movl %r15d, 0x58(%r13)
movl %ebp, 0x5c(%r13)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x60(%r13)
movb $-0x1, 0x74(%r13)
movl 0x10(%rsp), %esi
movl %esi, 0x70(%r13)
movq 0x8(%rsp), %rdi
movq %r13, %rdx
callq 0x12256
movq 0x2c(%r13), %rsi
movq 0x8(%rsp), %r13
jmp 0x10fc1
movq (%r14), %rdx
xorl %ebp, %ebp
xorl %ecx, %ecx
movq (%rsp), %rsi
movb $-0x1, %r8b
cmpq %rax, %rdx
jae 0x111c3
movb (%rdx), %r8b
incq %rdx
movq %rdx, (%r14)
movl %r8d, %edi
andb $0x7f, %dil
movzbl %dil, %edi
shll %cl, %edi
orl %edi, %ebp
addl $0x7, %ecx
testb %r8b, %r8b
js 0x111b2
addl 0x1c(%rsp), %ebp
movq %r13, %rdi
movl %ebp, %edx
callq 0x12058
movq %r13, %rdi
movl %ebp, %esi
jmp 0x1131b
movq (%r14), %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq (%rsp), %rsi
movb $-0x1, %dil
cmpq %rax, %r9
jae 0x1120e
movb (%r9), %dil
incq %r9
movq %r9, (%r14)
movl %edi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %edx
addl $0x7, %ecx
testb %dil, %dil
js 0x111fd
addl 0x1c(%rsp), %edx
movq %r13, %rdi
callq 0x12058
jmp 0x11060
movq 0x598(%r13), %rdx
movq (%r14), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movb $-0x1, %r8b
cmpq %rax, %rdi
jae 0x11257
movb (%rdi), %r8b
incq %rdi
movq %rdi, (%r14)
movl %r8d, %r9d
andb $0x7f, %r9b
movzbl %r9b, %r9d
shll %cl, %r9d
orl %r9d, %esi
addl $0x7, %ecx
testb %r8b, %r8b
js 0x11246
movl %esi, %eax
movq (%rdx,%rax,8), %r13
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %r15
xorl %ebx, %ebx
movq %rbx, 0x20(%rax)
movabsq $-0xfffffffb, %rax      # imm = 0xFFFFFFFF00000005
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%r15)
movq %rbx, (%r15)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%rcx)
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0xf524
movq %rax, 0x60(%r15)
movq %r13, 0x58(%r15)
movq %rbp, %r13
movl $0x0, 0x68(%r15)
jmp 0x10fc9
movq (%r14), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
movb $-0x1, %dil
cmpq %rax, %rdx
jae 0x112fb
movb (%rdx), %dil
incq %rdx
movq %rdx, (%r14)
movl %edi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %esi
addl $0x7, %ecx
testb %dil, %dil
js 0x112ea
addl 0x1c(%rsp), %esi
movq %r13, %rdi
callq 0x12015
jmp 0x11060
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %r15
xorl %ebx, %ebx
movq %rbx, 0x20(%rax)
movabsq $-0xfffffff2, %rax      # imm = 0xFFFFFFFF0000000E
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%r15)
movq %rbx, (%r15)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%rcx)
movq %r13, %rdi
callq 0xf524
movq %rax, 0x68(%r15)
movq %r13, %rdi
callq 0xf524
movq %rax, 0x60(%r15)
movq %r13, %rdi
callq 0xf524
movq %rax, 0x58(%r15)
movl 0x5c(%r15), %esi
jmp 0x10ca7
movq %r13, %rdi
callq 0xf524
jmp 0x10fc9
movq 0x1c0(%r13), %rdi
movq (%rsp), %rsi
callq 0x11efe
movq %rax, %rbp
leaq 0x14942(%rip), %rdi     # 0x25d03
callq 0x34d0
movq %rax, 0x50(%rbp)
movq (%r14), %rax
movq 0x8(%r14), %rdx
xorl %ebx, %ebx
xorl %ecx, %ecx
movb $-0x1, %sil
cmpq %rdx, %rax
jae 0x113e6
movb (%rax), %sil
incq %rax
movq %rax, (%r14)
movl %esi, %edi
andb $0x7f, %dil
movzbl %dil, %edi
shll %cl, %edi
orl %edi, %ebx
addl $0x7, %ecx
testb %sil, %sil
js 0x113d5
movslq %ebx, %r13
movq %r13, %rsi
shlq $0x4, %rsi
addq $0x68, %rsi
movl $0x1, %edi
callq 0x32f0
movq %rax, %r15
xorl %eax, %eax
movq %rax, 0x20(%r15)
movabsq $-0xfffffff4, %rcx      # imm = 0xFFFFFFFF0000000C
movq %rcx, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq (%rsp), %rcx
movq %rcx, 0x10(%r15)
movq %rax, (%r15)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%rcx)
movq 0x8(%rsp), %rdi
callq 0xf524
movq %rax, 0x58(%r15)
movl %r13d, 0x64(%r15)
testl %r13d, %r13d
leaq 0x20(%rsp), %r13
jle 0x114da
leaq 0x68(%r15), %rax
movq (%r14), %rdx
movq 0x8(%r14), %rsi
movl %ebx, %edi
xorl %r8d, %r8d
movq %r8, %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %r9
movq %r8, (%rax,%rcx)
xorl %r10d, %r10d
xorl %ecx, %ecx
movb $-0x1, %r11b
cmpq %rsi, %rdx
jae 0x1149e
movb (%rdx), %r11b
incq %rdx
movq %rdx, (%r14)
movl %r11d, %ebx
andb $0x7f, %bl
movzbl %bl, %ebx
shll %cl, %ebx
orl %ebx, %r10d
addl $0x7, %ecx
testb %r11b, %r11b
js 0x1148d
movq %r13, %rcx
testl %r10d, %r10d
jle 0x114c8
movq %r13, %rcx
movq 0x8(%rcx), %rcx
decl %r10d
jne 0x114bf
movq (%rcx), %rcx
movl 0x28(%rcx), %ecx
movl %ecx, 0x8(%r9)
incq %r8
cmpq %rdi, %r8
jne 0x11479
movq (%r14), %rdx
movq 0x8(%r14), %rsi
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x8(%rsp), %r13
movb $-0x1, %dil
cmpq %rsi, %rdx
jae 0x114fb
movb (%rdx), %dil
incq %rdx
movq %rdx, (%r14)
movl %edi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %eax
addl $0x7, %ecx
testb %dil, %dil
js 0x114ea
leaq 0x20(%rsp), %rcx
testl %eax, %eax
jle 0x11525
movq 0x8(%rcx), %rcx
decl %eax
jne 0x1151d
movq (%rcx), %rax
movl 0x28(%rax), %eax
movl %eax, 0x60(%r15)
xorl %ebx, %ebx
jmp 0x117b7
movl $0x1, %edi
movl $0x58, %esi
callq 0x32f0
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
movq %rdx, 0x28(%rax)
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
movq (%rsp), %rdx
movq %rdx, 0x10(%rax)
xorl %esi, %esi
movq %rcx, (%rax)
movq 0x18(%rdx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %rax, 0x18(%rdx)
movq (%r14), %rdx
movq 0x8(%r14), %rax
movb $-0x1, %cl
cmpq %rax, %rdx
jb 0x11593
testb %cl, %cl
jne 0x1159d
movq (%r14), %rdx
jmp 0x11583
movb (%rdx), %cl
incq %rdx
movq %rdx, (%r14)
jmp 0x1158a
movzbl %cl, %eax
cmpl $0x5, %eax
je 0x115cd
cmpl $0xb, %eax
jne 0x11870
movl 0x90(%rsp), %eax
testl %eax, %eax
movq %r12, %rax
cmoveq %rsi, %rax
movq %rax, 0x48(%rsp)
movl $0x1, %ebx
jmp 0x10fc9
movl 0x98(%rsp), %edx
cmpl $-0x1, %edx
movq (%rsp), %rbx
je 0x115e8
movq %r13, %rdi
movq %rbx, %rsi
callq 0x12058
movq 0x1c0(%r13), %rdi
movq %rbx, %rsi
callq 0x11efe
movq %rbx, %rbp
movq %rax, %r15
leaq 0x146d2(%rip), %rdi     # 0x25cd6
callq 0x34d0
movq %rax, 0x50(%r15)
movq %r15, 0x20(%rsp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
xorl %ebx, %ebx
movq %rbx, 0x20(%rax)
movabsq $-0xfffffff8, %rcx      # imm = 0xFFFFFFFF00000008
movq %rcx, 0x28(%rax)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, 0x30(%rax)
movq %rbp, 0x10(%rax)
movq %rbx, (%rax)
movq 0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %rax, 0x18(%rbp)
movl 0x28(%r15), %ecx
movl %ecx, 0x60(%rax)
movl %edx, 0x58(%rax)
movq 0x20(%rsp), %r15
movq %r12, (%rsp)
jmp 0x10fcc
movq %r13, %rdi
movq (%rsp), %r15
movq %r15, %rsi
callq 0x1195d
movq 0x1c0(%r13), %rdi
movq %r15, %rsi
callq 0x11efe
movq %rax, %r15
leaq 0x1464d(%rip), %rdi     # 0x25ce0
callq 0x34d0
movq %r15, (%rsp)
movq %rax, 0x50(%r15)
jmp 0x10fc9
movq %r13, %rdi
movl $0x5, %esi
jmp 0x116b7
movq %r13, %rdi
movl $0x6, %esi
callq 0xf9fe
movl %eax, %r15d
movq %r13, %rdi
callq 0xf5a0
movq 0x180(%r13), %rcx
cltq
movq (%rcx,%rax,8), %rcx
movl $0x3, (%rcx)
movl %r15d, 0x24(%rcx)
movl $0x0, 0x30(%rcx)
shlq $0x20, %r15
movl %eax, %eax
orq %r15, %rax
movq %rax, 0x5c(%rbp)
movq %r13, %rdi
callq 0xf524
movq %rax, 0x64(%rbp)
movl $0x20, 0x58(%rbp)
jmp 0x10fad
movl 0x198(%rbp), %eax
decl %eax
movl %eax, 0x58(%rsi)
movl %r13d, 0x6c(%rsi)
testl %r13d, %r13d
movq 0x8(%rsp), %rbp
jle 0x11750
incq %r13
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq (%rax,%rcx,4), %r15
addq $0x64, %r15
movq %rbp, %rdi
callq 0xf524
movq %rax, (%r15)
decq %r13
addq $-0xc, %r15
cmpq $0x1, %r13
jg 0x11738
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
leaq (%rax,%rcx,8), %rax
movl 0x10(%rax), %r8d
cmpq %r8, 0x170(%rbp)
movq %rbp, %r13
jbe 0x118cc
movq 0x168(%r13), %rax
leaq (%r8,%r8,4), %rcx
cmpl $0x1, (%rax,%rcx,8)
je 0x10fc9
movq %r13, %rdi
movl %r8d, %esi
movq 0x10(%rsp), %r15
jmp 0x10caa
movq 0x10(%rsp), %rbp
movl 0x28(%rbp), %eax
movl %eax, 0x64(%r13)
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xf524
movq %rax, 0x58(%r13)
movq %r15, %r13
movq %r12, %r15
movq %rbp, (%rsp)
jmp 0x10fcc
cmpl $0x4, %ebx
je 0x117d2
movq 0x48(%rsp), %r15
jmp 0x11844
movq %r12, %r15
movl 0x98(%rsp), %edx
cmpl $-0x1, %edx
je 0x117ea
movq %r13, %rdi
movq (%rsp), %rsi
callq 0x12058
testq %r15, %r15
movabsq $-0xfffffff8, %rbx      # imm = 0xFFFFFFFF00000008
je 0x11840
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movq %rbx, 0x28(%rax)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, 0x30(%rax)
movq (%rsp), %rsi
movq %rsi, 0x10(%rax)
movq %rcx, (%rax)
movq 0x18(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %rax, 0x18(%rsi)
movl 0x28(%r15), %ecx
movl %ecx, 0x60(%rax)
movl %edx, 0x58(%rax)
jmp 0x11844
movq (%rsp), %r15
movq %r15, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13cdb(%rip), %rsi     # 0x25538
leaq 0x1450f(%rip), %rcx     # 0x25d73
movq 0x8(%rsp), %rdi
movl $0x2a6, %edx            # imm = 0x2A6
jmp 0x118c2
leaq 0x13cc1(%rip), %rsi     # 0x25538
leaq 0x1442a(%rip), %rcx     # 0x25ca8
movq %r13, %rdi
movl $0x471, %edx            # imm = 0x471
xorl %eax, %eax
callq 0xca73
leaq 0x13ca4(%rip), %rsi     # 0x25538
leaq 0x1447b(%rip), %rcx     # 0x25d16
movq 0x8(%rsp), %rdi
movl $0x312, %edx            # imm = 0x312
jmp 0x118c2
callq 0x3060
leaq 0x13c85(%rip), %rsi     # 0x25538
leaq 0x14473(%rip), %rcx     # 0x25d2d
movq %r13, %rdi
movl $0x335, %edx            # imm = 0x335
movl %r15d, %r8d
xorl %eax, %eax
callq 0xca73
leaq 0x14139(%rip), %rsi     # 0x25a0c
leaq 0x1416b(%rip), %rcx     # 0x25a45
movq %r13, %rdi
movl $0x7c, %edx
jmp 0x118c5
leaq 0x13c4d(%rip), %rsi     # 0x25538
leaq 0x14469(%rip), %rcx     # 0x25d5b
movq %r13, %rdi
movl $0x272, %edx            # imm = 0x272
jmp 0x118c2
leaq 0x13c35(%rip), %rsi     # 0x25538
leaq 0x1443b(%rip), %rcx     # 0x25d45
movq %r13, %rdi
movl $0x2ea, %edx            # imm = 0x2EA
jmp 0x118c2
leaq 0x13ba5(%rip), %rsi     # 0x254c0
leaq 0x14352(%rip), %rcx     # 0x25c74
movq %r13, %rdi
movl $0x143, %edx            # imm = 0x143
jmp 0x118c2
movq 0x1c0(%r13), %rsi
leaq 0x143b3(%rip), %rdx     # 0x25ced
movq %r13, %rdi
callq 0x120e4
leaq 0x13bef(%rip), %rsi     # 0x25538
leaq 0x14188(%rip), %rcx     # 0x25ad8
movq %r13, %rdi
movl $0x4be, %edx            # imm = 0x4BE
jmp 0x118c2