// File: 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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq 0x48(%rbp), %rax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movl %r9d, -0x54(%rbp)
movl $0xffffffff, -0x84(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb0(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0xc8(%rbp)
movl $0xffffffff, -0xc0(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0xe0(%rbp)
movl $0xffffffff, -0xd8(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x100(%rbp)
movq $0x0, -0x108(%rbp)
movq $0x0, -0x110(%rbp)
movq $0x0, -0x118(%rbp)
movq $0x0, -0x130(%rbp)
movq $0x0, -0x138(%rbp)
movq $0x0, -0x128(%rbp)
movq $0x0, -0x148(%rbp)
movq $0x0, -0x150(%rbp)
movq $0x0, -0x140(%rbp)
movq $0x0, -0x168(%rbp)
movq $0x0, -0x170(%rbp)
movq $0x0, -0x160(%rbp)
movq $0x0, -0x188(%rbp)
movq $0x0, -0x190(%rbp)
movq $0x0, -0x180(%rbp)
movq $0x0, -0x1a8(%rbp)
movq $0x0, -0x1b0(%rbp)
movq $0x0, -0x1a0(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x153369
movq -0x30(%rbp), %rax
movq %rax, -0x118(%rbp)
jmp 0x1533bf
movq -0x38(%rbp), %rdi
callq 0xe5910
movq %rax, -0x118(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x118(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1533bd
movq -0x118(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
movb $0x0, 0x4(%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x153380
jmp 0x1533bf
movq -0x118(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xa8(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0xa8(%rbp), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1534d9
movl -0x5c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x6c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x153427
jmp 0x1534cb
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x153445
jmp 0x1534cb
cmpl $0x0, 0x28(%rbp)
je 0x153465
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
movzbl 0x4(%rax,%rcx,8), %eax
cmpl $0x1, %eax
jne 0x153465
jmp 0x1534cb
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
movq -0xb0(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x1534c9
movq -0xb0(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x60(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, -0x70(%rbp)
movq -0x50(%rbp), %rdi
movl -0x70(%rbp), %esi
movl -0x6c(%rbp), %edx
movq -0x38(%rbp), %rax
movq 0x20(%rax), %r8
movl -0x70(%rbp), %eax
shlq $0x3, %rax
addq %rax, %r8
addq $0x4, %r8
movl $0x1, %ecx
callq 0xd0e20
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x15346c
jmp 0x1534cb
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1533d8
movq -0xa8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x15455e
movl -0x5c(%rbp), %eax
shrl %eax
movl %eax, -0x6c(%rbp)
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x6c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x153526
jmp 0x154550
cmpl $0x0, 0x28(%rbp)
je 0x153549
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x6c(%rbp), %ecx
movzbl 0x4(%rax,%rcx,8), %eax
cmpl $0x1, %eax
jne 0x153549
jmp 0x154550
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x6c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x153577
jmp 0x154550
movq -0xb0(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x1535a2
movq -0xb0(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
je 0x1535a2
movq -0xb0(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x1535a7
jmp 0x154550
movq -0xa8(%rbp), %rdi
movl -0x5c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x0, %eax
je 0x1535c4
jmp 0x154550
movl -0x5c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1535e1
movq -0xb0(%rbp), %rax
movl 0x4(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x1535f1
movq -0xb0(%rbp), %rax
movl 0x8(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x74(%rbp)
movq -0x40(%rbp), %rax
movl -0x74(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x110(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
movl $0xffffffff, -0x90(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x108(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
movq -0x110(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x1537ea
movq -0x110(%rbp), %rax
movq (%rax), %rax
movl -0x60(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x118(%rbp), %r8
movq -0x38(%rbp), %r9
movl -0x54(%rbp), %eax
movl 0x10(%rbp), %r10d
movl %r10d, -0x1c4(%rbp)
movl -0x74(%rbp), %r13d
movl -0x6c(%rbp), %r12d
movl 0x18(%rbp), %r10d
movq 0x48(%rbp), %r11
movq %r11, -0x1c0(%rbp)
leaq -0x190(%rbp), %r15
xorl %r11d, %r11d
leaq -0x94(%rbp), %r14
leaq -0x9c(%rbp), %rbx
leaq -0x98(%rbp), %r11
movl %eax, (%rsp)
movl -0x1c4(%rbp), %eax
movl %eax, 0x8(%rsp)
movq -0x1c0(%rbp), %rax
movl %r13d, 0x10(%rsp)
movl %r12d, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movl %r10d, 0x48(%rsp)
movl $0x1, 0x50(%rsp)
movq %rax, 0x58(%rsp)
callq 0x1522e0
cmpl $0x0, %eax
je 0x1537da
movl $0x0, -0xa0(%rbp)
movl -0x98(%rbp), %eax
cmpl -0x90(%rbp), %eax
jae 0x153749
movl $0x1, -0xa0(%rbp)
jmp 0x15379d
movl -0x98(%rbp), %eax
cmpl -0x90(%rbp), %eax
jne 0x15379b
movl -0x94(%rbp), %eax
cmpl -0x88(%rbp), %eax
jbe 0x153771
movl $0x1, -0xa0(%rbp)
jmp 0x153799
movl -0x94(%rbp), %eax
cmpl -0x88(%rbp), %eax
jne 0x153797
movl -0x9c(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jbe 0x153797
movl $0x1, -0xa0(%rbp)
jmp 0x153799
jmp 0x15379b
jmp 0x15379d
cmpl $0x0, -0xa0(%rbp)
je 0x1537d8
movl -0x98(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x108(%rbp)
jmp 0x1537da
jmp 0x1537dc
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x15363a
cmpl $0x0, -0x88(%rbp)
jbe 0x15454e
movq -0x108(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x118(%rbp), %r8
movq -0x38(%rbp), %r9
movl -0x54(%rbp), %eax
movl 0x10(%rbp), %r10d
movl %r10d, -0x1d8(%rbp)
movl -0x74(%rbp), %r10d
movl %r10d, -0x1d4(%rbp)
movl -0x6c(%rbp), %r13d
movl 0x18(%rbp), %r10d
movq 0x48(%rbp), %r11
movq %r11, -0x1d0(%rbp)
leaq -0x190(%rbp), %r12
leaq -0x1b0(%rbp), %r15
leaq -0x94(%rbp), %r14
leaq -0x9c(%rbp), %rbx
leaq -0x98(%rbp), %r11
movl %eax, (%rsp)
movl -0x1d8(%rbp), %eax
movl %eax, 0x8(%rsp)
movl -0x1d4(%rbp), %eax
movl %eax, 0x10(%rsp)
movq -0x1d0(%rbp), %rax
movl %r13d, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movl %r10d, 0x48(%rsp)
movl $0x1, 0x50(%rsp)
movq %rax, 0x58(%rsp)
callq 0x1522e0
cmpq $0x1, -0x1b0(%rbp)
jae 0x1538c6
jmp 0x154550
movq -0x1a0(%rbp), %rax
movq -0x1b0(%rbp), %rcx
subq $0x1, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xe0(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd8(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xd0(%rbp)
movl $0x0, -0x60(%rbp)
movq $0x0, -0x150(%rbp)
movq -0x118(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %r8
movl -0x54(%rbp), %r9d
movl 0x10(%rbp), %r15d
movl -0xd8(%rbp), %r14d
movq -0x180(%rbp), %rbx
movq -0x190(%rbp), %rax
movl %eax, %r11d
leaq -0x60(%rbp), %r10
leaq -0xf8(%rbp), %rax
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl $0x1, 0x30(%rsp)
callq 0x169940
cmpl $0x0, %eax
je 0x153a34
jmp 0x153988
movq -0x150(%rbp), %rax
cmpq -0x148(%rbp), %rax
jne 0x1539ec
cmpq $0x0, -0x148(%rbp)
je 0x1539b5
movq -0x148(%rbp), %rax
shlq %rax
movq %rax, -0x1e0(%rbp)
jmp 0x1539c3
movl $0x2, %eax
movq %rax, -0x1e0(%rbp)
jmp 0x1539c3
movq -0x1e0(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rdi
imulq $0x18, -0x148(%rbp), %rsi
callq 0x2360
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq -0x150(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x150(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xf8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xf0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xe8(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x153911
movq -0x118(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x140(%rbp), %rdx
movq -0x150(%rbp), %rax
movl %eax, %ecx
callq 0x1516a0
cmpl $0x0, 0x28(%rbp)
je 0x153b82
movl $0x0, -0x80(%rbp)
movl $0xffffffff, -0x84(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x150(%rbp), %rax
jae 0x153afa
movq -0x140(%rbp), %rax
movl -0x60(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
movl -0xbc(%rbp), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x153ac3
jmp 0x153aec
movl -0xbc(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl -0x80(%rbp), %eax
jbe 0x153aea
movl -0xbc(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x80(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x84(%rbp)
jmp 0x153aec
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x153a76
cmpl $-0x1, -0x84(%rbp)
jne 0x153b08
jmp 0x154550
movq -0x140(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x118(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0xc0(%rbp), %edx
callq 0x1515e0
movl %eax, -0x7c(%rbp)
cmpl $-0x1, -0x7c(%rbp)
jne 0x153b60
jmp 0x154550
movq -0xa8(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x0, %eax
je 0x153b80
jmp 0x154550
jmp 0x153b82
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x1b0(%rbp), %rax
jae 0x153f30
movq -0x1a0(%rbp), %rax
movl -0x60(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xe0(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd8(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0x50(%rbp), %rdi
movl -0xd8(%rbp), %esi
shrl %esi
leaq -0x64(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0xd3d50
cmpl $0x1, -0x68(%rbp)
je 0x153bef
cmpl $-0x1, -0x68(%rbp)
jne 0x153bf6
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
movl -0x64(%rbp), %eax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
shlq $0x20, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movl -0xd8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x170(%rbp), %rax
cmpq -0x168(%rbp), %rax
jne 0x153c94
cmpq $0x0, -0x168(%rbp)
je 0x153c5a
movq -0x168(%rbp), %rax
shlq %rax
movq %rax, -0x1e8(%rbp)
jmp 0x153c68
movl $0x2, %eax
movq %rax, -0x1e8(%rbp)
jmp 0x153c68
movq -0x1e8(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x160(%rbp), %rdi
movq -0x168(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0x160(%rbp)
movq -0x120(%rbp), %rdx
movq -0x160(%rbp), %rax
movq -0x170(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x170(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xd8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
orl $0x0, %edx
movl %edx, (%rax,%rcx,8)
movq -0x48(%rbp), %rax
movl -0xd8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
movl -0xd8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x8(%rax)
movq -0x38(%rbp), %rdi
movq -0x118(%rbp), %rsi
movl -0x5c(%rbp), %edx
movl -0xd8(%rbp), %ecx
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movq -0x50(%rbp), %r11
movl -0x54(%rbp), %r10d
movl 0x10(%rbp), %eax
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x150b30
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x54(%rbp), %ecx
movl 0x10(%rbp), %r8d
movq -0xe0(%rbp), %rax
shrq $0x20, %rax
movl %eax, %r9d
movl -0xd8(%rbp), %r10d
leaq -0xc8(%rbp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xe9560
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x153df1
cmpq $0x0, -0x130(%rbp)
je 0x153dba
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x1f0(%rbp)
jmp 0x153dc8
movl $0x2, %eax
movq %rax, -0x1f0(%rbp)
jmp 0x153dc8
movq -0x1f0(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
imulq $0x18, -0x130(%rbp), %rsi
callq 0x2360
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x138(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xc8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xc0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x54(%rbp), %ecx
movl 0x10(%rbp), %r8d
movl -0xd8(%rbp), %r9d
xorl $0x1, %r9d
movq -0xe0(%rbp), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movl %eax, %r10d
leaq -0xc8(%rbp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xe9560
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x153edd
cmpq $0x0, -0x130(%rbp)
je 0x153ea6
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x1f8(%rbp)
jmp 0x153eb4
movl $0x2, %eax
movq %rax, -0x1f8(%rbp)
jmp 0x153eb4
movq -0x1f8(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
imulq $0x18, -0x130(%rbp), %rsi
callq 0x2360
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x138(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xc8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xc0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x153f22
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x153b89
cmpl $0x0, 0x28(%rbp)
je 0x15422a
movq -0x140(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x118(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0xc0(%rbp), %edx
callq 0x1515e0
movl %eax, -0x7c(%rbp)
cmpl $-0x1, -0x7c(%rbp)
jne 0x153f92
jmp 0x154550
jmp 0x153f94
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x153ff8
cmpq $0x0, -0x130(%rbp)
je 0x153fc1
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x200(%rbp)
jmp 0x153fcf
movl $0x2, %eax
movq %rax, -0x200(%rbp)
jmp 0x153fcf
movq -0x200(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
imulq $0x18, -0x130(%rbp), %rsi
callq 0x2360
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x138(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xc8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xc0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xbc(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x78(%rbp)
movq -0xa8(%rbp), %rdi
movl -0x5c(%rbp), %esi
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl -0x7c(%rbp), %ecx
movl -0x78(%rbp), %r8d
movw -0xb8(%rbp), %ax
shrw $0xe, %ax
andw $0x1, %ax
movb %al, %r9b
movb -0xb6(%rbp), %r10b
movw -0xb8(%rbp), %ax
shrw $0xf, %ax
movzbl %r9b, %r9d
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x141be0
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x54(%rbp), %ecx
movl 0x10(%rbp), %r8d
movl -0xc0(%rbp), %r9d
xorl $0x1, %r9d
movq -0xc8(%rbp), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movl %eax, %r10d
leaq -0xc8(%rbp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xe9560
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x154160
cmpq $0x0, -0x130(%rbp)
je 0x154129
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x208(%rbp)
jmp 0x154137
movl $0x2, %eax
movq %rax, -0x208(%rbp)
jmp 0x154137
movq -0x208(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
imulq $0x18, -0x130(%rbp), %rsi
callq 0x2360
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x138(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xc8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xc0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xbc(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x78(%rbp)
movq -0xa8(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl $0x1, %esi
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x7c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl -0x5c(%rbp), %ecx
xorl $0x1, %ecx
movl -0x78(%rbp), %r8d
movw -0xb8(%rbp), %ax
shrw $0xe, %ax
andw $0x1, %ax
movb %al, %r9b
movb -0xb6(%rbp), %r10b
movw -0xb8(%rbp), %ax
shrw $0xf, %ax
movzbl %r9b, %r9d
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x141be0
jmp 0x15454c
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x150(%rbp), %rax
jae 0x15454a
movq -0x140(%rbp), %rax
movl -0x60(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
movl -0xbc(%rbp), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x154285
jmp 0x15453c
movq -0x118(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0xc0(%rbp), %edx
callq 0x1515e0
movl %eax, -0x7c(%rbp)
cmpl $-0x1, -0x7c(%rbp)
jne 0x1542a9
jmp 0x15453c
jmp 0x1542ab
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x15430f
cmpq $0x0, -0x130(%rbp)
je 0x1542d8
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x210(%rbp)
jmp 0x1542e6
movl $0x2, %eax
movq %rax, -0x210(%rbp)
jmp 0x1542e6
movq -0x210(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
imulq $0x18, -0x130(%rbp), %rsi
callq 0x2360
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x138(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xc8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xc0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xbc(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x78(%rbp)
movq -0xa8(%rbp), %rdi
movl -0x5c(%rbp), %esi
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl -0x7c(%rbp), %ecx
movl -0x78(%rbp), %r8d
movw -0xb8(%rbp), %ax
shrw $0xe, %ax
andw $0x1, %ax
movb %al, %r9b
movb -0xb6(%rbp), %r10b
movw -0xb8(%rbp), %ax
shrw $0xf, %ax
movzbl %r9b, %r9d
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x141be0
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x54(%rbp), %ecx
movl 0x10(%rbp), %r8d
movl -0xc0(%rbp), %r9d
xorl $0x1, %r9d
movq -0xc8(%rbp), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movl %eax, %r10d
leaq -0xc8(%rbp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xe9560
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x154477
cmpq $0x0, -0x130(%rbp)
je 0x154440
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x218(%rbp)
jmp 0x15444e
movl $0x2, %eax
movq %rax, -0x218(%rbp)
jmp 0x15444e
movq -0x218(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
imulq $0x18, -0x130(%rbp), %rsi
callq 0x2360
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x138(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xc8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xc0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0xbc(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x78(%rbp)
movq -0xa8(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl $0x1, %esi
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x7c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl -0x5c(%rbp), %ecx
xorl $0x1, %ecx
movl -0x78(%rbp), %r8d
movw -0xb8(%rbp), %ax
shrw $0xe, %ax
andw $0x1, %ax
movb %al, %r9b
movb -0xb6(%rbp), %r10b
movw -0xb8(%rbp), %ax
shrw $0xf, %ax
movzbl %r9b, %r9d
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x141be0
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x154231
jmp 0x15454c
jmp 0x15454e
jmp 0x154550
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1534f4
movq $0x0, -0x1b8(%rbp)
cmpl $0x0, 0x20(%rbp)
je 0x154884
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x138(%rbp), %rax
jae 0x1545cf
movq -0x38(%rbp), %rdi
callq 0xd4050
movq %rax, -0x1b8(%rbp)
movq -0x128(%rbp), %rcx
movl -0x60(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x1b8(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x15457a
cmpq $0x0, -0x138(%rbp)
je 0x15460e
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x38(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rdi
callq 0xcdd10
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x38(%rbp), %rdx
xorl %ecx, %ecx
callq 0x150830
movq -0x38(%rbp), %rdi
movq 0x40(%rbp), %rsi
callq 0x151020
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x138(%rbp), %rax
jae 0x15471a
movq -0x128(%rbp), %rax
movl -0x60(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x5c(%rbp)
movq -0x128(%rbp), %rax
movl -0x60(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x7c(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x154693
jmp 0x15470c
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x7c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1546af
jmp 0x15470c
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x5c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1546de
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x7c(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1546de
jmp 0x15470c
movq -0x38(%rbp), %rdi
movl -0x5c(%rbp), %esi
movl -0x7c(%rbp), %edx
movl $0x1, %ecx
callq 0xd6530
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl $0x1, %esi
movl -0x5c(%rbp), %edx
xorl $0x1, %edx
movl $0x1, %ecx
callq 0xd6530
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x154635
movq -0x38(%rbp), %rdi
callq 0xcdd10
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x170(%rbp), %rax
jae 0x154882
movq -0x160(%rbp), %rax
movl -0x60(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
shll %eax
movl %eax, -0x7c(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x7c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x154787
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x0, %eax
je 0x154787
jmp 0x154874
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x7c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x1547be
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x0, %eax
je 0x1547be
jmp 0x154874
movl -0x7c(%rbp), %eax
shrl %eax
movl %eax, -0x7c(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x7c(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
orl $0x80000000, %edx       # imm = 0x80000000
movl %edx, (%rax,%rcx,8)
movq -0x48(%rbp), %rax
movl -0x7c(%rbp), %ecx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, (%rax)
movq -0x160(%rbp), %rax
movl -0x60(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x15483e
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x160(%rbp), %rcx
movl -0x60(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
jmp 0x154872
movq -0x50(%rbp), %rdi
movq -0x160(%rbp), %rax
movl -0x60(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %esi
movq -0x160(%rbp), %rax
movl -0x60(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xd0e20
jmp 0x154874
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x15472a
jmp 0x154884
cmpl $0x0, 0x28(%rbp)
je 0x154acd
cmpq $0x0, 0x38(%rbp)
je 0x154963
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x170(%rbp), %rax
jae 0x154961
movq -0x160(%rbp), %rax
movl -0x60(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x7c(%rbp)
movq 0x38(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x154932
movq 0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1548f1
movq 0x38(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x220(%rbp)
jmp 0x1548ff
movl $0x2, %eax
movq %rax, -0x220(%rbp)
jmp 0x1548ff
movq -0x220(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x38(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq 0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x7c(%rbp), %edx
movq 0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x154953
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x1548a0
jmp 0x154963
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x138(%rbp), %rax
jae 0x154a8c
movq -0x38(%rbp), %rdi
callq 0xd4050
movq %rax, -0x1b8(%rbp)
movq -0x128(%rbp), %rcx
movl -0x60(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x1b8(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, 0x30(%rbp)
je 0x154a7c
jmp 0x1549c5
movq 0x30(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x154a33
movq 0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1549f5
movq 0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x228(%rbp)
jmp 0x154a03
movl $0x2, %eax
movq %rax, -0x228(%rbp)
jmp 0x154a03
movq -0x228(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x30(%rbp), %rax
imulq $0x18, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq 0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x128(%rbp), %rcx
movl -0x60(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq 0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rbp), %rsi
movq (%rsi), %rdx
movq %rdx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x154a7c
jmp 0x154a7e
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x15496a
cmpq $0x0, -0x138(%rbp)
je 0x154acb
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x38(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rdi
callq 0xcdd10
jmp 0x154acd
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x154b19
movq -0x50(%rbp), %rdi
movl -0x5c(%rbp), %esi
leaq -0x6c(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0xd3d50
cmpl $0x1, -0x68(%rbp)
jne 0x154b0c
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x5c(%rbp), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
jmp 0x154b0e
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x154ad4
cmpq $0x0, -0x30(%rbp)
jne 0x154b2c
movq -0x118(%rbp), %rdi
callq 0xcd6f0
movq -0x128(%rbp), %rdi
callq 0x2210
movq -0x140(%rbp), %rdi
callq 0x2210
movq -0x160(%rbp), %rdi
callq 0x2210
movq -0x180(%rbp), %rdi
callq 0x2210
movq -0x1a0(%rbp), %rdi
callq 0x2210
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)