// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: rescue_bubbles_by_missing_ovlp(ma_ug_t*, asg_t*, ma_hit_t_alloc*, ma_sub_t*, R_to_U*, int, int, unsigned int, unsigned int, unsigned int, bubble_type*, bub_label_t*)
void rescue_bubbles_by_missing_ovlp(ma_ug_t *i_u_g, 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 beg_idx, uint32_t occ, bubble_type* bub, 
bub_label_t* b_mask_t)
{
    asg_t* nsg = NULL;
    uint32_t beg_utg, sink_utg, *a = NULL, n, i, bub_i, k_i, k_v, k, uId, endRid, is_Unitig, v, w;
    uint64_t l_bub, m_bub, r_bub/**, bub_0, bub_1**/;
    ma_ug_t* ug = i_u_g;
    ma_utg_t *nsu = NULL, *u = NULL;
    uint8_t* expect_vis = NULL; CALLOC(expect_vis, r_g->n_seq);
    asg_arc_t t, r_edge;

    for (v = 0; v < ug->u.n; v++) ug->g->seq[v].c = PRIMARY_LABLE;
    
    kvec_t(asg_arc_t) new_edges;
    kv_init(new_edges);

    kvec_t(asg_arc_t) rbub_edges;
    kv_init(rbub_edges);


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

    for (i = 0; i < bub->b_ug->u.n; i++)
    {
        u = &(bub->b_ug->u.a[i]);
        if(u->n < 3) continue; ///should be at least 3
        for (bub_i = 1; bub_i+1 < u->n; bub_i++)
        {
            m_bub = u->a[bub_i]>>33; l_bub = r_bub = (uint64_t)-1;
            if(m_bub < beg_idx || m_bub >= beg_idx + occ) continue;
            l_bub = u->a[bub_i-1]>>33;
            r_bub = u->a[bub_i+1]>>33;

            set_rtg_flag_by_bubble(bub, ug, r_g, l_bub, expect_vis, 1);
            set_rtg_flag_by_bubble(bub, ug, r_g, r_bub, expect_vis, 1);
            set_rtg_flag_by_bubble(bub, ug, r_g, m_bub, expect_vis, 1);

            get_bubbles(bub, m_bub, &beg_utg, &sink_utg, &a, &n, NULL);

            for (k_i = 0; k_i < n; k_i++)
            {
                uId = a[k_i]>>1;
                nsu = &(ug->u.a[uId]);
                if(nsu->m == 0) continue;
                for (k_v = 0; k_v < 2; k_v++)
                {
                    v = (uId<<1) + k_v;
                    if(get_real_length(nsg, v, NULL) != 0) continue;

                    if(v&1)
                    {
                        endRid = nsu->start^1;
                    }
                    else
                    {
                        endRid = nsu->end^1;
                    }


                    k = 0; rbub_edges.n = 0;
                    while(get_edge2existing_node_advance_by_broken_bub(ug, r_g, sources, coverage_cut, 
                        ruIndex, expect_vis, max_hang, min_ovlp, endRid, &k, &r_edge, 1))
                    {
                        kv_push(asg_arc_t, rbub_edges, r_edge);
                    }

                    if(rbub_edges.n > 0)
                    {
                        ///need to do transitive reduction
                        ///note here is different to standard transitive reduction
                        minor_transitive_reduction_r_g(r_g, rbub_edges.a, rbub_edges.n);
                        for (k = 0; k < rbub_edges.n; k++)
                        {
                            t = rbub_edges.a[k];
                            if(t.del) continue;
                    
                            kv_push(asg_arc_t, new_edges, t);
                            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);
                        }
                    }
                }
            }
            

            set_rtg_flag_by_bubble(bub, ug, r_g, l_bub, expect_vis, 0);
            set_rtg_flag_by_bubble(bub, ug, r_g, r_bub, expect_vis, 0);
            set_rtg_flag_by_bubble(bub, ug, r_g, m_bub, expect_vis, 0);
        }
    }

    asg_arc_t* p = NULL;
    for (k = 0; k < new_edges.n; k++)
    {
        p = asg_arc_pushp(r_g);
        *p = new_edges.a[k];
    }
    if(new_edges.n != 0)
    {
        free(r_g->idx);
        r_g->idx = 0;
        r_g->is_srt = 0;
        asg_cleanup(r_g);
        asg_symm(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);
    asg_symm(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;
    }
    // fprintf(stderr, "M::%s has done!\n", __func__);
    // print_bubble_filling_status(ug, r_g, ruIndex, bub, beg_idx, occ, new_edges.a, new_edges.n);

    kv_destroy(new_edges);
    kv_destroy(rbub_edges);
    free(expect_vis);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %r9d, %ebx
movq %r8, 0x48(%rsp)
movq %rcx, %rbp
movq %rdx, %r12
movq %rdi, %r14
movq $0x0, 0xd0(%rsp)
movq %rsi, 0x18(%rsp)
movl 0x14(%rsi), %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl $0x1, %esi
callq 0x2120
movq %rax, 0x68(%rsp)
movq (%r14), %rax
movq %r14, 0x30(%rsp)
movq 0x18(%r14), %rdi
testq %rax, %rax
je 0xfab95
movq 0x20(%rdi), %rcx
xorl %edx, %edx
movb $0x0, 0x4(%rcx,%rdx,8)
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0xfab86
movq %rdi, 0x50(%rsp)
movl 0x14(%rdi), %eax
testl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %ebx, 0x44(%rsp)
movq %r12, 0x70(%rsp)
je 0xfac43
xorl %r14d, %r14d
movq 0x30(%rsp), %rcx
movq 0x10(%rcx), %rcx
leaq (%r14,%r14,4), %rdx
cmpl $0x0, 0xc(%rcx,%rdx,8)
je 0xfac2f
movq 0x50(%rsp), %rsi
movq 0x20(%rsi), %rsi
cmpl $0x0, (%rsi,%r14,8)
js 0xfac2f
leaq (%rcx,%rdx,8), %rbx
cmpl $0x0, 0x10(%rbx)
je 0xfac2f
xorl %r15d, %r15d
movq 0x48(%rsp), %r12
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
shrq $0x21, %rsi
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
leaq (%rax,%rsi,8), %r8
addq $0x4, %r8
movq %r12, %rdi
movl %r14d, %edx
movl $0x1, %ecx
callq 0xa27e9
incq %r15
movl 0x10(%rbx), %eax
cmpq %rax, %r15
jb 0xfabea
movq 0x50(%rsp), %rax
movl 0x14(%rax), %eax
movq 0x70(%rsp), %r12
incq %r14
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %r14
jb 0xfabb4
movq 0x190(%rsp), %rax
movq 0xc0(%rax), %rax
movq (%rax), %rcx
movb $0x1, %dl
movl %edx, 0x58(%rsp)
xorl %edx, %edx
testq %rcx, %rcx
je 0xfb62e
movl 0x180(%rsp), %r8d
movl %r8d, %r9d
addl 0x188(%rsp), %r8d
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x38(%rsp)
xorl %r15d, %r15d
movq $0x0, 0xc8(%rsp)
xorl %r10d, %r10d
movl %esi, 0x40(%rsp)
movq %rbp, 0x28(%rsp)
movq %r8, 0xe8(%rsp)
movq %r9, 0xe0(%rsp)
movq 0x10(%rax), %rsi
movq %rdx, 0xd8(%rsp)
leaq (%rdx,%rdx,4), %rdi
movl 0x10(%rsi,%rdi,8), %edx
cmpl $0x3, %edx
jb 0xfb51b
leaq (%rsi,%rdi,8), %rdi
movl $0x2, %r11d
movl $0x1, %ebx
movq %rdi, 0xf0(%rsp)
movq 0x18(%rdi), %rax
movq (%rax,%rbx,8), %r14
shrq $0x21, %r14
cmpq %r9, %r14
setb %cl
cmpq %r8, %r14
setae %sil
orb %cl, %sil
jne 0xfb4f8
movq %r10, 0x20(%rsp)
movq %rbx, 0x108(%rsp)
movq -0x8(%rax,%rbx,8), %rcx
shrq $0x21, %rcx
movq %r11, 0x110(%rsp)
movq (%rax,%r11,8), %r13
shrq $0x21, %r13
movq 0x190(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %r14, 0xa8(%rsp)
movq 0x18(%rsp), %r14
movq %r14, %rdx
movq %rcx, 0xf8(%rsp)
movq 0x68(%rsp), %rbx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xf7b3a
movq 0x190(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
movq %r13, 0x100(%rsp)
movl %r13d, %ecx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xf7b3a
movq 0x190(%rsp), %r13
movq %r13, %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
movq 0xa8(%rsp), %r14
movl %r14d, %ecx
movq %rbx, %r8
movl $0x1, %r9d
callq 0xf7b3a
subq $0x8, %rsp
movq %r13, %rdi
movq %r14, %rsi
leaq 0x13c(%rsp), %rdx
leaq 0x138(%rsp), %rcx
leaq 0xd8(%rsp), %r8
leaq 0x6c(%rsp), %r9
pushq $0x0
callq 0x13df01
addq $0x10, %rsp
movl 0x64(%rsp), %eax
testl %eax, %eax
je 0xfb44c
xorl %edx, %edx
movq 0x50(%rsp), %r9
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movq 0x20(%rsp), %r11
movq 0xd0(%rsp), %rcx
movq %rdx, 0xb8(%rsp)
movl (%rcx,%rdx,4), %ebx
movl %ebx, %edx
shrl %edx
movq 0x30(%rsp), %rcx
movq 0x10(%rcx), %rcx
leaq (%rdx,%rdx,4), %rdx
cmpl $0x0, 0xc(%rcx,%rdx,8)
je 0xfb434
leaq (%rcx,%rdx,8), %rax
movq %rax, 0x128(%rsp)
andl $-0x2, %ebx
movb $0x1, %r14b
movl $0x8, %eax
xorl %ecx, %ecx
movq %rbx, 0xc0(%rsp)
orq %rbx, %rcx
movq 0x28(%r9), %rdx
movq (%rdx,%rcx,8), %rcx
movq %rcx, %rdx
andq %r10, %rdx
je 0xfaeb4
movq 0x8(%r9), %rsi
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,8), %rcx
addq $0xc, %rcx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
xorl %edi, %edi
movl (%rcx,%rsi), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %edi
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0xfae95
testl %edi, %edi
jne 0xfb416
movq 0x128(%rsp), %rcx
movl (%rcx,%rax), %ecx
movl %ecx, %eax
shrl %eax
leaq (%rax,%rax,2), %rax
movl 0xc(%r12,%rax,8), %edi
testl %edi, %edi
je 0xfb416
movl %r14d, 0x5c(%rsp)
leaq (%r12,%rax,8), %rax
xorq $0x1, %rcx
movq %rcx, 0x120(%rsp)
movq $0x0, 0x78(%rsp)
xorl %r12d, %r12d
movq %r11, 0x20(%rsp)
movq %r15, 0x10(%rsp)
movq %rax, 0x118(%rsp)
movq (%rax), %rcx
leaq 0x19a847(%rip), %rax    # 0x295758
movss 0x158(%rax), %xmm0
movl %edi, 0x8(%rsp)
movl %r12d, %eax
leaq (%rax,%rax,4), %r8
movl 0xc(%rcx,%r8,8), %r14d
leaq (%r14,%r14,2), %rsi
movl (%rbp,%rsi,4), %eax
testl %eax, %eax
js 0xfb036
movq 0x18(%rsp), %rdx
movq 0x20(%rdx), %rdx
cmpl $0x0, (%rdx,%r14,8)
js 0xfb036
leaq (%rcx,%r8,8), %rdx
leaq (,%rsi,4), %rsi
addq %rbp, %rsi
movl 0x4(%rsi), %edi
subl %eax, %edi
movq 0x18(%rdx), %rsi
testl %esi, %esi
js 0xfaf7c
movl 0x10(%rdx), %r11d
movl 0x14(%rdx), %r10d
subl %r10d, %edi
movl %edi, %r9d
movl %r11d, %edi
jmp 0xfaf8a
movl 0x10(%rdx), %r11d
movl 0x14(%rdx), %r10d
subl %r10d, %edi
movl %r11d, %r9d
movq (%rcx,%r8,8), %r8
movq %r8, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (,%rax,4), %rax
addq %rbp, %rax
movl 0x4(%rax), %r13d
movl (%rax), %eax
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
andl %ebx, %eax
subl %eax, %r13d
cmpl %r8d, %edi
movl %r8d, %eax
cmovll %edi, %eax
movl 0x8(%rdx), %r15d
movl %r13d, 0x60(%rsp)
subl %r15d, %r13d
cmpl %r9d, %r13d
movl %r9d, %ebx
cmovll %r13d, %ebx
movl 0x44(%rsp), %ebp
cmpl %ebp, %eax
jg 0xfb023
cmpl %ebp, %ebx
jg 0xfb023
movl %r15d, %ebp
subl %r8d, %ebp
xorps %xmm1, %xmm1
cvtsi2ss %rbp, %xmm1
addl %eax, %ebp
addl %ebx, %ebp
xorps %xmm2, %xmm2
cvtsi2ss %rbp, %xmm2
mulss %xmm0, %xmm2
ucomiss %xmm1, %xmm2
ja 0xfb023
subl %r11d, %r10d
xorps %xmm1, %xmm1
cvtsi2ss %r10, %xmm1
addl %eax, %ebx
addl %r10d, %ebx
xorps %xmm2, %xmm2
cvtsi2ss %rbx, %xmm2
mulss %xmm0, %xmm2
ucomiss %xmm1, %xmm2
jbe 0xfb047
movq 0x20(%rsp), %r11
movq 0x10(%rsp), %r15
movq 0x28(%rsp), %rbp
movl 0x8(%rsp), %edi
incl %r12d
cmpl %edi, %r12d
jb 0xfaf1d
jmp 0xfb26a
cmpl %r9d, %r13d
setl %al
setg %r11b
cmpl %edi, %r8d
setg %r13b
setl %r10b
orb %r11b, %r13b
cmpb $0x1, %r13b
jne 0xfb023
orb %al, %r10b
movq 0x20(%rsp), %r11
je 0xfb028
movl 0x170(%rsp), %eax
cmpl %eax, %ebp
jl 0xfb028
cmpl %eax, %ebx
movq 0x28(%rsp), %rbp
jl 0xfb162
movq %r11, %r13
addl %r15d, %r9d
movl 0x60(%rsp), %r10d
subl %r9d, %r10d
xorl %r9d, %r9d
movl %r8d, %ebx
subl %edi, %ebx
setle %al
cmovlel %r10d, %ebx
movl %esi, %r10d
shrl $0x10, %r10d
andl $0x4000, %r10d          # imm = 0x4000
movl 0x40(%rsp), %r11d
andl $0x3fff, %r11d          # imm = 0x3FFF
orl %r10d, %r11d
movzbl 0x21(%rdx), %r10d
shll $0xf, %r10d
orl %r11d, %r10d
movl %r10d, 0x40(%rsp)
testl %ebx, %ebx
js 0xfb16c
movb %al, %r9b
movq %r8, %r10
shrq $0x1f, %r10
andl $-0x2, %r10d
orq %r9, %r10
cmpl 0x120(%rsp), %r10d
movq 0x10(%rsp), %r15
movq %r13, %r11
jne 0xfb032
movl %r14d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0x48(%rsp), %r9
cmpq %rax, (%r9)
jbe 0xfb032
movq 0x8(%r9), %r9
movl (%r9,%rax,4), %r9d
cmpl $-0x2, %r9d
jg 0xfb032
movq %r10, 0xb0(%rsp)
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movq 0x30(%rsp), %r10
movq 0x18(%r10), %r10
movq 0x20(%r10), %r10
cmpl $0x0, (%r10,%r9,8)
js 0xfb032
movq 0x68(%rsp), %r9
cmpb $0x0, (%r9,%rax)
je 0xfb032
jmp 0xfb179
movq 0x10(%rsp), %r15
jmp 0xfb032
movq 0x10(%rsp), %r15
movq %r13, %r11
jmp 0xfb032
movl %ebx, 0x8(%rsp)
cmpl %edi, %r8d
setg %cl
testl %esi, %esi
setns %r15b
movb 0x20(%rdx), %bpl
movq 0x78(%rsp), %rbx
cmpq 0xa0(%rsp), %rbx
jne 0xfb1d7
movb %cl, 0xf(%rsp)
leaq (%rbx,%rbx), %rcx
testq %rbx, %rbx
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xa0(%rsp)
leaq (,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
movq 0x38(%rsp), %rdi
callq 0x2370
movb 0xf(%rsp), %cl
movq %r13, %r11
jmp 0xfb1dc
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rdi
xorb %cl, %r15b
movzbl %r15b, %ecx
leal (%rcx,%r14,2), %esi
shlq $0x20, %rdi
movl 0x8(%rsp), %edx
movl %edx, %ecx
orq %rdi, %rcx
movl 0x60(%rsp), %edi
subl %edx, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
incl %r12d
leaq (%rbx,%rbx,2), %rdx
incq %rbx
movq %rbx, 0x78(%rsp)
movq %rcx, (%rax,%rdx,8)
movl %esi, 0x8(%rax,%rdx,8)
movl %edi, 0xc(%rax,%rdx,8)
movl 0x40(%rsp), %ecx
movw %cx, 0x10(%rax,%rdx,8)
movb %bpl, 0x12(%rax,%rdx,8)
movb 0x9f(%rsp), %cl
movb %cl, 0x17(%rax,%rdx,8)
movl 0x9b(%rsp), %ecx
movq %rax, 0x38(%rsp)
movl %ecx, 0x13(%rax,%rdx,8)
movq 0x118(%rsp), %rax
movl 0xc(%rax), %edi
cmpl %edi, %r12d
movq 0x10(%rsp), %r15
movq 0x28(%rsp), %rbp
jb 0xfaf07
movq 0x78(%rsp), %r12
testq %r12, %r12
je 0xfb3f9
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl %r12d, %edx
movq %r11, %rbx
callq 0xf7c90
movq %rbx, %r11
movl $0x1, %r14d
xorl %eax, %eax
movl 0x44(%rsp), %ebp
movq 0xc8(%rsp), %r13
leaq (%rax,%rax,2), %rax
movq 0x38(%rsp), %rcx
movups (%rcx,%rax,8), %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0x10(%rcx,%rax,8), %rax
movq %rax, 0x90(%rsp)
cmpl $0x0, 0x8c(%rsp)
js 0xfb3cb
cmpq %r13, %r15
jne 0xfb300
leaq (%r15,%r15), %r13
testq %r15, %r15
movl $0x2, %eax
cmoveq %rax, %r13
leaq (,%r13,8), %rax
leaq (%rax,%rax,2), %rsi
movq %r11, %rdi
callq 0x2370
movq %rax, %r11
leaq 0x1(%r15), %rbx
leaq (%r15,%r15,2), %rax
movq 0x90(%rsp), %rcx
movq %rcx, 0x10(%r11,%rax,8)
movaps 0x80(%rsp), %xmm0
movups %xmm0, (%r11,%rax,8)
movl 0x84(%rsp), %eax
movl 0x88(%rsp), %r9d
xorl $0x1, %r9d
xorl $0x1, %eax
movq 0x70(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl %ebp, %ecx
movl 0x170(%rsp), %r8d
leaq 0x80(%rsp), %rdx
pushq %rdx
pushq %rax
movq %r11, %r12
callq 0xb3df3
addq $0x10, %rsp
cmpq %r13, %rbx
jne 0xfb3a1
movq %r15, %rbp
leaq (,%r13,2), %r15
testq %r13, %r13
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rsi
movq %r12, %rdi
callq 0x2370
movq %rax, %r11
movq %r15, %r13
movq %rbp, %r15
movl 0x44(%rsp), %ebp
jmp 0xfb3a4
movq %r12, %r11
addq $0x2, %r15
leaq (%rbx,%rbx,2), %rax
movq 0x90(%rsp), %rcx
movq %rcx, 0x10(%r11,%rax,8)
movaps 0x80(%rsp), %xmm0
movups %xmm0, (%r11,%rax,8)
movq 0x78(%rsp), %r12
movl %r14d, %eax
incl %r14d
cmpq %rax, %r12
ja 0xfb2a4
movq %r13, 0xc8(%rsp)
movq 0x70(%rsp), %r12
movq 0x50(%rsp), %r9
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movq 0x28(%rsp), %rbp
jmp 0xfb409
movq 0x70(%rsp), %r12
movq 0x50(%rsp), %r9
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movq 0xc0(%rsp), %rbx
movl 0x5c(%rsp), %r14d
movl $0x1, %ecx
movl $0x4, %eax
testb $0x1, %r14b
movl $0x0, %r14d
jne 0xfae62
movl 0x64(%rsp), %eax
movq 0xb8(%rsp), %rdx
incq %rdx
movl %eax, %ecx
cmpq %rcx, %rdx
jb 0xfae12
jmp 0xfb451
movq 0x20(%rsp), %r11
movq %r11, 0x20(%rsp)
movq 0x190(%rsp), %rdi
movq 0x30(%rsp), %r13
movq %r13, %rsi
movq 0x18(%rsp), %r14
movq %r14, %rdx
movq 0xf8(%rsp), %rcx
movq 0x68(%rsp), %rbx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0xf7b3a
movq 0x190(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
movq 0x100(%rsp), %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0xf7b3a
movq 0x190(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
movq 0xa8(%rsp), %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0xf7b3a
movq 0x20(%rsp), %r10
movq 0xf0(%rsp), %rdi
movl 0x10(%rdi), %edx
movq 0xe8(%rsp), %r8
movq 0xe0(%rsp), %r9
movq 0x110(%rsp), %r11
movq 0x108(%rsp), %rbx
incq %r11
movl %edx, %eax
incq %rbx
cmpq %rax, %r11
jb 0xfaced
movq 0x190(%rsp), %rax
movq 0xc0(%rax), %rax
movq (%rax), %rcx
movq 0xd8(%rsp), %rdx
incl %edx
cmpq %rdx, %rcx
ja 0xfacb9
testq %r15, %r15
je 0xfb63f
movq %r15, 0x10(%rsp)
movl $0x1, %ebx
xorl %r14d, %r14d
movq 0x18(%rsp), %r15
movl $0x10, %ebp
movl 0x4(%r15), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl (%r15), %ecx
jne 0xfb593
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
cmovel %ebp, %eax
movl %eax, (%r15)
movq 0x8(%r15), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
movq %r10, %r12
callq 0x2370
movq %r12, %r10
movq %rax, 0x8(%r15)
movl 0x4(%r15), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0xfb597
movq 0x8(%r15), %rax
leal 0x1(%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %esi, %edx
movl %edx, 0x4(%r15)
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%r14,%r14,2), %rdx
movq 0x10(%r10,%rdx,8), %rsi
movq %rsi, 0x10(%rax,%rcx,8)
movups (%r10,%rdx,8), %xmm0
movups %xmm0, (%rax,%rcx,8)
movl %ebx, %r14d
incl %ebx
cmpq %r14, 0x10(%rsp)
ja 0xfb54e
movq 0x10(%rsp), %r15
testq %r15, %r15
movq 0x48(%rsp), %r14
je 0xfb647
movq 0x18(%rsp), %rbx
movq 0x28(%rbx), %rdi
movq %r10, %r12
callq 0x2220
movq $0x0, 0x28(%rbx)
andb $0x7f, 0x7(%rbx)
movq %rbx, %rdi
callq 0xa0a7d
movq %rbx, %rdi
callq 0xa0ab6
movq %rbx, %rdi
callq 0xa0b79
movq %r12, %r10
orb $-0x80, 0x17(%rbx)
movl $0x0, 0x58(%rsp)
jmp 0xfb647
xorl %r10d, %r10d
xorl %r15d, %r15d
movq $0x0, 0x38(%rsp)
jmp 0xfb642
xorl %r15d, %r15d
movq 0x48(%rsp), %r14
movq %r10, %r13
movq 0x198(%rsp), %rbx
movl $0x64, %ecx
movq 0x18(%rsp), %rdx
xorl %r8d, %r8d
callq 0xe96a2
testq %rax, %rax
jne 0xfb652
movq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0xa0a7d
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xa7e08
cmpb $0x0, 0x58(%rsp)
jne 0xfb7a2
movq %r13, %r11
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq (%rax,%rax,2), %rsi
movq (%r11,%rsi,8), %rdx
movq 0x18(%rsp), %rdi
movq 0x20(%rdi), %rdi
movq %rdx, %r8
shrq $0x21, %r8
cmpl $0x0, (%rdi,%r8,8)
js 0xfb794
movl 0x8(%r11,%rsi,8), %esi
movl %esi, %r8d
shrl %r8d
cmpl $0x0, (%rdi,%r8,8)
js 0xfb794
shrq $0x20, %rdx
movq 0x18(%rsp), %rdi
movq 0x30(%rdi), %rdi
cmpb $0x0, (%rdi,%rdx)
je 0xfb6f6
movq %rsi, %r8
xorq $0x1, %r8
cmpb $0x0, (%rdi,%r8)
jne 0xfb794
movq 0x18(%rsp), %r8
movq 0x8(%r8), %rdi
movq 0x28(%r8), %r8
movq (%r8,%rdx,8), %r9
movq %r9, %r10
andq %rcx, %r10
je 0xfb74d
shrq $0x20, %r9
shlq $0x3, %r10
leaq (%r10,%r10,2), %r8
leaq (%r9,%r9,2), %r9
leaq (%rdi,%r9,8), %rdi
addq $0xc, %rdi
xorl %r9d, %r9d
cmpl %esi, -0x4(%rdi,%r9)
jne 0xfb737
orb $-0x80, 0x3(%rdi,%r9)
addq $0x18, %r9
cmpq %r9, %r8
jne 0xfb72a
movq 0x18(%rsp), %r8
movq 0x8(%r8), %rdi
movq 0x28(%r8), %r8
xorl $0x1, %esi
movq (%r8,%rsi,8), %r8
movq %r8, %rsi
andq %rcx, %rsi
je 0xfb794
shrq $0x20, %r8
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%r8,%r8,2), %r8
leaq (%rdi,%r8,8), %rdi
addq $0xc, %rdi
xorl %r8d, %r8d
movl -0x4(%rdi,%r8), %r9d
xorl %edx, %r9d
cmpl $0x1, %r9d
jne 0xfb78b
orb $-0x80, 0x3(%rdi,%r8)
addq $0x18, %r8
cmpq %r8, %rsi
jne 0xfb777
incq %rax
movl %eax, %edx
cmpq %rdx, %r15
ja 0xfb698
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0xa0a7d
movq %rbx, %rdi
callq 0xa0ab6
movq %rbx, %rdi
callq 0xa0b79
movq %r13, %rdi
orb $-0x80, 0x17(%rbx)
movq (%r14), %rax
testq %rax, %rax
je 0xfb7eb
movq 0x8(%r14), %rcx
xorl %edx, %edx
cmpl $-0x2, (%rcx,%rdx,4)
jg 0xfb7e1
movl $0xffffffff, (%rcx,%rdx,4) # imm = 0xFFFFFFFF
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0xfb7d4
callq 0x2220
movq 0x38(%rsp), %rdi
callq 0x2220
movq 0x68(%rsp), %rdi
callq 0x2220
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq