// File: /workspace/github_c_makefile_star2_O3/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 $0x48, %rsp
movl %ecx, 0x14(%rsp)
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbp
movq %r8, 0x28(%rsp)
cmpl $0x4, %r9d
je 0x10685
cmpl $0x3, %r9d
je 0x1060f
cmpl $0x2, %r9d
jne 0x116c6
movq 0x1c0(%rbp), %rdi
movq %r13, %rsi
callq 0x11ce8
movq %rax, %r12
leaq 0x1573c(%rip), %rdi     # 0x25d37
callq 0x34d0
movq %rax, 0x50(%r12)
movq %r12, 0x20(%rsp)
jmp 0x1072a
movq 0x1c0(%rbp), %rdi
movq %r13, %rsi
callq 0x11ce8
movq %rax, %r15
leaq 0x1571a(%rip), %rdi     # 0x25d42
callq 0x34d0
movq %rax, 0x50(%r15)
movq %r15, 0x20(%rsp)
movl 0x28(%r15), %ebx
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movabsq $-0xfffffff8, %rcx      # imm = 0xFFFFFFFF00000008
movq %rcx, 0x28(%rax)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x30(%rax)
movq %r13, 0x10(%rax)
movq 0x18(%r13), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rdx)
movq %rax, 0x18(%r13)
movl %ebx, 0x60(%rax)
movl %ecx, 0x58(%rax)
xorl %r12d, %r12d
movq 0x20(%rsp), %r13
jmp 0x1072a
movq 0x1c0(%rbp), %rdi
movq %r13, %rsi
callq 0x11ce8
movq %rax, %r12
leaq 0x156af(%rip), %rdi     # 0x25d4d
callq 0x34d0
movq %rax, 0x50(%r12)
movq %r12, 0x20(%rsp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movq %rax, %r15
movabsq $-0xfffffff8, %rax      # imm = 0xFFFFFFFF00000008
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq %r13, 0x10(%r15)
movq 0x18(%r13), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%r13)
movq 0x1c0(%rbp), %rdi
movq %r13, %rsi
callq 0x11ce8
movq %rax, %r13
leaq 0x15652(%rip), %rdi     # 0x25d53
callq 0x34d0
movq %rax, 0x50(%r13)
movl 0x28(%r13), %eax
movl %eax, 0x60(%r15)
movq 0x20(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, 0x64(%r15)
movq %rbp, %rdi
callq 0xf491
movq %rax, 0x58(%r15)
movq %rbp, (%rsp)
movq (%r14), %r10
movq 0x8(%r14), %rax
cmpq %rax, %r10
jae 0x11617
movl 0x80(%rsp), %ecx
incl %ecx
movq %rcx, 0x40(%rsp)
movzbl (%r10), %ebp
incq %r10
movq %r10, (%r14)
cmpl $0xb, %ebp
je 0x11617
cmpl $0xbf, %ebp
ja 0x11717
movsbq %bpl, %rbx
movl %ebp, %ecx
leaq 0x1369c(%rip), %rdx     # 0x23e14
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movzbl %bl, %eax
addl $-0x67, %eax
cmpl $0x3c, %eax
ja 0x116e3
leaq 0x1397d(%rip), %rcx     # 0x24114
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r12, %rbp
xorl %ebx, %ebx
jmp 0x10b7c
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %rbp
movabsq $-0xfffffff9, %rax      # imm = 0xFFFFFFFF00000007
movq %rax, 0x28(%rbp)
movl $0xffffffff, 0x30(%rbp) # imm = 0xFFFFFFFF
movq %r13, 0x10(%rbp)
movq 0x18(%r13), %rax
movq %rax, 0x8(%rbp)
movq %rbp, (%rax)
movq %rbp, 0x18(%r13)
movzbl %bl, %eax
addl $-0x45, %eax
leaq 0x13a17(%rip), %rcx     # 0x24208
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq %r12, 0x18(%rsp)
jmpq *%rax
movl $0x20, %ebx
jmp 0x10d8b
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movq %rax, %r15
movabsq $-0xfffffffd, %rax      # imm = 0xFFFFFFFF00000003
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq %r13, 0x10(%r15)
movq 0x18(%r13), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%r13)
leaq 0x14261(%rip), %rax     # 0x24aac
movl 0x164(%rax,%rbx,4), %ebp
addq $0x59, %rbx
movsbq %bl, %rax
leaq 0x142af(%rip), %rcx     # 0x24b10
movl (%rcx,%rax,4), %eax
movl %eax, 0x60(%r15)
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0xf491
movq %rax, 0x58(%r15)
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x12027
movq 0x2c(%r15), %rsi
movq %rbx, %rdi
callq 0xf90d
jmp 0x115f9
movsbq %bpl, %rcx
leaq -0x28(%rcx), %rdx
movsbq %dl, %rdx
leaq 0x1415f(%rip), %rsi     # 0x24a08
movl (%rsi,%rdx,4), %edi
leaq 0x1418d(%rip), %rsi     # 0x24a40
movb -0x28(%rcx,%rsi), %sil
leaq 0x14191(%rip), %rcx     # 0x24a50
movl (%rcx,%rdx,4), %ecx
cmpq %rax, %r10
jae 0x11611
leaq 0x1(%r10), %rdx
cmpb $0x0, (%r10)
movq %rdx, (%r14)
movq %rdx, %r10
js 0x108c2
movb %sil, 0x30(%rsp)
movl %edi, 0x38(%rsp)
movl %ecx, 0x8(%rsp)
movq %r12, 0x18(%rsp)
xorl %ebp, %ebp
xorl %ecx, %ecx
movb $-0x1, %sil
cmpq %rax, %rdx
jae 0x10902
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 0x108f1
movl $0x1, %edi
movl $0x78, %esi
callq 0x32f0
movq %rax, %r15
movabsq $-0xfffffffc, %rax      # imm = 0xFFFFFFFF00000004
movq %rax, 0x28(%r15)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, 0x30(%r15)
movq %r13, 0x10(%r15)
movq 0x18(%r13), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%r13)
movq (%rsp), %r12
movq %r12, %rdi
callq 0xf491
movq %rax, 0x58(%r15)
movl %ebp, 0x60(%r15)
movl %ebx, 0x64(%r15)
movb 0x30(%rsp), %al
movb %al, 0x74(%r15)
movl 0x38(%rsp), %eax
movl %eax, 0x70(%r15)
movq %r12, %rdi
movl 0x8(%rsp), %esi
movq %r15, %rdx
callq 0x12027
movq 0x2c(%r15), %rsi
jmp 0x10dc5
leaq 0x140ed(%rip), %rcx     # 0x24a88
movl -0xd8(%rcx,%rbx,4), %ebx
cmpq %rax, %r10
jae 0x11613
leaq 0x1(%r10), %rdx
cmpb $0x0, (%r10)
movq %rdx, (%r14)
movq %rdx, %r10
js 0x109a2
movq %r12, 0x18(%rsp)
xorl %ebp, %ebp
xorl %ecx, %ecx
movb $-0x1, %sil
cmpq %rax, %rdx
jae 0x109d5
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 0x109c4
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %r15
movabsq $-0xfffffffb, %rax      # imm = 0xFFFFFFFF00000005
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq %r13, 0x10(%r15)
movq 0x18(%r13), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%r13)
movq (%rsp), %r12
movq %r12, %rdi
callq 0xf491
movq %rax, 0x60(%r15)
movq %r12, %rdi
callq 0xf491
movq %rax, 0x58(%r15)
movl %ebx, 0x64(%r15)
movl %ebp, 0x68(%r15)
jmp 0x10dcd
movq %r12, %rbp
movl $0x2, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0x4, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0x1, %ebx
jmp 0x10b7c
movq (%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xf761
jmp 0x115f9
movq (%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf1ba
movl %eax, %r15d
andl $0xff, %r15d
je 0x10e63
movq %rbx, %rdi
callq 0xf50d
movq 0x180(%rbx), %rdx
movslq %eax, %rcx
movq %rax, %r10
movq (%rdx,%rcx,8), %rax
movl $0x4, (%rax)
movl $0xffffffff, 0x38(%rax) # imm = 0xFFFFFFFF
movl %r15d, 0x24(%rax)
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
movl 0x14(%rsp), %ecx
leaq 0x20(%rsp), %r8
movl %ebp, %r9d
movq %r10, %r15
pushq %r10
pushq 0x48(%rsp)
callq 0x105a8
addq $0x10, %rsp
movq %rax, %r13
movq %r15, %rsi
cmpl $-0x1, %esi
je 0x115f9
movq %rbx, %rdi
jmp 0x110b5
movq %r12, %rbp
movl $0xb, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0x7, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0x6, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0x5, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0xd, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0x9, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0xa, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0x3, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0x8, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0xc, %ebx
jmp 0x10b7c
movq %r12, %rbp
movl $0xe, %ebx
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %r15
movabsq $-0xfffffffe, %rax      # imm = 0xFFFFFFFF00000002
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq %r13, 0x10(%r15)
movq 0x18(%r13), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%r13)
movq (%rsp), %r12
movq %r12, %rdi
callq 0xf491
movq %rax, 0x64(%r15)
movq %r12, %rdi
callq 0xf491
movq %rax, 0x5c(%r15)
movl %ebx, 0x58(%r15)
shrq $0x20, %rax
movq %r12, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x12027
movq 0x2c(%r15), %rsi
movq %r12, %rdi
callq 0xf90d
jmp 0x115fc
movq %r12, 0x18(%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
cmpb $0x11, %bpl
jne 0x11130
movq (%rsp), %r12
movb $-0x1, %sil
cmpq %rax, %r10
jae 0x10c21
movb (%r10), %sil
incq %r10
movq %r10, (%r14)
movl %esi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %edx
addl $0x7, %ecx
testb %sil, %sil
js 0x10c10
movq 0x580(%r12), %rax
movslq %edx, %rcx
movl (%rax,%rcx,4), %ebp
jmp 0x11194
xorl %r15d, %r15d
xorl %ecx, %ecx
movq (%rsp), %rdi
movb $-0x1, %dl
cmpq %rax, %r10
jae 0x10c66
movb (%r10), %dl
incq %r10
movq %r10, (%r14)
movl %edx, %esi
andb $0x7f, %sil
movzbl %sil, %esi
shll %cl, %esi
orl %esi, %r15d
addl $0x7, %ecx
testb %dl, %dl
js 0x10c56
movq 0x1c0(%rdi), %rdi
movq %r13, %rsi
callq 0x11ce8
movq %rax, %rbp
leaq 0x15111(%rip), %rdi     # 0x25da6
callq 0x34d0
movq %rbp, 0x8(%rsp)
movq %rax, 0x50(%rbp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movq %rax, %rbp
movabsq $-0xfffffff8, %rax      # imm = 0xFFFFFFFF00000008
movq %rax, 0x28(%rbp)
movl $0xffffffff, 0x30(%rbp) # imm = 0xFFFFFFFF
movq %r13, 0x10(%rbp)
movq 0x18(%r13), %rax
movq %rax, 0x8(%rbp)
movq %rbp, (%rax)
movq %rbp, 0x18(%r13)
leaq 0x20(%rsp), %rcx
movq %rcx, %rax
testl %r15d, %r15d
jle 0x10cf6
movq %rcx, %rax
movq 0x8(%rax), %rax
decl %r15d
jne 0x10ced
movq (%rax), %rax
movl 0x28(%rax), %eax
movl %eax, 0x60(%rbp)
cmpb $0xd, %bl
je 0x1158b
movzbl %bl, %eax
cmpl $0xc, %eax
jne 0x10d17
movl $0xffffffff, 0x58(%rbp) # imm = 0xFFFFFFFF
movq %r12, %rbp
movq 0x8(%rsp), %r13
jmp 0x115fc
movl $0x3, %ebx
jmp 0x10d8b
movl $0x2, %ebx
jmp 0x10d8b
movl $0x1, %ebx
jmp 0x10d8b
movl $0x28, %ebx
jmp 0x10d8b
movl $0x22, %ebx
jmp 0x10d8b
movl $0xe, %ebx
jmp 0x10d8b
movl $0x5, %ebx
jmp 0x10d8b
movl $0x21, %ebx
jmp 0x10d8b
movl $0x29, %ebx
jmp 0x10d8b
movl $0x25, %ebx
jmp 0x10d8b
movl $0x24, %ebx
jmp 0x10d8b
movl $0x26, %ebx
jmp 0x10d8b
movl $0x4, %ebx
jmp 0x10d8b
movl $0x23, %ebx
jmp 0x10d8b
movl $0x27, %ebx
movq (%rsp), %r12
movq %r12, %rdi
callq 0xf491
movq %rax, 0x64(%rbp)
movl $0x5c, %r15d
movq %r12, %rdi
callq 0xf491
movq %rax, (%rbp,%r15)
movl %ebx, 0x58(%rbp)
movq %r12, %rdi
movl $0x1, %esi
movq %rbp, %rdx
callq 0x12027
movq 0x2c(%rbp), %rsi
movq %r12, %rdi
callq 0xf90d
movq 0x18(%rsp), %rbp
jmp 0x115fc
movq (%rsp), %rdi
movq %r13, %rsi
movl $0x1ca, %edx            # imm = 0x1CA
movl $0x3, %ecx
jmp 0x10e59
movq (%rsp), %rdi
movq %r13, %rsi
movl $0x1f8, %edx            # imm = 0x1F8
jmp 0x10e54
movq (%rsp), %rdi
movq %r13, %rsi
movl $0x1be, %edx            # imm = 0x1BE
movl $0x4, %ecx
jmp 0x10e59
movq (%rsp), %rdi
movq %r13, %rsi
movl $0x1f5, %edx            # imm = 0x1F5
jmp 0x10e41
movq (%rsp), %rdi
movq %r13, %rsi
movl $0x1f4, %edx            # imm = 0x1F4
jmp 0x10e41
movq (%rsp), %rdi
movq %r13, %rsi
movl $0x1f7, %edx            # imm = 0x1F7
jmp 0x10e54
movq (%rsp), %rdi
movq %r13, %rsi
movl $0x1f6, %edx            # imm = 0x1F6
movl $0x1, %ecx
jmp 0x10e59
movq (%rsp), %rdi
movq %r13, %rsi
movl $0x1f9, %edx            # imm = 0x1F9
movl $0x2, %ecx
callq 0x1206c
jmp 0x115f9
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
movl 0x14(%rsp), %ecx
leaq 0x20(%rsp), %r8
movl %ebp, %r9d
pushq $-0x1
pushq 0x48(%rsp)
callq 0x105a8
addq $0x10, %rsp
movq %rax, %r13
jmp 0x115f9
movq %r12, 0x18(%rsp)
movq (%rsp), %r12
movq 0x598(%r12), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
movb $-0x1, %r8b
cmpq %rax, %r10
jae 0x10eb5
movb (%r10), %r8b
incq %r10
movq %r10, (%r14)
movl %r8d, %r9d
andb $0x7f, %r9b
movzbl %r9b, %r9d
shll %cl, %r9d
orl %r9d, %esi
addl $0x7, %ecx
testb %r8b, %r8b
js 0x10ea4
movl %esi, %eax
movq (%rdx,%rax,8), %r15
movl %r15d, %eax
cmpq %rax, 0x188(%r12)
jbe 0x116fc
movq %r15, %rbx
shrq $0x20, %rbx
movq 0x180(%r12), %rcx
movq (%rcx,%rax,8), %rax
movq 0x30(%rax), %rax
movl 0x10(%rax), %eax
movl %eax, 0x8(%rsp)
movl $0x1, %edi
movl $0x78, %esi
callq 0x32f0
movq %rax, %rbp
movabsq $-0xfffffffc, %rax      # imm = 0xFFFFFFFF00000004
movq %rax, 0x28(%rbp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x30(%rbp)
movq %r13, 0x10(%rbp)
movq 0x18(%r13), %rax
movq %rax, 0x8(%rbp)
movq %rbp, (%rax)
movq %rbp, 0x18(%r13)
movl %r15d, 0x58(%rbp)
movl %ebx, 0x5c(%rbp)
movl %ecx, 0x64(%rbp)
movb $-0x1, 0x74(%rbp)
movl 0x8(%rsp), %esi
movl %esi, 0x70(%rbp)
movq %r12, %rdi
jmp 0x10db9
xorl %ebp, %ebp
xorl %ecx, %ecx
movb $-0x1, %dl
cmpq %rax, %r10
jae 0x10f6f
movb (%r10), %dl
incq %r10
movq %r10, (%r14)
movl %edx, %esi
andb $0x7f, %sil
movzbl %sil, %esi
shll %cl, %esi
orl %esi, %ebp
addl $0x7, %ecx
testb %dl, %dl
js 0x10f5f
addl 0x14(%rsp), %ebp
movq (%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x11e35
movq %rbx, %rdi
movl %ebp, %esi
jmp 0x110b5
xorl %edx, %edx
xorl %ecx, %ecx
movq (%rsp), %rdi
movb $-0x1, %sil
cmpq %rax, %r10
jae 0x10fbc
movb (%r10), %sil
incq %r10
movq %r10, (%r14)
movl %esi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %edx
addl $0x7, %ecx
testb %sil, %sil
js 0x10fab
addl 0x14(%rsp), %edx
movq %r13, %rsi
callq 0x11e35
jmp 0x115f9
movq %r12, %rbp
movq (%rsp), %r12
movq 0x598(%r12), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
movb $-0x1, %r8b
cmpq %rax, %r10
jae 0x1100a
movb (%r10), %r8b
incq %r10
movq %r10, (%r14)
movl %r8d, %r9d
andb $0x7f, %r9b
movzbl %r9b, %r9d
shll %cl, %r9d
orl %r9d, %esi
addl $0x7, %ecx
testb %r8b, %r8b
js 0x10ff9
movl %esi, %eax
movq (%rdx,%rax,8), %rbx
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %r15
movabsq $-0xfffffffb, %rax      # imm = 0xFFFFFFFF00000005
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq %r13, 0x10(%r15)
movq 0x18(%r13), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%r13)
movq %r12, %rdi
callq 0xf491
movq %rax, 0x60(%r15)
movq %rbx, 0x58(%r15)
movl $0x0, 0x68(%r15)
jmp 0x115fc
xorl %esi, %esi
xorl %ecx, %ecx
movq (%rsp), %rdi
movb $-0x1, %dl
cmpq %rax, %r10
jae 0x11099
movb (%r10), %dl
incq %r10
movq %r10, (%r14)
movl %edx, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %esi
addl $0x7, %ecx
testb %dl, %dl
js 0x11089
addl 0x14(%rsp), %esi
callq 0x11df2
jmp 0x115f9
movl $0x1, %edi
movl $0x70, %esi
callq 0x32f0
movq %rax, %r15
movabsq $-0xfffffff2, %rax      # imm = 0xFFFFFFFF0000000E
movq %rax, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq %r13, 0x10(%r15)
movq 0x18(%r13), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, 0x18(%r13)
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0xf491
movq %rax, 0x68(%r15)
movq %rbx, %rdi
callq 0xf491
movq %rax, 0x60(%r15)
movq %rbx, %rdi
callq 0xf491
movq %rax, 0x58(%r15)
shrq $0x20, %rax
movq %rbx, %rdi
movl %eax, %esi
jmp 0x1087d
movq (%rsp), %r12
movb $-0x1, %sil
cmpq %rax, %r10
jae 0x11145
movb (%r10), %sil
incq %r10
movq %r10, (%r14)
movl %esi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %edx
addl $0x7, %ecx
testb %sil, %sil
js 0x11134
movq 0x2d8(%r12), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %r15
movl 0x10(%r15), %ebp
movq %r12, %rdi
callq 0xf50d
movq 0x180(%r12), %rcx
cltq
movq (%rcx,%rax,8), %rax
movl $0x1, (%rax)
movl %ebp, 0x24(%rax)
movq %r15, 0x30(%rax)
movl %ebp, %r8d
cmpq %r8, 0x170(%r12)
jbe 0x116cb
movq 0x168(%r12), %rax
leaq (%r8,%r8,4), %rcx
movq %rax, 0x8(%rsp)
movq %rcx, 0x38(%rsp)
movslq 0x14(%rax,%rcx,8), %r15
leaq (%r15,%r15,2), %rax
movq %rax, 0x30(%rsp)
leaq 0x70(,%rax,4), %rsi
movl $0x1, %edi
callq 0x32f0
movq %rax, %rbp
movabsq $-0xfffffff6, %rax      # imm = 0xFFFFFFFF0000000A
movq %rax, 0x28(%rbp)
movl $0xffffffff, 0x30(%rbp) # imm = 0xFFFFFFFF
movq %r13, 0x10(%rbp)
movq 0x18(%r13), %rax
movq %rax, 0x8(%rbp)
movq %rbp, (%rax)
movq %rbp, 0x18(%r13)
cmpb $0x11, %bl
jne 0x11505
movq %r12, %rdi
callq 0xf491
movq %rax, 0x58(%rbp)
movq (%r14), %rcx
movq 0x8(%r14), %rax
cmpq %rax, %rcx
jae 0x11615
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
movq %rcx, (%r14)
js 0x11222
jmp 0x11512
movq (%rsp), %rdi
callq 0xf491
jmp 0x115f9
movq (%rsp), %rax
movq 0x1c0(%rax), %rdi
movq %r13, %rsi
callq 0x11ce8
movq %rax, %rbx
leaq 0x14b4c(%rip), %rdi     # 0x25db3
callq 0x34d0
movq %rbx, 0x8(%rsp)
movq %rax, 0x50(%rbx)
movq (%r14), %rax
movq 0x8(%r14), %rdx
xorl %ebx, %ebx
xorl %ecx, %ecx
movb $-0x1, %sil
cmpq %rdx, %rax
jae 0x11291
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 0x11280
movslq %ebx, %r15
movq %r15, %rsi
shlq $0x4, %rsi
addq $0x68, %rsi
movl $0x1, %edi
callq 0x32f0
movq %rax, %rbp
movabsq $-0xfffffff4, %rax      # imm = 0xFFFFFFFF0000000C
movq %rax, 0x28(%rbp)
movl $0xffffffff, 0x30(%rbp) # imm = 0xFFFFFFFF
movq %r13, 0x10(%rbp)
movq 0x18(%r13), %rax
movq %rax, 0x8(%rbp)
movq %rbp, (%rax)
movq %rbp, 0x18(%r13)
movq (%rsp), %rdi
callq 0xf491
movq %rax, 0x58(%rbp)
movl %r15d, 0x64(%rbp)
movq (%r14), %rax
movq 0x8(%r14), %rdx
testl %r15d, %r15d
jle 0x115a6
leaq 0x68(%rbp), %rsi
movl %ebx, %edi
xorl %r8d, %r8d
leaq 0x20(%rsp), %r15
movq 0x8(%rsp), %r13
movq %r8, %rcx
shlq $0x4, %rcx
leaq (%rsi,%rcx), %r9
movq %r8, (%rsi,%rcx)
xorl %r10d, %r10d
xorl %ecx, %ecx
movb $-0x1, %r11b
cmpq %rdx, %rax
jae 0x11343
movb (%rax), %r11b
incq %rax
movq %rax, (%r14)
movl %r11d, %ebx
andb $0x7f, %bl
movzbl %bl, %ebx
shll %cl, %ebx
orl %ebx, %r10d
addl $0x7, %ecx
testb %r11b, %r11b
js 0x11332
movq %r15, %rcx
testl %r10d, %r10d
jle 0x1136d
movq %r15, %rcx
movq 0x8(%rcx), %rcx
decl %r10d
jne 0x11364
movq (%rcx), %rcx
movl 0x28(%rcx), %ecx
movl %ecx, 0x8(%r9)
incq %r8
cmpq %rdi, %r8
jne 0x1131e
jmp 0x115b0
movl $0x1, %edi
movl $0x58, %esi
callq 0x32f0
movq $-0x1, 0x2c(%rax)
movq %r13, 0x10(%rax)
movq 0x18(%r13), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %rax, 0x18(%r13)
movq (%r14), %rax
movq 0x8(%r14), %rcx
movb $-0x1, %dl
cmpq %rcx, %rax
jb 0x113c2
testb %dl, %dl
je 0x113b5
jmp 0x113cc
movb (%rax), %dl
incq %rax
movq %rax, (%r14)
jmp 0x113bc
movzbl %dl, %eax
cmpl $0x5, %eax
jne 0x1168f
movl 0x88(%rsp), %edx
cmpl $-0x1, %edx
movq (%rsp), %rbx
je 0x113f3
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11e35
movq 0x1c0(%rbx), %rdi
movq %r13, %rsi
callq 0x11ce8
movq %rax, %r15
leaq 0x1497a(%rip), %rdi     # 0x25d86
callq 0x34d0
movq %rax, 0x50(%r15)
movq %r15, 0x20(%rsp)
movl 0x28(%r15), %ebx
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movabsq $-0xfffffff8, %rcx      # imm = 0xFFFFFFFF00000008
movq %rcx, 0x28(%rax)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, 0x30(%rax)
movq %r13, 0x10(%rax)
movq 0x18(%r13), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %rax, 0x18(%r13)
movl %ebx, 0x60(%rax)
movl %edx, 0x58(%rax)
movq 0x20(%rsp), %rbp
movq %r12, %r13
jmp 0x115fc
movq (%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11751
movq 0x1c0(%rbx), %rdi
movq %r13, %rsi
callq 0x11ce8
movq %rax, %r13
leaq 0x148ff(%rip), %rdi     # 0x25d90
callq 0x34d0
movq %rax, 0x50(%r13)
jmp 0x115f9
movq (%rsp), %r12
movq %r12, %rdi
movl $0x5, %esi
jmp 0x114b9
movq (%rsp), %r12
movq %r12, %rdi
movl $0x6, %esi
callq 0xf96e
movl %eax, %r15d
movq %r12, %rdi
callq 0xf50d
movq 0x180(%r12), %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)
movl $0x20, %ebx
movl $0x64, %r15d
jmp 0x10da1
movl 0x198(%r12), %eax
decl %eax
movl %eax, 0x58(%rbp)
movl %r15d, 0x6c(%rbp)
testl %r15d, %r15d
movq (%rsp), %r12
jle 0x1154a
incq %r15
movq 0x30(%rsp), %rax
leaq 0x64(,%rax,4), %rbx
addq %rbp, %rbx
movq %r12, %rdi
callq 0xf491
movq %rax, (%rbx)
decq %r15
addq $-0xc, %rbx
cmpq $0x1, %r15
ja 0x11532
movq 0x8(%rsp), %rax
movq 0x38(%rsp), %rcx
leaq (%rax,%rcx,8), %rax
movl 0x10(%rax), %r8d
cmpq %r8, 0x170(%r12)
jbe 0x116cb
movq 0x168(%r12), %rax
leaq (%r8,%r8,4), %rcx
cmpl $0x1, (%rax,%rcx,8)
je 0x10dcd
movq %r12, %rdi
movl %r8d, %esi
jmp 0x10db9
movq 0x8(%rsp), %r13
movl 0x28(%r13), %eax
movl %eax, 0x64(%rbp)
movq (%rsp), %rdi
callq 0xf491
movq %rax, 0x58(%rbp)
jmp 0x115f9
leaq 0x20(%rsp), %r15
movq 0x8(%rsp), %r13
xorl %esi, %esi
xorl %ecx, %ecx
movb $-0x1, %dil
cmpq %rdx, %rax
jae 0x115c5
movb (%rax), %dil
incq %rax
movq %rax, (%r14)
movl %edi, %r8d
andb $0x7f, %r8b
movzbl %r8b, %r8d
shll %cl, %r8d
orl %r8d, %esi
addl $0x7, %ecx
testb %dil, %dil
js 0x115b4
movq %r15, %rax
testl %esi, %esi
jle 0x115f0
movq %r15, %rax
movq 0x8(%rax), %rax
decl %esi
jne 0x115e8
movq (%rax), %rax
movl 0x28(%rax), %eax
movl %eax, 0x60(%rbp)
movq %r12, %rbp
movq (%r14), %r10
movq 0x8(%r14), %rax
movq %rbp, %r12
cmpq %rax, %r10
jb 0x1074c
jmp 0x1161a
jmp 0x11611
jmp 0x11613
jmp 0x11615
movq %r12, %rbp
movl 0x88(%rsp), %edx
cmpl $-0x1, %edx
je 0x11632
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x11e35
testq %rbp, %rbp
je 0x1167a
movl 0x28(%rbp), %ebx
movl $0x1, %edi
movl $0x68, %esi
callq 0x32f0
movabsq $-0xfffffff8, %rcx      # imm = 0xFFFFFFFF00000008
movq %rcx, 0x28(%rax)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x30(%rax)
movq %r13, 0x10(%rax)
movq 0x18(%r13), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rdx)
movq %rax, 0x18(%r13)
movl %ebx, 0x60(%rax)
movl %ecx, 0x58(%rax)
jmp 0x1167d
movq %r13, %rbp
movq %rbp, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xb, %eax
jne 0x116a8
xorl %eax, %eax
movl 0x80(%rsp), %ecx
testl %ecx, %ecx
cmoveq %rax, %r12
movq %r12, %rbp
jmp 0x1167d
leaq 0x13f39(%rip), %rsi     # 0x255e8
leaq 0x146a2(%rip), %rcx     # 0x25d58
movq (%rsp), %rdi
movl $0x471, %edx            # imm = 0x471
xorl %eax, %eax
callq 0xca98
callq 0x3060
leaq 0x143ea(%rip), %rsi     # 0x25abc
leaq 0x1441c(%rip), %rcx     # 0x25af5
movq %r12, %rdi
movl $0x7c, %edx
jmp 0x1174a
leaq 0x13efe(%rip), %rsi     # 0x255e8
leaq 0x146d5(%rip), %rcx     # 0x25dc6
movq (%rsp), %rdi
movl $0x272, %edx            # imm = 0x272
jmp 0x11747
leaq 0x13e6d(%rip), %rsi     # 0x25570
leaq 0x1461a(%rip), %rcx     # 0x25d24
movq %r12, %rdi
movl $0x143, %edx            # imm = 0x143
movl %r15d, %r8d
jmp 0x1174a
movq (%rsp), %rbx
movq 0x1c0(%rbx), %rsi
leaq 0x14674(%rip), %rdx     # 0x25d9d
movq %rbx, %rdi
callq 0x11eb5
leaq 0x13eb0(%rip), %rsi     # 0x255e8
leaq 0x14449(%rip), %rcx     # 0x25b88
movq %rbx, %rdi
movl $0x4be, %edx            # imm = 0x4BE
movl %ebp, %r8d
xorl %eax, %eax
callq 0xca98