// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: rescue_chimeric_reads_aggressive(ma_ug_t*, asg_t*, ma_hit_t_alloc*, ma_sub_t*, R_to_U*, int, int, unsigned int, unsigned int, unsigned int, kvec_asg_arc_t_warp*, kvec_t_u32_warp*, bub_label_t*, unsigned char*)
void rescue_chimeric_reads_aggressive(ma_ug_t *i_ug, asg_t *rg, ma_hit_t_alloc* sources, ma_sub_t *coverage_cut,
R_to_U* ruIndex, int max_hang, int min_ovlp, uint32_t chainLenThres, uint32_t is_bubble_check, uint32_t is_primary_check, kvec_asg_arc_t_warp* new_rtg_edges, 
kvec_t_u32_warp* new_rtg_nodes, bub_label_t* b_mask_t, uint8_t *cmk)
{
    uint32_t n_vtx, v, k, contain_rId, is_Unitig, uId, rId, endRid, oLen, w, max_oLen, max_oLen_i = (uint32_t)-1;
    uint32_t ava_max, ava_ol_max, ava_min_chain, ava_cur, ava_chainLen, test_oLen, is_update;
    asg_t* nsg = NULL; ma_utg_t* nsu = NULL; asg_arc_t t, t_max, r_edge; t_max.v = t_max.ul = t.v = t.ul = (uint32_t)-1;
    ma_hit_t *h = NULL, *h_max = NULL; ma_hit_t_alloc* x = NULL; ma_ug_t* ug = NULL; uint64_t a_nodes;
    
    kvec_t(asg_arc_t) new_edges; kv_init(new_edges);
    kvec_t(asg_arc_t) rbub_edges; kv_init(rbub_edges);
    kvec_t_u64_warp u_vecs; kv_init(u_vecs.a);
    kvec_t_u32_warp chain_buffer; kv_init(chain_buffer.a);
    kvec_asg_arc_t_warp chain_edges; kv_init(chain_edges.a);

    if(i_ug != NULL) {
        ug = i_ug;
    } else {
        ug = ma_ug_gen(rg);
        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, &(rg->seq[rId].c));
        }
    }

    // fprintf(stderr, "-0-[M::%s]\tx->index[2300071]::%u\n", __func__, ruIndex->index[2300071]); 
    n_vtx = nsg->n_seq * 2;
    for (v = 0; v < n_vtx; v++) {
        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(v&1) {
            endRid = nsu->start^1;
        } else {
            endRid = nsu->end^1;
        }

        ///x is the end read of a tip
        ///find all overlap of x
        x = &(sources[(endRid>>1)]);
        ava_ol_max = ava_max = 0; ava_min_chain = (uint32_t)-1;
        h_max = NULL;
        for (k = 0; k < x->length; k++) {
            ///h is the edge of endRid
            h = &(x->buffer[k]);
            ///means we found a contained read
            if(get_chimeric_reads_chain(h, sources, coverage_cut, ruIndex, ug, rg, max_hang, min_ovlp, endRid, uId, &chain_buffer, NULL, &ava_cur, &test_oLen, &ava_chainLen, chainLenThres, 1, cmk)) {
                is_update = 0;
                if(ava_chainLen < ava_min_chain) {
                    is_update = 1;
                } else if(ava_chainLen == ava_min_chain) {
                    if(ava_cur > ava_max) {
                        is_update = 1;
                    } else if(ava_cur == ava_max && test_oLen > ava_ol_max) {
                        is_update = 1;
                    }
                }

                if(is_update) {
                    ava_min_chain = ava_chainLen;
                    ava_max = ava_cur;
                    ava_ol_max = test_oLen;
                    h_max = h;
                }
            }
        }





        if(ava_max > 0) {
            //get all edges between contained reads
            get_chimeric_reads_chain(h_max, sources, coverage_cut, ruIndex, ug, rg, max_hang, min_ovlp, endRid, uId, &chain_buffer, &chain_edges, &ava_cur, &test_oLen, &ava_chainLen, chainLenThres, 1, cmk);
            if(chain_edges.a.n < 1) continue;
            ///the last read
            t_max = chain_edges.a.a[chain_edges.a.n-1];

            k = 0; rbub_edges.n = 0;
            ///edges from the last contained read to other unitigs
            while(get_edge2existing_node_advance(ug, rg, sources, coverage_cut, ruIndex, 
                    max_hang, min_ovlp, t_max.v, chain_buffer.a.a, chain_buffer.a.n, &k, &r_edge, 1)) {
               kv_push(asg_arc_t, rbub_edges, r_edge);
            }

            ///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;
            }
            
            //recover all contained reads
            for (k = 0; k < chain_edges.a.n; k++) {
                t_max = chain_edges.a.a[k];
                ///save all infor for reverting
                get_R_to_U(ruIndex, t_max.v>>1, &contain_rId, &is_Unitig);
                if((is_Unitig == 1) || (is_Unitig == ((uint32_t)-1))) contain_rId = ((uint32_t)-1);///shouldn't be possible
                a_nodes=contain_rId; 
                a_nodes=a_nodes<<32; 
                a_nodes=a_nodes|((uint64_t)(t_max.v>>1));
                kv_push(uint64_t, u_vecs.a, a_nodes);


                //(t_max.ul>>32)----->(t_max.v/r_edge.ul>>32)----->r_edge.v
                //need to recover (t_max.v/r_edge.ul>>32), 1. set .del = 0 2. set ruIndex
                rg->seq[t_max.v>>1].del = 0;
                coverage_cut[t_max.v>>1].del = 0;
                coverage_cut[t_max.v>>1].c = PRIMARY_LABLE;
                //add recover to the end of the unitig
                append_rId_to_Unitig(rg, ug, v, t_max.v, sources, coverage_cut, ruIndex, max_hang, min_ovlp);

                get_edge_from_source(sources, coverage_cut, ruIndex, max_hang, min_ovlp, (t_max.ul>>32), t_max.v, &t);
                kv_push(asg_arc_t, new_edges, t);

                get_edge_from_source(sources, coverage_cut, ruIndex, max_hang, min_ovlp, (t_max.v^1), ((t_max.ul>>32)^1), &t);
                kv_push(asg_arc_t, new_edges, t);
            }

            if(is_primary_check) {
                t = rbub_edges.a[max_oLen_i];
                w = get_corresponding_uId(ug, ruIndex, t.v);
                if(w == ((uint32_t)(-1))) 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 {
                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;
            
                    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);
                }
            }
            
        }
    }

    // fprintf(stderr, "-1-[M::%s]\tx->index[2300071]::%u\n", __func__, ruIndex->index[2300071]); 

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

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

        lable_all_bubbles(rg, 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(rg->seq[v>>1].del) continue;
            if(rg->seq[w>>1].del) continue;
            ///if this edge is at a bubble
            if(rg->seq_vis[v]!=0 && rg->seq_vis[w^1]!=0) continue;

            asg_arc_del(rg, v, w, 1);
            asg_arc_del(rg, w^1, v^1, 1);
        }
        asg_cleanup(rg);
        // fprintf(stderr, "-2-[M::%s]\tx->index[2300071]::%u\n", __func__, ruIndex->index[2300071]); 

        // w=max_contain_rId; w=w<<32; w=w|(t_max.v>>1);
        // kv_push(uint64_t, u_vecs.a, w);
        for (k = 0; k < u_vecs.a.n; k++) {
            w = (uint32_t)u_vecs.a.a[k];
            w = w<<1;
            if(!rg->seq[w>>1].del && get_real_length(rg, w, NULL)!=0) continue;
            if(!rg->seq[w>>1].del && get_real_length(rg, (w^1), NULL)!=0) continue;
            w=w>>1;
            rg->seq[w].del = 1;
            coverage_cut[w].del = 1;
            if((u_vecs.a.a[k]>>32) == ((uint32_t)-1)) {
                ruIndex->index[((uint32_t)(u_vecs.a.a[k]))] = (uint32_t)-1;
            } else {
                set_R_to_U(ruIndex, ((uint32_t)(u_vecs.a.a[k])), (u_vecs.a.a[k]>>32), 0, NULL);
            }
        }

        // fprintf(stderr, "-3-[M::%s]\tx->index[2300071]::%u\n", __func__, ruIndex->index[2300071]); 
    }

    ///actually we don't update sources
    ///during the the primary_check, we need to recover everything for r_g, coverage_cut and ruIndex
    if(is_primary_check)
    {
        ///don't remove nodes and edges
        /**
        for (k = 0; k < u_vecs.a.n; k++)
        {
            w = (uint32_t)u_vecs.a.a[k];
            r_g->seq[w].del = 1;
            coverage_cut[w].del = 1;
            set_R_to_U(ruIndex, ((uint32_t)(u_vecs.a.a[k])), (u_vecs.a.a[k]>>32), 0);
        }
        **/
       if(new_rtg_nodes)
       {
           for(k = 0; k < u_vecs.a.n; k++)
           {
                w = (uint32_t)u_vecs.a.a[k];
                kv_push(uint32_t, new_rtg_nodes->a, w);
           }
       }

       
        for (k = 0; k < new_edges.n; k++)
        {
            p = asg_arc_pushp(rg);
            *p = new_edges.a[k];
            if(new_rtg_edges) kv_push(asg_arc_t, new_rtg_edges->a, new_edges.a[k]);
        }

        if(new_edges.n != 0)
        {
            free(rg->idx);
            rg->idx = 0;
            rg->is_srt = 0;
            asg_cleanup(rg);
        }
    }
    // fprintf(stderr, "-4-[M::%s]\tx->index[2300071]::%u\n", __func__, ruIndex->index[2300071]); 

    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;
    }
    // fprintf(stderr, "-5-[M::%s]\tx->index[2300071]::%u\n", __func__, ruIndex->index[2300071]); 

    if(i_ug == NULL) ma_ug_destroy(ug);
    kv_destroy(new_edges);
    kv_destroy(rbub_edges);
    kv_destroy(u_vecs.a);
    kv_destroy(chain_buffer.a);
    kv_destroy(chain_edges.a);
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %r9, 0xb0(%rsp)
movq %r8, %rbp
movq %rcx, 0x98(%rsp)
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl 0x1b8(%rsp), %edi
movl 0x1b0(%rsp), %ebx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x30(%rsp)
movl $0xffffffff, 0x38(%rsp) # imm = 0xFFFFFFFF
xorl %eax, %eax
movq %rax, 0x140(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x130(%rsp)
movq %rax, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
testq %r15, %r15
movq %r8, 0x60(%rsp)
movq %r15, 0x128(%rsp)
je 0xf655e
movq 0x18(%r15), %r10
movl 0x14(%r10), %eax
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %r15, 0x20(%rsp)
jmp 0xf65a3
movq %r12, %rdi
callq 0xb10cd
movq %rax, 0x20(%rsp)
movq 0x18(%rax), %r10
testl $0x7fffffff, 0x14(%r10) # imm = 0x7FFFFFFF
je 0xf7510
movq 0x20(%r10), %rdx
xorl %esi, %esi
movb $0x0, 0x4(%rdx,%rsi,8)
incq %rsi
movl 0x14(%r10), %eax
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rsi
jb 0xf6583
movl 0x1b8(%rsp), %edi
testl %ecx, %ecx
je 0xf7510
movq %r14, 0x90(%rsp)
xorl %ebx, %ebx
movq %r10, 0x28(%rsp)
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rcx
leaq (%rbx,%rbx,4), %rdx
cmpl $0x0, 0xc(%rcx,%rdx,8)
je 0xf6642
movq 0x20(%r10), %rsi
cmpl $0x0, (%rsi,%rbx,8)
js 0xf6642
testl %edi, %edi
je 0xf65e3
cmpb $0x1, 0x4(%rsi,%rbx,8)
je 0xf6642
leaq (%rcx,%rdx,8), %r14
movl $0x0, 0x4(%rsp)
cmpl $0x0, 0x10(%r14)
je 0xf6642
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rsi
shrq $0x21, %rsi
movq 0x20(%r12), %rax
leaq (%rax,%rsi,8), %r8
addq $0x4, %r8
movq %rbp, %rdi
movl %ebx, %edx
movl $0x1, %ecx
callq 0xa27e9
incq %r15
movl %r15d, 0x4(%rsp)
movl 0x10(%r14), %eax
cmpq %rax, %r15
jb 0xf65f9
movq 0x28(%rsp), %r10
movl 0x14(%r10), %eax
movl 0x1b8(%rsp), %edi
incq %rbx
movl %eax, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
cmpq %r15, %rbx
jb 0xf65ba
testl %r15d, %r15d
je 0xf753d
addl %r15d, %r15d
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
xorl %r14d, %r14d
xorl %r11d, %r11d
movq $0x0, 0xe0(%rsp)
xorl %r13d, %r13d
movq $0x0, 0xe8(%rsp)
xorl %r8d, %r8d
movq $0x0, 0x10(%rsp)
movq $0x0, 0x68(%rsp)
xorl %r9d, %r9d
movq %r13, %rbx
movl %r14d, %r13d
shrl %r13d
movq 0x20(%r10), %rax
cmpl $0x0, (%rax,%r13,8)
js 0xf6ab1
testl %edi, %edi
je 0xf66d0
cmpb $0x1, 0x4(%rax,%r13,8)
je 0xf6ab1
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
leaq (,%r13,4), %rcx
addq %r13, %rcx
cmpl $0x0, 0xc(%rax,%rcx,8)
je 0xf6ab1
leaq (%rax,%rcx,8), %rax
cmpl $0x0, (%rax)
js 0xf6ab1
cmpl $-0x1, 0x4(%rax)
je 0xf6ab1
cmpl $-0x1, 0x8(%rax)
je 0xf6ab1
movq %rcx, 0xd0(%rsp)
movq 0x28(%r10), %rcx
movq (%rcx,%r14,8), %rcx
movq %rcx, %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
andq %rsi, %rdx
movq %r9, 0x70(%rsp)
je 0xf6783
movq %r8, %r9
movq 0x8(%r10), %rsi
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,8), %rcx
addq $0xc, %rcx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
xorl %edi, %edi
movl (%rcx,%rsi), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %edi
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0xf6755
testl %edi, %edi
movl 0x1b8(%rsp), %edi
movq %r9, %r8
movq 0x70(%rsp), %r9
jne 0xf6ab1
leaq 0x4(%rax), %rcx
addq $0x8, %rax
testb $0x1, %r14b
cmovneq %rcx, %rax
movl (%rax), %edx
movl %edx, %eax
shrl %eax
leaq (%rax,%rax,2), %rax
movl $0x0, 0x4(%rsp)
movq 0x90(%rsp), %rcx
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0xf6ab1
movq %r14, 0x50(%rsp)
movq %r11, 0x18(%rsp)
movq %r8, 0x8(%rsp)
movq %rbx, 0x78(%rsp)
xorl $0x1, %edx
movq %rdx, 0x58(%rsp)
leaq (%rcx,%rax,8), %rcx
movq $0x0, 0xa0(%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movl $0x0, 0x88(%rsp)
xorl %edx, %edx
movq %rcx, 0xa8(%rsp)
movl %edx, %eax
leaq (%rax,%rax,4), %rbp
shlq $0x3, %rbp
addq (%rcx), %rbp
subq $0x8, %rsp
movq %rbp, %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x28(%rsp), %r8
movq %r12, %r9
pushq $0x1
movl 0x1b8(%rsp), %eax
pushq %rax
leaq 0xdc(%rsp), %rax
pushq %rax
leaq 0xdc(%rsp), %rax
pushq %rax
leaq 0xe8(%rsp), %rax
pushq %rax
pushq $0x0
leaq 0x168(%rsp), %rax
pushq %rax
pushq %r13
pushq 0xa0(%rsp)
movl 0x1f0(%rsp), %eax
pushq %rax
pushq 0x108(%rsp)
callq 0xf5529
addq $0x60, %rsp
testl %eax, %eax
je 0xf68b6
movl 0xc4(%rsp), %eax
cmpl %ebx, %eax
movq 0x28(%rsp), %r10
jae 0xf68c2
movl 0xc0(%rsp), %ecx
movl %ecx, 0x88(%rsp)
movl 0xbc(%rsp), %ecx
movq %rbp, 0xa0(%rsp)
jmp 0xf68f0
movl %r14d, %ecx
movl %ebx, %eax
movq 0x28(%rsp), %r10
jmp 0xf68f0
jne 0xf68eb
movl 0xc0(%rsp), %edx
movl 0xbc(%rsp), %ecx
cmpl 0x88(%rsp), %edx
jbe 0xf68e4
movl %edx, 0x88(%rsp)
jmp 0xf68ac
jne 0xf68eb
cmpl %r14d, %ecx
ja 0xf68ac
movl %r14d, %ecx
movl %ebx, %eax
movl 0x4(%rsp), %edx
incl %edx
movl %edx, 0x4(%rsp)
movl %eax, %ebx
movl %ecx, %r14d
movq 0xa8(%rsp), %rcx
cmpl 0xc(%rcx), %edx
jb 0xf6801
cmpl $0x0, 0x88(%rsp)
je 0xf6c21
subq $0x8, %rsp
movq 0xa8(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x68(%rsp), %rbp
movq %rbp, %rcx
movq 0x28(%rsp), %r8
movq %r12, %r9
pushq $0x1
movl 0x1b8(%rsp), %eax
pushq %rax
leaq 0xdc(%rsp), %rax
pushq %rax
leaq 0xdc(%rsp), %rax
pushq %rax
leaq 0xe8(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
leaq 0x168(%rsp), %rax
pushq %rax
pushq %r13
pushq 0xa0(%rsp)
movl 0x1f0(%rsp), %eax
pushq %rax
pushq 0x108(%rsp)
callq 0xf5529
addq $0x60, %rsp
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0xf6c43
movq 0x100(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movl -0x10(%rcx,%rax,8), %ebx
movl $0x0, 0x4(%rsp)
xorl %r14d, %r14d
xorl %r13d, %r13d
movq %rbx, 0x58(%rsp)
movl 0x130(%rsp), %eax
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq %r12, %rsi
movq 0x98(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movq %rbp, %r8
movq 0xb8(%rsp), %r9
pushq $0x1
leaq 0x160(%rsp), %r10
pushq %r10
leaq 0x1c(%rsp), %r10
pushq %r10
pushq %rax
pushq 0x168(%rsp)
pushq %rbx
movl 0x1d8(%rsp), %eax
pushq %rax
callq 0x1072ad
addq $0x40, %rsp
testl %eax, %eax
je 0xf6ac5
movq 0xe8(%rsp), %rax
cmpq %rax, %r13
jne 0xf6a81
movq %r13, %rbx
leaq (%rax,%rax), %r13
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r13
leaq (,%r13,8), %rax
leaq (%rax,%rax,2), %rsi
movq 0x8(%rsp), %rdi
callq 0x2370
movq %r13, 0xe8(%rsp)
movq %rbx, %r13
movq 0x58(%rsp), %rbx
jmp 0xf6a86
movq 0x8(%rsp), %rax
incq %r13
movq 0x160(%rsp), %rcx
movq %rcx, 0x10(%rax,%r14)
movups 0x150(%rsp), %xmm0
movq %rax, 0x8(%rsp)
movups %xmm0, (%rax,%r14)
addq $0x18, %r14
jmp 0xf69d6
movq %rbx, %r13
incq %r14
cmpq %r15, %r14
jne 0xf66a8
jmp 0xf7527
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq 0x8(%rsp), %rdx
movl %r13d, %ecx
callq 0xf48e8
movl 0x1b8(%rsp), %edi
testl %edi, %edi
movq %r13, %rax
movq 0x78(%rsp), %r13
movq 0x70(%rsp), %r9
movq 0x18(%rsp), %r11
movq 0x28(%rsp), %r10
je 0xf6ccb
testq %rax, %rax
je 0xf6c6d
movq %rax, %rbx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edx, %edx
movq 0x50(%rsp), %r14
movq 0x8(%rsp), %r8
leaq (%rax,%rax,2), %rsi
movups (%r8,%rsi,8), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%r8,%rsi,8), %rsi
movq %rsi, 0x40(%rsp)
movl 0x3c(%rsp), %esi
testl %esi, %esi
setns %dil
cmpl %edx, %esi
seta %r8b
movl %eax, %r9d
testb %r8b, %dil
jne 0xf6b54
movl %edx, %esi
movl %ecx, %r9d
incl %eax
movl %r9d, %ecx
movl %esi, %edx
cmpq %rax, %rbx
movq 0x8(%rsp), %r8
ja 0xf6b1f
movl %eax, 0x4(%rsp)
cmpl $-0x1, %r9d
je 0xf6c8a
movl %r9d, 0x84(%rsp)
movl %r9d, %eax
leaq (%rax,%rax,2), %rax
movups (%r8,%rax,8), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%r8,%rax,8), %rax
movq %rax, 0x40(%rsp)
movl 0x38(%rsp), %edx
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0xf488a
cmpl $-0x1, %eax
je 0xf6ca6
xorl $0x1, %eax
movq 0x28(%rsp), %r10
movq 0x28(%r10), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rcx
movq 0x70(%rsp), %r9
movq 0x18(%rsp), %r11
je 0xf6cc1
movq 0x8(%r10), %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 0xf6bfb
testl %esi, %esi
movl 0x1b8(%rsp), %edi
movq %rbx, %rax
jne 0xf6c80
jmp 0xf6ccb
movq 0x60(%rsp), %rbp
movq 0x78(%rsp), %r13
movq 0x8(%rsp), %r8
movq 0x70(%rsp), %r9
movl 0x1b8(%rsp), %edi
movq 0x18(%rsp), %r11
jmp 0xf6c63
movq 0x78(%rsp), %r13
movq 0x8(%rsp), %r8
movq 0x70(%rsp), %r9
movl 0x1b8(%rsp), %edi
movq 0x18(%rsp), %r11
movq 0x28(%rsp), %r10
movq 0x50(%rsp), %r14
jmp 0xf6ab4
movl $0x0, 0x4(%rsp)
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movq 0x50(%rsp), %r14
jmp 0xf7430
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movq 0x70(%rsp), %r9
movl 0x1b8(%rsp), %edi
jmp 0xf6ab4
movq 0x70(%rsp), %r9
movl 0x1b8(%rsp), %edi
movq 0x18(%rsp), %r11
movq 0x28(%rsp), %r10
jmp 0xf7430
movl 0x1b8(%rsp), %edi
movq %rbx, %rax
movq %rax, 0xc8(%rsp)
movl $0x0, 0x4(%rsp)
cmpq $0x0, 0xf0(%rsp)
je 0xf7009
leaq (%r11,%r11), %rax
movq %rax, 0x110(%rsp)
leaq (,%r11,8), %rax
movq %rax, 0x118(%rsp)
movq 0x10(%rsp), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0xd8(%rsp)
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x88(%rsp)
xorl %esi, %esi
xorl %eax, %eax
movq 0x100(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movl 0x8(%rcx,%rax,8), %ebx
movq %rbx, 0xa0(%rsp)
shrl %ebx
cmpq %rbx, (%rbp)
jbe 0xf6d5c
movq 0x8(%rbp), %rdx
movl (%rdx,%rbx,4), %r14d
testl %r14d, %r14d
jns 0xf6d62
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq %r9, 0x70(%rsp)
movq (%rcx,%rax,8), %rax
movq %rax, 0x58(%rsp)
cmpq 0xe0(%rsp), %r11
movq %rsi, 0xa8(%rsp)
movq %r11, 0x18(%rsp)
jne 0xf6dc2
movq 0x110(%rsp), %rax
leaq (%rax,%rsi), %rcx
testq %r11, %r11
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xe0(%rsp)
leaq (,%rcx,8), %rsi
movq %r13, %rdi
callq 0x2370
movq 0xa8(%rsp), %rsi
movq %rax, %r13
movq 0x10(%rsp), %rcx
addq %rsi, %rcx
movq %rcx, 0x120(%rsp)
shlq $0x20, %r14
orq %rbx, %r14
movq %r13, 0x78(%rsp)
movq 0x118(%rsp), %rcx
leaq (%rcx,%r13), %rax
movq %r14, (%rax,%rsi,4)
movq 0x20(%r12), %rax
andl $0x7fffffff, (%rax,%rbx,8) # imm = 0x7FFFFFFF
leaq (%rbx,%rbx,2), %rax
movq 0x98(%rsp), %rbx
andb $0x7f, 0x3(%rbx,%rax,4)
movb $0x0, 0x8(%rbx,%rax,4)
subq $0x8, %rsp
movq %r12, %rdi
movq 0x28(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0xa8(%rsp), %rbp
movl %ebp, %ecx
movq 0x98(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
movl 0x1a8(%rsp), %eax
pushq %rax
movq 0xc0(%rsp), %r14
pushq %r14
pushq 0x78(%rsp)
callq 0xf41b9
addq $0x20, %rsp
movq 0x58(%rsp), %r9
shrq $0x20, %r9
movq %r13, %rdi
movq %rbx, %rsi
movl %r14d, %ecx
movl 0x1a0(%rsp), %r8d
movq %r9, 0x58(%rsp)
leaq 0x30(%rsp), %rax
pushq %rax
pushq %rbp
callq 0xb3df3
movq 0x130(%rsp), %rax
addq $0x10, %rsp
movq 0x68(%rsp), %r13
cmpq %r13, %rax
jne 0xf6ec8
testq %rax, %rax
movq 0xd8(%rsp), %r13
movl $0x2, %eax
cmoveq %rax, %r13
leaq (,%r13,8), %rax
leaq (%rax,%rax,2), %rsi
movq 0x70(%rsp), %rdi
callq 0x2370
movq %rax, %r14
jmp 0xf6ecd
movq 0x70(%rsp), %r14
movq 0x10(%rsp), %rax
movq 0xa8(%rsp), %rcx
leaq (%rax,%rcx), %rbx
incq %rbx
movq 0x40(%rsp), %rax
movq 0x88(%rsp), %rcx
movq %rax, 0x10(%r14,%rcx)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%r14,%rcx)
movq 0xa0(%rsp), %r9
xorl $0x1, %r9d
movq 0x58(%rsp), %rdx
xorl $0x1, %edx
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xb0(%rsp), %rcx
movl 0x1a0(%rsp), %r8d
leaq 0x30(%rsp), %rax
pushq %rax
pushq %rdx
callq 0xb3df3
addq $0x10, %rsp
cmpq %r13, %rbx
movq %r13, %rax
movq 0x78(%rsp), %r13
jne 0xf6f86
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rsi
movq %r14, %rdi
callq 0x2370
movq %rax, %r9
movq %rbx, 0x68(%rsp)
movq 0x60(%rsp), %rbp
movq 0x8(%rsp), %r8
jmp 0xf6f98
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rbp
movq 0x8(%rsp), %r8
movq %r14, %r9
movl 0x1b8(%rsp), %edi
movq 0x18(%rsp), %r11
movq 0x28(%rsp), %r10
movq 0x40(%rsp), %rax
movq 0x88(%rsp), %rcx
movq %rax, 0x28(%r9,%rcx)
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x18(%r9,%rcx)
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
movq 0xa8(%rsp), %rsi
addq $0x2, %rsi
addq $0x4, 0xd8(%rsp)
addq $0x30, %rcx
movq %rcx, 0x88(%rsp)
incq %r11
cmpq %rax, 0xf0(%rsp)
ja 0xf6d2f
addq %rsi, 0x10(%rsp)
jmp 0xf700e
movq 0x8(%rsp), %r8
testl %edi, %edi
movq %r13, 0x78(%rsp)
movq %r11, 0x18(%rsp)
je 0xf71aa
movq %r9, %r14
movl 0x84(%rsp), %eax
leaq (%rax,%rax,2), %rax
movups (%r8,%rax,8), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%r8,%rax,8), %rax
movq %rax, 0x40(%rsp)
movl 0x38(%rsp), %edx
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq %r8, %rbx
callq 0xf488a
cmpl $-0x1, %eax
je 0xf743a
movl %eax, %r11d
movq 0x68(%rsp), %rbp
cmpq %rbp, 0x10(%rsp)
movq %r14, %rdi
jne 0xf70a2
leaq (,%rbp,2), %rbx
testq %rbp, %rbp
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rsi
movq %r11, %r14
callq 0x2370
movq %r14, %r11
movq %rax, %rdi
movq %rbx, %rbp
movq 0x50(%rsp), %r14
movq 0x10(%rsp), %rax
leaq 0x1(%rax), %rbx
movq %rax, 0x10(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rdi,%rax,8)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rdi,%rax,8)
movl 0x3c(%rsp), %r8d
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %r8d
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xd0(%rsp), %rdx
movl (%rax,%rdx,8), %edx
andl %ecx, %edx
movzwl 0x40(%rsp), %eax
movq %rdi, %r13
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x42(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0x28(%rsp), %rdi
movl %r14d, %esi
movq %r11, 0x58(%rsp)
movl %r11d, %ecx
pushq %rax
pushq %r10
callq 0xeaa02
addq $0x10, %rsp
movl 0x34(%rsp), %eax
movl 0x38(%rsp), %r9d
xorl $0x1, %r9d
xorl $0x1, %eax
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xb0(%rsp), %rcx
movl 0x1a0(%rsp), %r8d
leaq 0x30(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0xb3df3
addq $0x10, %rsp
cmpq %rbp, %rbx
jne 0xf7460
leaq (,%rbp,2), %r14
testq %rbp, %rbp
movl $0x2, %eax
cmoveq %rax, %r14
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %rsi
movq %r13, %rdi
callq 0x2370
movq %rax, %r13
movq %r14, 0x68(%rsp)
movq 0x50(%rsp), %r14
jmp 0xf7465
movl $0x0, 0x4(%rsp)
cmpq $0x0, 0xc8(%rsp)
je 0xf6c63
movq 0x50(%rsp), %r14
movl %r14d, %eax
xorl $0x1, %eax
movl %eax, 0xa8(%rsp)
xorl %ebx, %ebx
leaq (%rbx,%rbx,2), %rax
movq 0x8(%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 0xf741c
movq %r9, %r13
movl 0x38(%rsp), %edx
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0xf488a
cmpl $-0x1, %eax
je 0xf7251
movl %eax, %ebp
movq 0x10(%rsp), %rcx
cmpq 0x68(%rsp), %rcx
jne 0xf726f
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rsi
movq %r13, %rdi
callq 0x2370
movq 0x10(%rsp), %rcx
movq %rax, %r13
jmp 0xf7274
movq 0x60(%rsp), %rbp
movq %r13, %r9
movl 0x1b8(%rsp), %edi
movq 0x18(%rsp), %r11
movq 0x28(%rsp), %r10
jmp 0xf7417
movq 0x68(%rsp), %rbx
movq %rcx, 0x10(%rsp)
leaq 0x1(%rcx), %rax
movq %rax, 0x58(%rsp)
leaq (%rcx,%rcx,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 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xd0(%rsp), %rdx
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 0x28(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %ecx
pushq %rax
pushq %r10
callq 0xeaa02
addq $0x10, %rsp
movl 0x34(%rsp), %eax
movl 0x38(%rsp), %r9d
xorl $0x1, %r9d
xorl $0x1, %eax
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xb0(%rsp), %rcx
movl 0x1a0(%rsp), %r8d
leaq 0x30(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0xb3df3
addq $0x10, %rsp
movq 0x58(%rsp), %rax
cmpq %rbx, %rax
jne 0xf736a
leaq (%rbx,%rbx), %r14
testq %rbx, %rbx
movl $0x2, %eax
cmoveq %rax, %r14
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %rsi
movq %r13, %rdi
callq 0x2370
movq %rax, %r13
movq %r14, 0x68(%rsp)
movq 0x50(%rsp), %r14
jmp 0xf736f
movq %rbx, 0x68(%rsp)
movq 0x10(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
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, %edi       # imm = 0x7FFFFFFF
andl %edi, %r8d
movl %ebp, %esi
xorl $0x1, %esi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
shrl %ebp
leaq (,%rbp,4), %rcx
addq %rbp, %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 0x28(%rsp), %rbx
movq %rbx, %rdi
movl 0xa8(%rsp), %ecx
pushq %rax
pushq %r10
callq 0xeaa02
movq %rbx, %r10
movq %r13, %r9
addq $0x10, %rsp
movl 0x4(%rsp), %ebx
movq 0x60(%rsp), %rbp
movl 0x1b8(%rsp), %edi
movq 0x18(%rsp), %r11
movq 0x78(%rsp), %r13
incl %ebx
movl %ebx, 0x4(%rsp)
cmpq %rbx, 0xc8(%rsp)
ja 0xf71d5
movq 0x8(%rsp), %r8
jmp 0xf6ab4
movq 0x60(%rsp), %rbp
movq %r14, %r9
movl 0x1b8(%rsp), %edi
movq 0x18(%rsp), %r11
movq 0x28(%rsp), %r10
movq 0x50(%rsp), %r14
movq %rbx, %r8
jmp 0xf6ab4
movq %rbp, 0x68(%rsp)
movq 0x10(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
leaq (%rbx,%rbx,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, %edi       # imm = 0x7FFFFFFF
andl %edi, %r8d
movq 0x58(%rsp), %rcx
movl %ecx, %esi
xorl $0x1, %esi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
shrl %ecx
leaq (%rcx,%rcx,4), %rcx
movl (%rax,%rcx,8), %edx
andl %edi, %edx
movl %r14d, %ecx
xorl $0x1, %ecx
movzwl 0x40(%rsp), %eax
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x42(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
pushq %rax
pushq %r10
callq 0xeaa02
movq %rbx, %r10
movq %r13, %r9
addq $0x10, %rsp
movq 0x60(%rsp), %rbp
movq 0x8(%rsp), %r8
movl 0x1b8(%rsp), %edi
movq 0x18(%rsp), %r11
movq 0x78(%rsp), %r13
jmp 0xf6ab4
xorl %r15d, %r15d
xorl %r14d, %r14d
movq $0x0, 0x8(%rsp)
xorl %r13d, %r13d
xorl %r11d, %r11d
jmp 0xf7559
movq %r9, %r15
movq %r8, 0x8(%rsp)
movl 0x1b0(%rsp), %ebx
movq 0x10(%rsp), %r14
jmp 0xf7559
xorl %r15d, %r15d
xorl %r14d, %r14d
movq $0x0, 0x8(%rsp)
xorl %r13d, %r13d
xorl %r11d, %r11d
movl 0x1b0(%rsp), %ebx
testl %ebx, %ebx
movq %r14, 0x10(%rsp)
movq %r11, 0x18(%rsp)
je 0xf78e1
movl $0x0, 0x4(%rsp)
testq %r14, %r14
je 0xf763c
xorl %ecx, %ecx
movl $0x10, %ebx
movq %r15, %r8
movl 0x4(%r12), %esi
movl %esi, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpl (%r12), %edx
jne 0xf75d2
leal (%rdx,%rdx), %eax
testl %edx, %edx
cmovel %ebx, %eax
movl %eax, (%r12)
movq 0x8(%r12), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq %r15, %r8
movq %rax, 0x8(%r12)
movl 0x4(%r12), %esi
movl %esi, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl 0x4(%rsp), %ecx
jmp 0xf75d7
movq 0x8(%r12), %rax
leal 0x1(%rsi), %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl $0x80000000, %esi       # imm = 0x80000000
orl %edi, %esi
movl %esi, 0x4(%r12)
movl %edx, %edx
leaq (%rdx,%rdx,2), %rdx
movl %ecx, %esi
leaq (%rsi,%rsi,2), %rsi
movq 0x10(%r8,%rsi,8), %rdi
movq %rdi, 0x10(%rax,%rdx,8)
movups (%r8,%rsi,8), %xmm0
movups %xmm0, (%rax,%rdx,8)
incl %ecx
movl %ecx, 0x4(%rsp)
cmpq %rcx, %r14
ja 0xf7586
movq 0x28(%r12), %rdi
callq 0x2220
movq $0x0, 0x28(%r12)
andb $0x7f, 0x7(%r12)
movq %r12, %rdi
callq 0xa0a7d
movq 0x1d0(%rsp), %rbx
movl $0x64, %ecx
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xe96a2
testq %rax, %rax
jne 0xf7644
movq %r12, %rdi
callq 0xa0a7d
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xa7e08
movl $0x0, 0x4(%rsp)
movq 0x10(%rsp), %r10
testq %r10, %r10
je 0xf7790
movq %r15, %r9
xorl %ecx, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq (%rcx,%rcx,2), %rdx
movq (%r9,%rdx,8), %rcx
movq 0x20(%r12), %rsi
movq %rcx, %rdi
shrq $0x21, %rdi
cmpl $0x0, (%rsi,%rdi,8)
js 0xf777d
movl 0x8(%r9,%rdx,8), %edx
movl %edx, %edi
shrl %edi
cmpl $0x0, (%rsi,%rdi,8)
js 0xf777d
shrq $0x20, %rcx
movq 0x30(%r12), %rsi
cmpb $0x0, (%rsi,%rcx)
je 0xf76df
movq %rdx, %rdi
xorq $0x1, %rdi
cmpb $0x0, (%rsi,%rdi)
jne 0xf777d
movq 0x8(%r12), %rsi
movq 0x28(%r12), %rdi
movq (%rdi,%rcx,8), %r8
movq %r8, %r9
andq %rax, %r9
je 0xf7735
shrq $0x20, %r8
shlq $0x3, %r9
leaq (%r9,%r9,2), %rdi
leaq (%r8,%r8,2), %r8
leaq (%rsi,%r8,8), %rsi
addq $0xc, %rsi
xorl %r8d, %r8d
movq %r15, %r9
cmpl %edx, -0x4(%rsi,%r8)
jne 0xf7720
orb $-0x80, 0x3(%rsi,%r8)
addq $0x18, %r8
cmpq %r8, %rdi
jne 0xf7713
movq 0x8(%r12), %rsi
movq 0x28(%r12), %rdi
jmp 0xf7738
movq %r15, %r9
xorl $0x1, %edx
movq (%rdi,%rdx,8), %rdi
movq %rdi, %rdx
andq %rax, %rdx
je 0xf777d
shrq $0x20, %rdi
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rdi,%rdi,2), %rdi
leaq (%rsi,%rdi,8), %rsi
addq $0xc, %rsi
xorl %edi, %edi
movl -0x4(%rsi,%rdi), %r8d
xorl %ecx, %r8d
cmpl $0x1, %r8d
jne 0xf7774
orb $-0x80, 0x3(%rsi,%rdi)
addq $0x18, %rdi
cmpq %rdi, %rdx
jne 0xf7761
movl 0x4(%rsp), %ecx
incl %ecx
movl %ecx, 0x4(%rsp)
cmpq %rcx, %r10
ja 0xf768e
movq %r12, %rdi
callq 0xa0a7d
movl $0x0, 0x4(%rsp)
movq 0x18(%rsp), %r11
testq %r11, %r11
je 0xf78e1
xorl %eax, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq (%r13,%rax,8), %rdi
movq 0x20(%r12), %rax
movl %edi, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl (%rax,%rcx,8), %edx
testl %edx, %edx
js 0xf787e
addl %edi, %edi
movq 0x28(%r12), %rsi
movl %edi, %edi
movq (%rsi,%rdi,8), %r8
movq %r8, %r9
andq %rbx, %r9
je 0xf7832
movq 0x8(%r12), %r10
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
leaq (%r10,%r8,8), %r8
addq $0xc, %r8
shlq $0x3, %r9
leaq (%r9,%r9,2), %r9
xorl %r10d, %r10d
xorl %r11d, %r11d
movl (%r8,%r10), %ebp
notl %ebp
shrl $0x1f, %ebp
addl %ebp, %r11d
addq $0x18, %r10
cmpq %r10, %r9
jne 0xf780a
testl %r11d, %r11d
movq 0x60(%rsp), %rbp
movq 0x18(%rsp), %r11
jne 0xf78ce
movq 0x8(%rsi,%rdi,8), %rsi
movq %rsi, %rdi
andq %rbx, %rdi
je 0xf787e
movq 0x8(%r12), %r8
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%r8,%rsi,8), %rsi
addq $0xc, %rsi
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
movl (%rsi,%r8), %r10d
notl %r10d
shrl $0x1f, %r10d
addl %r10d, %r9d
addq $0x18, %r8
cmpq %r8, %rdi
jne 0xf7862
testl %r9d, %r9d
jne 0xf78ce
orl $0x80000000, %edx       # imm = 0x80000000
movl %edx, (%rax,%rcx,8)
leaq (%rcx,%rcx,2), %rax
movq 0x98(%rsp), %rcx
orb $-0x80, 0x3(%rcx,%rax,4)
movl 0x4(%rsp), %eax
movq (%r13,%rax,8), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
cmpq %rbx, %rdx
jne 0xf78bc
movq 0x8(%rbp), %rax
movl %esi, %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
jmp 0xf78ce
movq %rbp, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xa27e9
movq 0x18(%rsp), %r11
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
cmpq %rax, %r11
ja 0xf77b5
cmpl $0x0, 0x1b8(%rsp)
movq %r15, %rdi
je 0xf7ab5
movq 0x1c8(%rsp), %rbx
testq %rbx, %rbx
je 0xf796c
movl $0x0, 0x4(%rsp)
testq %r11, %r11
je 0xf796c
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
xorl %edx, %edx
movl $0x2, %r14d
movl (%r13,%rdx,8), %ebp
cmpq 0x8(%rbx), %rcx
jne 0xf7950
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r14, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x18(%rsp), %r11
movq %r15, %rdi
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbx)
movl %ebp, (%rax,%rcx,4)
movl 0x4(%rsp), %edx
incl %edx
movl %edx, 0x4(%rsp)
movq %rsi, %rcx
cmpq %rdx, %r11
ja 0xf791b
movl $0x0, 0x4(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0xf7ab5
movq 0x1c0(%rsp), %rbx
xorl %ecx, %ecx
movl $0x10, %ebp
movl $0x2, %r14d
movl 0x4(%r12), %esi
movl %esi, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpl (%r12), %edx
jne 0xf79e1
leal (%rdx,%rdx), %eax
testl %edx, %edx
cmovel %ebp, %eax
movl %eax, (%r12)
movq 0x8(%r12), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq %r15, %rdi
movq %rax, 0x8(%r12)
movl 0x4(%r12), %esi
movl %esi, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl 0x4(%rsp), %ecx
jmp 0xf79e6
movq 0x8(%r12), %rax
leal 0x1(%rsi), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andl $0x80000000, %esi       # imm = 0x80000000
orl %r8d, %esi
movl %esi, 0x4(%r12)
movl %edx, %edx
leaq (%rdx,%rdx,2), %rsi
movl %ecx, %edx
leaq (%rdx,%rdx,2), %r9
movq 0x10(%rdi,%r9,8), %r8
movq %r8, 0x10(%rax,%rsi,8)
movups (%rdi,%r9,8), %xmm0
movups %xmm0, (%rax,%rsi,8)
testq %rbx, %rbx
je 0xf7a80
movq (%rbx), %rsi
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rsi
jne 0xf7a5f
leaq (%rsi,%rsi), %rcx
testq %rsi, %rsi
cmoveq %r14, %rcx
movq %rcx, 0x8(%rbx)
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq %r15, %rdi
movq %rax, 0x10(%rbx)
movl 0x4(%rsp), %edx
movq (%rbx), %rsi
movl %edx, %ecx
leaq (%rdx,%rdx,2), %rdx
leaq 0x1(%rsi), %r8
movq %r8, (%rbx)
leaq (%rsi,%rsi,2), %rsi
movq 0x10(%rdi,%rdx,8), %r8
movq %r8, 0x10(%rax,%rsi,8)
movups (%rdi,%rdx,8), %xmm0
movups %xmm0, (%rax,%rsi,8)
incl %ecx
movl %ecx, 0x4(%rsp)
cmpq %rcx, 0x10(%rsp)
ja 0xf7995
movq 0x28(%r12), %rdi
callq 0x2220
movq $0x0, 0x28(%r12)
andb $0x7f, 0x7(%r12)
movq %r12, %rdi
callq 0xa0a7d
movq %r15, %rdi
movq 0x60(%rsp), %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0xf7adf
movq 0x8(%rcx), %rcx
xorl %edx, %edx
cmpl $-0x2, (%rcx,%rdx,4)
jg 0xf7ad5
movl $0xffffffff, (%rcx,%rdx,4) # imm = 0xFFFFFFFF
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0xf7ac8
cmpq $0x0, 0x128(%rsp)
jne 0xf7af7
movq 0x20(%rsp), %rdi
callq 0xa0761
movq %r15, %rdi
callq 0x2220
movq 0x8(%rsp), %rdi
callq 0x2220
movq %r13, %rdi
callq 0x2220
movq 0x140(%rsp), %rdi
callq 0x2220
movq 0x100(%rsp), %rdi
callq 0x2220
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq