// File: /workspace/github_cpp_makefile_star2_O2/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 $0x158, %rsp            # imm = 0x158
movq %r9, 0x90(%rsp)
movq %r8, %r12
movq %rcx, 0x78(%rsp)
movq %rdx, 0x68(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x20(%rsp)
orl $-0x1, 0x28(%rsp)
movq %rsi, %r13
andq $0x0, 0x130(%rsp)
andq $0x0, 0x100(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0xf0(%rsp)
testq %rdi, %rdi
movq %rdi, 0x110(%rsp)
je 0xb6716
movq 0x18(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
jmp 0xb674a
movq %r13, %rdi
callq 0x76d91
movq %rax, 0x18(%rsp)
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl 0x14(%rdx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
jae 0xb6745
movq 0x20(%rdx), %rcx
movb $0x0, 0x4(%rcx,%rax,8)
incq %rax
jmp 0xb6729
movq %rdx, 0x10(%rsp)
xorl %r14d, %r14d
pushq $0x1
popq %rbp
movq 0x10(%rsp), %rax
movl 0x14(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %r14
jae 0xb67da
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rbx
imulq $0x28, %r14, %rax
cmpl $0x0, 0xc(%rbx,%rax)
je 0xb6799
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
cmpl $0x0, (%rcx,%r14,8)
js 0xb6799
cmpl $0x0, 0x1a8(%rsp)
je 0xb679e
cmpb $0x1, 0x4(%rcx,%r14,8)
jne 0xb679e
incq %r14
jmp 0xb6750
addq %rax, %rbx
xorl %r15d, %r15d
movl %r15d, (%rsp)
movl 0x10(%rbx), %eax
cmpq %rax, %r15
jae 0xb6799
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
shrq $0x21, %rsi
movq 0x20(%r13), %rax
leaq (%rax,%rsi,8), %r8
addq $0x4, %r8
movq %r12, %rdi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x6ab56
incq %r15
jmp 0xb67a4
addl %ecx, %ecx
xorl %ebx, %ebx
pushq $-0x1
popq %rax
movl %eax, 0xa4(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x58(%rsp)
xorl %r15d, %r15d
xorl %esi, %esi
movq $0x0, 0x98(%rsp)
movq $0x0, 0xd8(%rsp)
movq $0x0, 0xb8(%rsp)
movq %r13, 0xb0(%rsp)
movq 0x1b0(%rsp), %r14
movq 0x1b8(%rsp), %rbp
movq $0x0, 0xe8(%rsp)
movq 0x10(%rsp), %rdi
movq %rcx, 0x50(%rsp)
movq %rdi, 0x10(%rsp)
cmpl %ecx, %esi
je 0xb749b
movl %esi, %r14d
shrl %r14d
movq 0x20(%rdi), %rax
cmpl $0x0, (%rax,%r14,8)
js 0xb6881
cmpl $0x0, 0x1a8(%rsp)
je 0xb688b
cmpb $0x1, 0x4(%rax,%r14,8)
jne 0xb688b
movq 0x1b0(%rsp), %r14
jmp 0xb68fd
movq %rbx, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rbx
imulq $0x28, %r14, %rax
cmpl $0x0, 0xc(%rbx,%rax)
je 0xb68f0
addq %rax, %rbx
cmpl $0x0, (%rbx)
js 0xb68f0
cmpl $-0x1, 0x4(%rbx)
je 0xb68f0
cmpl $-0x1, 0x8(%rbx)
je 0xb68f0
movq %rax, 0xd0(%rsp)
movl %esi, %ebp
xorl %edx, %edx
callq 0xc2e7a
testl %eax, %eax
je 0xb6904
movq 0x1b0(%rsp), %r14
movq 0x8(%rsp), %rbx
movq 0x50(%rsp), %rcx
movl %ebp, %esi
movq 0x1b8(%rsp), %rbp
movq 0x10(%rsp), %rdi
jmp 0xb68fd
movq 0x1b0(%rsp), %r14
movq 0x8(%rsp), %rbx
incl %esi
jmp 0xb6856
movq %r15, 0x40(%rsp)
movq %r12, 0x88(%rsp)
leaq 0x4(%rbx), %rax
addq $0x8, %rbx
movl %ebp, 0x4(%rsp)
testb $0x1, %bpl
cmovneq %rax, %rbx
movl (%rbx), %eax
movl %eax, %ecx
xorl $0x1, %ecx
movq %rcx, 0x70(%rsp)
shrl %eax
imulq $0x18, %rax, %rbp
addq 0x68(%rsp), %rbp
xorl %edx, %edx
movl $0x0, 0x60(%rsp)
xorl %ebx, %ebx
pushq $-0x1
popq %r12
xorl %r15d, %r15d
movl %edx, (%rsp)
cmpl 0xc(%rbp), %edx
jae 0xb6a42
movl %edx, %eax
movq %r13, %r9
imulq $0x28, %rax, %r13
addq (%rbp), %r13
subq $0x8, %rsp
movq %r13, %rdi
movq 0x70(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0x20(%rsp), %r8
pushq $0x1
movl 0x1a8(%rsp), %eax
pushq %rax
leaq 0xdc(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xd4(%rsp), %rax
pushq %rax
pushq $0x0
leaq 0x158(%rsp), %rax
pushq %rax
pushq %r14
pushq 0xb8(%rsp)
movl 0x1e0(%rsp), %eax
pushq %rax
pushq 0xe8(%rsp)
callq 0xb5cb7
addq $0x60, %rsp
testl %eax, %eax
je 0xb6a20
movl 0xc4(%rsp), %eax
cmpl %r12d, %eax
jae 0xb69fe
movl 0xac(%rsp), %ecx
movl %ecx, 0x60(%rsp)
movl 0xa8(%rsp), %ecx
jmp 0xb6a28
jne 0xb6a20
movl 0xac(%rsp), %edx
movl 0xa8(%rsp), %ecx
cmpl 0x60(%rsp), %edx
jbe 0xb6a1a
movl %edx, 0x60(%rsp)
jmp 0xb6a28
jne 0xb6a20
cmpl %ebx, %ecx
ja 0xb6a28
movl %ebx, %ecx
movl %r12d, %eax
movq %r15, %r13
movl (%rsp), %edx
incl %edx
movl %ecx, %ebx
movl %eax, %r12d
movq %r13, %r15
movq 0xb0(%rsp), %r13
jmp 0xb694f
cmpl $0x0, 0x60(%rsp)
je 0xb6c42
subq $0x8, %rsp
movq %r15, %rdi
movq 0x70(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x90(%rsp), %r12
movq %r12, %rcx
movq 0x20(%rsp), %r8
movq %r13, %r9
pushq $0x1
movl 0x1a8(%rsp), %eax
pushq %rax
leaq 0xdc(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xd4(%rsp), %rax
pushq %rax
leaq 0x120(%rsp), %rax
pushq %rax
leaq 0x158(%rsp), %rax
pushq %rax
pushq %r14
pushq 0xb8(%rsp)
movl 0x1e0(%rsp), %eax
pushq %rax
pushq 0xe8(%rsp)
callq 0xb5cb7
addq $0x60, %rsp
movq 0xf0(%rsp), %rax
testq %rax, %rax
movq 0x1b8(%rsp), %rbp
je 0xb6ccf
movq 0x100(%rsp), %rcx
imulq $0x18, %rax, %rax
movl -0x10(%rcx,%rax), %ebx
andl $0x0, (%rsp)
xorl %r14d, %r14d
movq $0x0, 0x70(%rsp)
movq 0x40(%rsp), %r15
movl 0x120(%rsp), %eax
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq %r13, %rsi
movq 0x70(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq %r12, %r8
movq 0x98(%rsp), %r9
pushq $0x1
leaq 0x150(%rsp), %r10
pushq %r10
leaq 0x18(%rsp), %r10
pushq %r10
pushq %rax
pushq 0x158(%rsp)
pushq %rbx
movl 0x1c8(%rsp), %eax
pushq %rax
callq 0xc47e9
addq $0x40, %rsp
testl %eax, %eax
je 0xb6bc5
movq 0xe8(%rsp), %rcx
cmpq %rcx, 0x70(%rsp)
jne 0xb6b95
movq %r15, %rdi
leaq (%rcx,%rcx), %r15
testq %rcx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %r15
imulq $0x18, %r15, %rsi
callq 0x2370
movq %r15, %rcx
movq %rax, %r15
movq %rcx, 0xe8(%rsp)
incq 0x70(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x10(%r15,%r14)
movups 0x140(%rsp), %xmm0
movups %xmm0, (%r15,%r14)
addq $0x18, %r14
jmp 0xb6b0a
movq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq 0x70(%rsp), %rcx
callq 0xb5486
cmpl $0x0, 0x1a8(%rsp)
movq 0x8(%rsp), %rbx
je 0xb6cf4
xorl %eax, %eax
xorl %ecx, %ecx
pushq $-0x1
popq %rsi
movq 0x1b0(%rsp), %r14
movl %eax, %edx
cmpq %rdx, 0x70(%rsp)
jbe 0xb6c66
movl %esi, %r9d
imulq $0x18, %rdx, %rdx
movups (%r15,%rdx), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x10(%r15,%rdx), %rdx
movq %rdx, 0x30(%rsp)
movl 0x2c(%rsp), %edx
testl %edx, %edx
setns %dil
cmpl %ecx, %edx
seta %r8b
movl %eax, %esi
testb %r8b, %dil
jne 0xb6c3c
movl %ecx, %edx
movl %r9d, %esi
incl %eax
movl %edx, %ecx
jmp 0xb6bfc
movq 0x88(%rsp), %r12
movq 0x1b0(%rsp), %r14
movq 0x40(%rsp), %r15
movq 0x8(%rsp), %rbx
movq 0x1b8(%rsp), %rbp
jmp 0xb6ce1
movl %eax, (%rsp)
cmpl $-0x1, %esi
je 0xb7159
movl %esi, 0xa4(%rsp)
movl %esi, %eax
imulq $0x18, %rax, %rax
movups (%r15,%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x10(%r15,%rax), %rax
movq %rax, 0x30(%rsp)
movl 0x28(%rsp), %edx
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0xb542c
cmpl $-0x1, %eax
je 0xb73da
xorl $0x1, %eax
movq 0x10(%rsp), %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0xc2e7a
testl %eax, %eax
je 0xb6cf4
movq 0x1b0(%rsp), %r14
jmp 0xb73da
movq 0x1b0(%rsp), %r14
movq 0x40(%rsp), %r15
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rcx
movl 0x4(%rsp), %esi
jmp 0xb68fd
movq 0x58(%rsp), %rax
imulq $0x18, %rax, %rcx
movq %rcx, 0x60(%rsp)
leaq 0x2(,%rax,2), %rdx
movq 0xb8(%rsp), %rax
leaq (,%rax,8), %rax
movq %rax, 0x118(%rsp)
xorl %r14d, %r14d
xorl %eax, %eax
movq %r15, 0x40(%rsp)
movl 0x4(%rsp), %esi
movq 0x58(%rsp), %rcx
addq %r14, %rcx
movq %rcx, 0x80(%rsp)
movl %eax, (%rsp)
movl %eax, %ecx
cmpq %rcx, 0xf0(%rsp)
movq %rbx, 0x8(%rsp)
movq %r14, 0xc8(%rsp)
jbe 0xb6fe5
movq %rdx, 0xe0(%rsp)
movq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
movl 0x8(%rax,%rcx), %r15d
movl %r15d, %ebx
shrl %ebx
cmpq %rbx, (%r12)
jbe 0xb6d99
movq 0x88(%rsp), %rdx
movq 0x8(%rdx), %rdx
movl (%rdx,%rbx,4), %r12d
testl %r12d, %r12d
jns 0xb6d9f
pushq $-0x1
popq %rdx
movl %edx, %r12d
movq (%rax,%rcx), %r13
movq 0xd8(%rsp), %rax
cmpq %rax, 0xb8(%rsp)
jne 0xb6de2
leaq (%rax,%rax), %rbp
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbp
leaq (,%rbp,8), %rsi
movq 0x98(%rsp), %rdi
callq 0x2370
movq %rbp, 0xd8(%rsp)
jmp 0xb6dea
movq 0x98(%rsp), %rax
shlq $0x20, %r12
orq %rbx, %r12
movq %rax, 0x98(%rsp)
movq 0x118(%rsp), %rcx
addq %rcx, %rax
movq %r12, (%rax,%r14,4)
movq 0xb0(%rsp), %rdi
movq 0x20(%rdi), %rax
andl $0x7fffffff, (%rax,%rbx,8) # imm = 0x7FFFFFFF
imulq $0xc, %rbx, %rax
movq 0x78(%rsp), %rbx
andb $0x7f, 0x3(%rbx,%rax)
movb $0x0, 0x8(%rbx,%rax)
subq $0x8, %rsp
movq 0x20(%rsp), %rsi
movl 0xc(%rsp), %edx
movl %r15d, %ecx
movq 0x70(%rsp), %r14
movq %r14, %r8
movq %rbx, %r9
movl 0x198(%rsp), %eax
pushq %rax
movq 0xa0(%rsp), %rbp
pushq %rbp
movq 0xa0(%rsp), %r12
pushq %r12
callq 0xb4dd7
addq $0x20, %rsp
shrq $0x20, %r13
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
movl 0x190(%rsp), %r8d
movl %r13d, %r9d
leaq 0x20(%rsp), %rax
pushq %rax
pushq %r15
callq 0x79204
popq %rcx
popq %rdx
movq 0x48(%rsp), %rax
cmpq %rax, 0x80(%rsp)
jne 0xb6ec3
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
imulq $0x18, %rbx, %rsi
movq 0x8(%rsp), %rdi
callq 0x2370
movq %rax, %r14
jmp 0xb6ecb
movq 0x8(%rsp), %r14
movq %rax, %rbx
movq 0x58(%rsp), %rax
movq 0xc8(%rsp), %rcx
leaq (%rax,%rcx), %rbp
incq %rbp
movq 0x30(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rax, 0x10(%r14,%rcx)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%r14,%rcx)
xorl $0x1, %r15d
xorl $0x1, %r13d
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x90(%rsp), %rcx
movl 0x190(%rsp), %r8d
movl %r15d, %r9d
leaq 0x20(%rsp), %rax
pushq %rax
pushq %r13
callq 0x79204
popq %rcx
popq %rdx
cmpq %rbx, %rbp
jne 0xb6f78
testq %rbp, %rbp
movq 0xe0(%rsp), %rbx
movq %rbx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x48(%rsp)
imulq $0x18, %rcx, %rsi
movq %r14, %rdi
callq 0x2370
movq %rbx, %rdx
movq %rax, %rbx
movq 0xb0(%rsp), %r13
movq 0x40(%rsp), %r15
movl 0x4(%rsp), %esi
movq 0x1b8(%rsp), %rbp
jmp 0xb6fa1
movq %rbx, 0x48(%rsp)
movq 0xb0(%rsp), %r13
movq 0x40(%rsp), %r15
movq %r14, %rbx
movl 0x4(%rsp), %esi
movq 0x1b8(%rsp), %rbp
movq 0xe0(%rsp), %rdx
movq 0x30(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rax, 0x28(%rbx,%rcx)
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x18(%rbx,%rcx)
movl (%rsp), %eax
incl %eax
movq 0xc8(%rsp), %r14
addq $0x2, %r14
addq $0x30, %rcx
movq %rcx, 0x60(%rsp)
addq $0x4, %rdx
incq 0xb8(%rsp)
jmp 0xb6d30
cmpl $0x0, 0x1a8(%rsp)
je 0xb7168
movl 0xa4(%rsp), %eax
imulq $0x18, %rax, %rax
movups (%r15,%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x10(%r15,%rax), %rax
movq %rax, 0x30(%rsp)
movl 0x28(%rsp), %edx
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0xb542c
cmpl $-0x1, %eax
movq 0x1b0(%rsp), %r14
je 0xb73c8
movl %eax, %r15d
movq %rbx, %rdi
movq 0x48(%rsp), %rax
cmpq %rax, 0x80(%rsp)
jne 0xb7066
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
imulq $0x18, %rbx, %rsi
callq 0x2370
movq %rax, %rdi
movq %rbx, %rax
movq %rdi, 0x8(%rsp)
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rbx
subq %rax, %rbx
addq 0xc8(%rsp), %rbx
movq 0x30(%rsp), %rax
movq 0x60(%rsp), %rdx
movq %rax, 0x10(%rdi,%rdx)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rdi,%rdx)
movl 0x2c(%rsp), %r8d
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %r8d
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xd0(%rsp), %rdx
movl (%rax,%rdx), %edx
andl %ecx, %edx
movzwl 0x30(%rsp), %eax
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x32(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %esi
movl %r15d, %ecx
pushq %rax
pushq %r10
callq 0xac072
popq %rcx
popq %rdx
movl 0x24(%rsp), %eax
movl 0x28(%rsp), %r9d
xorl $0x1, %r9d
xorl $0x1, %eax
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x90(%rsp), %rcx
movl 0x190(%rsp), %r8d
leaq 0x20(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0x79204
popq %rcx
popq %rdx
incq %rbx
jne 0xb73e8
movq 0x48(%rsp), %rax
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
imulq $0x18, %rbx, %rsi
movq 0x8(%rsp), %rdi
callq 0x2370
movq %rax, %rdx
movq %rbx, 0x48(%rsp)
jmp 0xb73ed
pushq $-0x1
popq %rax
movl %eax, 0xa4(%rsp)
jmp 0xb73da
movl %esi, %eax
xorl $0x1, %eax
movl %eax, 0x88(%rsp)
xorl %ebx, %ebx
movq 0x1b0(%rsp), %r14
movq 0x50(%rsp), %rcx
movq 0x10(%rsp), %rdi
movl %ebx, (%rsp)
movl %ebx, %eax
cmpq %rax, 0x70(%rsp)
jbe 0xb73b6
imulq $0x18, %rax, %rax
movups (%r15,%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x10(%r15,%rax), %rax
movq %rax, 0x30(%rsp)
cmpl $0x0, 0x2c(%rsp)
js 0xb73af
movl 0x28(%rsp), %edx
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0xb542c
cmpl $-0x1, %eax
je 0xb7209
movl %eax, %r15d
movq 0x48(%rsp), %rax
cmpq %rax, 0x80(%rsp)
jne 0xb7221
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
imulq $0x18, %rbx, %rsi
movq 0x8(%rsp), %rdi
callq 0x2370
movq %rax, %rbp
movq %rbx, 0x48(%rsp)
jmp 0xb722b
movq 0x40(%rsp), %r15
movq 0x50(%rsp), %rcx
movl 0x4(%rsp), %esi
movq 0x10(%rsp), %rdi
jmp 0xb73af
movq 0x8(%rsp), %rbp
movq %rax, 0x48(%rsp)
movq 0x80(%rsp), %rax
leaq 0x1(%rax), %rbx
imulq $0x18, %rax, %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rbp,%rax)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rbp,%rax)
movl 0x2c(%rsp), %r8d
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %r8d
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xd0(%rsp), %rdx
movl (%rax,%rdx), %edx
andl %ecx, %edx
movzwl 0x30(%rsp), %eax
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x32(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %esi
movl %r15d, %ecx
pushq %rax
pushq %r10
callq 0xac072
popq %rcx
popq %rdx
movl 0x24(%rsp), %eax
movl 0x28(%rsp), %r9d
xorl $0x1, %r9d
xorl $0x1, %eax
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x90(%rsp), %rcx
movl 0x190(%rsp), %r8d
leaq 0x20(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0x79204
popq %rcx
popq %rdx
movq %rbx, 0x8(%rsp)
movq 0x48(%rsp), %rax
cmpq %rax, %rbx
jne 0xb7312
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
imulq $0x18, %r14, %rsi
movq %rbp, %rdi
callq 0x2370
movq %rax, %rbp
movq %r14, 0x48(%rsp)
movq 0x1b0(%rsp), %r14
addq $0x2, 0x80(%rsp)
imulq $0x18, 0x8(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rbp,%rax)
movaps 0x20(%rsp), %xmm0
movq %rbp, 0x8(%rsp)
movups %xmm0, (%rbp,%rax)
movl 0x2c(%rsp), %r8d
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl %edi, %r8d
movl %r15d, %esi
xorl $0x1, %esi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
shrl %r15d
imulq $0x28, %r15, %rcx
movl (%rax,%rcx), %edx
andl %edi, %edx
movzwl 0x30(%rsp), %eax
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x32(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0x10(%rsp), %rdi
movl 0x88(%rsp), %ecx
pushq %rax
pushq %r10
callq 0xac072
popq %rcx
popq %rdx
movl (%rsp), %ebx
movq 0x40(%rsp), %r15
movq 0x1b8(%rsp), %rbp
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rcx
movl 0x4(%rsp), %esi
incl %ebx
jmp 0xb7188
movq 0x80(%rsp), %rax
movq %rax, 0x58(%rsp)
jmp 0xb68f8
movq 0x80(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x40(%rsp), %r15
movq 0x50(%rsp), %rcx
movl 0x4(%rsp), %esi
jmp 0xb68e9
movq 0x8(%rsp), %rdx
movq %rdx, 0x8(%rsp)
movq 0x58(%rsp), %rax
movq 0xc8(%rsp), %rcx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, 0x58(%rsp)
movq 0x30(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rax, 0x28(%rdx,%rcx)
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x18(%rdx,%rcx)
movl 0x2c(%rsp), %r8d
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl %edi, %r8d
movl %r15d, %esi
xorl $0x1, %esi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
shrl %r15d
imulq $0x28, %r15, %rcx
movl (%rax,%rcx), %edx
andl %edi, %edx
movl 0x4(%rsp), %ebx
movl %ebx, %ecx
xorl $0x1, %ecx
movzwl 0x30(%rsp), %eax
movl %eax, %r9d
shrl $0xe, %r9d
movzbl 0x32(%rsp), %r10d
shrl $0xf, %eax
andl $0x1, %r9d
movq 0x10(%rsp), %r15
movq %r15, %rdi
pushq %rax
pushq %r10
callq 0xac072
movq %r15, %rdi
movl %ebx, %esi
addq $0x10, %rsp
movq 0x40(%rsp), %r15
movq 0x8(%rsp), %rbx
movq 0x50(%rsp), %rcx
jmp 0xb68fd
movq %rbx, 0x8(%rsp)
movq %r15, 0x40(%rsp)
cmpl $0x0, 0x1a0(%rsp)
je 0xb76ad
xorl %eax, %eax
movq 0x8(%rsp), %rbx
movq 0x58(%rsp), %r15
movl %eax, (%rsp)
movl %eax, %eax
cmpq %rax, %r15
jbe 0xb74ed
movq %r13, %rdi
callq 0x6c45d
movl (%rsp), %ecx
imulq $0x18, %rcx, %rdx
movq 0x10(%rbx,%rdx), %rsi
movq %rsi, 0x10(%rax)
movups (%rbx,%rdx), %xmm0
movups %xmm0, (%rax)
leal 0x1(%rcx), %eax
jmp 0xb74bf
testq %r15, %r15
je 0xb750d
movq 0x28(%r13), %rdi
callq 0x2220
andq $0x0, 0x28(%r13)
andb $0x7f, 0x7(%r13)
movq %r13, %rdi
callq 0x694eb
xorl %ebx, %ebx
movq 0x68(%rsp), %rdi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0xb4c38
movq %r13, %rdi
movq 0x1c0(%rsp), %rsi
callq 0xb5068
pushq $0x1
popq %rbp
movl %ebx, (%rsp)
movl %ebx, %eax
cmpq %rax, 0x58(%rsp)
jbe 0xb75c5
imulq $0x18, %rax, %rcx
movq 0x8(%rsp), %rsi
movq (%rsi,%rcx), %r15
movq 0x20(%r13), %rax
movq %r15, %rdx
shrq $0x21, %rdx
cmpl $0x0, (%rax,%rdx,8)
js 0xb75b6
movl 0x8(%rsi,%rcx), %edx
movl %edx, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0xb75b6
shrq $0x20, %r15
movq 0x30(%r13), %rax
movq %rdx, %r13
xorq $0x1, %r13
cmpb $0x0, (%rax,%r15)
je 0xb758a
cmpb $0x0, (%rax,%r13)
jne 0xb75b6
movq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %ecx
callq 0x6db50
xorl $0x1, %r15d
movq %rbx, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x6db50
movl (%rsp), %ebx
incl %ebx
movq 0xb0(%rsp), %r13
jmp 0xb7531
movq %r13, %rdi
callq 0x694eb
xorl %eax, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x1b8(%rsp), %rbp
movl %eax, (%rsp)
movl %eax, %eax
cmpq %rax, 0xb8(%rsp)
jbe 0xb76ad
movq 0x98(%rsp), %rcx
movq (%rcx,%rax,8), %r15
movq 0x20(%r13), %rax
movl %r15d, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl (%rax,%r14,8), %ecx
testl %ecx, %ecx
js 0xb764e
addl %r15d, %r15d
movq %r13, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0xc2e7a
testl %eax, %eax
jne 0xb769b
movq 0x20(%r13), %rax
movl (%rax,%r14,8), %ecx
testl %ecx, %ecx
js 0xb764e
orl $0x1, %r15d
movq %r13, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0xc2e7a
testl %eax, %eax
jne 0xb769b
movq 0x20(%r13), %rax
movl (%rax,%r14,8), %ecx
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, (%rax,%r14,8)
imulq $0xc, %r14, %rax
movq 0x78(%rsp), %rcx
orb $-0x80, 0x3(%rcx,%rax)
movl (%rsp), %eax
movq 0x98(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
cmpq %rbx, %rdx
jne 0xb768e
movq 0x8(%r12), %rax
movl %esi, %ecx
orl $-0x1, (%rax,%rcx,4)
jmp 0xb769b
movq %r12, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6ab56
movl (%rsp), %eax
incl %eax
movq 0x1b0(%rsp), %r14
jmp 0xb75dc
cmpl $0x0, 0x1a8(%rsp)
movq 0x40(%rsp), %r15
je 0xb77e2
testq %rbp, %rbp
je 0xb7727
xorl %eax, %eax
movl %eax, (%rsp)
movl %eax, %eax
cmpq %rax, 0xb8(%rsp)
jbe 0xb7727
movq 0x98(%rsp), %rcx
movl (%rcx,%rax,8), %ebx
movq (%rbp), %rcx
movq 0x10(%rbp), %rax
cmpq 0x8(%rbp), %rcx
jne 0xb7715
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%rbp)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%rbp)
movq (%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbp)
movl %ebx, (%rax,%rcx,4)
movl (%rsp), %eax
incl %eax
jmp 0xb76c7
xorl %ecx, %ecx
movq 0x8(%rsp), %rbx
movq 0x58(%rsp), %rbp
movl %ecx, (%rsp)
movl %ecx, %eax
cmpq %rax, %rbp
jbe 0xb77c2
movq %r13, %rdi
callq 0x6c45d
movl (%rsp), %ecx
imulq $0x18, %rcx, %rdx
movups (%rbx,%rdx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx,%rdx), %rdx
movq %rdx, 0x10(%rax)
testq %r14, %r14
je 0xb77bb
movq (%r14), %rdx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rdx
jne 0xb779a
leaq (%rdx,%rdx), %rcx
testq %rdx, %rdx
pushq $0x2
popq %rdx
cmoveq %rdx, %rcx
movq %rcx, 0x8(%r14)
imulq $0x18, %rcx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movl (%rsp), %ecx
movq (%r14), %rdx
imulq $0x18, %rcx, %rsi
leaq 0x1(%rdx), %rdi
movq %rdi, (%r14)
imulq $0x18, %rdx, %rdx
movq 0x10(%rbx,%rsi), %rdi
movq %rdi, 0x10(%rax,%rdx)
movups (%rbx,%rsi), %xmm0
movups %xmm0, (%rax,%rdx)
incl %ecx
jmp 0xb7733
testq %rbp, %rbp
je 0xb77e2
movq 0x28(%r13), %rdi
callq 0x2220
andq $0x0, 0x28(%r13)
andb $0x7f, 0x7(%r13)
movq %r13, %rdi
callq 0x694eb
movq (%r12), %rax
xorl %ecx, %ecx
movq 0x98(%rsp), %rbx
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0xb780a
movq 0x8(%r12), %rdx
cmpl $-0x2, (%rdx,%rcx,4)
jg 0xb7806
orl $-0x1, (%rdx,%rcx,4)
incl %ecx
jmp 0xb77f0
cmpq $0x0, 0x110(%rsp)
jne 0xb781f
movq 0x18(%rsp), %rdi
callq 0x6921d
movq 0x8(%rsp), %rdi
callq 0x2220
movq %r15, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2220
movq 0x130(%rsp), %rdi
callq 0x2220
movq 0x100(%rsp), %rdi
callq 0x2220
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq