// File: chhylp123[P]hifiasm/hic.cpp
// Function: identify_bubbles_recal_poy(asg_t*, ma_ug_t*, bubble_type*, unsigned char*, ma_hit_t_alloc*, R_to_U*, kv_u_trans_t*)
void identify_bubbles_recal_poy(asg_t* sg, ma_ug_t* ug, bubble_type* bub, uint8_t *r_het_flag, ma_hit_t_alloc* sources, R_to_U* ruIndex,
kv_u_trans_t *ref)
{
    asg_cleanup(ug->g);
    if (!ug->g->is_symm) asg_symm(ug->g);
    uint32_t v, n_vtx = ug->g->n_seq * 2, i, k, mode = (((uint32_t)-1)<<2);
    uint32_t beg, sink, n, *a, n_occ;
    uint64_t pathLen, hom_cov, het_cov, m_het_cov, m_hom_cov;
    bub->ug = ug; 
    bub->b_bub = bub->b_end_bub = bub->tangle_bub = bub->cross_bub = bub->mess_bub = 0;
    if(asm_opt.hom_global_coverage_set) {
        hom_cov = asm_opt.hom_global_coverage;
    } else {
        hom_cov = ((double)asm_opt.hom_global_coverage)/((double)HOM_PEAK_RATE);
    }
    het_cov = hom_cov/asm_opt.polyploidy;
    m_het_cov = het_cov + (het_cov*0.333333);///hom_cov - het_cov + (het_cov*0.333333);
    m_hom_cov = het_cov + (het_cov*0.6);///hom_cov - het_cov + (het_cov*0.6);
    // fprintf(stderr, "hom_cov::%lu, het_cov::%lu, m_het_cov::%lu, m_hom_cov::%lu\n",  hom_cov, het_cov, m_het_cov, m_hom_cov);

    buf_t b; memset(&b, 0, sizeof(buf_t)); b.a = (binfo_t*)calloc(n_vtx, sizeof(binfo_t));
    uint64_t tLen = get_bub_pop_max_dist_advance(ug->g, &b);
    kv_init(bub->list); kv_init(bub->num); kv_init(bub->pathLen);
    kv_init(bub->b_s_idx); kv_malloc(bub->b_s_idx, ug->g->n_seq); 
    bub->b_ug = NULL; kv_init(bub->chain_weight);
    bub->b_s_idx.n = ug->g->n_seq;
    memset(bub->b_s_idx.a, -1, bub->b_s_idx.n * sizeof(uint64_t));
    CALLOC(bub->index, n_vtx);
    for (i = 0; i < ug->g->n_seq; i++) ug->g->seq[i].c = 0;
    for (v = 0; v < n_vtx; ++v) 
    {
        if(ug->g->seq[v>>1].del) continue;
        if(asg_arc_n(ug->g, v) < 2) continue;
        if((bub->index[v]&(uint32_t)3) != 0) continue;
        if(asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, NULL, NULL, NULL, 0, 0, NULL))
        {
            //beg is v, end is b.S.a[0]
            //note b.b include end, does not include beg
            for (i = 0; i < b.b.n; i++)
            {
                if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                bub->index[b.b.a[i]] &= mode; bub->index[b.b.a[i]] += 1;
                bub->index[b.b.a[i]^1] &= mode; bub->index[b.b.a[i]^1] += 1;
            }
            bub->index[v] &= mode; bub->index[v] += 2;
            bub->index[b.S.a[0]^1] &= mode; bub->index[b.S.a[0]^1] += 3;
        }
    }

    kvec_t_u32_warp stack, result;
    kv_init(stack.a); kv_init(result.a);
    for (v = 0; v < n_vtx; ++v) 
    {
        if((bub->index[v]&(uint32_t)3) !=2) continue;
        if(asg_bub_pop1_primary_trio(ug->g, ug, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, &pathLen, NULL, NULL, 0, 0, NULL))
        {   
            //note b.b include end, does not include beg
            i = b.b.n + 1;
            if(b.b.n == 2 || b.b.n == 3 || b.b.n == 5)
            {
                for (i = 0; i < b.b.n; i++)
                {
                    if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                    dfs_bubble(ug->g, &stack, &result, b.b.a[i]>>1, v>>1, b.S.a[0]>>1);
                    if((result.a.n + 3) != b.b.n && (result.a.n + 2) != b.b.n) break;
                }
            }

            if(i == b.b.n)
            {
                kv_push(uint32_t, bub->num, v);
            }
            else
            {
                kv_push(uint32_t, bub->num, v + (1<<31));
            }
        }
    }
    kv_destroy(stack.a); kv_destroy(result.a);
    radix_sort_u32(bub->num.a, bub->num.a + bub->num.n);
    bub->s_bub = 0;
    for (k = 0; k < bub->num.n; k++)
    {
        if((bub->num.a[k]>>31) == 0) bub->s_bub++;
        v = (bub->num.a[k]<<1)>>1;
        bub->num.a[k] = bub->list.n;
        if(asg_bub_pop1_primary_trio(ug->g, ug, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, &pathLen, NULL, NULL, 0, 0, NULL))
        {
            kv_push(uint64_t, bub->pathLen, pathLen);
            //beg is v, end is b.S.a[0]
            kv_push(uint32_t, bub->list, v);
            kv_push(uint32_t, bub->list, b.S.a[0]^1);
            
            //note b.b include end, does not include beg
            for (i = 0; i < b.b.n; i++)
            {
                if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                kv_push(uint32_t, bub->list, b.b.a[i]);
            }
        }
    }
    kv_push(uint32_t, bub->num, bub->list.n);
    // free(b.a); free(b.S.a); free(b.T.a); free(b.b.a); free(b.e.a);
    bub->f_bub = bub->num.n - 1; ///bub->s_bub = bub->num.n - 1;
    

    memset(r_het_flag, 0, sizeof((*r_het_flag))*sg->n_seq);
    for (i = 0; i < ug->g->n_seq; i++) {
        bub->index[i] = get_unitig_het_fly(ug, i, sg, m_het_cov, m_hom_cov,
        sources, ruIndex, r_het_flag, 20, M_het(*bub), P_het(*bub), (uint32_t)-1);
    }

    for (i = 0; i < bub->f_bub; i++) {
        get_bubbles(bub, i, &beg, &sink, &a, &n, &pathLen);
        for (v = n_occ = 0; v < n; v++) {
            bub->index[(a[v]>>1)] = i;
            n_occ += ug->u.a[a[v]>>1].n;
        }

        if(n_occ > 3) {
            if(bub->index[(beg>>1)] != M_het(*bub)) bub->index[(beg>>1)] = (uint32_t)-1;
            if(bub->index[(sink>>1)] != M_het(*bub)) bub->index[(sink>>1)] = (uint32_t)-1;
        }
        
        
        v = beg>>1;
        if(bub->b_s_idx.a[v] == (uint64_t)-1) {
            bub->b_s_idx.a[v] <<= 32;
            bub->b_s_idx.a[v] |= i;
        } else if((bub->b_s_idx.a[v] & 0xffffffff00000000) == 0xffffffff00000000) {
            bub->b_s_idx.a[v] <<= 32;
            bub->b_s_idx.a[v] |= i;
        }


        v = sink>>1;
        if(bub->b_s_idx.a[v] == (uint64_t)-1) {
            bub->b_s_idx.a[v] <<= 32;
            bub->b_s_idx.a[v] |= i;
        } else if((bub->b_s_idx.a[v] & 0xffffffff00000000) == 0xffffffff00000000) {
            bub->b_s_idx.a[v] <<= 32;
            bub->b_s_idx.a[v] |= i;
        }     
    }
    for (i = 0; i < ug->g->n_seq; i++) {
        if(bub->index[i] == M_het(*bub)) bub->index[i] = P_het(*bub);
    }
    
    bub->b_g = NULL;
    bub->b_ug = NULL;
    build_bub_graph(ug, bub);


    ///make het nodes to be hom
    ma_utg_t *u = NULL;
    for (i = 0; i < bub->b_ug->u.n; i++) {
        u = &(bub->b_ug->u.a[i]);
        if(u->n == 0) continue;
        for (k = 0; k < u->n; k++) {
            reset_inner_bub_het_poy(sg, ug, bub, u->a[k]>>33, tLen, &b, m_het_cov, m_hom_cov, r_het_flag, sources, ruIndex);   
        }
    }
    free(b.a); free(b.S.a); free(b.T.a); free(b.b.a); free(b.e.a);

    for (i = 0; i < ug->g->n_seq; i++) {
        if(IF_HOM(i, *bub)) continue;
        if(deter_unitig_het_fly(ug, i, sg, het_cov*1.15, sources, ruIndex, r_het_flag)) continue;
        bub->index[i] = (uint32_t)-1;
    }
    // fprintf(stderr, "-bub->index[18759]: %u, bub->num.n: %u\n",  (uint32_t)bub->index[18759], bub->num.n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
