// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: rescue_missing_overlaps_backward(ma_ug_t*, asg_t*, ma_hit_t_alloc*, ma_sub_t*, R_to_U*, int, int, unsigned int, unsigned int, unsigned int, bub_label_t*)
void rescue_missing_overlaps_backward(ma_ug_t *i_ug, asg_t *r_g, ma_hit_t_alloc* sources, ma_sub_t *coverage_cut,
R_to_U* ruIndex, int max_hang, int min_ovlp, uint32_t backward_steps, uint32_t is_bubble_check, uint32_t is_primary_check, bub_label_t* b_mask_t)
{
    uint32_t v, vId, dir, k, cur_backward_steps, round, is_Unitig, uId, rId, endRid, oLen, w, max_oLen, max_oLen_i, mode, nv;
    uint64_t tmp;
    long long init, step = 0;
    asg_t* nsg = NULL;
    ma_utg_t* nsu = NULL;
    ma_ug_t *ug = NULL;
    asg_arc_t *av = NULL;
    asg_arc_t t, r_edge;
    kvec_t(asg_arc_t) new_edges;
    kv_init(new_edges);

    kvec_asg_arc_t_warp recover_edges;
    kv_init(recover_edges.a);

    kvec_t(asg_arc_t) rbub_edges;
    kv_init(rbub_edges);

    kvec_t_u64_warp u_vecs;
    kv_init(u_vecs.a);

    if(i_ug != NULL)
    {
        ug = i_ug;
    }
    else
    {
        ug = ma_ug_gen(r_g);
        for (v = 0; v < ug->g->n_seq; v++)
        {
            ug->g->seq[v].c = PRIMARY_LABLE;
        }
    }
    nsg = ug->g;
    
    for (v = 0; v < nsg->n_seq; v++)
    {
        uId = v;
        nsu = &(ug->u.a[uId]);
        if(nsu->m == 0) continue;
        if(nsg->seq[v].del) continue;
        if(is_primary_check && nsg->seq[v].c==ALTER_LABLE) continue;

        for (k = 0; k < nsu->n; k++)
        {
            rId = nsu->a[k]>>33;
            set_R_to_U(ruIndex, rId, uId, 1, &(r_g->seq[rId].c));
        }
    }



    for (vId = 0; vId < nsg->n_seq; vId++)
    {
        rbub_edges.n = round = 0;
        for (dir = 0; dir < 2; dir++)
        {
            if(rbub_edges.n > 0)
            {
                cur_backward_steps = nsu->n - round - 1;
                if(cur_backward_steps > backward_steps)
                {
                    cur_backward_steps = backward_steps;
                }
            }
            else
            {
                cur_backward_steps = backward_steps;
            }
            
            

            v = vId; v = v<<1; v = v | dir;
            uId = v>>1;
            if(nsg->seq[uId].del) continue;
            if(is_primary_check && nsg->seq[uId].c == ALTER_LABLE) continue;

            nsu = &(ug->u.a[uId]);
            if(nsu->m == 0) continue;
            if(nsu->circ || nsu->start == UINT32_MAX || nsu->end == UINT32_MAX) continue;
            if(get_real_length(nsg, v, NULL) != 0) continue;
            ////if(get_real_length(nsg, v^1, NULL) == 0) continue;
            ///that means this unitig has been changed
            if(nsu->start!=((uint64_t)(nsu->a[0])>>32)) continue;
            if((nsu->end^1)!=((uint64_t)(nsu->a[nsu->n-1])>>32)) continue;
            
            if(v&1)
            {
                init = 0;
                step = 1;
                mode = 1;
                //endRid = nsu->start^1;
            }
            else
            {
                init = nsu->n - 1;
                step = -1;
                mode = 0;
                ///endRid = nsu->end^1;
            }


            rbub_edges.n = 0;
            for (round = 0; round < cur_backward_steps && init >= 0 && init < (long long)nsu->n; 
                                                                    init = init + step, round++)
            {
                endRid = ((uint64_t)(nsu->a[init]))>>32;
                endRid = endRid^mode;

                k = 0;
                rbub_edges.n = 0;
                while(get_edge2existing_node_advance(ug, r_g, sources, coverage_cut, ruIndex, 
                    max_hang, min_ovlp, endRid, &uId, 1, &k, &r_edge, 1))
                {
                    kv_push(asg_arc_t, rbub_edges, r_edge);
                }
                if(rbub_edges.n > 0) break;
            }

            if(rbub_edges.n > 0)
            {
                if(mode == 1) nsu->start = endRid^1;
                if(mode == 0) nsu->end = endRid^1;
                //save for revert
                tmp = mode; tmp = tmp <<31; tmp = tmp | (uint64_t)(init); tmp = tmp << 32; tmp = tmp | uId;
                kv_push(uint64_t, u_vecs.a, tmp);



                ///need to do transitive reduction
                ///note here is different to standard transitive reduction
                minor_transitive_reduction(ug, ruIndex, rbub_edges.a, rbub_edges.n);
                if(is_primary_check)
                {
                    max_oLen = 0; max_oLen_i = (uint32_t)-1;
                    for (k = 0; k < rbub_edges.n; k++)
                    {
                        t = rbub_edges.a[k];
                        if(t.del) continue;
                        if(t.ol > max_oLen)
                        {
                            max_oLen = t.ol;
                            max_oLen_i = k;
                        }
                    }

                    if(max_oLen_i == (uint32_t)-1) continue;
                    t = rbub_edges.a[max_oLen_i];
                    w = get_corresponding_uId(ug, ruIndex, t.v);
                    if(w == ((uint32_t)(-1))) continue;
                    if(get_real_length(nsg, w^1, NULL)!=0) continue;

                    kv_push(asg_arc_t, new_edges, t);
                    oLen = t.ol;
                    asg_append_edges_to_srt(nsg, v, ug->u.a[v>>1].len, w, oLen, t.strong, t.el, t.no_l_indel);


                    get_edge_from_source(sources, coverage_cut, ruIndex, max_hang, min_ovlp, 
                    (t.v^1), ((t.ul>>32)^1), &t);
                    kv_push(asg_arc_t, new_edges, t);
                    oLen = t.ol;
                    asg_append_edges_to_srt(nsg, w^1, ug->u.a[w>>1].len, v^1, oLen, t.strong, t.el, t.no_l_indel);
                }
                else
                {
                    ///modify read graph
                    for (init = init - step; init >= 0 && init < (long long)nsu->n; init = init - step)
                    {
                        w = ((uint64_t)(nsu->a[init]))>>32;
                        nv = asg_arc_n(r_g, w);
                        av = asg_arc_a(r_g, w);
                        for (k = 0; k < nv; k++)
                        {
                            if(av[k].del) continue;
                            kv_push(asg_arc_t, recover_edges.a, av[k]);
                            if(asg_get_arc(r_g, av[k].v^1, av[k].ul>>32^1, &t)==0)
                            {
                                fprintf(stderr, "error\n");
                            } 
                            kv_push(asg_arc_t, recover_edges.a, t);
                        }
                        

                        nv = asg_arc_n(r_g, w^1);
                        av = asg_arc_a(r_g, w^1);
                        for (k = 0; k < nv; k++)
                        {
                            if(av[k].del) continue;
                            kv_push(asg_arc_t, recover_edges.a, av[k]);
                            if(asg_get_arc(r_g, av[k].v^1, av[k].ul>>32^1, &t)==0)
                            {
                                fprintf(stderr, "error\n");
                            } 
                            kv_push(asg_arc_t, recover_edges.a, t);
                        }

                        ///w = ((uint64_t)(nsu->a[init]))>>32;
                        asg_seq_del(r_g, w>>1);
                    }


                    
                    for (k = 0; k < rbub_edges.n; k++)
                    {
                        t = rbub_edges.a[k];
                        if(t.del) continue;
                        w = get_corresponding_uId(ug, ruIndex, t.v);
                        if(w == ((uint32_t)(-1))) continue;
                        // get_R_to_U(ruIndex, t.v>>1, &uId, &is_Unitig);
                        // w = (uint32_t)-1;
                        // if(t.v == ug->u.a[uId].start) w = uId<<1;
                        // if(t.v == ug->u.a[uId].end) w = (uId<<1)^1;
                        kv_push(asg_arc_t, new_edges, t);
                        oLen = t.ol;
                        asg_append_edges_to_srt(nsg, v, ug->u.a[v>>1].len, w, oLen, t.strong, t.el, t.no_l_indel);


                        get_edge_from_source(sources, coverage_cut, ruIndex, max_hang, min_ovlp, 
                        (t.v^1), ((t.ul>>32)^1), &t);
                        kv_push(asg_arc_t, new_edges, t);
                        oLen = t.ol;
                        asg_append_edges_to_srt(nsg, w^1, ug->u.a[w>>1].len, v^1, oLen, t.strong, t.el, t.no_l_indel);
                    }
                }

            }
        }
    }
    
    
    if(is_bubble_check)
    {
        asg_arc_t* p = NULL;
        for (k = 0; k < new_edges.n; k++)
        {
            p = asg_arc_pushp(r_g);
            *p = new_edges.a[k];
        }

        if(new_edges.n != 0)
        {
            free(r_g->idx);
            r_g->idx = 0;
            r_g->is_srt = 0;
            asg_cleanup(r_g);
        }
        
        pre_clean(sources, coverage_cut, r_g, 0);

        lable_all_bubbles(r_g, b_mask_t);


        for (k = 0; k < new_edges.n; k++)
        {
            v = new_edges.a[k].ul>>32;
            w = new_edges.a[k].v;

            if(r_g->seq[v>>1].del) continue;
            if(r_g->seq[w>>1].del) continue;
            ///if this edge is at a bubble
            if(r_g->seq_vis[v]!=0 && r_g->seq_vis[w^1]!=0) continue;

            asg_arc_del(r_g, v, w, 1);
            asg_arc_del(r_g, w^1, v^1, 1);
        }

        asg_cleanup(r_g);
        

        for (k = 0; k < recover_edges.a.n; k++)
        {
            recover_edges.a.a[k].del = 1;
        }

        for (k = 0; k < u_vecs.a.n; k++)
        {
            mode = (uint64_t)u_vecs.a.a[k]>>63;
            if(mode == 1) step = 1;
            if(mode == 0) step = -1;
            init = (uint64_t)((uint64_t)u_vecs.a.a[k]>>32)&((uint64_t)(0x7fffffff));
            uId = (uint32_t)u_vecs.a.a[k];
            nsu = &(ug->u.a[uId]);

            endRid = ((uint64_t)(nsu->a[init]))>>32;
            endRid = endRid^mode;
            /********************for debug**********************/
            // fprintf(stderr, "n: %u, k: %u, mode: %u, init: %lld, step: %lld, uId: %u, endRid: %u\n", 
            // (uint32_t)u_vecs.a.n, k, mode, init, step, uId, endRid);
            // fprintf(stderr, "nsu->start: %u, nsu->end: %u\n", 
            // nsu->start, nsu->end);
            // if(mode == 1 && nsu->start != (endRid^1)) fprintf(stderr, "ERROR\n");
            // if(mode == 0 && nsu->end != (endRid^1)) fprintf(stderr, "ERROR\n");
            // update_unitig(step, init, nsu, r_g, &recover_edges, 0);
            /********************for debug**********************/
            if(get_real_length(r_g, endRid, NULL) > 0)
            {
                update_unitig(step, init, nsu, r_g, &recover_edges, 1);
                // fprintf(stderr, "endRid: %u, %.*s, uId: %u\n", 
                // endRid>>1, (int)Get_NAME_LENGTH((R_INF), v>>1), Get_NAME((R_INF), v>>1), uId);
            }
            else
            {
                update_unitig(step, init, nsu, r_g, &recover_edges, 0);
            }
        }

        uint64_t recov_occ = 0;
        for (k = 0; k < recover_edges.a.n; k++)
        {
            if(recover_edges.a.a[k].del) continue;
            p = asg_arc_pushp(r_g);
            *p = recover_edges.a.a[k];
            recov_occ++;
        }

        if(recov_occ != 0)
        {
            free(r_g->idx);
            r_g->idx = 0;
            r_g->is_srt = 0;
        }

        asg_cleanup(r_g);
    }

    if(is_primary_check)
    {
        for (k = 0; k < u_vecs.a.n; k++)
        {
            mode = (uint64_t)u_vecs.a.a[k]>>63;
            if(mode == 1) step = 1;
            if(mode == 0) step = -1;
            init = (uint64_t)((uint64_t)u_vecs.a.a[k]>>32)&((uint64_t)(0x7fffffff));
            uId = (uint32_t)u_vecs.a.a[k];
            nsu = &(ug->u.a[uId]);

            endRid = ((uint64_t)(nsu->a[init]))>>32;
            endRid = endRid^mode;

            update_unitig(step, init, nsu, r_g, &recover_edges, 1);
        }
    }


    for (v = 0; v < ruIndex->len; v++)
    {
        get_R_to_U(ruIndex, v, &uId, &is_Unitig);
        if(is_Unitig == 1) ruIndex->index[v] = (uint32_t)-1;
    }

    if(i_ug == NULL) ma_ug_destroy(ug);

    kv_destroy(new_edges);
    kv_destroy(recover_edges.a);
    kv_destroy(rbub_edges);
    kv_destroy(u_vecs.a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movl %r9d, 0x9c(%rsp)
movq %r8, %r15
movq %rcx, 0xf0(%rsp)
movq %rdx, 0xe8(%rsp)
movq %rsi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
movq %rdi, %r13
movq %rdi, 0x118(%rsp)
testq %rdi, %rdi
jne 0xfa695
movq %r12, %rdi
callq 0xb0285
movq %rax, %r13
movq 0x18(%rax), %rax
testl $0x7fffffff, 0x14(%rax) # imm = 0x7FFFFFFF
je 0xfa695
movq 0x20(%rax), %rcx
xorl %edx, %edx
movb $0x0, 0x4(%rcx,%rdx,8)
incq %rdx
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
cmpq %rsi, %rdx
jb 0xfa67f
movq 0x18(%r13), %rdi
testl $0x7fffffff, 0x14(%rdi) # imm = 0x7FFFFFFF
movq %rdi, 0x10(%rsp)
je 0xfa750
xorl %ebx, %ebx
movl %ebx, 0x1c(%rsp)
movq 0x10(%r13), %rax
leaq (%rbx,%rbx,4), %rcx
leaq (%rax,%rcx,8), %rsi
cmpl $0x0, 0xc(%rsi)
je 0xfa735
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
cmpl $0x0, (%rax,%rbx,8)
js 0xfa735
cmpl $0x0, 0x198(%rsp)
je 0xfa6e3
cmpb $0x1, 0x4(%rax,%rbx,8)
je 0xfa735
movl $0x0, 0xc(%rsp)
cmpl $0x0, 0x10(%rsi)
je 0xfa735
xorl %eax, %eax
movq 0x18(%rsi), %rcx
movl %eax, %eax
movq %rsi, %r14
movq (%rcx,%rax,8), %rsi
shrq $0x21, %rsi
movl 0x1c(%rsp), %edx
movq 0x20(%r12), %rax
leaq (%rax,%rsi,8), %r8
addq $0x4, %r8
movq %r15, %rdi
movl $0x1, %ecx
callq 0xa1cd4
movq %r14, %rsi
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl 0x10(%r14), %eax
jb 0xfa6f3
incq %rbx
movq 0x10(%rsp), %rdi
movl 0x14(%rdi), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %rbx
jb 0xfa6ad
jmp 0xfa752
xorl %esi, %esi
testl $0x7fffffff, 0x14(%rdi) # imm = 0x7FFFFFFF
je 0xfb697
movl 0x188(%rsp), %edx
xorl %ecx, %ecx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq $0x0, 0xc0(%rsp)
movq $0x0, 0xf8(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0x110(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x48(%rsp)
movq %rax, 0x108(%rsp)
movq %r15, 0xd0(%rsp)
movq %r13, 0xc8(%rsp)
leaq (%rcx,%rcx), %rax
movq %rax, 0x128(%rsp)
xorl %r10d, %r10d
xorl %r14d, %r14d
movq $0x0, 0xb0(%rsp)
movq %rcx, 0x28(%rsp)
movl %edx, %ebx
testq %r14, %r14
je 0xfa81d
movq 0xb0(%rsp), %rax
movl %eax, %ebx
notl %ebx
addl 0x10(%rsi), %ebx
cmpl %edx, %ebx
cmovael %edx, %ebx
movl %ecx, 0x1c(%rsp)
movq 0x20(%rdi), %rax
cmpl $0x0, (%rax,%rcx,8)
js 0xfab60
cmpl $0x0, 0x198(%rsp)
je 0xfa844
cmpb $0x1, 0x4(%rax,%rcx,8)
je 0xfab60
movq 0x10(%r13), %rax
leaq (%rcx,%rcx,4), %r11
leaq (%rax,%r11,8), %rsi
cmpl $0x0, 0xc(%rsi)
je 0xfab60
cmpl $0x0, (%rsi)
js 0xfab60
movl 0x4(%rsi), %ecx
cmpq %rbp, %rcx
je 0xfab5b
movl 0x8(%rsi), %eax
cmpq %rbp, %rax
je 0xfab5b
movq %rsi, 0x50(%rsp)
movq 0x128(%rsp), %rdx
leaq (%r10,%rdx), %rsi
movq 0x28(%rdi), %rdx
movq %rsi, 0xe0(%rsp)
movq (%rdx,%rsi,8), %rdx
movq %rdx, %rsi
andq %rbp, %rsi
je 0xfa8f5
movq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rdi
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rdi,%rdx,8), %rdx
addq $0xc, %rdx
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
xorl %edi, %edi
xorl %r8d, %r8d
movl (%rdx,%rdi), %r9d
notl %r9d
shrl $0x1f, %r9d
addl %r9d, %r8d
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0xfa8ca
testl %r8d, %r8d
je 0xfa8f5
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
jmp 0xfab54
movq 0x50(%rsp), %rsi
movq 0x18(%rsi), %rdx
cmpl %ecx, 0x4(%rdx)
jne 0xfab4f
xorl $0x1, %eax
movl 0x10(%rsi), %r9d
decl %r9d
cmpl %eax, 0x4(%rdx,%r9,8)
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rcx
jne 0xfab75
xorl %edx, %edx
xorl %eax, %eax
testq %r10, %r10
setne %al
cmovneq %rdx, %r9
leaq -0x1(,%rax,2), %rax
movq %rax, 0xa8(%rsp)
testl %ebx, %ebx
movl 0x188(%rsp), %edx
movq %r10, 0x88(%rsp)
movq %r11, 0xd8(%rsp)
je 0xfab7e
cmpl 0x10(%rsi), %r9d
jae 0xfab7e
xorl %r8d, %r8d
movq %r8, 0xb0(%rsp)
movq 0x18(%rsi), %rax
movq %r9, 0x20(%rsp)
movl 0x4(%rax,%r9,8), %r11d
xorl %r10d, %r11d
movl $0x0, 0xc(%rsp)
subq $0x8, %rsp
movq %r13, %rdi
movq %r12, %rsi
movq 0xf0(%rsp), %rdx
movq 0xf8(%rsp), %rcx
movq %r15, %r8
movl 0xa4(%rsp), %r9d
movl $0x1, %eax
pushq %rax
leaq 0x140(%rsp), %r10
pushq %r10
leaq 0x24(%rsp), %r10
pushq %r10
pushq %rax
leaq 0x44(%rsp), %rax
pushq %rax
movq %r11, 0x138(%rsp)
pushq %r11
movl 0x1b8(%rsp), %eax
pushq %rax
callq 0x102d41
addq $0x40, %rsp
testl %eax, %eax
je 0xfaae0
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x110(%rsp), %rax
cmpq %rax, %r14
jne 0xfaa45
leaq (%rax,%rax), %r15
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rsi
movq 0x90(%rsp), %rdi
callq 0x2370
movq %r15, 0x110(%rsp)
movq 0xd0(%rsp), %r15
jmp 0xfaa4d
movq 0x90(%rsp), %rax
incq %r14
movq 0x140(%rsp), %rcx
movq %rcx, 0x10(%rax,%r13)
movups 0x130(%rsp), %xmm0
movq %rax, 0x90(%rsp)
movups %xmm0, (%rax,%r13)
subq $0x8, %rsp
movq 0xd0(%rsp), %rdi
movq %r12, %rsi
movq 0xf0(%rsp), %rdx
movq 0xf8(%rsp), %rcx
movq %r15, %r8
movl 0xa4(%rsp), %r9d
movl $0x1, %eax
pushq %rax
leaq 0x140(%rsp), %r10
pushq %r10
leaq 0x24(%rsp), %r10
pushq %r10
pushq %rax
leaq 0x44(%rsp), %rax
pushq %rax
pushq 0x138(%rsp)
movl 0x1b8(%rsp), %eax
pushq %rax
callq 0x102d41
addq $0x40, %rsp
addq $0x18, %r13
testl %eax, %eax
jne 0xfa9fd
jmp 0xfaae3
xorl %r14d, %r14d
testq %r14, %r14
movq 0x88(%rsp), %r10
jne 0xfb49c
movq 0x20(%rsp), %r9
addq 0xa8(%rsp), %r9
movq 0xb0(%rsp), %r8
incl %r8d
cmpl %ebx, %r8d
movq 0xc8(%rsp), %r13
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x188(%rsp), %edx
movq 0x28(%rsp), %rcx
jae 0xfab40
testq %r9, %r9
js 0xfab40
movl 0x10(%rsi), %eax
cmpq %rax, %r9
jl 0xfa970
movq %r9, 0x20(%rsp)
movq %r8, 0xb0(%rsp)
jmp 0xfab8f
movq 0x10(%rsp), %rdi
movl 0x188(%rsp), %edx
movq 0x28(%rsp), %rcx
leaq 0x1(%r10), %rax
testq %r10, %r10
movq %rax, %r10
je 0xfa802
jmp 0xfb681
movl 0x188(%rsp), %edx
jmp 0xfab60
movq %r9, 0x20(%rsp)
movq $0x0, 0xb0(%rsp)
xorl %r14d, %r14d
testq %r14, %r14
je 0xfabac
movq 0x108(%rsp), %rax
xorl $0x1, %eax
testq %r10, %r10
je 0xfabb1
movl %eax, 0x4(%rsi)
jmp 0xfabb4
xorl %r14d, %r14d
jmp 0xfab60
movl %eax, 0x8(%rsi)
movq 0xf8(%rsp), %rax
movl 0x1c(%rsp), %esi
cmpq %rax, 0xc0(%rsp)
jne 0xfac0f
leaq (%rax,%rax), %r15
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r15
movq %rsi, %rbx
leaq (,%r15,8), %rsi
movq 0xb8(%rsp), %rdi
callq 0x2370
movq %rbx, %rsi
movq 0x88(%rsp), %r10
movq %r15, 0xf8(%rsp)
movq 0xd0(%rsp), %r15
jmp 0xfac17
movq 0xb8(%rsp), %rax
movq %r10, %rdx
shlq $0x3f, %rdx
movq 0x20(%rsp), %rbx
movq %rbx, %rcx
shlq $0x20, %rcx
orq %rdx, %rcx
orq %rcx, %rsi
movq %rax, 0xb8(%rsp)
movq 0xc0(%rsp), %rcx
movq %rsi, (%rax,%rcx,8)
incq %rcx
movq %rcx, 0xc0(%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq 0x90(%rsp), %rdx
movl %r14d, %ecx
callq 0xf24f6
cmpl $0x0, 0x198(%rsp)
je 0xfb1f1
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edx, %edx
leaq (%rax,%rax,2), %rsi
movq 0x90(%rsp), %rdi
movups (%rdi,%rsi,8), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%rdi,%rsi,8), %rsi
movq %rsi, 0x40(%rsp)
movl 0x3c(%rsp), %edi
testl %edi, %edi
setns %r8b
cmpl %edx, %edi
seta %r9b
movl %eax, %esi
testb %r9b, %r8b
jne 0xfacb6
movl %edx, %edi
movl %ecx, %esi
incl %eax
movl %esi, %ecx
movl %edi, %edx
cmpq %rax, %r14
ja 0xfac7c
movl %eax, 0xc(%rsp)
cmpl $-0x1, %esi
je 0xfb492
movl %esi, %eax
leaq (%rax,%rax,2), %rax
movq 0x90(%rsp), %rcx
movups (%rcx,%rax,8), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%rcx,%rax,8), %rax
movq %rax, 0x40(%rsp)
movl 0x38(%rsp), %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0xf2482
cmpl $-0x1, %eax
je 0xfb492
movl %eax, %r11d
movl %eax, %r8d
xorl $0x1, %r8d
movq 0x10(%rsp), %rdi
movq 0x28(%rdi), %rax
movq (%rax,%r8,8), %rax
movq %rax, %rcx
andq %rbp, %rcx
movq 0x88(%rsp), %r10
je 0xfad6e
movq 0x8(%rdi), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,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 0xfad4e
testl %esi, %esi
movq 0x10(%rsp), %rdi
jne 0xfa8eb
movq 0xa0(%rsp), %rax
cmpq %rax, 0x58(%rsp)
movq %r8, 0x100(%rsp)
movq %r11, 0xa8(%rsp)
jne 0xfb4bf
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rsi
movq 0x48(%rsp), %rdi
callq 0x2370
movq 0xa8(%rsp), %r11
movq 0x10(%rsp), %rdi
movq %rbx, 0xa0(%rsp)
jmp 0xfb4cc
movq 0x18(%rsi), %rax
movq %rbx, 0x20(%rsp)
movq (%rax,%rbx,8), %rax
movq %rax, 0x100(%rsp)
movq %rax, %rcx
shrq $0x20, %rcx
movq 0x28(%r12), %rax
movq %rcx, 0x120(%rsp)
movq (%rax,%rcx,8), %r13
movq %r13, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %rbx
shlq $0x3, %rbx
addq 0x8(%r12), %rbx
movl $0x0, 0xc(%rsp)
testl %r13d, %r13d
je 0xfaf8c
xorl %eax, %eax
movl %eax, %eax
leaq (%rax,%rax,2), %rax
cmpl $0x0, 0xc(%rbx,%rax,8)
js 0xfaf79
movq 0x68(%rsp), %rax
cmpq %rax, 0x60(%rsp)
jne 0xfae6e
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x68(%rsp)
movq 0x70(%rsp), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x70(%rsp)
movl 0xc(%rsp), %eax
leaq (%rax,%rax,2), %rax
movq 0x60(%rsp), %rcx
movq 0x70(%rsp), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x60(%rsp)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rbx,%rax,8), %rsi
movq %rsi, 0x10(%rdx,%rcx,8)
movups (%rbx,%rax,8), %xmm0
movups %xmm0, (%rdx,%rcx,8)
movl 0x8(%rbx,%rax,8), %ecx
xorq $0x1, %rcx
movq 0x28(%r12), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, %rsi
andq %rbp, %rsi
je 0xfaef9
movl 0x4(%rbx,%rax,8), %ecx
movq 0x8(%r12), %rax
shrq $0x20, %rdx
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rdi
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %r8
addq $0xc, %r8
xorl %esi, %esi
cmpl $0x0, (%r8,%rsi)
js 0xfaef0
movl -0x4(%r8,%rsi), %r9d
xorl %ecx, %r9d
cmpl $0x1, %r9d
je 0xfaf00
addq $0x18, %rsi
cmpq %rsi, %rdi
jne 0xfaedb
callq 0x11e10
jmp 0xfaf17
leaq (%rax,%rdx,8), %rax
movq 0x10(%rsi,%rax), %rcx
movq %rcx, 0x40(%rsp)
movups (%rsi,%rax), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x68(%rsp), %rax
cmpq %rax, 0x60(%rsp)
jne 0xfaf4f
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x68(%rsp)
movq 0x70(%rsp), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x70(%rsp)
movq 0x60(%rsp), %rax
movq 0x70(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x60(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x40(%rsp), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rcx,%rax,8)
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl %r13d, %eax
jb 0xfae25
movq 0x28(%r12), %rax
movq 0x120(%rsp), %rcx
xorq $0x1, %rcx
movq (%rax,%rcx,8), %r13
movq %r13, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %rbx
shlq $0x3, %rbx
addq 0x8(%r12), %rbx
movl $0x0, 0xc(%rsp)
testl %r13d, %r13d
je 0xfb12f
xorl %eax, %eax
movl %eax, %eax
leaq (%rax,%rax,2), %rax
cmpl $0x0, 0xc(%rbx,%rax,8)
js 0xfb11c
movq 0x68(%rsp), %rax
cmpq %rax, 0x60(%rsp)
jne 0xfb011
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x68(%rsp)
movq 0x70(%rsp), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x70(%rsp)
movl 0xc(%rsp), %eax
leaq (%rax,%rax,2), %rax
movq 0x60(%rsp), %rcx
movq 0x70(%rsp), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x60(%rsp)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rbx,%rax,8), %rsi
movq %rsi, 0x10(%rdx,%rcx,8)
movups (%rbx,%rax,8), %xmm0
movups %xmm0, (%rdx,%rcx,8)
movl 0x8(%rbx,%rax,8), %ecx
xorq $0x1, %rcx
movq 0x28(%r12), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, %rsi
andq %rbp, %rsi
je 0xfb09c
movl 0x4(%rbx,%rax,8), %ecx
movq 0x8(%r12), %rax
shrq $0x20, %rdx
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rdi
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %r8
addq $0xc, %r8
xorl %esi, %esi
cmpl $0x0, (%r8,%rsi)
js 0xfb093
movl -0x4(%r8,%rsi), %r9d
xorl %ecx, %r9d
cmpl $0x1, %r9d
je 0xfb0a3
addq $0x18, %rsi
cmpq %rsi, %rdi
jne 0xfb07e
callq 0x11e32
jmp 0xfb0ba
leaq (%rax,%rdx,8), %rax
movq 0x10(%rsi,%rax), %rcx
movq %rcx, 0x40(%rsp)
movups (%rsi,%rax), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x68(%rsp), %rax
cmpq %rax, 0x60(%rsp)
jne 0xfb0f2
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x68(%rsp)
movq 0x70(%rsp), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x70(%rsp)
movq 0x60(%rsp), %rax
movq 0x70(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x60(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x40(%rsp), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rcx,%rax,8)
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl %r13d, %eax
jb 0xfafc8
movq 0x100(%rsp), %rbx
shrq $0x21, %rbx
movq 0x20(%r12), %rax
orl $0x80000000, (%rax,%rbx,8) # imm = 0x80000000
addl %ebx, %ebx
xorl %eax, %eax
leaq (%rax,%rbx), %rcx
movq 0x28(%r12), %rdx
movq (%rdx,%rcx,8), %rsi
movq %rsi, %rdx
andq %rbp, %rdx
je 0xfb1dc
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
shlq $0x3, %rsi
addq 0x8(%r12), %rsi
xorl %edi, %edi
leaq (%rdi,%rdi,2), %r8
orb $-0x80, 0xf(%rsi,%r8,8)
movl 0x8(%rsi,%r8,8), %r8d
xorq $0x1, %r8
movq 0x28(%r12), %r9
movq (%r9,%r8,8), %r9
movq %r9, %r8
andq %rbp, %r8
je 0xfb1d4
movq 0x8(%r12), %r10
shrq $0x20, %r9
shlq $0x3, %r8
leaq (%r8,%r8,2), %r8
leaq (%r9,%r9,2), %r9
leaq (%r10,%r9,8), %r9
addq $0xc, %r9
xorl %r10d, %r10d
movl -0x4(%r9,%r10), %r11d
xorl %ecx, %r11d
cmpl $0x1, %r11d
jne 0xfb1cb
orb $-0x80, 0x3(%r9,%r10)
addq $0x18, %r10
cmpq %r10, %r8
jne 0xfb1b7
incq %rdi
cmpq %rdx, %rdi
jne 0xfb173
leaq 0x1(%rax), %rcx
testq %rax, %rax
movq %rcx, %rax
je 0xfb14b
movq 0x20(%rsp), %rbx
subq 0xa8(%rsp), %rbx
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
js 0xfb211
movl 0x10(%rsi), %eax
cmpq %rax, %rbx
jl 0xfadd1
movl $0x0, 0xc(%rsp)
movq 0xe0(%rsp), %rax
xorl $0x1, %eax
movl %eax, 0xa8(%rsp)
xorl %eax, %eax
movq 0xc8(%rsp), %r13
movl 0x188(%rsp), %edx
movq 0x88(%rsp), %r10
leaq (%rax,%rax,2), %rax
movq 0x90(%rsp), %rcx
movups (%rcx,%rax,8), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%rcx,%rax,8), %rax
movq %rax, 0x40(%rsp)
cmpl $0x0, 0x3c(%rsp)
js 0xfb2bc
movl 0x38(%rsp), %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0xf2482
cmpl $-0x1, %eax
je 0xfb2c6
movl %eax, %ebx
movq 0xa0(%rsp), %r15
cmpq %r15, 0x58(%rsp)
jne 0xfb2d0
movq %r15, %rax
addq %r15, %r15
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rsi
movq 0x48(%rsp), %rdi
callq 0x2370
movq %rax, %r13
jmp 0xfb2d5
movq 0x28(%rsp), %rcx
jmp 0xfb47a
movq 0x10(%rsp), %rdi
jmp 0xfb461
movq 0x48(%rsp), %r13
movq 0x10(%rsp), %rdi
movq 0xd8(%rsp), %rdx
movq 0x58(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x20(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%r13,%rax,8)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%r13,%rax,8)
movl 0x3c(%rsp), %r8d
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %r8d
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rax
movl (%rax,%rdx,8), %edx
andl %ecx, %edx
movzwl 0x40(%rsp), %eax
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x42(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0xe0(%rsp), %rsi
movl %ebx, %ecx
pushq %rax
pushq %r10
callq 0xe907b
addq $0x10, %rsp
movl 0x34(%rsp), %eax
movl 0x38(%rsp), %r9d
xorl $0x1, %r9d
xorl $0x1, %eax
movq 0xe8(%rsp), %rdi
movq 0xf0(%rsp), %rsi
movl 0x9c(%rsp), %ecx
movl 0x180(%rsp), %r8d
leaq 0x30(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0xb2ced
movq 0x30(%rsp), %rax
addq $0x10, %rsp
cmpq %r15, %rax
jne 0xfb3cd
movq %r15, %rax
addq %r15, %r15
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rsi
movq %r13, %rdi
callq 0x2370
movq %rax, %r13
movq 0x20(%rsp), %rax
movq %r15, 0xa0(%rsp)
movq 0xd0(%rsp), %r15
addq $0x2, 0x58(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%r13,%rax,8)
movaps 0x30(%rsp), %xmm0
movq %r13, 0x48(%rsp)
movups %xmm0, (%r13,%rax,8)
movl 0x3c(%rsp), %r8d
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl %edi, %r8d
movl %ebx, %esi
xorl $0x1, %esi
movq 0xc8(%rsp), %r13
movq 0x10(%r13), %rax
shrl %ebx
leaq (%rbx,%rbx,4), %rcx
movl (%rax,%rcx,8), %edx
andl %edi, %edx
movzwl 0x40(%rsp), %eax
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x42(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl 0xa8(%rsp), %ecx
pushq %rax
pushq %r10
callq 0xe907b
movq %rbx, %rdi
addq $0x10, %rsp
movq 0x50(%rsp), %rsi
movl 0x188(%rsp), %edx
movq 0x28(%rsp), %rcx
movq 0x88(%rsp), %r10
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpq %rax, %r14
ja 0xfb244
jmp 0xfab60
movq 0x10(%rsp), %rdi
jmp 0xfb663
movq 0xc8(%rsp), %r13
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x188(%rsp), %edx
movq 0x28(%rsp), %rcx
jmp 0xfab92
movq %rax, 0xa0(%rsp)
movq 0x48(%rsp), %rax
movq 0xd8(%rsp), %rdx
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x20(%rsp)
leaq (%rcx,%rcx,2), %rsi
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rax,%rsi,8)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rax,%rsi,8)
movl 0x3c(%rsp), %r8d
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %r8d
movq 0x10(%r13), %rsi
movl (%rsi,%rdx,8), %edx
andl %ecx, %edx
movzwl 0x40(%rsp), %ebx
movl %ebx, %r9d
shrl $0xe, %r9d
movzbl 0x42(%rsp), %r10d
shrl $0xf, %ebx
andl $0x1, %r9d
movq 0xe0(%rsp), %rsi
movl %r11d, %ecx
pushq %rbx
pushq %r10
callq 0xe907b
addq $0x10, %rsp
movl 0x34(%rsp), %eax
movl 0x38(%rsp), %r9d
xorl $0x1, %r9d
xorl $0x1, %eax
movq 0xe8(%rsp), %rdi
movq 0xf0(%rsp), %rsi
movl 0x9c(%rsp), %ecx
movl 0x180(%rsp), %r8d
leaq 0x30(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0xb2ced
addq $0x10, %rsp
movq 0x20(%rsp), %rcx
movq 0xa0(%rsp), %rax
cmpq %rax, %rcx
jne 0xfb5d0
leaq (%rax,%rax), %r15
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rsi
movq 0x48(%rsp), %rdi
callq 0x2370
movq %rax, %rbx
movq %r15, 0xa0(%rsp)
movq 0xd0(%rsp), %r15
jmp 0xfb5d5
movq 0x48(%rsp), %rbx
addq $0x2, 0x58(%rsp)
movq 0x20(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rbx,%rax,8)
movaps 0x30(%rsp), %xmm0
movq %rbx, 0x48(%rsp)
movups %xmm0, (%rbx,%rax,8)
movl 0x3c(%rsp), %r8d
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl %esi, %r8d
movq 0x10(%r13), %rax
movq 0xa8(%rsp), %rcx
shrl %ecx
leaq (%rcx,%rcx,4), %rcx
movl (%rax,%rcx,8), %edx
andl %esi, %edx
movq 0xe0(%rsp), %rcx
xorl $0x1, %ecx
movzwl 0x40(%rsp), %eax
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x42(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq 0x100(%rsp), %rsi
pushq %rax
pushq %r10
callq 0xe907b
movq %rbx, %rdi
addq $0x10, %rsp
movq 0x50(%rsp), %rsi
movl 0x188(%rsp), %edx
movq 0x28(%rsp), %rcx
movq 0x88(%rsp), %r10
jmp 0xfab60
incq %rcx
movl 0x14(%rdi), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %rcx
jb 0xfa7df
jmp 0xfb6cd
movq $0x0, 0x48(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0xc0(%rsp)
cmpl $0x0, 0x190(%rsp)
movq 0xb8(%rsp), %rbp
je 0xfbb1c
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0x58(%rsp)
movq 0x48(%rsp), %r14
je 0xfb7ba
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movl $0x10, %ebp
movl 0x4(%r12), %ecx
andl %ebx, %ecx
movl (%r12), %eax
cmpl %eax, %ecx
jne 0xfb738
leal (%rax,%rax), %ecx
testl %eax, %eax
cmovel %ebp, %ecx
movl %ecx, (%r12)
movq 0x8(%r12), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x8(%r12)
movq 0x8(%r12), %rax
movl 0x4(%r12), %ecx
movl %ecx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leal 0x1(%rcx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %esi, %ecx
movl %ecx, 0x4(%r12)
leaq (%rdx,%rdx,2), %rcx
movl 0xc(%rsp), %edx
leaq (%rdx,%rdx,2), %rsi
movups (%r14,%rsi,8), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq 0x10(%r14,%rsi,8), %rsi
movq %rsi, 0x10(%rax,%rcx,8)
leal 0x1(%rdx), %eax
movl %eax, 0xc(%rsp)
cmpq %rax, 0x58(%rsp)
ja 0xfb706
movq 0x28(%r12), %rdi
callq 0x2220
movq $0x0, 0x28(%r12)
andb $0x7f, 0x7(%r12)
movq %r12, %rdi
callq 0xa02fa
movq 0xb8(%rsp), %rbp
movq 0x1a0(%rsp), %rbx
movl $0x64, %ecx
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xe7e99
testq %rax, %rax
jne 0xfb7c2
movq %r12, %rdi
callq 0xa02fa
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xa6dbe
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0xfb903
xorl %ecx, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq (%rcx,%rcx,2), %rdx
movq (%r14,%rdx,8), %rcx
movq 0x20(%r12), %rsi
movq %rcx, %rdi
shrq $0x21, %rdi
cmpl $0x0, (%rsi,%rdi,8)
js 0xfb8ee
movl 0x8(%r14,%rdx,8), %edx
movl %edx, %edi
shrl %edi
cmpl $0x0, (%rsi,%rdi,8)
js 0xfb8ee
shrq $0x20, %rcx
movq 0x30(%r12), %rsi
cmpb $0x0, (%rsi,%rcx)
je 0xfb858
movq %rdx, %rdi
xorq $0x1, %rdi
cmpb $0x0, (%rsi,%rdi)
jne 0xfb8ee
movq 0x28(%r12), %rsi
movq (%rsi,%rcx,8), %rdi
movq %rdi, %rsi
andq %rax, %rsi
je 0xfb89f
movq 0x8(%r12), %r8
shrq $0x20, %rdi
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rdi,%rdi,2), %rdi
leaq (%r8,%rdi,8), %rdi
addq $0xc, %rdi
xorl %r8d, %r8d
cmpl %edx, -0x4(%rdi,%r8)
jne 0xfb896
orb $-0x80, 0x3(%rdi,%r8)
addq $0x18, %r8
cmpq %r8, %rsi
jne 0xfb889
xorl $0x1, %edx
movq 0x28(%r12), %rsi
movq (%rsi,%rdx,8), %rsi
movq %rsi, %rdx
andq %rax, %rdx
je 0xfb8ee
movq 0x8(%r12), %rdi
shrq $0x20, %rsi
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rsi,%rsi,2), %rsi
leaq (%rdi,%rsi,8), %rsi
addq $0xc, %rsi
xorl %edi, %edi
movl -0x4(%rsi,%rdi), %r8d
xorl %ecx, %r8d
cmpl $0x1, %r8d
jne 0xfb8e5
orb $-0x80, 0x3(%rsi,%rdi)
addq $0x18, %rdi
cmpq %rdi, %rdx
jne 0xfb8d2
movl 0xc(%rsp), %ecx
incl %ecx
movl %ecx, 0xc(%rsp)
cmpq %rcx, 0x58(%rsp)
ja 0xfb807
movq %r12, %rdi
callq 0xa02fa
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0xfb93f
xorl %eax, %eax
movq 0x70(%rsp), %rcx
leaq (%rax,%rax,2), %rax
orl $0x80000000, 0xc(%rcx,%rax,8) # imm = 0x80000000
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpq %rax, 0x60(%rsp)
ja 0xfb91d
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0xfba22
xorl %eax, %eax
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
leaq 0x60(%rsp), %rbx
movq (%rbp,%rax,8), %rdi
movq %rdi, %rdx
shrq $0x3f, %rdx
movq %rdi, %rsi
shrq $0x20, %rsi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl %edi, 0x1c(%rsp)
movq 0x10(%r13), %rax
movl %edi, %ecx
leaq (%rcx,%rcx,4), %rcx
movq 0x18(%rax,%rcx,8), %r8
movl 0x4(%r8,%rsi,8), %r8d
xorq %rdx, %r8
movq 0x28(%r12), %rdx
movq (%rdx,%r8,8), %rdx
movq %rdx, %r8
andq %r14, %r8
je 0xfb9ed
movq 0x8(%r12), %r9
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%r9,%rdx,8), %rdx
addq $0xc, %rdx
shlq $0x3, %r8
leaq (%r8,%r8,2), %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
movl (%rdx,%r9), %r11d
notl %r11d
shrl $0x1f, %r11d
addl %r11d, %r10d
addq $0x18, %r9
cmpq %r9, %r8
jne 0xfb9cb
movl $0x1, %r9d
testl %r10d, %r10d
jg 0xfb9f0
xorl %r9d, %r9d
notq %rdi
sarq $0x3f, %rdi
orq $0x1, %rdi
leaq (%rax,%rcx,8), %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0xf976b
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpq %rax, 0xc0(%rsp)
ja 0xfb963
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0xfbb14
xorl %eax, %eax
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movl $0x10, %ebp
xorl %r14d, %r14d
movq 0x70(%rsp), %rcx
leaq (%rax,%rax,2), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
js 0xfbad9
movl 0x4(%r12), %ecx
andl %ebx, %ecx
movl (%r12), %eax
cmpl %eax, %ecx
jne 0xfba8b
leal (%rax,%rax), %ecx
testl %eax, %eax
cmovel %ebp, %ecx
movl %ecx, (%r12)
movq 0x8(%r12), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x8(%r12)
movq 0x8(%r12), %rax
movl 0x4(%r12), %ecx
movl %ecx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leal 0x1(%rcx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %esi, %ecx
movl %ecx, 0x4(%r12)
leaq (%rdx,%rdx,2), %rcx
movq 0x70(%rsp), %rdx
movl 0xc(%rsp), %esi
leaq (%rsi,%rsi,2), %rsi
movq 0x10(%rdx,%rsi,8), %rdi
movq %rdi, 0x10(%rax,%rcx,8)
movups (%rdx,%rsi,8), %xmm0
movups %xmm0, (%rax,%rcx,8)
incq %r14
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpq %rax, 0x60(%rsp)
ja 0xfba45
testq %r14, %r14
movq 0xb8(%rsp), %rbp
je 0xfbb14
movq 0x28(%r12), %rdi
callq 0x2220
movq $0x0, 0x28(%r12)
andb $0x7f, 0x7(%r12)
movq %r12, %rdi
callq 0xa02fa
cmpl $0x0, 0x198(%rsp)
movq 0xc0(%rsp), %r14
je 0xfbb91
movl $0x0, 0xc(%rsp)
testq %r14, %r14
je 0xfbb91
xorl %eax, %eax
leaq 0x60(%rsp), %rbx
movq (%rbp,%rax,8), %rdi
movq %rdi, %rsi
movl %edi, 0x1c(%rsp)
movl %edi, %eax
notq %rdi
sarq $0x3f, %rdi
orq $0x1, %rdi
shrq $0x20, %rsi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq (%rax,%rax,4), %rdx
shlq $0x3, %rdx
addq 0x10(%r13), %rdx
movq %r12, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xf976b
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpq %rax, %r14
ja 0xfbb42
movq (%r15), %rax
testq %rax, %rax
movq 0x90(%rsp), %rbx
movq 0x48(%rsp), %r14
je 0xfbbe3
movq 0x8(%r15), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
cmpl $-0x1, %esi
je 0xfbbd1
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl %esi, 0x1c(%rsp)
cmpl $0x0, (%rcx,%rdx,4)
jns 0xfbbd9
movq 0x8(%r15), %rsi
movl $0xffffffff, (%rsi,%rdx,4) # imm = 0xFFFFFFFF
jmp 0xfbbd9
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0xfbbac
cmpq $0x0, 0x118(%rsp)
jne 0xfbbf6
movq %r13, %rdi
callq 0xa0004
movq %r14, %rdi
callq 0x2220
movq 0x70(%rsp), %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2220
movq %rbp, %rdi
callq 0x2220
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq