// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: debug_hap_overlaps(hap_overlaps_list*, hap_overlaps_list*)
void debug_hap_overlaps(hap_overlaps_list* all_ovlp, hap_overlaps_list* back_all_ovlp)
{
    hap_overlaps *x = NULL, *y = NULL;
    uint32_t v, i, uId, qn, tn;
    uint32_t types[4];
    types[X2Y] = Y2X; types[Y2X] = X2Y; types[XCY] = YCX; types[YCX] = XCY;
    int index;
    for (v = 0; v < all_ovlp->num; v++)
    {
        uId = v;
        for (i = 0; i < all_ovlp->x[uId].a.n; i++)
        {
            qn = all_ovlp->x[uId].a.a[i].xUid;
            tn = all_ovlp->x[uId].a.a[i].yUid;
            x = &(all_ovlp->x[uId].a.a[i]);
            index = get_specific_hap_overlap(&(all_ovlp->x[tn]), tn, qn);
            if(index == -1)
            {
                fprintf(stderr, "ERROR 0\n");
                continue;
            }

            y = &(all_ovlp->x[tn].a.a[index]);
            if(x->rev != y->rev || types[x->type] != y->type)
            {
                fprintf(stderr, "ERROR 1\n");
                continue;
            }

            if(x->status == REVE_EXIST && y->status != SELF_EXIST)
            {
                fprintf(stderr, "ERROR 2\n");
                continue;
            }

            if(x->status == REVE_EXIST)
            {
                if(x->weight != y->weight) fprintf(stderr, "ERROR 3\n"); 
                if(x->xUid != y->yUid) fprintf(stderr, "ERROR 4\n"); 
                if(x->yUid != y->xUid) fprintf(stderr, "ERROR 5\n"); 
                if(x->x_beg_pos != y->y_beg_pos) fprintf(stderr, "ERROR 6\n"); 
                if(x->x_end_pos != y->y_end_pos) fprintf(stderr, "ERROR 7\n"); 
                if(x->y_beg_pos != y->x_beg_pos) fprintf(stderr, "ERROR 8\n");
                if(x->y_end_pos != y->x_end_pos) fprintf(stderr, "ERROR 9\n");
                if(x->x_beg_id != y->y_beg_id) fprintf(stderr, "ERROR 10\n");
                if(x->x_end_id != y->y_end_id) fprintf(stderr, "ERROR 11\n");
                if(x->y_beg_id != y->x_beg_id) fprintf(stderr, "ERROR 12\n");
                if(x->y_beg_id != y->x_beg_id) fprintf(stderr, "ERROR 13\n");
                if(x->y_end_id != y->x_end_id) fprintf(stderr, "ERROR 14\n");

                index = get_specific_hap_overlap(&(back_all_ovlp->x[qn]), qn, tn);
                if(index != -1)
                {
                    if(back_all_ovlp->x[qn].a.a[index].weight > x->weight) fprintf(stderr, "ERROR 15\n");
                }
            }
           
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movaps 0x11d3f5(%rip), %xmm0   # 0x1eb570
movaps %xmm0, 0x30(%rsp)
xorl %ecx, %ecx
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
cmpq %rax, %rcx
jae 0xce513
xorl %r13d, %r13d
movq %rcx, 0x10(%rsp)
imulq $0x18, %rcx, %rbp
movl %r13d, %r13d
movq 0x8(%rsp), %rax
movq (%rax), %r14
cmpq %r13, (%r14,%rbp)
jbe 0xce506
movq %rbp, %r15
leaq (%r14,%rbp), %rax
movq 0x10(%rax), %rbx
movq %r13, %r12
shlq $0x6, %r12
movl 0x24(%rbx,%r12), %edx
movl 0x28(%rbx,%r12), %esi
imulq $0x18, %rsi, %rbp
leaq (%r14,%rbp), %rdi
movq %rsi, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
callq 0xcd675
cmpl $-0x1, %eax
je 0xce32a
addq %r12, %rbx
movq 0x10(%r14,%rbp), %r14
cltq
shlq $0x6, %rax
movb (%rbx), %cl
cmpb (%r14,%rax), %cl
jne 0xce317
addq %rax, %r14
movzbl 0x1(%rbx), %eax
movzbl 0x1(%r14), %ecx
cmpl %ecx, 0x30(%rsp,%rax,4)
jne 0xce317
cmpb $0x1, 0x2(%rbx)
movq %r15, %rbp
jne 0xce349
cmpb $0x0, 0x2(%r14)
jne 0xce351
movl 0x2c(%rbx), %ecx
movq 0x28(%rsp), %r15
movl %r15d, %eax
cmpl 0x2c(%r14), %ecx
jne 0xce36f
cmpl 0x28(%r14), %eax
jne 0xce393
movl 0x28(%rbx), %eax
cmpl 0x24(%r14), %eax
jne 0xce3b4
movl 0x4(%rbx), %eax
cmpl 0xc(%r14), %eax
jne 0xce3d5
movl 0x8(%rbx), %eax
cmpl 0x10(%r14), %eax
jne 0xce3f6
movl 0xc(%rbx), %eax
cmpl 0x4(%r14), %eax
jne 0xce417
movl 0x10(%rbx), %eax
cmpl 0x8(%r14), %eax
jne 0xce438
movl 0x14(%rbx), %eax
cmpl 0x1c(%r14), %eax
jne 0xce459
movl 0x18(%rbx), %eax
cmpl 0x20(%r14), %eax
jne 0xce47a
movl 0x1c(%rbx), %eax
cmpl 0x14(%r14), %eax
jne 0xce49b
movl 0x20(%rbx), %eax
cmpl 0x18(%r14), %eax
jne 0xce4e5
movq 0x18(%rsp), %rax
movq (%rax), %r14
imulq $0x18, %r15, %r12
leaq (%r14,%r12), %rdi
movl %r15d, %esi
movq 0x20(%rsp), %rdx
callq 0xcd675
cmpl $-0x1, %eax
je 0xce349
movq 0x10(%r14,%r12), %rcx
cltq
shlq $0x6, %rax
movl 0x2c(%rcx,%rax), %eax
cmpl 0x2c(%rbx), %eax
jbe 0xce349
movq 0x184cd7(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d4d1(%rip), %rdi    # 0x1eb7e4
pushq $0x9
jmp 0xce364
movq 0x184cc2(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11a47b(%rip), %rdi    # 0x1e87a3
jmp 0xce33b
movq 0x184caf(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d42f(%rip), %rdi    # 0x1eb76a
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq %r15, %rbp
incl %r13d
jmp 0xce19f
movq 0x184c88(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d411(%rip), %rdi    # 0x1eb773
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce349
movq 0x184c6a(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d3fc(%rip), %rdi    # 0x1eb77c
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movl 0x24(%rbx), %eax
jmp 0xce24d
movq 0x184c46(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x1150c4(%rip), %rdi    # 0x1e3468
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce257
movq 0x184c25(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d3c0(%rip), %rdi    # 0x1eb785
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce264
movq 0x184c04(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d3a8(%rip), %rdi    # 0x1eb78e
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce271
movq 0x184be3(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d390(%rip), %rdi    # 0x1eb797
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce27e
movq 0x184bc2(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d378(%rip), %rdi    # 0x1eb7a0
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce28b
movq 0x184ba1(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d360(%rip), %rdi    # 0x1eb7a9
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce298
movq 0x184b80(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d348(%rip), %rdi    # 0x1eb7b2
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce2a5
movq 0x184b5f(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d331(%rip), %rdi    # 0x1eb7bc
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce2b2
movq 0x184b3e(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d31a(%rip), %rdi    # 0x1eb7c6
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movl 0x1c(%rbx), %eax
cmpl 0x14(%r14), %eax
je 0xce2bf
movq 0x184b15(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d2fb(%rip), %rdi    # 0x1eb7d0
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce2bf
movq 0x184af4(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x11d2e4(%rip), %rdi    # 0x1eb7da
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0xce2cc
movq 0x10(%rsp), %rcx
incq %rcx
jmp 0xce182
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq