// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_del_short_false_link(asg_t*, float, float, int, ma_hit_t_alloc*, long long, R_to_U*)
int asg_arc_del_short_false_link(asg_t *g, float drop_ratio, float o_drop_ratio, int max_dist, 
ma_hit_t_alloc* reverse_sources, long long miniedgeLen, R_to_U* ruIndex)
{
    double startTime = Get_T();
    
    kvec_t(uint64_t) b;
    memset(&b, 0, sizeof(b));


    kvec_t(uint32_t) b_f;
    memset(&b_f, 0, sizeof(b_f));

    kvec_t(uint32_t) b_r;
    memset(&b_r, 0, sizeof(b_r));


	uint32_t v, w, n_vtx = g->n_seq * 2, n_cut = 0;
    uint32_t sink;

    buf_t bub;
    if (!g->is_symm) asg_symm(g);
    memset(&bub, 0, sizeof(buf_t));
    bub.a = (binfo_t*)calloc(n_vtx, sizeof(binfo_t));
    
    for (v = 0; v < n_vtx; ++v) 
    {
        if(g->seq_vis[v] == 0)
        {
            asg_arc_t *av = asg_arc_a(g, v);
            uint32_t nv = asg_arc_n(g, v);
            if(nv == 1 && asg_arc_n(g, v^1) == 1) continue;

            uint64_t t_ol = 0;
            long long i;
            for (i = 0; i < nv; ++i)
            {
                t_ol += av[i].ol;
            }
            kv_push(uint64_t, b, (uint64_t)(t_ol << 32 | v));  
        }
	}

    radix_sort_arch64(b.a, b.a + b.n);

    uint32_t min_edge;
    
    
    uint64_t k, t;
    for (k = 0; k < b.n; k++)
    {
        ///v is the node
        v = (uint32_t)b.a[k];
        if (g->seq[v>>1].del) continue;
        uint32_t nv = asg_arc_n(g, v), nw, to_del_l, to_del_r;
        if (nv < 2) continue;
        uint32_t kv = get_real_length(g, v, NULL), kw;
        if (kv < 2) continue;
        uint32_t i;
        asg_arc_t *av = asg_arc_a(g, v), *aw;

        b_f.n = 0;
        b_r.n = 0;
        to_del_l = 0;
        for (i = 0; i < nv; i++)
        {
            if (av[i].del) continue;
            
            w = av[i].v^1;
            nw = asg_arc_n(g, w);
            if(nw < 2) break;
            kw = get_real_length(g, w, NULL);
            if(kw < 2) break;

            kv_push(uint32_t, b_f, av[i].v);
            kv_push(uint32_t, b_r, w);

            aw = asg_arc_a(g, w);
            min_edge = (uint32_t)-1;
            for (t = 0; t < nw; t++)
            {
                if(aw[t].del) continue;
                if((aw[t].v>>1) == (v>>1)) continue;
                if(aw[t].ol < min_edge) min_edge = aw[t].ol;
                ///kv_push(uint32_t, b_r, aw[t].v);
            }

            if(av[i].ol < min_edge * drop_ratio) to_del_l++;
        }












        /****************************may have bugs********************************/
        if(to_del_l != kv)
        {
            b_f.n = 0;
            b_r.n = 0;
            to_del_l = 0;

            for (i = 0; i < nv; i++)
            {
                if (av[i].del) continue;

                w = av[i].v^1;
                nw = asg_arc_n(g, w);
                if(nw < 2) break;
                kw = get_real_length(g, w, NULL);
                if(kw < 2) break;

                kv_push(uint32_t, b_f, av[i].v);
                kv_push(uint32_t, b_r, w);

                aw = asg_arc_a(g, w);
                min_edge = (uint32_t)-1;
                for (t = 0; t < nw; t++)
                {
                    if(aw[t].del) continue;
                    if((aw[t].v>>1) == (v>>1)) continue;
                    if(aw[t].ol < min_edge) min_edge = aw[t].ol;
                }

                if(av[i].ol < min_edge * o_drop_ratio) to_del_l++;
            }

            if(to_del_l == kv)
            {
                ///forward
                to_del_l = 1;
                for (i = 1; i < b_f.n; i++)
                {
                    if(check_if_diploid(b_f.a[0], b_f.a[i], g, reverse_sources, miniedgeLen, ruIndex) == 1)
                    {
                        to_del_l++;
                    }
                }

                ///backward
                if(to_del_l != kv && b_r.n >= 2)
                {
                    to_del_l = 0;
                    uint32_t w0 = 0, w1 = 0;


                    w = b_r.a[0];
                    kw = get_real_length(g, w, NULL);
                    if(kw != 2) goto terminal;
                    aw = asg_arc_a(g, w);
                    nw = asg_arc_n(g, w);
                    for (t = 0; t < nw; t++)
                    {
                        if(aw[t].del) continue;
                        if((aw[t].v>>1) == (v>>1)) continue;
                        w0 = aw[t].v;
                    }
                    to_del_l = 1;


                    for (i = 1; i < b_r.n; i++)
                    {
                        w = b_r.a[i];
                        kw = get_real_length(g, w, NULL);
                        if(kw != 2) goto terminal;
                        aw = asg_arc_a(g, w);
                        nw = asg_arc_n(g, w);
                        for (t = 0; t < nw; t++)
                        {
                            if(aw[t].del) continue;
                            if((aw[t].v>>1) == (v>>1)) continue;
                            w1 = aw[t].v;
                        }

                        if(check_if_diploid(w0, w1, g, reverse_sources, miniedgeLen, ruIndex) == 1)
                        {
                            to_del_l++;
                        }
                    }

                }
            }
        }

        terminal:
        /****************************may have bugs********************************/


        if(to_del_l != kv) continue;





        uint32_t convex1;
        long long l1;




        ////forward bubble
        to_del_l = 0;
        for (i = 0; i < b_f.n; i++)
        {
            if(b_f.a[i] == b_f.a[0])
            {
                to_del_l = 1;
            } 
            else
            {
                to_del_l = 0;
                break;
            }
        }
        //check the length
        if(to_del_l == 0 && asg_bub_end_finder_with_del_advance(g, 
        b_f.a, b_f.n, max_dist, &bub, 0, (uint32_t)-1, &sink)==1)
        {
            to_del_l = 1;
        }
        if(to_del_l == 0 && detect_mul_bubble_end_with_bubbles(g, b_f.a, b_f.n, &convex1, &l1, NULL))
        {
            to_del_l = 1;
        }

        ////backward bubble
        to_del_r = 0;
        for (i = 0; i < b_r.n; i++)
        {
            if(b_r.a[i] == b_r.a[0])
            {
                to_del_r = 1;
            } 
            else
            {
                to_del_r = 0;
                break;
            }
        }
        if(to_del_r == 0 && asg_bub_end_finder_with_del_advance
        (g, b_r.a, b_r.n, max_dist, &bub, 1, v^1, &sink)==1)
        {
            to_del_r = 1;
        }
        if(to_del_r == 0 && detect_mul_bubble_end_with_bubbles(g, b_r.a, b_r.n, &convex1, &l1, NULL))
        {
            to_del_r = 1;
        }

        
    



		if (to_del_l && to_del_r)
        {
            for (i = 0; i < nv; ++i) 
            {
			    if (av[i].del) continue;
                ++n_cut;
                av[i].del = 1;
                asg_arc_del(g, av[i].v^1, av[i].ul>>32^1, 1);
		    }

        }
    }
    
    free(b.a); free(b_f.a); free(b_r.a);
    free(bub.a); free(bub.S.a); free(bub.T.a); free(bub.b.a); free(bub.e.a);
	if (n_cut) 
    {
		asg_cleanup(g);
		asg_symm(g);
	}

    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] removed %u false overlaps\n", __func__, n_cut);
        fprintf(stderr, "[M::%s] takes %0.2f s\n\n", __func__, Get_T()-startTime);
    }
	return n_cut;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r8, 0x98(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movl %esi, 0x48(%rsp)
movss %xmm1, 0x78(%rsp)
movss %xmm0, 0x7c(%rsp)
movq %rdi, %rbx
callq 0x251c
movq %rbx, (%rsp)
movl 0x14(%rbx), %eax
leal (%rax,%rax), %ebx
testl %eax, %eax
js 0x7315e
movq (%rsp), %rdi
callq 0x69638
xorps %xmm0, %xmm0
movups %xmm0, 0x118(%rsp)
movups %xmm0, 0x108(%rsp)
movups %xmm0, 0xf8(%rsp)
movups %xmm0, 0xe8(%rsp)
movups %xmm0, 0xd8(%rsp)
movups %xmm0, 0xc8(%rsp)
movl %ebx, %r14d
pushq $0x1c
popq %rsi
movq %r14, %rdi
callq 0x2120
movq %rax, 0xc0(%rsp)
xorl %ebx, %ebx
movq $0x0, 0x30(%rsp)
xorl %r9d, %r9d
movq $0x0, 0x40(%rsp)
movq %r15, 0x90(%rsp)
movq %r12, 0x88(%rsp)
cmpq %r14, %rbx
je 0x73294
movq (%rsp), %rax
movq 0x30(%rax), %rcx
cmpb $0x0, (%rcx,%rbx)
jne 0x7328c
movq (%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x28(%rax), %rdi
movq (%rdi,%rbx,8), %rsi
movl %esi, %ecx
cmpq $0x1, %rcx
jne 0x7320f
movl %ebx, %r8d
xorq $0x1, %r8
cmpl $0x1, (%rdi,%r8,8)
je 0x7328c
shrq $0x20, %rsi
imulq $0x18, %rcx, %rcx
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
addq $0xc, %rdx
xorl %esi, %esi
xorl %r15d, %r15d
cmpq %rsi, %rcx
je 0x7323e
movl (%rdx,%rsi), %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
addq %rdi, %r15
addq $0x18, %rsi
jmp 0x73227
cmpq %r9, 0x40(%rsp)
jne 0x7326a
leaq (%r9,%r9), %r12
testq %r9, %r9
pushq $0x2
popq %rax
cmoveq %rax, %r12
leaq (,%r12,8), %rsi
movq 0x30(%rsp), %rdi
callq 0x2370
movq %r12, %r9
jmp 0x7326f
movq 0x30(%rsp), %rax
shlq $0x20, %r15
orq %rbx, %r15
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rcx
movq %r15, (%rax,%rcx,8)
incq %rcx
movq %rcx, 0x40(%rsp)
incq %rbx
jmp 0x731ce
movq 0x30(%rsp), %r12
movq 0x40(%rsp), %rax
leaq (%r12,%rax,8), %rsi
movq %r12, %rdi
callq 0x66c25
movq $0x0, 0x58(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movl $0x0, 0x4c(%rsp)
xorl %ecx, %ecx
xorl %r15d, %r15d
cmpq 0x40(%rsp), %r15
je 0x73a5e
movq %r15, 0x38(%rsp)
movq (%r12,%r15,8), %rbp
movq (%rsp), %rax
movq 0x20(%rax), %rax
movl %ebp, %edx
shrl %edx
cmpl $0x0, (%rax,%rdx,8)
js 0x73a51
movq %r14, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
movl %ebp, %ebx
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%rbx,8), %r14
testl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
je 0x73a47
movq %rdx, 0x68(%rsp)
movq %rcx, %r13
movq (%rsp), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xc2e7a
cmpl $0x2, %eax
jae 0x73342
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r14
movq 0x38(%rsp), %r15
jmp 0x73a3d
movl %eax, 0x2c(%rsp)
movq %rbp, 0xb0(%rsp)
movl %r14d, %eax
movq %rax, 0x70(%rsp)
movq (%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x28(%rax), %rax
movq (%rax,%rbx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
movq %rdx, 0xa8(%rsp)
movq %rcx, 0xa0(%rsp)
addq %rdx, %rcx
movq %rcx, 0x60(%rsp)
xorl %esi, %esi
xorl %r10d, %r10d
xorl %r11d, %r11d
movl $0x0, 0x18(%rsp)
movq %r13, %rcx
cmpq 0x70(%rsp), %rsi
je 0x73516
imulq $0x18, %rsi, %r14
movq 0x60(%rsp), %rdx
cmpl $0x0, 0xc(%rdx,%r14)
js 0x7350e
addq %rdx, %r14
movl 0x8(%r14), %r12d
xorq $0x1, %r12
movq (%rax,%r12,8), %r13
testl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
je 0x73516
movq (%rsp), %rdi
movq %rsi, 0x20(%rsp)
movl %r12d, %esi
xorl %edx, %edx
movq %rcx, %rbp
movq %r10, %rbx
movq %r11, %r15
callq 0xc2e7a
movq %r15, %r11
movq %rbx, %r10
movq %rbp, %rcx
cmpl $0x2, %eax
jb 0x73516
cmpq %rcx, %r11
jne 0x73430
leaq (%rcx,%rcx), %rbp
testq %rcx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rbp
leaq (,%rbp,4), %rsi
movq 0x10(%rsp), %rdi
callq 0x2370
movq %r15, %r11
movq %rbx, %r10
jmp 0x73435
movq 0x10(%rsp), %rax
movl 0x8(%r14), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, (%rax,%r11,4)
cmpq 0x58(%rsp), %r10
jne 0x73476
leaq (%r10,%r10), %rcx
testq %r10, %r10
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x58(%rsp)
leaq (,%rcx,4), %rsi
movq 0x8(%rsp), %rdi
callq 0x2370
movq %r15, %r11
movq %rbx, %r10
jmp 0x7347b
movq 0x8(%rsp), %rax
movl %r13d, %ecx
incq %r11
movq %rax, 0x8(%rsp)
movl %r12d, (%rax,%r10,4)
movq (%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x28(%rax), %rax
movl 0x4(%rax,%r12,8), %edi
imulq $0x18, %rcx, %rdx
imulq $0x18, %rdi, %rcx
addq %rcx, %rsi
addq $0xc, %rsi
xorl %edi, %edi
pushq $-0x1
popq %rcx
movq 0x68(%rsp), %rbx
cmpq %rdi, %rdx
je 0x734de
movl (%rsi,%rdi), %r8d
testl %r8d, %r8d
js 0x734d8
movl -0x4(%rsi,%rdi), %r9d
shrl %r9d
cmpl %ecx, %r8d
cmovael %ecx, %r8d
cmpl %ebx, %r9d
cmovnel %r8d, %ecx
addq $0x18, %rdi
jmp 0x734b4
movl 0xc(%r14), %edx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl %esi, %edx
cvtsi2ss %edx, %xmm0
movl %ecx, %ecx
cvtsi2ss %rcx, %xmm1
incq %r10
mulss 0x7c(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x73506
incl 0x18(%rsp)
movq %rbp, %rcx
movq 0x20(%rsp), %rsi
incq %rsi
jmp 0x73399
movl 0x2c(%rsp), %eax
cmpl %eax, 0x18(%rsp)
je 0x738aa
xorl %ebx, %ebx
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r15d, %r15d
cmpq 0x70(%rsp), %rbx
movq %r10, 0x20(%rsp)
movq %r11, 0x18(%rsp)
je 0x736b4
imulq $0x18, %rbx, %r14
movq 0x60(%rsp), %rax
cmpl $0x0, 0xc(%rax,%r14)
js 0x736ac
addq %rax, %r14
movl 0x8(%r14), %r12d
xorq $0x1, %r12
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r12,8), %r13
testl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
je 0x736b4
movq (%rsp), %rdi
movl %r12d, %esi
xorl %edx, %edx
movq %rcx, %rbp
callq 0xc2e7a
movq 0x18(%rsp), %r11
movq 0x20(%rsp), %r10
movq %rbp, %rcx
cmpl $0x2, %eax
jb 0x736b4
cmpq %rcx, %r11
jne 0x735d5
leaq (%rcx,%rcx), %rbp
testq %rcx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rbp
leaq (,%rbp,4), %rsi
movq 0x10(%rsp), %rdi
callq 0x2370
movq 0x18(%rsp), %r11
movq 0x20(%rsp), %r10
jmp 0x735da
movq 0x10(%rsp), %rax
movl 0x8(%r14), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, (%rax,%r11,4)
cmpq 0x58(%rsp), %r10
jne 0x7361f
leaq (%r10,%r10), %rcx
testq %r10, %r10
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x58(%rsp)
leaq (,%rcx,4), %rsi
movq 0x8(%rsp), %rdi
callq 0x2370
movq 0x18(%rsp), %r11
movq 0x20(%rsp), %r10
jmp 0x73624
movq 0x8(%rsp), %rax
movl %r13d, %edi
incq %r11
movq %rax, 0x8(%rsp)
movl %r12d, (%rax,%r10,4)
movq (%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x28(%rax), %rcx
movl 0x4(%rcx,%r12,8), %esi
imulq $0x18, %rdi, %rcx
imulq $0x18, %rsi, %rax
addq %rax, %rdx
addq $0xc, %rdx
xorl %esi, %esi
pushq $-0x1
popq %rax
movq 0x68(%rsp), %r9
cmpq %rsi, %rcx
je 0x73682
movl (%rdx,%rsi), %edi
testl %edi, %edi
js 0x7367c
movl -0x4(%rdx,%rsi), %r8d
shrl %r8d
cmpl %eax, %edi
cmovael %eax, %edi
cmpl %r9d, %r8d
cmovnel %edi, %eax
addq $0x18, %rsi
jmp 0x7365d
movl 0xc(%r14), %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl %edx, %ecx
cvtsi2ss %ecx, %xmm0
movl %eax, %eax
cvtsi2ss %rax, %xmm1
incq %r10
mulss 0x78(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x736a9
incl %r15d
movq %rbp, %rcx
incq %rbx
jmp 0x7352f
movq %r15, %rbp
cmpl 0x2c(%rsp), %ebp
movq 0x98(%rsp), %r15
movq 0x68(%rsp), %r13
jne 0x738a0
movq %rcx, 0x50(%rsp)
pushq $0x1
popq %rax
movl %eax, %ebp
movq 0x90(%rsp), %r14
movq 0x88(%rsp), %r12
movl %eax, %ebx
cmpq %rbx, %r11
jbe 0x73725
movq 0x10(%rsp), %rax
movl (%rax), %edi
movl (%rax,%rbx,4), %esi
movq (%rsp), %rdx
movq %r12, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x70fd8
movq 0x18(%rsp), %r11
movq 0x20(%rsp), %r10
xorl %ecx, %ecx
cmpq $0x1, %rax
sete %cl
addl %ecx, %ebp
leal 0x1(%rbx), %eax
jmp 0x736e8
cmpl 0x2c(%rsp), %ebp
setne %al
cmpq $0x2, %r10
setae %cl
andb %al, %cl
cmpb $0x1, %cl
movq 0x50(%rsp), %rcx
jne 0x738a0
movq 0x8(%rsp), %rax
movl (%rax), %r12d
xorl %ebp, %ebp
movq (%rsp), %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0xc2e7a
movq 0x18(%rsp), %r11
movq 0x20(%rsp), %r10
movq 0x50(%rsp), %rcx
cmpl $0x2, %eax
jne 0x738a0
movq (%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x28(%rax), %rax
movq (%rax,%r12,8), %rax
movl %eax, %edx
movq %rax, %rsi
shrq $0x20, %rsi
imulq $0x18, %rdx, %rax
imulq $0x18, %rsi, %rdx
addq %rdx, %rcx
addq $0xc, %rcx
xorl %edx, %edx
xorl %r8d, %r8d
movq 0x8(%rsp), %r14
cmpq %rdx, %rax
je 0x737c5
cmpl $0x0, (%rcx,%rdx)
js 0x737bf
movl -0x4(%rcx,%rdx), %esi
movl %esi, %edi
shrl %edi
cmpl %r13d, %edi
cmovnel %esi, %r8d
addq $0x18, %rdx
jmp 0x737a5
movl %r8d, 0x60(%rsp)
xorl %r12d, %r12d
pushq $0x1
popq %rax
movl %eax, %ebp
movl %eax, %ebx
movl %ebx, %ebx
cmpq %rbx, %r10
jbe 0x7388a
movl (%r14,%rbx,4), %r14d
movq (%rsp), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xc2e7a
cmpl $0x2, %eax
jne 0x73891
movq (%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x28(%rax), %rax
movq (%rax,%r14,8), %rax
movl %eax, %edx
movq %rax, %rsi
shrq $0x20, %rsi
imulq $0x18, %rdx, %rax
imulq $0x18, %rsi, %rdx
addq %rdx, %rcx
addq $0xc, %rcx
xorl %edx, %edx
movq 0x8(%rsp), %r14
movl 0x60(%rsp), %edi
cmpq %rdx, %rax
je 0x7384f
cmpl $0x0, (%rcx,%rdx)
js 0x73849
movl -0x4(%rcx,%rdx), %esi
movl %esi, %r8d
shrl %r8d
cmpl %r13d, %r8d
cmovnel %esi, %r12d
addq $0x18, %rdx
jmp 0x7382d
movl %r12d, %esi
movq (%rsp), %rdx
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %r8
movq %r15, %r9
callq 0x70fd8
xorl %ecx, %ecx
cmpq $0x1, %rax
sete %cl
addl %ecx, %ebp
incl %ebx
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %r11
jmp 0x737d4
movq 0x50(%rsp), %rcx
jmp 0x738a0
movq 0x50(%rsp), %rcx
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %r11
cmpl 0x2c(%rsp), %ebp
jne 0x73a42
movq %rcx, %r13
xorl %ecx, %ecx
movb $0x1, %al
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r14
movq 0x38(%rsp), %r15
movq %r10, %rbp
movl %ecx, %ecx
cmpq %rcx, %r11
jbe 0x738d9
movl (%r14,%rcx,4), %edx
incl %ecx
xorl %eax, %eax
cmpl (%r14), %edx
je 0x738c3
jmp 0x738e0
movb $0x1, %r12b
testb $0x1, %al
je 0x73944
movq (%rsp), %rdi
movq %r14, %rsi
movl %r11d, %edx
movl 0x48(%rsp), %ecx
leaq 0xc0(%rsp), %r8
xorl %r9d, %r9d
leaq 0x84(%rsp), %rax
pushq %rax
pushq $-0x1
movq %r11, %r12
callq 0x6d6ff
movq %r12, %rdx
movq %rbp, %r10
addq $0x10, %rsp
movb $0x1, %r12b
cmpq $0x1, %rax
je 0x73944
movq (%rsp), %rdi
movq %r14, %rsi
leaq 0x80(%rsp), %rcx
leaq 0xb8(%rsp), %r8
xorl %r9d, %r9d
callq 0x6cf20
movq %rbp, %r10
movl %eax, %r12d
xorl %eax, %eax
movb $0x1, %cl
movl %eax, %eax
cmpq %rax, %r10
jbe 0x7395c
movl (%rbx,%rax,4), %edx
incl %eax
xorl %ecx, %ecx
cmpl (%rbx), %edx
je 0x73948
jmp 0x73963
movb $0x1, %al
testb $0x1, %cl
je 0x739c7
movq 0xb0(%rsp), %r11
xorl $0x1, %r11d
movq (%rsp), %rdi
movq %rbx, %rsi
movl %r10d, %edx
movl 0x48(%rsp), %ecx
leaq 0xc0(%rsp), %r8
pushq $0x1
popq %r9
leaq 0x84(%rsp), %rax
pushq %rax
pushq %r11
callq 0x6d6ff
popq %rcx
popq %rdx
movq %rax, %rcx
movb $0x1, %al
cmpq $0x1, %rcx
je 0x739c7
movq (%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %edx
leaq 0x80(%rsp), %rcx
leaq 0xb8(%rsp), %r8
xorl %r9d, %r9d
callq 0x6cf20
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x73a38
imulq $0x18, 0x70(%rsp), %rbx
movq 0xa8(%rsp), %rax
movq 0xa0(%rsp), %rcx
leaq (%rax,%rcx), %r14
addq $0xc, %r14
xorl %r15d, %r15d
movq 0x30(%rsp), %r12
movq %r13, %rcx
cmpq %r15, %rbx
je 0x73a47
movl (%r14,%r15), %eax
testl %eax, %eax
js 0x73a32
incl 0x4c(%rsp)
orl $0x80000000, %eax       # imm = 0x80000000
movl %eax, (%r14,%r15)
movl -0x8(%r14,%r15), %edx
movl -0x4(%r14,%r15), %esi
xorl $0x1, %esi
xorl $0x1, %edx
movq (%rsp), %rdi
pushq $0x1
popq %rcx
callq 0x6db50
movq %r13, %rcx
addq $0x18, %r15
jmp 0x739f9
movq 0x30(%rsp), %r12
movq %r13, %rcx
jmp 0x73a56
movq 0x30(%rsp), %r12
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r14
movq 0x38(%rsp), %r15
incq %r15
jmp 0x732c5
movq %r12, %rdi
callq 0x2220
movq %r14, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2220
movq 0xc0(%rsp), %rdi
callq 0x2220
movq 0xd8(%rsp), %rdi
callq 0x2220
movq 0xf0(%rsp), %rdi
callq 0x2220
movq 0x108(%rsp), %rdi
callq 0x2220
movq 0x120(%rsp), %rdi
callq 0x2220
movl 0x4c(%rsp), %ebx
testl %ebx, %ebx
je 0x73ad3
movq (%rsp), %r14
movq %r14, %rdi
callq 0x694eb
movq %r14, %rdi
callq 0x69638
movl %ebx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq