// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: resolve_bubble_chain_by_hic(ha_ug_index*, kv_u_trans_t*, bubble_type*)
void resolve_bubble_chain_by_hic(ha_ug_index *idx, kv_u_trans_t *ta, bubble_type* bub)
{   
    // double index_time = yak_realtime();
    ma_ug_t* ug = idx->ug;
    ma_ug_t *bs_ug = bub->b_ug;
    uint32_t v, u, i, max_i, nv, rv, n_vx, root, flag_pri = 1, flag_aux = 2, flag_ava = 4, occ;
    double w, cutoff = 2;
    uint32_t max_w_occ = 4;
    asg_arc_t *av = NULL;
    n_vx = bs_ug->g->n_seq << 1;
    uint8_t *vis = NULL; CALLOC(vis, ug->g->n_seq<<1);
    uint8_t *is_vis = NULL; CALLOC(is_vis, ug->g->n_seq<<1);
    uint8_t *is_used = NULL; CALLOC(is_used, n_vx);
    uint8_t *dedup = NULL; CALLOC(dedup, ug->g->n_seq<<1);
    uint8_t *is_tangle = NULL; CALLOC(is_tangle, ug->g->n_seq);
    buf_t b; memset(&b, 0, sizeof(buf_t));
    kvec_t_u32_warp stack, result, res_utg;
    kv_init(stack.a); kv_init(result.a); kv_init(res_utg.a);
    double *e_w = NULL; MALLOC(e_w, bs_ug->g->n_arc);
    uint32_t *e_occ = NULL, *a_occ = NULL; CALLOC(e_occ, bs_ug->g->n_arc);
    double *aw = NULL, max_w = 0;
    kvec_asg_arc_t_warp edges; kv_init(edges.a);
    ma_ug_t *back_bs_ug = copy_untig_graph(bs_ug);

    for (i = 0; i < bs_ug->g->n_arc; i++)///weight of bs_ug's edges
    {
        e_w[i] = -1;
    }

    for (i = 0; i < bs_ug->g->n_seq; i++)///init all chain with flag_aux 
    {
        set_b_utg_weight_flag(bub, &b, i<<1, vis, flag_aux, NULL);
    }


    for (v = 0; v < n_vx; v++)
    {
        av = asg_arc_a(bs_ug->g, v);
        nv = asg_arc_n(bs_ug->g, v);
        aw = (&e_w[bs_ug->g->idx[v]>>32]);
        a_occ = (&e_occ[bs_ug->g->idx[v]>>32]);
        if(nv <= 1 || get_real_length(bs_ug->g, v, NULL) <= 1) continue;
        set_b_utg_weight_flag_xor(bub, bs_ug, &b, v^1, vis, flag_pri, NULL);

        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            w = get_chain_weight_hic(bub, bs_ug, &b, av[i].v, v, ta, vis, is_vis, ug, &stack, &result, flag_pri, flag_ava, NULL, &occ);
            aw[i] = w;
            a_occ[i] = occ;
        }

        set_b_utg_weight_flag_xor(bub, bs_ug, &b, v^1, vis, flag_pri, NULL);
    }


    for (v = 0; v < n_vx; v++)
    {
        av = asg_arc_a(bs_ug->g, v);
        nv = asg_arc_n(bs_ug->g, v);
        aw = (&e_w[bs_ug->g->idx[v]>>32]);
        a_occ = (&e_occ[bs_ug->g->idx[v]>>32]);
        if(nv <= 1 || get_real_length(bs_ug->g, v, NULL) <= 1) continue;

        for (i = rv = 0, max_i = (uint32_t)-1; i < nv; i++)
        {
            if(av[i].del) continue;
            if(max_i == (uint32_t)-1)
            {
                max_i = i;
                max_w = aw[i];
            }
            else if(max_w < aw[i])
            {
                max_i = i;
                max_w = aw[i];
            }
            rv++;
        }

        if(max_i == (uint32_t)-1) continue;
        ///if(max_w <= max_w_cutoff) continue; //must be <=
        if(a_occ[max_i] <= max_w_occ) continue; //must be <=
        if(rv < 2) continue;

        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            if(i == max_i) continue;
            ///if((av[i].v>>1) == (v>>1) && aw[i] <= max_w_cutoff) continue; ///might be not reasonable
            if((av[i].v>>1) == (v>>1) && a_occ[i] <= max_w_occ) continue; ///might be not reasonable
            if(aw[i]*cutoff < max_w && double_check_bub_branch(&av[i], bs_ug, e_w, e_occ, cutoff, max_w_occ))
            {
                av[i].del = 1; asg_arc_del(bs_ug->g, (av[i].v)^1, (av[i].ul>>32)^1, 1);
            }
        }
    }

    uint32_t rId_0, ori_0, rId_1, ori_1, root_0, root_1;
    for (v = 0; v < n_vx; v++)
    {
        av = asg_arc_a(bs_ug->g, v);
        nv = asg_arc_n(bs_ug->g, v);
        rv = get_real_length(bs_ug->g, v, NULL);
        if(nv == rv) continue;///no edge drop
        if(rv != 1 || nv <= 1) continue;
        get_real_length(bs_ug->g, v, &u);
        u ^= 1;
        if(get_real_length(bs_ug->g, u, NULL) != 1) continue;
        drop_g_edges_by_utg(bub, bub->b_g, bs_ug, NULL, v, u);
        if(is_used[v] || is_used[u]) continue;

        is_used[v] = is_used[u] = 1;
        root = get_utg_end_from_btg(bub, bs_ug, v);
        rId_0 = root>>1;
        ori_0 = root&1;
        get_bubbles(bub, rId_0, ori_0 == 1?&root_0:NULL, ori_0 == 0?&root_0:NULL, NULL, NULL, NULL);

        root = get_utg_end_from_btg(bub, bs_ug, u);
        rId_1 = root>>1;
        ori_1 = root&1;
        get_bubbles(bub, rId_1, ori_1 == 1?&root_1:NULL, ori_1 == 0?&root_1:NULL, NULL, NULL, NULL);

        res_utg.a.n = 0;
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, v^1, vis, flag_pri, NULL);
        get_chain_weight_hic(bub, back_bs_ug, &b, u^1, v, ta, vis, is_vis, ug, &stack, &result, flag_pri, flag_ava, &res_utg, NULL);
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, v^1, vis, flag_pri, NULL);
        for (i = 0; i < res_utg.a.n; i++) dedup[res_utg.a.a[i]>>1] |= 1;

        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, u^1, vis, flag_pri, NULL);
        get_chain_weight_hic(bub, back_bs_ug, &b, v^1, u, ta, vis, is_vis, ug, &stack, &result, flag_pri, flag_ava, &res_utg, NULL);
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, u^1, vis, flag_pri, NULL);
        for (; i < res_utg.a.n; i++) dedup[res_utg.a.a[i]>>1] |= 2;

        for (i = 0; i < res_utg.a.n; i++)
        {
            if(dedup[res_utg.a.a[i]>>1] == 3)
            {
                is_tangle[res_utg.a.a[i]>>1] = 3;
            }
            else
            {
                if(is_tangle[res_utg.a.a[i]>>1] != 3)
                {
                    is_tangle[res_utg.a.a[i]>>1] = 1;
                }
            }
            dedup[res_utg.a.a[i]>>1] = 0;
        }
    }

    /*******************************for debug************************************/
    // for (i = 0; i < ug->g->n_seq; i++)
    // {
    //     if(is_tangle[i] == 1)
    //     {
    //         fprintf(stderr, "*****tangle-utg%.6ul\n", i+1);
    //     }
    // }
    /*******************************for debug************************************/
    memset(is_used, 0, n_vx);
    for (v = 0; v < n_vx; v++)
    {
        av = asg_arc_a(bs_ug->g, v);
        nv = asg_arc_n(bs_ug->g, v);
        rv = get_real_length(bs_ug->g, v, NULL);
        if(nv == rv) continue;///no edge drop
        if(rv != 1 || nv <= 1) continue;
        get_real_length(bs_ug->g, v, &u);
        u ^= 1;
        if(get_real_length(bs_ug->g, u, NULL) != 1) continue;
        drop_g_edges_by_utg(bub, bub->b_g, bs_ug, NULL, v, u);
        if(is_used[v] || is_used[u]) continue;

        is_used[v] = is_used[u] = 1;
        root = get_utg_end_from_btg(bub, bs_ug, v);
        rId_0 = root>>1;
        ori_0 = root&1;
        get_bubbles(bub, rId_0, ori_0 == 1?&root_0:NULL, ori_0 == 0?&root_0:NULL, NULL, NULL, NULL);

        root = get_utg_end_from_btg(bub, bs_ug, u);
        rId_1 = root>>1;
        ori_1 = root&1;
        get_bubbles(bub, rId_1, ori_1 == 1?&root_1:NULL, ori_1 == 0?&root_1:NULL, NULL, NULL, NULL);

        res_utg.a.n = 0;
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, v^1, vis, flag_pri, NULL);
        get_chain_weight_hic(bub, back_bs_ug, &b, u^1, v, ta, vis, is_vis, ug, &stack, &result, flag_pri, flag_ava, &res_utg, NULL);
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, v^1, vis, flag_pri, NULL);
        for (i = 0; i < res_utg.a.n; i++) dedup[res_utg.a.a[i]>>1] |= 1;

        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, u^1, vis, flag_pri, NULL);
        get_chain_weight_hic(bub, back_bs_ug, &b, v^1, u, ta, vis, is_vis, ug, &stack, &result, flag_pri, flag_ava, &res_utg, NULL);
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, u^1, vis, flag_pri, NULL);
        for (; i < res_utg.a.n; i++) dedup[res_utg.a.a[i]>>1] |= 2;


        /*******************************for debug************************************/
        // fprintf(stderr, "\nres_utg.a.n: %u, beg-utg%.6ul, sink-utg%.6ul\n", 
        //             (uint32_t)res_utg.a.n, (root_0>>1)+1, (root_1>>1)+1);
        // for (i = 0; i < res_utg.a.n; i++)
        // {
        //     if(dedup[res_utg.a.a[i]>>1] == 3)
        //     {
        //         fprintf(stderr, "share-utg%.6ul\n", (res_utg.a.a[i]>>1)+1);
        //     }
        // }
        // for (i = 0; i < res_utg.a.n; i++)
        // {
        //     if(dedup[res_utg.a.a[i]>>1] == 1)
        //     {
        //         fprintf(stderr, "1-utg%.6ul\n", (res_utg.a.a[i]>>1)+1);
        //     }
        // }
        // for (i = 0; i < res_utg.a.n; i++)
        // {
        //     if(dedup[res_utg.a.a[i]>>1] == 2)
        //     {
        //         fprintf(stderr, "2-utg%.6ul\n", (res_utg.a.a[i]>>1)+1);
        //     }
        // }
        /*******************************for debug************************************/

        clean_sub_tangle(bub, vis, &res_utg, dedup, is_tangle, NULL, flag_pri, v>>1, u>>1);

        for (i = 0; i < res_utg.a.n; i++)
        {
            dedup[res_utg.a.a[i]>>1] = 0;
        }
    }


    edges.a.n = 0;
    memset(is_used, 0, n_vx);
    for (v = 0; v < n_vx; v++)
    {
        av = asg_arc_a(bs_ug->g, v);
        nv = asg_arc_n(bs_ug->g, v);
        rv = get_real_length(bs_ug->g, v, NULL);
        if(nv == rv) continue;///no edge drop
        if(rv != 1 || nv <= 1) continue;
        get_real_length(bs_ug->g, v, &u);
        u ^= 1;
        if(get_real_length(bs_ug->g, u, NULL) != 1) continue;
        drop_g_edges_by_utg(bub, bub->b_g, bs_ug, NULL, v, u);
        if(is_used[v] || is_used[u]) continue;

        is_used[v] = is_used[u] = 1;
        root = get_utg_end_from_btg(bub, bs_ug, v);
        rId_0 = root>>1;
        ori_0 = root&1;
        get_bubbles(bub, rId_0, ori_0 == 1?&root_0:NULL, ori_0 == 0?&root_0:NULL, NULL, NULL, NULL);

        root = get_utg_end_from_btg(bub, bs_ug, u);
        rId_1 = root>>1;
        ori_1 = root&1;
        get_bubbles(bub, rId_1, ori_1 == 1?&root_1:NULL, ori_1 == 0?&root_1:NULL, NULL, NULL, NULL);

        res_utg.a.n = 0;
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, v^1, vis, flag_pri, NULL);
        get_chain_weight_hic(bub, back_bs_ug, &b, u^1, v, ta, vis, is_vis, ug, &stack, &result, flag_pri, flag_ava, &res_utg, NULL);
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, v^1, vis, flag_pri, NULL);
        for (i = 0; i < res_utg.a.n; i++) dedup[res_utg.a.a[i]>>1] |= 1;

        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, u^1, vis, flag_pri, NULL);
        get_chain_weight_hic(bub, back_bs_ug, &b, v^1, u, ta, vis, is_vis, ug, &stack, &result, flag_pri, flag_ava, &res_utg, NULL);
        set_b_utg_weight_flag_xor(bub, back_bs_ug, &b, u^1, vis, flag_pri, NULL);
        for (; i < res_utg.a.n; i++) dedup[res_utg.a.a[i]>>1] |= 2;

        clean_sub_tangle(bub, vis, &res_utg, dedup, is_tangle, &edges, flag_pri, v>>1, u>>1);

        for (i = 0; i < res_utg.a.n; i++)
        {
            dedup[res_utg.a.a[i]>>1] = 0;
        }
    }


    /*******************************for debug************************************/
    // for (i = 0; i < ug->g->n_seq; i++)
    // {
    //     if(is_tangle[i] == 1)
    //     {
    //         fprintf(stderr, "####tangle-utg%.6ul\n", i+1);
    //     }
    // }

    // for (i = 0; i < edges.a.n; i++)
    // {
    //     fprintf(stderr, "s-utg%.6lul<------>d-utg%.6ul\n", (edges.a.a[i].ul>>33) + 1, (edges.a.a[i].v>>1) + 1);
        
    // }
    /*******************************for debug************************************/
    if(edges.a.n > 0)
    {
        for (i = 0; i < edges.a.n; i++)
        {
            asg_arc_del(bub->ug->g, edges.a.a[i].ul>>32, edges.a.a[i].v, 1);
            asg_arc_del(bub->ug->g, (edges.a.a[i].v)^1, (edges.a.a[i].ul>>32)^1, 1);
            delete_sg_e_by_ug(idx->read_g, idx->ug, edges.a.a[i].ul>>32, edges.a.a[i].v);
            delete_sg_e_by_ug(idx->read_g, idx->ug, (edges.a.a[i].v)^1, (edges.a.a[i].ul>>32)^1);
        }
        asg_cleanup(bub->ug->g);
        asg_cleanup(idx->read_g);
    }
    

    free(vis); free(is_vis); free(is_used); free(dedup); free(b.b.a); free(e_w); free(e_occ); free(is_tangle);
    kv_destroy(stack.a); kv_destroy(result.a); kv_destroy(res_utg.a); kv_destroy(edges.a);
    ma_ug_destroy(back_bs_ug);
    // fprintf(stderr, "[M::%s::%.3f]\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, 0x58(%rsp)
