// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: rescue_contained_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*)
void rescue_contained_reads_aggressive(ma_ug_t *i_ug, asg_t *r_g, ma_hit_t_alloc* sources, ma_sub_t *coverage_cut,
R_to_U* ruIndex, int max_hang, int min_ovlp, uint32_t 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)
{
    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(r_g);
        for (v = 0; v < ug->g->n_seq; v++)
        {
            ug->g->seq[v].c = PRIMARY_LABLE;
        }
    }
    nsg = ug->g;
    
    for (v = 0; v < nsg->n_seq; v++)
    {
        uId = v;
        nsu = &(ug->u.a[uId]);
        if(nsu->m == 0) continue;
        if(nsg->seq[v].del) continue;
        if(is_primary_check && nsg->seq[v].c==ALTER_LABLE) continue;
        for (k = 0; k < nsu->n; k++)
        {
            rId = nsu->a[k]>>33;
            set_R_to_U(ruIndex, rId, uId, 1, &(r_g->seq[rId].c));
        }
    }




    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;
        ///we probably don't need this line
        ///if(get_real_length(nsg, v^1, 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_contained_reads_chain(h, sources, coverage_cut, ruIndex, ug, r_g, 
            max_hang, min_ovlp, endRid, uId, &chain_buffer, NULL, &ava_cur, &test_oLen, 
            &ava_chainLen, chainLenThres, 1))
            {
                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_contained_reads_chain(h_max, sources, coverage_cut, ruIndex, ug, r_g, 
            max_hang, min_ovlp, endRid, uId, &chain_buffer, &chain_edges, &ava_cur, &test_oLen, 
            &ava_chainLen, chainLenThres, 1);
            if(chain_edges.a.n < 1) continue;
            ///the last cantained 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, r_g, 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);
                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
                r_g->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(r_g, 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);
                }
            }
            
        }
    }

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

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

        lable_all_bubbles(r_g, b_mask_t);

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

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

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


        // 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(!r_g->seq[w>>1].del && get_real_length(r_g, w, NULL)!=0) continue;
            if(!r_g->seq[w>>1].del && get_real_length(r_g, (w^1), NULL)!=0) continue;
            w=w>>1;
            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, NULL);
        }
    }

    ///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(r_g);
            *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(r_g->idx);
            r_g->idx = 0;
            r_g->is_srt = 0;
            asg_cleanup(r_g);
        }
    }


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


    if(i_ug == NULL) ma_ug_destroy(ug);
    kv_destroy(new_edges);
    kv_destroy(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 $0x248, %rsp            # imm = 0x248
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 0x122a55
movq -0x30(%rbp), %rax
movq %rax, -0x118(%rbp)
jmp 0x122aab
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 0x122aa9
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 0x122a6c
jmp 0x122aab
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 0x122bc5
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 0x122b13
jmp 0x122bb7
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x122b31
jmp 0x122bb7
cmpl $0x0, 0x28(%rbp)
je 0x122b51
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
movzbl 0x4(%rax,%rcx,8), %eax
cmpl $0x1, %eax
jne 0x122b51
jmp 0x122bb7
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
movq -0xb0(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x122bb5
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 0x122b58
jmp 0x122bb7
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x122ac4
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 0x123c09
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 0x122c12
jmp 0x123bfb
cmpl $0x0, 0x28(%rbp)
je 0x122c35
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x6c(%rbp), %ecx
movzbl 0x4(%rax,%rcx,8), %eax
cmpl $0x1, %eax
jne 0x122c35
jmp 0x123bfb
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 0x122c63
jmp 0x123bfb
movq -0xb0(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x122c8e
movq -0xb0(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
je 0x122c8e
movq -0xb0(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x122c93
jmp 0x123bfb
movq -0xa8(%rbp), %rdi
movl -0x5c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x0, %eax
je 0x122cb0
jmp 0x123bfb
movl -0x5c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x122ccd
movq -0xb0(%rbp), %rax
movl 0x4(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x122cdd
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 0x122ebf
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), %r13d
movl -0x74(%rbp), %r12d
movl -0x6c(%rbp), %r15d
movl 0x18(%rbp), %r10d
movl %r10d, -0x1bc(%rbp)
leaq -0x190(%rbp), %r14
xorl %r10d, %r10d
leaq -0x94(%rbp), %rbx
leaq -0x9c(%rbp), %r11
leaq -0x98(%rbp), %r10
movl %eax, (%rsp)
movl -0x1bc(%rbp), %eax
movl %r13d, 0x8(%rsp)
movl %r12d, 0x10(%rsp)
movl %r15d, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
movq %r11, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movl %eax, 0x48(%rsp)
movl $0x1, 0x50(%rsp)
callq 0x151d50
cmpl $0x0, %eax
je 0x122eaf
movl $0x0, -0xa0(%rbp)
movl -0x98(%rbp), %eax
cmpl -0x90(%rbp), %eax
jae 0x122e1e
movl $0x1, -0xa0(%rbp)
jmp 0x122e72
movl -0x98(%rbp), %eax
cmpl -0x90(%rbp), %eax
jne 0x122e70
movl -0x94(%rbp), %eax
cmpl -0x88(%rbp), %eax
jbe 0x122e46
movl $0x1, -0xa0(%rbp)
jmp 0x122e6e
movl -0x94(%rbp), %eax
cmpl -0x88(%rbp), %eax
jne 0x122e6c
movl -0x9c(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jbe 0x122e6c
movl $0x1, -0xa0(%rbp)
jmp 0x122e6e
jmp 0x122e70
jmp 0x122e72
cmpl $0x0, -0xa0(%rbp)
je 0x122ead
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 0x122eaf
jmp 0x122eb1
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x122d26
cmpl $0x0, -0x88(%rbp)
jbe 0x123bf9
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, -0x1c4(%rbp)
movl -0x74(%rbp), %r13d
movl -0x6c(%rbp), %r12d
movl 0x18(%rbp), %r10d
movl %r10d, -0x1c0(%rbp)
leaq -0x190(%rbp), %r15
leaq -0x1b0(%rbp), %r14
leaq -0x94(%rbp), %rbx
leaq -0x9c(%rbp), %r11
leaq -0x98(%rbp), %r10
movl %eax, (%rsp)
movl -0x1c4(%rbp), %eax
movl %eax, 0x8(%rsp)
movl -0x1c0(%rbp), %eax
movl %r13d, 0x10(%rsp)
movl %r12d, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
movq %r11, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movl %eax, 0x48(%rsp)
movl $0x1, 0x50(%rsp)
callq 0x151d50
cmpq $0x1, -0x1b0(%rbp)
jae 0x122f84
jmp 0x123bfb
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 0x1230f2
jmp 0x123046
movq -0x150(%rbp), %rax
cmpq -0x148(%rbp), %rax
jne 0x1230aa
cmpq $0x0, -0x148(%rbp)
je 0x123073
movq -0x148(%rbp), %rax
shlq %rax
movq %rax, -0x1d0(%rbp)
jmp 0x123081
movl $0x2, %eax
movq %rax, -0x1d0(%rbp)
jmp 0x123081
movq -0x1d0(%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 0x122fcf
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 0x123240
movl $0x0, -0x80(%rbp)
movl $0xffffffff, -0x84(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x150(%rbp), %rax
jae 0x1231b8
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 0x123181
jmp 0x1231aa
movl -0xbc(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl -0x80(%rbp), %eax
jbe 0x1231a8
movl -0xbc(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x80(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x84(%rbp)
jmp 0x1231aa
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x123134
cmpl $-0x1, -0x84(%rbp)
jne 0x1231c6
jmp 0x123bfb
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 0x12321e
jmp 0x123bfb
movq -0xa8(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x0, %eax
je 0x12323e
jmp 0x123bfb
jmp 0x123240
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x1b0(%rbp), %rax
jae 0x1235db
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
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 0x12333f
cmpq $0x0, -0x168(%rbp)
je 0x123305
movq -0x168(%rbp), %rax
shlq %rax
movq %rax, -0x1d8(%rbp)
jmp 0x123313
movl $0x2, %eax
movq %rax, -0x1d8(%rbp)
jmp 0x123313
movq -0x1d8(%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 0x12349c
cmpq $0x0, -0x130(%rbp)
je 0x123465
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x1e0(%rbp)
jmp 0x123473
movl $0x2, %eax
movq %rax, -0x1e0(%rbp)
jmp 0x123473
movq -0x1e0(%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 0x123588
cmpq $0x0, -0x130(%rbp)
je 0x123551
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x1e8(%rbp)
jmp 0x12355f
movl $0x2, %eax
movq %rax, -0x1e8(%rbp)
jmp 0x12355f
movq -0x1e8(%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 0x1235cd
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x123247
cmpl $0x0, 0x28(%rbp)
je 0x1238d5
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 0x12363d
jmp 0x123bfb
jmp 0x12363f
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x1236a3
cmpq $0x0, -0x130(%rbp)
je 0x12366c
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x1f0(%rbp)
jmp 0x12367a
movl $0x2, %eax
movq %rax, -0x1f0(%rbp)
jmp 0x12367a
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)
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 0x12380b
cmpq $0x0, -0x130(%rbp)
je 0x1237d4
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x1f8(%rbp)
jmp 0x1237e2
movl $0x2, %eax
movq %rax, -0x1f8(%rbp)
jmp 0x1237e2
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)
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 0x123bf7
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x150(%rbp), %rax
jae 0x123bf5
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 0x123930
jmp 0x123be7
movq -0x118(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0xc0(%rbp), %edx
callq 0x1515e0
movl %eax, -0x7c(%rbp)
cmpl $-0x1, -0x7c(%rbp)
jne 0x123954
jmp 0x123be7
jmp 0x123956
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x1239ba
cmpq $0x0, -0x130(%rbp)
je 0x123983
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x200(%rbp)
jmp 0x123991
movl $0x2, %eax
movq %rax, -0x200(%rbp)
jmp 0x123991
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 0x123b22
cmpq $0x0, -0x130(%rbp)
je 0x123aeb
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x208(%rbp)
jmp 0x123af9
movl $0x2, %eax
movq %rax, -0x208(%rbp)
jmp 0x123af9
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
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x1238dc
jmp 0x123bf7
jmp 0x123bf9
jmp 0x123bfb
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x122be0
movq $0x0, -0x1b8(%rbp)
cmpl $0x0, 0x20(%rbp)
je 0x123eed
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x138(%rbp), %rax
jae 0x123c7a
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 0x123c25
cmpq $0x0, -0x138(%rbp)
je 0x123cb9
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 0x123dc5
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 0x123d3e
jmp 0x123db7
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 0x123d5a
jmp 0x123db7
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x5c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x123d89
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 0x123d89
jmp 0x123db7
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 0x123ce0
movq -0x38(%rbp), %rdi
callq 0xcdd10
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x170(%rbp), %rax
jae 0x123eeb
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 0x123e32
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x0, %eax
je 0x123e32
jmp 0x123edd
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 0x123e66
movq -0x38(%rbp), %rdi
movl -0x7c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x0, %eax
je 0x123e66
jmp 0x123edd
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 -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
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x123dd5
jmp 0x123eed
cmpl $0x0, 0x28(%rbp)
je 0x124136
cmpq $0x0, 0x38(%rbp)
je 0x123fcc
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x170(%rbp), %rax
jae 0x123fca
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 0x123f9b
movq 0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x123f5a
movq 0x38(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x210(%rbp)
jmp 0x123f68
movl $0x2, %eax
movq %rax, -0x210(%rbp)
jmp 0x123f68
movq -0x210(%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 0x123fbc
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x123f09
jmp 0x123fcc
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpq -0x138(%rbp), %rax
jae 0x1240f5
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 0x1240e5
jmp 0x12402e
movq 0x30(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x12409c
movq 0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x12405e
movq 0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x218(%rbp)
jmp 0x12406c
movl $0x2, %eax
movq %rax, -0x218(%rbp)
jmp 0x12406c
movq -0x218(%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 0x1240e5
jmp 0x1240e7
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x123fd3
cmpq $0x0, -0x138(%rbp)
je 0x124134
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 0x124136
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x124182
movq -0x50(%rbp), %rdi
movl -0x5c(%rbp), %esi
leaq -0x6c(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0xd3d50
cmpl $0x1, -0x68(%rbp)
jne 0x124175
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x5c(%rbp), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
jmp 0x124177
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x12413d
cmpq $0x0, -0x30(%rbp)
jne 0x124195
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 $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)