movq 0x10(%rbp), %rax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xcdd10
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x1c91e7
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xce020
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x48(%rbp)
movl $0xfffffffc, -0x54(%rbp) # imm = 0xFFFFFFFC
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0xa8(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x98(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x88(%rax)
leaq 0x1fb597(%rip), %rax    # 0x3c47f8
cmpl $0x0, 0x148(%rax)
je 0x1c927e
leaq 0x1fb587(%rip), %rax    # 0x3c47f8
movslq 0x144(%rax), %rax
movq %rax, -0x80(%rbp)
jmp 0x1c92c3
leaq 0x1fb573(%rip), %rax    # 0x3c47f8
cvtsi2sdl 0x144(%rax), %xmm0
movsd 0x1bd5ab(%rip), %xmm1   # 0x386840
divsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x1b8d48(%rip), %xmm1   # 0x381ff8
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
leaq 0x1fb52a(%rip), %rcx    # 0x3c47f8
movslq 0x1bc(%rcx), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %xmm1
movaps 0x1b8d20(%rip), %xmm3   # 0x382010
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x1b8d24(%rip), %xmm0   # 0x382020
subpd %xmm0, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
movsd 0x1b8fb5(%rip), %xmm4   # 0x3822c8
movaps %xmm1, %xmm2
mulsd %xmm4, %xmm2
addsd %xmm1, %xmm2
movaps %xmm2, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x1b8cc3(%rip), %xmm1   # 0x381ff8
subsd %xmm1, %xmm2
cvttsd2si %xmm2, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %xmm2
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
subpd %xmm0, %xmm2
movaps %xmm2, %xmm0
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm0, %xmm2
movsd 0x1b8ea2(%rip), %xmm3   # 0x382210
movaps %xmm2, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
movaps %xmm0, %xmm2
cvttsd2si %xmm2, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x98(%rbp)
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2100
movl -0x48(%rbp), %eax
movl %eax, %edi
movl $0x1c, %esi
callq 0x2140
movq %rax, -0x100(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x100(%rbp), %rsi
callq 0xfde50
movq %rax, -0x108(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0xd0(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0xc8(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0xd8(%rax)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rdx
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x2100
movl -0x48(%rbp), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x2140
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1c958f
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
movb $0x0, 0x4(%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1c9558
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x48(%rbp), %eax
jae 0x1c97b4
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x44(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1c95c5
jmp 0x1c97a6
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x2, %eax
jae 0x1c95e2
jmp 0x1c97a6
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x44(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x1c95fc
jmp 0x1c97a6
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x44(%rbp), %edx
movq -0x108(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0x100(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
cmpq $0x0, %rax
je 0x1c97a4
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpq -0xc8(%rbp), %rax
jae 0x1c9742
movq -0xb8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x44(%rbp), %eax
je 0x1c96b4
movq -0xb8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xe8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x1c96b6
jmp 0x1c9734
movl -0x54(%rbp), %edx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0xb8(%rbp), %rcx
movl -0x4c(%rbp), %esi
movl (%rcx,%rsi,4), %ecx
andl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0xb8(%rbp), %rcx
movl -0x4c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x54(%rbp), %edx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0xb8(%rbp), %rcx
movl -0x4c(%rbp), %esi
movl (%rcx,%rsi,4), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
andl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0xb8(%rbp), %rcx
movl -0x4c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1c967a
movl -0x54(%rbp), %edx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x44(%rbp), %ecx
andl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x44(%rbp), %ecx
movl (%rax,%rcx,4), %edx
addl $0x2, %edx
movl %edx, (%rax,%rcx,4)
movl -0x54(%rbp), %edx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0xe8(%rbp), %rcx
movl (%rcx), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
andl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0xe8(%rbp), %rcx
movl (%rcx), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %edx
addl $0x3, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x1c97a6
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1c9596
movq $0x0, -0x120(%rbp)
movq $0x0, -0x128(%rbp)
movq $0x0, -0x118(%rbp)
movq $0x0, -0x140(%rbp)
movq $0x0, -0x148(%rbp)
movq $0x0, -0x138(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x48(%rbp), %eax
jae 0x1c9ae3
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x44(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0x3, %eax
cmpl $0x2, %eax
je 0x1c9823
jmp 0x1c9ad5
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movl -0x44(%rbp), %edx
movq -0x108(%rbp), %rcx
leaq -0x100(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
leaq -0x78(%rbp), %rax
xorl %r10d, %r10d
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
cmpq $0x0, %rax
je 0x1c9ad3
movq -0xc8(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x4c(%rbp)
cmpq $0x2, -0xc8(%rbp)
je 0x1c98cd
cmpq $0x3, -0xc8(%rbp)
je 0x1c98cd
cmpq $0x5, -0xc8(%rbp)
jne 0x1c998a
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpq -0xc8(%rbp), %rax
jae 0x1c9988
movq -0xb8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x44(%rbp), %eax
je 0x1c990e
movq -0xb8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xe8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x1c9910
jmp 0x1c997a
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0xb8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
shrl %ecx
movl -0x44(%rbp), %r8d
shrl %r8d
movq -0xe8(%rbp), %rax
movl (%rax), %r9d
shrl %r9d
leaq -0x128(%rbp), %rsi
leaq -0x148(%rbp), %rdx
callq 0x1c54a0
movq -0x148(%rbp), %rax
addq $0x3, %rax
cmpq -0xc8(%rbp), %rax
je 0x1c9978
movq -0x148(%rbp), %rax
addq $0x2, %rax
cmpq -0xc8(%rbp), %rax
je 0x1c9978
jmp 0x1c9988
jmp 0x1c997a
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1c98d4
jmp 0x1c998a
movl -0x4c(%rbp), %eax
cmpq -0xc8(%rbp), %rax
jne 0x1c9a34
jmp 0x1c999c
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jne 0x1c9a0e
movq -0x28(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x1c99cd
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
shlq %rax
movq %rax, -0x158(%rbp)
jmp 0x1c99db
movl $0x2, %eax
movq %rax, -0x158(%rbp)
jmp 0x1c99db
movq -0x158(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0x44(%rbp), %edx
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rsi
movq 0x30(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x30(%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x1c9ad1
jmp 0x1c9a36
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jne 0x1c9aa8
movq -0x28(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x1c9a67
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
shlq %rax
movq %rax, -0x160(%rbp)
jmp 0x1c9a75
movl $0x2, %eax
movq %rax, -0x160(%rbp)
jmp 0x1c9a75
movq -0x160(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0x44(%rbp), %edx
addl $0x80000000, %edx       # imm = 0x80000000
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rsi
movq 0x30(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x30(%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x1c9ad1
jmp 0x1c9ad3
jmp 0x1c9ad5
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1c97fd
movq -0x118(%rbp), %rdi
callq 0x2210
movq -0x138(%rbp), %rdi
callq 0x2210
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rsi
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x1ba520
movq -0x28(%rbp), %rax
movq $0x0, 0x78(%rax)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x1c9ee1
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x50(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x1c9b69
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x78(%rax)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x50(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shll %eax
shrl %eax
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x50(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movl -0x44(%rbp), %edx
movq -0x108(%rbp), %rcx
leaq -0x100(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
leaq -0x78(%rbp), %rax
xorl %r10d, %r10d
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
cmpq $0x0, %rax
je 0x1c9ed1
jmp 0x1c9c12
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jne 0x1c9c84
movq -0x28(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x1c9c43
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rax
shlq %rax
movq %rax, -0x168(%rbp)
jmp 0x1c9c51
movl $0x2, %eax
movq %rax, -0x168(%rbp)
jmp 0x1c9c51
movq -0x168(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x78(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x28(%rbp), %rsi
movq 0x48(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x48(%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x1c9ca9
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x1c9d1b
movq -0x28(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x1c9cda
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
shlq %rax
movq %rax, -0x170(%rbp)
jmp 0x1c9ce8
movl $0x2, %eax
movq %rax, -0x170(%rbp)
jmp 0x1c9ce8
movq -0x170(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x44(%rbp), %edx
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rsi
movq 0x18(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x18(%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x1c9d3e
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x1c9db0
movq -0x28(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x1c9d6f
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
shlq %rax
movq %rax, -0x178(%rbp)
jmp 0x1c9d7d
movl $0x2, %eax
movq %rax, -0x178(%rbp)
jmp 0x1c9d7d
movq -0x178(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0xe8(%rbp), %rax
movl (%rax), %edx
xorl $0x1, %edx
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rsi
movq 0x18(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x18(%rsi)
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpq -0xc8(%rbp), %rax
jae 0x1c9ecf
movq -0xb8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x44(%rbp), %eax
je 0x1c9e1b
movq -0xb8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xe8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x1c9e20
jmp 0x1c9ec1
jmp 0x1c9e22
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x1c9e94
movq -0x28(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x1c9e53
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
shlq %rax
movq %rax, -0x180(%rbp)
jmp 0x1c9e61
movl $0x2, %eax
movq %rax, -0x180(%rbp)
jmp 0x1c9e61
movq -0x180(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0xb8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rsi
movq 0x18(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x18(%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x1c9ec1
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1c9de1
jmp 0x1c9ed1
jmp 0x1c9ed3
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1c9b32
jmp 0x1c9ee3
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jne 0x1c9f55
movq -0x28(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x1c9f14
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
shlq %rax
movq %rax, -0x188(%rbp)
jmp 0x1c9f22
movl $0x2, %eax
movq %rax, -0x188(%rbp)
jmp 0x1c9f22
movq -0x188(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rsi
movq 0x30(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x30(%rsi)
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rcx
subq $0x1, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x2100
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1ca056
movq -0x20(%rbp), %rdi
movl -0x4c(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x90(%rbp), %rcx
movq -0x98(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x40(%rbp), %rbx
movq -0x30(%rbp), %r11
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
addq $0x1, %rax
movl %eax, %r10d
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movl $0x14, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movl $0xffffffff, 0x28(%rsp) # imm = 0xFFFFFFFF
callq 0x1c6f90
movl %eax, %edx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1c9fba
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x1ca2cb
movq -0x28(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %esi
leaq -0x58(%rbp), %rdx
leaq -0x5c(%rbp), %rcx
leaq -0x68(%rbp), %r8
leaq -0x60(%rbp), %r9
leaq -0x78(%rbp), %rax
movq %rax, (%rsp)
callq 0x1c4b20
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x60(%rbp), %eax
jae 0x1ca0f9
movl -0x4c(%rbp), %edx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rcx
movl -0x44(%rbp), %esi
movl (%rcx,%rsi,4), %ecx
shrl %ecx
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x68(%rbp), %rcx
movl -0x44(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addl -0x6c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1ca0a5
cmpl $0x3, -0x6c(%rbp)
jbe 0x1ca16f
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x58(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0x28(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x1ca136
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x58(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0x28(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x1ca16d
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
jmp 0x1ca16f
movl -0x58(%rbp), %eax
shrl %eax
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x1ca1ba
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1ca215
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rcx
movl -0x44(%rbp), %eax
movl %eax, %edx
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
andq (%rcx,%rdx,8), %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jne 0x1ca213
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1ca215
movl -0x5c(%rbp), %eax
shrl %eax
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x1ca260
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1ca2bb
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rcx
movl -0x44(%rbp), %eax
movl %eax, %edx
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
andq (%rcx,%rdx,8), %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jne 0x1ca2b9
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x44(%rbp), %ecx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1ca2bb
jmp 0x1ca2bd
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1ca05d
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1ca32c
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x28(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x1ca31f
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x1ca321
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1ca2d2
movq -0x28(%rbp), %rax
movq $0x0, 0xb8(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1c6ee0
movq $0x0, -0x150(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0xc0(%rcx), %rcx
cmpq (%rcx), %rax
jae 0x1ca44f
movq -0x28(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x1ca3b2
jmp 0x1ca441
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x150(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x1ca43f
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x150(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x50(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, %ecx
movq -0x108(%rbp), %r8
movq -0x90(%rbp), %r14
movq -0x98(%rbp), %rbx
movq -0x30(%rbp), %r11
movq -0x38(%rbp), %r10
movq -0x40(%rbp), %rax
leaq -0x100(%rbp), %r9
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x1c8820
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1ca3b9
jmp 0x1ca441
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1ca369
movq -0x100(%rbp), %rdi
callq 0x2210
movq -0xe8(%rbp), %rdi
callq 0x2210
movq -0xd0(%rbp), %rdi
callq 0x2210
movq -0xb8(%rbp), %rdi
callq 0x2210
movq -0xa0(%rbp), %rdi
callq 0x2210
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1ca552
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x28(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x1ca4d1
jmp 0x1ca544
movq -0x20(%rbp), %rdi
movl -0x4c(%rbp), %esi
movq -0x18(%rbp), %rdx
movaps 0x1b7b2d(%rip), %xmm1   # 0x382010
movq -0x88(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1b7b29(%rip), %xmm1   # 0x382020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x1bc382(%rip), %xmm1   # 0x386890
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
movq -0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0x1c8c70
cmpl $0x0, %eax
je 0x1ca533
jmp 0x1ca544
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1ca492
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r14
popq %rbp
retq
nop