movq %rdi, 0x180(%rsp)
movq (%rdi), %rax
movq %rdx, 0x8(%rsp)
movq 0xc0(%rdx), %rbp
movq 0x18(%rbp), %rbx
movl 0x14(%rbx), %r14d
addl %r14d, %r14d
movq %rax, 0x50(%rsp)
movq 0x18(%rax), %rax
movl 0x14(%rax), %r12d
leal (%r12,%r12), %eax
movslq %eax, %r13
movl $0x1, %esi
movq %r13, %rdi
callq 0x2120
movq %rax, 0x30(%rsp)
movl $0x1, %esi
movq %r13, %rdi
callq 0x2120
movq %rax, 0x48(%rsp)
movl $0x1, %esi
movq %r14, 0x28(%rsp)
movq %r14, %rdi
callq 0x2120
movq %rax, 0x38(%rsp)
movl $0x1, %esi
movq %r13, %rdi
callq 0x2120
movq %rax, 0x20(%rsp)
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
andq %r14, %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x2120
movq %rax, %r13
xorl %r15d, %r15d
movq %r15, 0x170(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x160(%rsp)
movdqa %xmm0, 0x150(%rsp)
movdqa %xmm0, 0x140(%rsp)
movdqa %xmm0, 0x130(%rsp)
movdqa %xmm0, 0x120(%rsp)
movdqa %xmm0, 0x110(%rsp)
movdqa %xmm0, 0xf0(%rsp)
movq %r15, 0x100(%rsp)
movdqa %xmm0, 0xd0(%rsp)
movq %r15, 0xe0(%rsp)
movdqa %xmm0, 0x60(%rsp)
movq %r15, 0x70(%rsp)
movl 0x4(%rbx), %r12d
andq %r14, %r12
leaq (,%r12,8), %rdi
callq 0x2280
movq %rax, %rbx
movl $0x4, %esi
movq %r12, %rdi
callq 0x2120
movq %rax, 0x90(%rsp)
movq %r15, 0xb0(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0xa0(%rsp)
movq %rbp, %rdi
callq 0xc8eab
movq %rbp, %r11
movq %rax, 0x18(%rsp)
movq 0x18(%rbp), %rax
movl 0x4(%rax), %edx
andq %r14, %rdx
je 0x15a014
leal 0x1(%rdx), %ecx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
andl $-0x2, %ecx
shlq $0x3, %rcx
movdqa 0xd7337(%rip), %xmm1    # 0x2312d0
xorl %edx, %edx
movdqa 0xd733d(%rip), %xmm2    # 0x2312e0
pxor %xmm2, %xmm0
movabsq $-0x4010000000000000, %rsi # imm = 0xBFF0000000000000
pcmpeqd %xmm3, %xmm3
movdqa 0xd7543(%rip), %xmm4    # 0x231500
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edi
notl %edi
testb $0x1, %dil
je 0x159ff3
movq %rsi, (%rbx,%rdx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edi
testb $0x1, %dil
je 0x15a007
movq %rsi, 0x8(%rbx,%rdx)
paddq %xmm4, %xmm1
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x159fbd
movq %rbx, 0x88(%rsp)
movq %r13, 0x80(%rsp)
testl $0x7fffffff, 0x14(%rax) # imm = 0x7FFFFFFF
movq 0x8(%rsp), %r14
movq 0x30(%rsp), %r15
movq %r11, (%rsp)
je 0x15a07e
xorl %r12d, %r12d
leaq 0x110(%rsp), %r13
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
movq %r15, %rcx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x14d241
movq (%rsp), %r11
incl %ebp
movq 0x18(%r11), %rax
movl 0x14(%rax), %eax
andl %ebx, %eax
addl $0x2, %r12d
cmpl %eax, %ebp
jb 0x15a04d
cmpq $0x0, 0x28(%rsp)
movq 0x38(%rsp), %r14
je 0x15abd2
xorl %r12d, %r12d
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq 0x88(%rsp), %rdi
movq 0x18(%r11), %rcx
movq 0x28(%rcx), %rax
movq (%rax,%r12,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
je 0x15a215
movq %rax, %rbx
andq %r8, %rbx
je 0x15a215
movq 0x8(%rcx), %rcx
shrq $0x20, %rax
leaq (%rdi,%rax,8), %r14
movq 0x90(%rsp), %rdx
leaq (%rdx,%rax,4), %rbp
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %r15
addq $0xc, %r15
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movl (%r15,%rcx), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %edx
addq $0x18, %rcx
cmpq %rcx, %rax
jne 0x15a0f7
cmpl $0x2, %edx
jl 0x15a215
movl %r12d, %ecx
xorl $0x1, %ecx
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %r11, %rsi
leaq 0x118(%rsp), %rdx
movl %ecx, 0x18(%rsp)
movq 0x38(%rsp), %r8
movl $0x1, %r9d
pushq $0x0
callq 0x1500a5
addq $0x10, %rsp
xorl %r13d, %r13d
cmpl $0x0, (%r15)
js 0x15a1c1
movl -0x4(%r15), %ecx
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq 0x118(%rsp), %rdx
movl %r12d, %r8d
movq 0x60(%rsp), %r9
leaq 0xa4(%rsp), %rax
pushq %rax
pushq $0x0
pushq $0x4
pushq $0x1
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq 0x78(%rsp)
callq 0x158a5c
addq $0x50, %rsp
movq %xmm0, (%r14,%r13,8)
movl 0x9c(%rsp), %eax
movl %eax, (%rbp,%r13,4)
incq %r13
addq $0x18, %r15
cmpq %r13, %rbx
jne 0x15a14b
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
leaq 0x118(%rsp), %rdx
movl 0x18(%rsp), %ecx
movq 0x38(%rsp), %r8
movl $0x1, %r9d
pushq $0x0
callq 0x1500a5
movq %rbx, %r11
addq $0x10, %rsp
movq 0x88(%rsp), %rdi
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
incq %r12
cmpq 0x28(%rsp), %r12
jne 0x15a0a0
cmpl $0x0, 0x28(%rsp)
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r14
je 0x15abd2
pxor %xmm1, %xmm1
xorl %r13d, %r13d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x88(%rsp), %rdx
movq 0x18(%r11), %rcx
movq 0x28(%rcx), %rax
movq (%rax,%r13,8), %r10
testl $0xfffffffe, %r10d      # imm = 0xFFFFFFFE
je 0x15a337
movq %r10, %rax
andq %rbx, %rax
je 0x15a337
movq 0x8(%rcx), %rcx
movq %r10, %rsi
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rdi
leaq (%rcx,%rdi,8), %r8
movq %r8, 0xc8(%rsp)
leaq (%rdx,%rsi,8), %r15
movq 0x90(%rsp), %r8
leaq (%r8,%rsi,4), %rsi
movq %rsi, 0x40(%rsp)
leaq (%rcx,%rdi,8), %rcx
addq $0xc, %rcx
leaq (,%rax,8), %rsi
leaq (%rsi,%rsi,2), %rsi
xorl %edi, %edi
xorl %r8d, %r8d
movl (%rcx,%rdi), %r9d
notl %r9d
shrl $0x1f, %r9d
addl %r9d, %r8d
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0x15a2ba
cmpl $0x2, %r8d
jl 0x15a332
movl %r10d, %r10d
xorl %esi, %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
cmpl $0x0, (%rcx)
js 0x15a303
movsd (%r15,%rsi,8), %xmm0
cmpl $-0x1, %edi
je 0x15a2fa
ucomisd %xmm1, %xmm0
jbe 0x15a300
movl %esi, %edi
movapd %xmm0, %xmm1
incl %r8d
incq %rsi
addq $0x18, %rcx
cmpq %rsi, %rax
jne 0x15a2e4
cmpl $-0x1, %edi
je 0x15a332
movl %edi, %ecx
movq 0x40(%rsp), %rax
movq %rcx, 0x10(%rsp)
cmpl $0x5, (%rax,%rcx,4)
setb %al
cmpl $0x2, %r8d
setb %cl
orb %al, %cl
je 0x15a34a
movq 0x30(%rsp), %r15
incq %r13
cmpq 0x28(%rsp), %r13
jne 0x15a24c
jmp 0x15a48f
xorl %r14d, %r14d
movq 0xc8(%rsp), %r9
movsd %xmm1, 0x190(%rsp)
movq %r15, 0x188(%rsp)
leaq (%r14,%r14,2), %rax
movl 0xc(%r9,%rax,8), %ebx
testl %ebx, %ebx
js 0x15a46f
cmpq 0x10(%rsp), %r14
je 0x15a46f
leaq (%r9,%rax,8), %r12
movl 0x8(%r12), %ebp
movl %ebp, %eax
xorl %r13d, %eax
cmpl $0x1, %eax
ja 0x15a3a5
movq 0x40(%rsp), %rax
cmpl $0x5, (%rax,%r14,4)
jb 0x15a46f
movsd (%r15,%r14,8), %xmm0
addsd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x15a46f
movq %r12, %rdi
movq %r11, %rsi
movq 0x90(%rsp), %rcx
movsd 0xe0e91(%rip), %xmm0    # 0x23b260
movl $0x4, %r8d
movq %r10, %r15
callq 0x150e71
movq %r15, %r10
movq 0x188(%rsp), %r15
movq 0xc8(%rsp), %r9
movsd 0x190(%rsp), %xmm1
movq (%rsp), %r11
movq 0x88(%rsp), %rdx
testl %eax, %eax
je 0x15a46f
orl $0x80000000, %ebx       # imm = 0x80000000
movl %ebx, 0xc(%r12)
movq 0x18(%r11), %rcx
xorq $0x1, %rbp
movq 0x28(%rcx), %rax
movq (%rax,%rbp,8), %r8
movq %r8, %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
andq %rax, %rsi
je 0x15a46f
movl 0x4(%r12), %eax
movq 0x8(%rcx), %rdi
shrq $0x20, %r8
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rcx
leaq (%r8,%r8,2), %rsi
leaq (%rdi,%rsi,8), %r8
addq $0xc, %r8
xorl %esi, %esi
movl -0x4(%r8,%rsi), %edi
xorl %eax, %edi
cmpl $0x1, %edi
jne 0x15a466
orb $-0x80, 0x3(%r8,%rsi)
addq $0x18, %rsi
cmpq %rsi, %rcx
jne 0x15a454
incq %r14
cmpq %r10, %r14
jne 0x15a366
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r14
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x15a337
cmpl $0x0, 0x28(%rsp)
je 0x15abd2
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movq 0x18(%r11), %rax
movq 0x28(%rax), %rcx
movq (%rcx,%r12,8), %rdx
movq %rdx, %rsi
movl $0x0, %edi
andq %rbx, %rsi
je 0x15a4fa
movq 0x8(%rax), %rdi
movq %rdx, %r8
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
leaq (%rdi,%r8,8), %r8
addq $0xc, %r8
leaq (,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %r9
xorl %r10d, %r10d
xorl %edi, %edi
movl (%r8,%r10), %r11d
notl %r11d
shrl $0x1f, %r11d
addl %r11d, %edi
addq $0x18, %r10
cmpq %r10, %r9
jne 0x15a4e3
cmpl %edx, %edi
jne 0x15a511
movq (%rsp), %r11
incq %r12
cmpq 0x28(%rsp), %r12
jne 0x15a4a2
jmp 0x15a81e
cmpl $0x2, %edx
jb 0x15a4fe
cmpl $0x1, %edi
jne 0x15a4fe
testq %rsi, %rsi
movq (%rsp), %r11
je 0x15a555
movq 0x8(%rax), %rdi
shrq $0x20, %rdx
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rdx,%rdx,2), %rdx
leaq (%rdi,%rdx,8), %rdx
addq $0xc, %rdx
xorl %edi, %edi
cmpl $0x0, (%rdx,%rdi)
js 0x15a54c
movl -0x4(%rdx,%rdi), %ebp
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0x15a542
movl %ebp, %r13d
xorq $0x1, %r13
movq (%rcx,%r13,8), %rdx
movq %rdx, %rcx
andq %rbx, %rcx
je 0x15a5d2
movq 0x8(%rax), %rax
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rdx), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %esi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x15a588
cmpl $0x1, %esi
jne 0x15a5d2
movq 0x8(%rsp), %rax
movq 0xb8(%rax), %rsi
movq %r11, %rdx
xorl %ecx, %ecx
movl %r12d, %r8d
movl %r13d, %r9d
callq 0x14e373
cmpb $0x0, (%r14,%r12)
jne 0x15a5ca
cmpb $0x0, (%r14,%r13)
je 0x15a5da
movl %r13d, %ebp
jmp 0x15a4fe
movl %r13d, %ebp
jmp 0x15a502
movq %r13, 0x10(%rsp)
movb $0x1, %al
movb %al, (%r14,%r13)
movb %al, (%r14,%r12)
xorl %r14d, %r14d
movq %r14, 0x60(%rsp)
movl %r12d, %r13d
xorl $0x1, %r13d
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0x118(%rsp), %rdx
movl %r13d, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %r14
callq 0x1500a5
addq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movl %r12d, %r8d
movq 0x60(%rsp), %r9
pushq %r14
leaq 0x70(%rsp), %rax
pushq %rax
pushq $0x4
pushq $0x1
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq %r15
callq 0x158a5c
addq $0x48, %rsp
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0x118(%rsp), %rdx
movl %r13d, 0x48(%rsp)
movl %r13d, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %r14
callq 0x1500a5
addq $0x10, %rsp
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x15a6d2
movq 0x70(%rsp), %rcx
xorl %r14d, %r14d
movq 0x20(%rsp), %rsi
movl (%rcx,%r14,4), %edx
shrl %edx
orb $0x1, (%rsi,%rdx)
incq %r14
movl %r14d, %edx
cmpq %rdx, %rax
ja 0x15a6bd
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %r13
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movq %r15, %r8
movl $0x1, %r9d
xorl %eax, %eax
pushq %rax
callq 0x1500a5
addq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl 0x48(%rsp), %ecx
movq 0x18(%rsp), %r8
movq 0x60(%rsp), %r9
xorl %eax, %eax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
pushq $0x4
pushq $0x1
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq %r15
callq 0x158a5c
addq $0x48, %rsp
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %rax
callq 0x1500a5
addq $0x10, %rsp
movq 0x60(%rsp), %rax
movl %r14d, %ecx
cmpq %rcx, %rax
jbe 0x15a7be
movq 0x70(%rsp), %rdx
leal 0x1(%rcx), %esi
movq 0x80(%rsp), %r8
movq 0x38(%rsp), %r14
movq 0x20(%rsp), %rdi
movq (%rsp), %r11
movl (%rdx,%rcx,4), %ecx
shrl %ecx
orb $0x2, (%rdi,%rcx)
movl %esi, %ecx
incl %esi
cmpq %rcx, %rax
ja 0x15a7aa
jmp 0x15a7d9
testq %rax, %rax
movq 0x80(%rsp), %r8
movq 0x38(%rsp), %r14
movq 0x20(%rsp), %rdi
movq (%rsp), %r11
je 0x15a814
movq 0x70(%rsp), %rcx
xorl %edx, %edx
movq %rdi, %r9
movl (%rcx,%rdx,4), %esi
shrl %esi
movb $0x3, %dil
cmpb $0x3, (%r9,%rsi)
je 0x15a7fc
movb $0x1, %dil
cmpb $0x3, (%r8,%rsi)
je 0x15a800
movb %dil, (%r8,%rsi)
movq 0x20(%rsp), %r9
movb $0x0, (%r9,%rsi)
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0x15a7e3
movq 0x10(%rsp), %rbp
jmp 0x15a502
movq %r14, %rdi
xorl %esi, %esi
movq 0x28(%rsp), %rbx
movq %rbx, %rdx
callq 0x20e0
movq (%rsp), %rdx
testl %ebx, %ebx
je 0x15abd2
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movq 0x18(%rdx), %rax
movq 0x28(%rax), %rcx
movq (%rcx,%r12,8), %rbx
movq %rbx, %rsi
movl $0x0, %edi
andq %r13, %rsi
je 0x15a89d
movq 0x8(%rax), %rdi
movq %rbx, %r8
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
leaq (%rdi,%r8,8), %r8
addq $0xc, %r8
leaq (,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %r9
xorl %r10d, %r10d
xorl %edi, %edi
movl (%r8,%r10), %r11d
notl %r11d
shrl $0x1f, %r11d
addl %r11d, %edi
addq $0x18, %r10
cmpq %r10, %r9
jne 0x15a886
cmpl %ebx, %edi
jne 0x15a8b4
movq (%rsp), %rdx
incq %r12
cmpq 0x28(%rsp), %r12
jne 0x15a845
jmp 0x15ac83
cmpl $0x2, %ebx
jb 0x15a8a1
cmpl $0x1, %edi
jne 0x15a8a1
testq %rsi, %rsi
movq (%rsp), %rdx
je 0x15a8fa
movq 0x8(%rax), %rdi
shrq $0x20, %rbx
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rbx,%rbx,2), %r8
leaq (%rdi,%r8,8), %r8
addq $0xc, %r8
xorl %edi, %edi
cmpl $0x0, (%r8,%rdi)
js 0x15a8f1
movl -0x4(%r8,%rdi), %ebp
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0x15a8e5
movl %ebp, %ebx
xorq $0x1, %rbx
movq (%rcx,%rbx,8), %rsi
movq %rsi, %rcx
andq %r13, %rcx
je 0x15a974
movq 0x8(%rax), %rax
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rax,%rsi,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %r8d, %r8d
xorl %esi, %esi
movl (%rax,%r8), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %esi
addq $0x18, %r8
cmpq %r8, %rcx
jne 0x15a92d
cmpl $0x1, %esi
jne 0x15a974
movq 0x8(%rsp), %rax
movq 0xb8(%rax), %rsi
xorl %ecx, %ecx
movl %r12d, %r8d
movl %ebx, %r9d
callq 0x14e373
cmpb $0x0, (%r14,%r12)
jne 0x15a96d
cmpb $0x0, (%r14,%rbx)
je 0x15a97b
movl %ebx, %ebp
jmp 0x15a8a1
movl %ebx, %ebp
jmp 0x15a8a5
movb $0x1, %al
movq %rbx, 0x10(%rsp)
movb %al, (%r14,%rbx)
movb %al, (%r14,%r12)
movq 0x8(%rsp), %r13
xorl %r14d, %r14d
movq %r14, 0x60(%rsp)
movl %r12d, %ebx
xorl $0x1, %ebx
subq $0x8, %rsp
movq %r13, %rdi
movq 0x20(%rsp), %rsi
leaq 0x118(%rsp), %rdx
movl %ebx, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %r14
callq 0x1500a5
addq $0x8, %rsp
movq %r13, %rdi
movq 0x20(%rsp), %r13
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movl %r12d, %r8d
movq 0x60(%rsp), %r9
pushq %r14
leaq 0x70(%rsp), %rax
pushq %rax
pushq $0x4
pushq $0x1
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq %r15
callq 0x158a5c
addq $0x48, %rsp
movq 0x10(%rsp), %rdi
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebx, 0x48(%rsp)
movl %ebx, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %r14
callq 0x1500a5
addq $0x10, %rsp
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x15aa71
movq 0x70(%rsp), %rcx
xorl %r14d, %r14d
movq 0x20(%rsp), %rsi
movl (%rcx,%r14,4), %edx
shrl %edx
orb $0x1, (%rsi,%rdx)
incq %r14
movl %r14d, %edx
cmpq %rdx, %rax
ja 0x15aa5c
subq $0x8, %rsp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq 0x20(%rsp), %r13
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movq %r15, %r8
movl $0x1, %r9d
xorl %eax, %eax
pushq %rax
callq 0x1500a5
addq $0x8, %rsp
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl 0x48(%rsp), %ecx
movq 0x18(%rsp), %r8
movq 0x60(%rsp), %r9
xorl %eax, %eax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
pushq $0x4
pushq $0x1
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq %r15
callq 0x158a5c
addq $0x48, %rsp
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movq %r15, %r8
movl $0x1, %r9d
xorl %eax, %eax
pushq %rax
callq 0x1500a5
addq $0x10, %rsp
movq 0x60(%rsp), %rax
movl %r14d, %ecx
cmpq %rcx, %rax
movq 0x20(%rsp), %rdi
jbe 0x15ab49
movq 0x70(%rsp), %rdx
leal 0x1(%rcx), %esi
movl (%rdx,%rcx,4), %ecx
shrl %ecx
orb $0x2, (%rdi,%rcx)
movl %esi, %ecx
incl %esi
cmpq %rcx, %rax
ja 0x15ab37
movl %r12d, %eax
shrl %eax
shrl %ebp
subq $0x8, %rsp
movq %rdi, %rcx
movq 0x10(%rsp), %rdi
movq %r15, %rsi
leaq 0x68(%rsp), %rdx
movq 0x88(%rsp), %r8
xorl %r9d, %r9d
pushq %rbp
pushq %rax
pushq $0x1
callq 0x1592cf
addq $0x20, %rsp
movq 0x60(%rsp), %rax
testq %rax, %rax
movq 0x38(%rsp), %r14
je 0x15abbb
movq 0x70(%rsp), %rcx
xorl %r8d, %r8d
movq 0x20(%rsp), %rdi
movq (%rsp), %rdx
movq 0x10(%rsp), %r13
movl (%rcx,%r8,4), %esi
shrl %esi
movb $0x0, (%rdi,%rsi)
incq %r8
movl %r8d, %esi
cmpq %rsi, %rax
ja 0x15aba1
movl %r13d, %ebp
jmp 0x15abc7
movq 0x10(%rsp), %r13
movl %r13d, %ebp
movq (%rsp), %rdx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x15a8a5
movq $0x0, 0xa0(%rsp)
movq %r15, %rdi
callq 0x2220
movq 0x48(%rsp), %rdi
callq 0x2220
movq %r14, %rdi
callq 0x2220
movq 0x20(%rsp), %rdi
callq 0x2220
movq 0x158(%rsp), %rdi
callq 0x2220
movq 0x88(%rsp), %rdi
callq 0x2220
movq 0x90(%rsp), %rdi
callq 0x2220
movq 0x80(%rsp), %rdi
callq 0x2220
movq 0x100(%rsp), %rdi
callq 0x2220
movq 0xe0(%rsp), %rdi
callq 0x2220
movq 0x70(%rsp), %rdi
callq 0x2220
movq 0xb0(%rsp), %rdi
callq 0x2220
movq 0x18(%rsp), %rdi
callq 0xa0761
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0xa0(%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq 0x28(%rsp), %rbx
movq %rbx, %rdx
callq 0x20e0
testl %ebx, %ebx
je 0x15abde
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movq (%rsp), %rdx
movq 0x18(%rdx), %rax
movq 0x28(%rax), %rcx
movq (%rcx,%r12,8), %rbx
movq %rbx, %rsi
movl $0x0, %edi
andq %r13, %rsi
je 0x15ad0e
movq 0x8(%rax), %rdi
movq %rbx, %r8
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
leaq (%rdi,%r8,8), %r8
addq $0xc, %r8
leaq (,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %r9
xorl %r10d, %r10d
xorl %edi, %edi
movl (%r8,%r10), %r11d
notl %r11d
shrl $0x1f, %r11d
addl %r11d, %edi
addq $0x18, %r10
cmpq %r10, %r9
jne 0x15acf7
cmpl %ebx, %edi
jne 0x15ad25
movq (%rsp), %rdx
incq %r12
cmpq 0x28(%rsp), %r12
jne 0x15acb6
jmp 0x15b048
cmpl $0x2, %ebx
jb 0x15ad12
cmpl $0x1, %edi
jne 0x15ad12
testq %rsi, %rsi
movq (%rsp), %rdx
je 0x15ad6b
movq 0x8(%rax), %rdi
shrq $0x20, %rbx
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rbx,%rbx,2), %r8
leaq (%rdi,%r8,8), %r8
addq $0xc, %r8
xorl %edi, %edi
cmpl $0x0, (%r8,%rdi)
js 0x15ad62
movl -0x4(%r8,%rdi), %ebp
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0x15ad56
movl %ebp, %ebx
xorq $0x1, %rbx
movq (%rcx,%rbx,8), %rsi
movq %rsi, %rcx
andq %r13, %rcx
je 0x15ade5
movq 0x8(%rax), %rax
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rax,%rsi,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %r8d, %r8d
xorl %esi, %esi
movl (%rax,%r8), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %esi
addq $0x18, %r8
cmpq %r8, %rcx
jne 0x15ad9e
cmpl $0x1, %esi
jne 0x15ade5
movq 0x8(%rsp), %rax
movq 0xb8(%rax), %rsi
xorl %ecx, %ecx
movl %r12d, %r8d
movl %ebx, %r9d
callq 0x14e373
cmpb $0x0, (%r14,%r12)
jne 0x15adde
cmpb $0x0, (%r14,%rbx)
je 0x15adec
movl %ebx, %ebp
jmp 0x15ad12
movl %ebx, %ebp
jmp 0x15ad16
movb $0x1, %al
movq %rbx, 0x10(%rsp)
movb %al, (%r14,%rbx)
movb %al, (%r14,%r12)
movq 0x8(%rsp), %r13
xorl %r14d, %r14d
movq %r14, 0x60(%rsp)
movl %r12d, %ebx
xorl $0x1, %ebx
subq $0x8, %rsp
movq %r13, %rdi
movq 0x20(%rsp), %rsi
leaq 0x118(%rsp), %rdx
movl %ebx, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %r14
callq 0x1500a5
addq $0x8, %rsp
movq %r13, %rdi
movq 0x20(%rsp), %r13
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movl %r12d, %r8d
movq 0x60(%rsp), %r9
pushq %r14
leaq 0x70(%rsp), %rax
pushq %rax
pushq $0x4
pushq $0x1
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq %r15
callq 0x158a5c
addq $0x48, %rsp
movq 0x10(%rsp), %rdi
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebx, 0x48(%rsp)
movl %ebx, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %r14
callq 0x1500a5
addq $0x10, %rsp
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x15aee2
movq 0x70(%rsp), %rcx
xorl %r14d, %r14d
movq 0x20(%rsp), %rsi
movl (%rcx,%r14,4), %edx
shrl %edx
orb $0x1, (%rsi,%rdx)
incq %r14
movl %r14d, %edx
cmpq %rdx, %rax
ja 0x15aecd
subq $0x8, %rsp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq 0x20(%rsp), %r13
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movq %r15, %r8
movl $0x1, %r9d
xorl %eax, %eax
pushq %rax
callq 0x1500a5
addq $0x8, %rsp
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl 0x48(%rsp), %ecx
movq 0x18(%rsp), %r8
movq 0x60(%rsp), %r9
xorl %eax, %eax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
pushq $0x4
pushq $0x1
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq %r15
callq 0x158a5c
addq $0x48, %rsp
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x118(%rsp), %rdx
movl %ebp, %ecx
movq %r15, %r8
movl $0x1, %r9d
xorl %eax, %eax
pushq %rax
callq 0x1500a5
addq $0x10, %rsp
movq 0x60(%rsp), %rax
movl %r14d, %ecx
cmpq %rcx, %rax
movq 0x20(%rsp), %rdi
jbe 0x15afba
movq 0x70(%rsp), %rdx
leal 0x1(%rcx), %esi
movl (%rdx,%rcx,4), %ecx
shrl %ecx
orb $0x2, (%rdi,%rcx)
movl %esi, %ecx
incl %esi
cmpq %rcx, %rax
ja 0x15afa8
movl %r12d, %eax
shrl %eax
shrl %ebp
subq $0x8, %rsp
movq %rdi, %rcx
movq 0x10(%rsp), %rdi
movq %r15, %rsi
leaq 0x68(%rsp), %rdx
movq 0x88(%rsp), %r8
leaq 0xa8(%rsp), %r9
pushq %rbp
pushq %rax
pushq $0x1
callq 0x1592cf
addq $0x20, %rsp
movq 0x60(%rsp), %rax
testq %rax, %rax
movq 0x38(%rsp), %r14
je 0x15b031
movq 0x70(%rsp), %rcx
xorl %r8d, %r8d
movq 0x20(%rsp), %rdi
movq (%rsp), %rdx
movq 0x10(%rsp), %r13
movl (%rcx,%r8,4), %esi
shrl %esi
movb $0x0, (%rdi,%rsi)
incq %r8
movl %r8d, %esi
cmpq %rsi, %rax
ja 0x15b017
movl %r13d, %ebp
jmp 0x15b03d
movq 0x10(%rsp), %r13
movl %r13d, %ebp
movq (%rsp), %rdx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x15ad16
cmpq $0x0, 0xa0(%rsp)
je 0x15abde
xorl %ebx, %ebx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq 0x180(%rsp), %r12
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rsi
movq 0xb0(%rsp), %rax
leaq (%rbx,%rbx,2), %r15
movq (%rax,%r15,8), %rdx
shrq $0x20, %rdx
movl 0x8(%rax,%r15,8), %ecx
movq 0x8(%rsi), %rax
movq 0x28(%rsi), %rsi
movq (%rsi,%rdx,8), %rdi
movq %rdi, %r8
andq %r14, %r8
je 0x15b0f6
shrq $0x20, %rdi
shlq $0x3, %r8
leaq (%r8,%r8,2), %rdx
leaq (%rdi,%rdi,2), %rsi
leaq (%rax,%rsi,8), %rax
addq $0xc, %rax
xorl %esi, %esi
cmpl %ecx, -0x4(%rax,%rsi)
jne 0x15b0c6
orb $-0x80, 0x3(%rax,%rsi)
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x15b0bb
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rsi
movq 0xb0(%rsp), %rax
movl 0x4(%rax,%r15,8), %edx
movl 0x8(%rax,%r15,8), %ecx
movq 0x8(%rsi), %rax
movq 0x28(%rsi), %rsi
movl %ecx, %edi
xorl $0x1, %edi
movq (%rsi,%rdi,8), %rsi
movq %rsi, %rdi
andq %r14, %rdi
je 0x15b14c
shrq $0x20, %rsi
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rcx
leaq (%rsi,%rsi,2), %rsi
leaq (%rax,%rsi,8), %rax
addq $0xc, %rax
xorl %esi, %esi
movl -0x4(%rax,%rsi), %edi
xorl %edx, %edi
cmpl $0x1, %edi
jne 0x15b131
orb $-0x80, 0x3(%rax,%rsi)
addq $0x18, %rsi
cmpq %rsi, %rcx
jne 0x15b121
movq 0xb0(%rsp), %rax
movl 0x4(%rax,%r15,8), %edx
movl 0x8(%rax,%r15,8), %ecx
movq (%r12), %rsi
movq 0x8(%r12), %rdi
callq 0x159d06
movq (%r12), %rsi
movq 0x8(%r12), %rdi
movq 0xb0(%rsp), %rax
movl 0x4(%rax,%r15,8), %ecx
movl 0x8(%rax,%r15,8), %edx
xorl $0x1, %edx
xorl $0x1, %ecx
callq 0x159d06
incl %ebx
cmpq %rbx, 0xa0(%rsp)
ja 0x15b067
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rdi
callq 0xa0a7d
movq 0x8(%r12), %rdi
callq 0xa0a7d
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r14
jmp 0x15abde