// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: print_het_ovlp(p_g_t*, ma_ug_t*, hap_overlaps_list*, double)
void print_het_ovlp(p_g_t *pg, ma_ug_t *ug, hap_overlaps_list* ha, double filter_rate)
{
    uint32_t v, i, k, n_vtx = pg->pg_h_lev->n_seq * 2, nv, qn, qs, qe, tn, ts, te, as, ae, occ, ovlp, hetLen, homLen;
    asg_arc_t *av = NULL;
    hap_overlaps *x = NULL;
    p_node_t *a = NULL;
    int index;
    for (v = 0; v < n_vtx; v++)
    {
        av = asg_arc_a(pg->pg_h_lev, v);
        nv = asg_arc_n(pg->pg_h_lev, v);
        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            index = get_specific_hap_overlap(&(ha->x[av[i].ul>>33]), av[i].ul>>33, av[i].v>>1);
            if(index == -1) fprintf(stderr, "ERROR\n");
            x = &(ha->x[av[i].ul>>33].a.a[index]);

            qn = x->xUid;
            qs = x->x_beg_pos;
            qe = x->x_end_pos - 1;
            get_p_nodes(pg, &a, &occ, qn);
            for (k = 0, hetLen = 0, homLen = 0; k < occ; k++)
            {
                as = a[k].baseBeg;
                ae = a[k].baseEnd;
                ovlp = ((MIN(qe, ae) >= MAX(qs, as))? MIN(qe, ae) - MAX(qs, as) + 1 : 0);
                if(homLen + hetLen > 0 && ovlp == 0) break;
                if(ovlp == 0) continue;
                if(a[k].h_status == N_HET)
                {
                    homLen += ovlp;
                } 
                else if(asm_opt.polyploidy <= 2 && (a[k].h_status&P_HET))
                {
                    homLen += ovlp;
                }
                else
                {
                    hetLen += ovlp;
                }  
            }

            if(hetLen <= ((hetLen + homLen) * filter_rate))
            {
                ///all_ovlp->x[uId].a.a[i].status = DELETE;
                fprintf(stderr, "********XY********\n");
                print_hap_paf(ug, x);
            }


            tn = x->yUid;
            ts = x->y_beg_pos;
            te = x->y_end_pos - 1;
            get_p_nodes(pg, &a, &occ, tn);
            for (k = 0, hetLen = 0, homLen = 0; k < occ; k++)
            {
                as = a[k].baseBeg;
                ae = a[k].baseEnd;
                ovlp = ((MIN(te, ae) >= MAX(ts, as))? MIN(te, ae) - MAX(ts, as) + 1 : 0);
                if(homLen + hetLen > 0 && ovlp == 0) break;
                if(ovlp == 0) continue;
                if(a[k].h_status == N_HET)
                {
                    homLen += ovlp;
                } 
                else if(asm_opt.polyploidy <= 2 && (a[k].h_status&P_HET))
                {
                    homLen += ovlp;
                }
                else
                {
                    hetLen += ovlp;
                }                 
            }

            if(hetLen <= ((hetLen + homLen) * filter_rate))
            {
                ///all_ovlp->x[uId].a.a[i].status = DELETE;
                fprintf(stderr, "********YX********\n");
                print_hap_paf(ug, x);
            }
        }
    }

    for (v = 0; v < ha->num; v++)
    {
        for (i = 0; i < ha->x[v].a.n; i++)
        {
            if(ha->x[v].a.a[i].status == DELETE)
            {
                x = &(ha->x[v].a.a[i]);

                qn = x->xUid;
                qs = x->x_beg_pos;
                qe = x->x_end_pos - 1;
                get_p_nodes(pg, &a, &occ, qn);
                for (k = 0, hetLen = 0, homLen = 0; k < occ; k++)
                {
                    as = a[k].baseBeg;
                    ae = a[k].baseEnd;
                    ovlp = ((MIN(qe, ae) >= MAX(qs, as))? MIN(qe, ae) - MAX(qs, as) + 1 : 0);
                    if(homLen + hetLen > 0 && ovlp == 0) break;
                    if(ovlp == 0) continue;
                    if(a[k].h_status == N_HET)
                    {
                        homLen += ovlp;
                    } 
                    else if(asm_opt.polyploidy <= 2 && (a[k].h_status&P_HET))
                    {
                        homLen += ovlp;
                    }
                    else
                    {
                        hetLen += ovlp;
                    }  
                }

                if(hetLen <= ((hetLen + homLen) * filter_rate))
                {
                    fprintf(stderr, "********C(X)********hetLen-%u, homLen-%u\n", hetLen, homLen);
                    print_hap_paf(ug, x);
                }


                tn = x->yUid;
                ts = x->y_beg_pos;
                te = x->y_end_pos - 1;
                get_p_nodes(pg, &a, &occ, tn);
                for (k = 0, hetLen = 0, homLen = 0; k < occ; k++)
                {
                    as = a[k].baseBeg;
                    ae = a[k].baseEnd;
                    ovlp = ((MIN(te, ae) >= MAX(ts, as))? MIN(te, ae) - MAX(ts, as) + 1 : 0);
                    if(homLen + hetLen > 0 && ovlp == 0) break;
                    if(ovlp == 0) continue;
                    if(a[k].h_status == N_HET)
                    {
                        homLen += ovlp;
                    } 
                    else if(asm_opt.polyploidy <= 2 && (a[k].h_status&P_HET))
                    {
                        homLen += ovlp;
                    }
                    else
                    {
                        hetLen += ovlp;
                    }                 
                }

                if(hetLen <= ((hetLen + homLen) * filter_rate))
                {
                    fprintf(stderr, "********C(Y)********hetLen-%u, homLen-%u\n", hetLen, homLen);
                    print_hap_paf(ug, x);
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x30(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x180603
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x24(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x34(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x1805f3
movq -0x70(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x180111
jmp 0x1805e5
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x70(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x21, %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq -0x70(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x21, %rax
movl %eax, %esi
movq -0x70(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
shrl %edx
callq 0x17a150
movl %eax, -0x84(%rbp)
cmpl $-0x1, -0x84(%rbp)
jne 0x18018a
movq 0x243e67(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x20992c(%rip), %rsi    # 0x389aaf
movb $0x0, %al
callq 0x22a0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x21, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0x84(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x78(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x78(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %ecx
leaq -0x80(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x17ad50
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x18038d
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x54(%rbp), %eax
ja 0x180253
movl -0x40(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x18025c
movl -0x54(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jb 0x18027b
movl -0x3c(%rbp), %eax
movl %eax, -0x90(%rbp)
jmp 0x180284
movl -0x50(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x8c(%rbp), %eax
movl -0x90(%rbp), %ecx
cmpl %ecx, %eax
jb 0x1802f1
movl -0x40(%rbp), %eax
cmpl -0x54(%rbp), %eax
ja 0x1802a7
movl -0x40(%rbp), %eax
movl %eax, -0x94(%rbp)
jmp 0x1802b0
movl -0x54(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0x98(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jb 0x1802cf
movl -0x3c(%rbp), %eax
movl %eax, -0x9c(%rbp)
jmp 0x1802d8
movl -0x50(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x98(%rbp), %eax
movl -0x9c(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x1802fb
xorl %eax, %eax
movl %eax, -0xa0(%rbp)
jmp 0x1802fb
movl -0xa0(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x64(%rbp), %eax
addl -0x60(%rbp), %eax
cmpl $0x0, %eax
jbe 0x180317
cmpl $0x0, -0x5c(%rbp)
jne 0x180317
jmp 0x18038d
cmpl $0x0, -0x5c(%rbp)
jne 0x18031f
jmp 0x18037f
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
jne 0x18033e
movl -0x5c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x18037d
leaq 0x2444b3(%rip), %rax    # 0x3c47f8
cmpl $0x2, 0x1bc(%rax)
jg 0x180372
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x180372
movl -0x5c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x18037b
movl -0x5c(%rbp), %eax
addl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x18037d
jmp 0x18037f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x18020d
movl -0x60(%rbp), %eax
movl %eax, %ecx
movl %ecx, %eax
cvtsi2sd %rcx, %xmm1
movl -0x64(%rbp), %ecx
addl %ecx, %eax
cvtsi2sd %rax, %xmm0
mulsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x1803d3
movq 0x243c2b(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x20a227(%rip), %rsi    # 0x38a5e6
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x178a00
movq -0x78(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x78(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x78(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %ecx
leaq -0x80(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x17ad50
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x18059d
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x54(%rbp), %eax
ja 0x180463
movl -0x4c(%rbp), %eax
movl %eax, -0xa4(%rbp)
jmp 0x18046c
movl -0x54(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x50(%rbp), %eax
jb 0x18048b
movl -0x48(%rbp), %eax
movl %eax, -0xac(%rbp)
jmp 0x180494
movl -0x50(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xa8(%rbp), %eax
movl -0xac(%rbp), %ecx
cmpl %ecx, %eax
jb 0x180501
movl -0x4c(%rbp), %eax
cmpl -0x54(%rbp), %eax
ja 0x1804b7
movl -0x4c(%rbp), %eax
movl %eax, -0xb0(%rbp)
jmp 0x1804c0
movl -0x54(%rbp), %eax
movl %eax, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x50(%rbp), %eax
jb 0x1804df
movl -0x48(%rbp), %eax
movl %eax, -0xb8(%rbp)
jmp 0x1804e8
movl -0x50(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl -0xb4(%rbp), %eax
movl -0xb8(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x18050b
xorl %eax, %eax
movl %eax, -0xbc(%rbp)
jmp 0x18050b
movl -0xbc(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x64(%rbp), %eax
addl -0x60(%rbp), %eax
cmpl $0x0, %eax
jbe 0x180527
cmpl $0x0, -0x5c(%rbp)
jne 0x180527
jmp 0x18059d
cmpl $0x0, -0x5c(%rbp)
jne 0x18052f
jmp 0x18058f
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
jne 0x18054e
movl -0x5c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x18058d
leaq 0x2442a3(%rip), %rax    # 0x3c47f8
cmpl $0x2, 0x1bc(%rax)
jg 0x180582
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x180582
movl -0x5c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x18058b
movl -0x5c(%rbp), %eax
addl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x18058d
jmp 0x18058f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x18041d
movl -0x60(%rbp), %eax
movl %eax, %ecx
movl %ecx, %eax
cvtsi2sd %rcx, %xmm1
movl -0x64(%rbp), %ecx
addl %ecx, %eax
cvtsi2sd %rax, %xmm0
mulsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x1805e3
movq 0x243a1b(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x20a02b(%rip), %rsi    # 0x38a5fa
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x178a00
jmp 0x1805e5
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1800e7
jmp 0x1805f5
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x180090
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x180adb
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movl -0x24(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x180acb
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl 0x2(%rax), %eax
cmpl $0x2, %eax
jne 0x180abb
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x78(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x78(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %ecx
leaq -0x80(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x17ad50
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x180857
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x54(%rbp), %eax
ja 0x18071d
movl -0x40(%rbp), %eax
movl %eax, -0xc0(%rbp)
jmp 0x180726
movl -0x54(%rbp), %eax
movl %eax, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jb 0x180745
movl -0x3c(%rbp), %eax
movl %eax, -0xc8(%rbp)
jmp 0x18074e
movl -0x50(%rbp), %eax
movl %eax, -0xc8(%rbp)
movl -0xc4(%rbp), %eax
movl -0xc8(%rbp), %ecx
cmpl %ecx, %eax
jb 0x1807bb
movl -0x40(%rbp), %eax
cmpl -0x54(%rbp), %eax
ja 0x180771
movl -0x40(%rbp), %eax
movl %eax, -0xcc(%rbp)
jmp 0x18077a
movl -0x54(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movl %eax, -0xd0(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jb 0x180799
movl -0x3c(%rbp), %eax
movl %eax, -0xd4(%rbp)
jmp 0x1807a2
movl -0x50(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xd0(%rbp), %eax
movl -0xd4(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x1807c5
xorl %eax, %eax
movl %eax, -0xd8(%rbp)
jmp 0x1807c5
movl -0xd8(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x64(%rbp), %eax
addl -0x60(%rbp), %eax
cmpl $0x0, %eax
jbe 0x1807e1
cmpl $0x0, -0x5c(%rbp)
jne 0x1807e1
jmp 0x180857
cmpl $0x0, -0x5c(%rbp)
jne 0x1807e9
jmp 0x180849
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
jne 0x180808
movl -0x5c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x180847
leaq 0x243fe9(%rip), %rax    # 0x3c47f8
cmpl $0x2, 0x1bc(%rax)
jg 0x18083c
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x18083c
movl -0x5c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x180845
movl -0x5c(%rbp), %eax
addl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x180847
jmp 0x180849
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1806d7
movl -0x60(%rbp), %eax
movl %eax, %ecx
movl %ecx, %eax
cvtsi2sd %rcx, %xmm1
movl -0x64(%rbp), %ecx
addl %ecx, %eax
cvtsi2sd %rax, %xmm0
mulsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x1808a3
movq 0x243761(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x60(%rbp), %edx
movl -0x64(%rbp), %ecx
leaq 0x209d7f(%rip), %rsi    # 0x38a60e
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x178a00
movq -0x78(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x78(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x78(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %ecx
leaq -0x80(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x17ad50
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x180a6d
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x54(%rbp), %eax
ja 0x180933
movl -0x4c(%rbp), %eax
movl %eax, -0xdc(%rbp)
jmp 0x18093c
movl -0x54(%rbp), %eax
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, -0xe0(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x50(%rbp), %eax
jb 0x18095b
movl -0x48(%rbp), %eax
movl %eax, -0xe4(%rbp)
jmp 0x180964
movl -0x50(%rbp), %eax
movl %eax, -0xe4(%rbp)
movl -0xe0(%rbp), %eax
movl -0xe4(%rbp), %ecx
cmpl %ecx, %eax
jb 0x1809d1
movl -0x4c(%rbp), %eax
cmpl -0x54(%rbp), %eax
ja 0x180987
movl -0x4c(%rbp), %eax
movl %eax, -0xe8(%rbp)
jmp 0x180990
movl -0x54(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
movl %eax, -0xec(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x50(%rbp), %eax
jb 0x1809af
movl -0x48(%rbp), %eax
movl %eax, -0xf0(%rbp)
jmp 0x1809b8
movl -0x50(%rbp), %eax
movl %eax, -0xf0(%rbp)
movl -0xec(%rbp), %eax
movl -0xf0(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0x1809db
xorl %eax, %eax
movl %eax, -0xf4(%rbp)
jmp 0x1809db
movl -0xf4(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x64(%rbp), %eax
addl -0x60(%rbp), %eax
cmpl $0x0, %eax
jbe 0x1809f7
cmpl $0x0, -0x5c(%rbp)
jne 0x1809f7
jmp 0x180a6d
cmpl $0x0, -0x5c(%rbp)
jne 0x1809ff
jmp 0x180a5f
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
jne 0x180a1e
movl -0x5c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x180a5d
leaq 0x243dd3(%rip), %rax    # 0x3c47f8
cmpl $0x2, 0x1bc(%rax)
jg 0x180a52
movq -0x80(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x180a52
movl -0x5c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x180a5b
movl -0x5c(%rbp), %eax
addl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x180a5d
jmp 0x180a5f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1808ed
movl -0x60(%rbp), %eax
movl %eax, %ecx
movl %ecx, %eax
cvtsi2sd %rcx, %xmm1
movl -0x64(%rbp), %ecx
addl %ecx, %eax
cvtsi2sd %rax, %xmm0
mulsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x180ab9
movq 0x24354b(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x60(%rbp), %edx
movl -0x64(%rbp), %ecx
leaq 0x209b93(%rip), %rsi    # 0x38a638
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x178a00
jmp 0x180abb
jmp 0x180abd
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x180621
jmp 0x180acd
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x18060a
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)