// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_value.c
// Function: eval_constexpr
static void
eval_constexpr(ir_unit_t *iu, ir_value_t *iv, ir_constexpr_t *ic)
{
  switch(ic->ic_code) {
  case CST_CODE_CE_CAST:
    {
      ir_type_code_t tc = type_get(iu, iv->iv_type)->it_code;
      ir_value_t *src = value_get(iu, ic->ic_cast.src);

      if(src->iv_class == IR_VC_CE)
        eval_constexpr(iu, src, src->iv_ce);

      if(src->iv_class == IR_VC_ALIAS) {
        src = value_get(iu, src->iv_reg);
      }

      iv->iv_class = IR_VC_CONSTANT;

      switch(COMBINE3(tc, ic->ic_cast.op, src->iv_class)) {
      case COMBINE3(IR_TYPE_POINTER, CAST_INTTOPTR, IR_VC_CONSTANT):
        iv->iv_u32 = src->iv_u32;
        break;

      case COMBINE3(IR_TYPE_POINTER, CAST_BITCAST, IR_VC_GLOBALVAR):
        iv->iv_u32 = value_get_const32(iu, src);
        break;

      case COMBINE3(IR_TYPE_POINTER, CAST_BITCAST, IR_VC_CONSTANT):
        iv->iv_u32 = value_get_const32(iu, src);
        break;

      case COMBINE3(IR_TYPE_POINTER, CAST_BITCAST, IR_VC_FUNCTION):
        iv->iv_class = IR_VC_FUNCTION;
        iv->iv_func = src->iv_func;
        iv->iv_type = src->iv_type;
        break;

      case COMBINE3(IR_TYPE_INT32, CAST_PTRTOINT, IR_VC_CONSTANT):
      case COMBINE3(IR_TYPE_INT32, CAST_PTRTOINT, IR_VC_GLOBALVAR):
      case COMBINE3(IR_TYPE_INT8, CAST_PTRTOINT, IR_VC_CONSTANT):
      case COMBINE3(IR_TYPE_INT8, CAST_PTRTOINT, IR_VC_GLOBALVAR):
        iv->iv_u32 = value_get_const32(iu, src);
        break;

      case COMBINE3(IR_TYPE_INT32, CAST_PTRTOINT, IR_VC_FUNCTION):
        iv->iv_u32 = value_function_addr(src);
        break;

      default:
        parser_error(iu,
                     "Unable to constant-cast %s from %s using op %d class=%d",
                     type_str_index(iu, iv->iv_type),
                     type_str_index(iu, src->iv_type),
                     ic->ic_cast.op, src->iv_class);
      }
    }
    break;

  case CST_CODE_CE_BINOP:
    {
      ir_value_t *lhs = value_get(iu, ic->ic_binop.lhs);
      ir_value_t *rhs = value_get(iu, ic->ic_binop.rhs);
      ir_type_code_t tc = type_get(iu, iv->iv_type)->it_code;

      switch(tc) {
      case IR_TYPE_INT8:
      case IR_TYPE_INT32:
      case IR_TYPE_POINTER:
        {
          const uint32_t l = value_get_const32(iu, lhs);
          const uint32_t r = value_get_const32(iu, rhs);

          switch(ic->ic_binop.op) {
          case BINOP_ADD:  iv->iv_u32 = l + r; break;
          case BINOP_SUB:  iv->iv_u32 = l - r; break;
          case BINOP_MUL:  iv->iv_u32 = l * r; break;

          case BINOP_UDIV: iv->iv_u32 = l / r; break;
          case BINOP_SDIV: iv->iv_u32 = (int32_t)l / (int32_t)r; break;
          case BINOP_UREM: iv->iv_u32 = l % r; break;
          case BINOP_SREM: iv->iv_u32 = (int32_t)l % (int32_t)r; break;

          case BINOP_SHL:  iv->iv_u32 = l << r; break;
          case BINOP_LSHR: iv->iv_u32 = l >> r; break;
          case BINOP_ASHR: iv->iv_u32 = (int32_t)l >> r; break;
          case BINOP_AND:  iv->iv_u32 = l & r; break;
          case BINOP_OR:   iv->iv_u32 = l | r; break;
          case BINOP_XOR:  iv->iv_u32 = l ^ r; break;
          default:
            parser_error(iu, "Unable to handle opcode %d in constant binop",
                         ic->ic_binop.op);
          }
        }
        break;

      default:
        parser_error(iu, "Unable to handle constant binop for typecode %d",
                     tc);
      }
      iv->iv_class = IR_VC_CONSTANT;
    }
    break;

  case CST_CODE_CE_CMP:
    {
      ir_value_t *lhs = value_get(iu, ic->ic_cmp.lhs);
      ir_value_t *rhs = value_get(iu, ic->ic_cmp.rhs);
      ir_type_code_t opty = type_get(iu, ic->ic_cmp.opty)->it_code;

      switch(opty) {
      case IR_TYPE_INT32:
      case IR_TYPE_POINTER:
        {
          const uint32_t l = value_get_const32(iu, lhs);
          const uint32_t r = value_get_const32(iu, rhs);

          switch(ic->ic_cmp.pred) {
          case ICMP_EQ:  iv->iv_u32 = l == r; break;
          case ICMP_NE:  iv->iv_u32 = l != r; break;
          case ICMP_UGT: iv->iv_u32 = l >  r; break;
          case ICMP_UGE: iv->iv_u32 = l >= r; break;
          case ICMP_ULT: iv->iv_u32 = l <  r; break;
          case ICMP_ULE: iv->iv_u32 = l <= r; break;
          case ICMP_SGT: iv->iv_u32 = (int32_t)l >  (int32_t)r; break;
          case ICMP_SGE: iv->iv_u32 = (int32_t)l >= (int32_t)r; break;
          case ICMP_SLT: iv->iv_u32 = (int32_t)l <  (int32_t)r; break;
          case ICMP_SLE: iv->iv_u32 = (int32_t)l <= (int32_t)r; break;

          default:
            parser_error(iu, "Unable to handle opcode %d in constant cmp",
                         ic->ic_binop.op);
          }
        }
        break;

      default:
        parser_error(iu, "Unable to handle constant cmp for type %s",
                     type_str_index(iu, ic->ic_cmp.opty));
      }
      iv->iv_class = IR_VC_CONSTANT;
    }
    break;

  case CST_CODE_CE_GEP:
  case CST_CODE_CE_INBOUNDS_GEP:
    {
      const int *vv = ic->ic_gep.values;
      ir_value_t *curval = value_get(iu, vv[0]);

      if(curval->iv_class == IR_VC_CE)
        eval_constexpr(iu, curval, curval->iv_ce);

      uint32_t addr = value_get_const32(iu, curval);
      int type_index = curval->iv_type;
      for(int i = 1; i < ic->ic_gep.num_values; i++) {
        ir_type_t *curtype = type_get(iu, type_index);
        curval = value_get(iu, vv[i]);

        int x = value_get_const32(iu, curval);

        switch(curtype->it_code) {
        default:
          parser_error(iu, "Unable to handle type %s in constexpr GEP",
                       type_str(iu, curtype));

        case IR_TYPE_POINTER:
          addr += x * type_sizeof(iu, curtype->it_pointer.pointee);
          type_index = curtype->it_pointer.pointee;
          break;

        case IR_TYPE_STRUCT:
          if(x >= curtype->it_struct.num_elements)
            parser_error(iu, "Bad index %d info struct", x);
          type_index = curtype->it_struct.elements[x].type;
          addr += curtype->it_struct.elements[x].offset;
          break;

        case IR_TYPE_ARRAY:
          addr +=  x * type_sizeof(iu, curtype->it_array.element_type);
          type_index = curtype->it_array.element_type;
          break;
        }
      }
      iv->iv_type = type_make_pointer(iu, type_index, 1);
      iv->iv_u32 = addr;
      iv->iv_class = IR_VC_CONSTANT;

      free(ic->ic_gep.values);
    }
    break;

  default:
    parser_error(iu, "Unable to eval constexpr for code %d", ic->ic_code);
  }
  free(ic);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $-0xa, %eax
movl %eax, %ecx
movq %rcx, -0xa0(%rbp)
subl $0xa, %eax
ja 0x387f7
movq -0xa0(%rbp), %rax
leaq 0x5fb8(%rip), %rcx      # 0x3def8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x1ee20
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x20ee0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x8, (%rax)
jne 0x37f90
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x37f00
movq -0x28(%rbp), %rax
cmpl $0xa, (%rax)
jne 0x37fad
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x20ee0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl $0x3, (%rax)
movl -0x1c(%rbp), %eax
shll $0x10, %eax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x28(%rbp), %rcx
movl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0xa4(%rbp)
addl $0xfffcf6fe, %eax       # imm = 0xFFFCF6FE
subl $0x2, %eax
jb 0x380c5
jmp 0x37fe7
movl -0xa4(%rbp), %eax
subl $0x50901, %eax          # imm = 0x50901
je 0x380e0
jmp 0x37ffa
movl -0xa4(%rbp), %eax
addl $0xfffaf6fe, %eax       # imm = 0xFFFAF6FE
subl $0x2, %eax
jb 0x380c5
jmp 0x38010
movl -0xa4(%rbp), %eax
subl $0xb0a03, %eax          # imm = 0xB0A03
je 0x3804f
jmp 0x3801f
movl -0xa4(%rbp), %eax
subl $0xb0b01, %eax          # imm = 0xB0B01
je 0x38098
jmp 0x3802e
movl -0xa4(%rbp), %eax
subl $0xb0b02, %eax          # imm = 0xB0B02
je 0x38062
jmp 0x3803d
movl -0xa4(%rbp), %eax
subl $0xb0b03, %eax          # imm = 0xB0B03
je 0x3807d
jmp 0x380f4
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x38167
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x261a0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x38167
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x261a0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x38167
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x38167
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x261a0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x38167
movq -0x28(%rbp), %rdi
callq 0x323e0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x38167
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x22560
movq %rax, -0xb0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x22560
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %r8
movq %rax, %r9
movq -0x18(%rbp), %rax
movl 0x8(%rax), %r10d
movq -0x28(%rbp), %rax
movl (%rax), %eax
leaq 0x6618(%rip), %rsi      # 0x3e764
movl $0x37d, %edx            # imm = 0x37D
leaq 0x8f31(%rip), %rcx      # 0x41089
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x18220
jmp 0x3881c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x20ee0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x20ee0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x1ee20
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0xbc(%rbp)
subl $0x3, %eax
je 0x381d7
jmp 0x381b9
movl -0xbc(%rbp), %eax
subl $0x5, %eax
je 0x381d7
jmp 0x381c6
movl -0xbc(%rbp), %eax
subl $0xb, %eax
jne 0x3833d
jmp 0x381d7
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x261a0
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x261a0
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0xc8(%rbp)
subq $0xc, %rax
ja 0x38315
movq -0xc8(%rbp), %rax
leaq 0x5d2f(%rip), %rcx      # 0x3df4c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x40(%rbp), %ecx
addl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %ecx
subl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %ecx
imull -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %eax
xorl %edx, %edx
divl -0x44(%rbp)
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %eax
cltd
idivl -0x44(%rbp)
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %eax
xorl %edx, %edx
divl -0x44(%rbp)
movq -0x10(%rbp), %rax
movl %edx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %eax
cltd
idivl -0x44(%rbp)
movq -0x10(%rbp), %rax
movl %edx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
shll %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
shrl %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
sarl %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %ecx
andl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %ecx
orl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movl -0x40(%rbp), %ecx
xorl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3833b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %r8d
leaq 0x643c(%rip), %rsi      # 0x3e764
movl $0x3a2, %edx            # imm = 0x3A2
leaq 0x8d8d(%rip), %rcx      # 0x410c1
movb $0x0, %al
callq 0x18220
jmp 0x3835f
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %r8d
leaq 0x6418(%rip), %rsi      # 0x3e764
movl $0x3a9, %edx            # imm = 0x3A9
leaq 0x8d96(%rip), %rcx      # 0x410ee
movb $0x0, %al
callq 0x18220
movq -0x10(%rbp), %rax
movl $0x3, (%rax)
jmp 0x3881c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x20ee0
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x20ee0
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x1ee20
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0xcc(%rbp)
subl $0x5, %eax
je 0x383cc
jmp 0x383bb
movl -0xcc(%rbp), %eax
subl $0xb, %eax
jne 0x3853f
jmp 0x383cc
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x261a0
movl %eax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x261a0
movl %eax, -0x64(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
addl $-0x20, %eax
movl %eax, %ecx
movq %rcx, -0xd8(%rbp)
subl $0x9, %eax
ja 0x38517
movq -0xd8(%rbp), %rax
leaq 0x5b0e(%rip), %rcx      # 0x3df24
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
setne %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
seta %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
setae %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
setb %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
setbe %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
setg %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
setle %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x3853d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %r8d
leaq 0x623a(%rip), %rsi      # 0x3e764
movl $0x3ca, %edx            # imm = 0x3CA
leaq 0x8be8(%rip), %rcx      # 0x4111e
movb $0x0, %al
callq 0x18220
jmp 0x3857e
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x22560
movq -0xe0(%rbp), %rdi
movq %rax, %r8
leaq 0x61f9(%rip), %rsi      # 0x3e764
movl $0x3d1, %edx            # imm = 0x3D1
leaq 0x8bd2(%rip), %rcx      # 0x41149
movb $0x0, %al
callq 0x18220
movq -0x10(%rbp), %rax
movl $0x3, (%rax)
jmp 0x3881c
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
movq -0x70(%rbp), %rax
movl (%rax), %esi
callq 0x20ee0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpl $0x8, (%rax)
jne 0x385ca
movq -0x8(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x78(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x37f00
movq -0x8(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x261a0
movl %eax, -0x7c(%rbp)
movq -0x78(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x80(%rbp)
movl $0x1, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x387ba
movq -0x8(%rbp), %rdi
movl -0x80(%rbp), %esi
callq 0x1ee20
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rdi
movq -0x70(%rbp), %rax
movslq -0x84(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x20ee0
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x261a0
movl %eax, -0x94(%rbp)
movq -0x90(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xe4(%rbp)
testl %eax, %eax
je 0x386fa
jmp 0x3865b
movl -0xe4(%rbp), %eax
subl $0xa, %eax
je 0x38767
jmp 0x3866c
movl -0xe4(%rbp), %eax
subl $0xb, %eax
je 0x386b8
jmp 0x38679
movq -0x8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x4760
movq -0xf0(%rbp), %rdi
movq %rax, %r8
leaq 0x60bf(%rip), %rsi      # 0x3e764
movl $0x3eb, %edx            # imm = 0x3EB
leaq 0x8ac2(%rip), %rcx      # 0x41173
movb $0x0, %al
callq 0x18220
movl -0x94(%rbp), %eax
movl %eax, -0xf4(%rbp)
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x1ecd0
movl %eax, %ecx
movl -0xf4(%rbp), %eax
imull %ecx, %eax
addl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq -0x90(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x80(%rbp)
jmp 0x387a4
movl -0x94(%rbp), %eax
movq -0x90(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jl 0x38731
movq -0x8(%rbp), %rdi
movl -0x94(%rbp), %r8d
leaq 0x6046(%rip), %rsi      # 0x3e764
movl $0x3f4, %edx            # imm = 0x3F4
leaq 0x6cfe(%rip), %rcx      # 0x3f428
movb $0x0, %al
callq 0x18220
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x94(%rbp), %rcx
movl (%rax,%rcx,8), %eax
movl %eax, -0x80(%rbp)
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x94(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
addl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x387a4
movl -0x94(%rbp), %eax
movl %eax, -0xf8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x1ecd0
movl %eax, %ecx
movl -0xf8(%rbp), %eax
imull %ecx, %eax
addl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq -0x90(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x80(%rbp)
jmp 0x387a6
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x385ee
movq -0x8(%rbp), %rdi
movl -0x80(%rbp), %esi
movl $0x1, %edx
callq 0x1e6e0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0x7c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rax
movl $0x3, (%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3030
jmp 0x3881c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %r8d
leaq 0x5f5b(%rip), %rsi      # 0x3e764
movl $0x408, %edx            # imm = 0x408
leaq 0x8988(%rip), %rcx      # 0x4119d
movb $0x0, %al
callq 0x18220
movq -0x18(%rbp), %rdi
callq 0x3030
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nop