// File: /workspace/github_cpp_makefile_star2_O3/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 $0x38, %rsp
movq %rsi, 0x18(%rsp)
movaps 0x127802(%rip), %xmm0   # 0x239690
movaps %xmm0, 0x20(%rsp)
movq %rdi, 0x8(%rsp)
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
je 0x11213f
movq 0x8(%rsp), %rax
movq (%rax), %rax
xorl %esi, %esi
leaq (%rsi,%rsi,2), %rbp
cmpq $0x0, (%rax,%rbp,8)
je 0x112131
movq %rsi, 0x10(%rsp)
xorl %edx, %edx
xorl %r13d, %r13d
movq 0x10(%rax,%rbp,8), %rsi
shlq $0x6, %rdx
movl 0x28(%rsi,%rdx), %ebx
leaq (%rbx,%rbx,2), %rdi
movq (%rax,%rdi,8), %rcx
testq %rcx, %rcx
je 0x112042
leaq (%rsi,%rdx), %r15
movl 0x24(%rsi,%rdx), %r12d
leaq (%rax,%rdi,8), %rax
movq 0x10(%rax), %r14
movl $0x1, %eax
xorl %edx, %edx
shlq $0x6, %rdx
cmpl %ebx, 0x24(%r14,%rdx)
jne 0x111f10
addq %r14, %rdx
cmpl %r12d, 0x28(%rdx)
je 0x111f1e
movl %eax, %edx
incl %eax
cmpq %rdx, %rcx
ja 0x111efc
jmp 0x112042
subl $0x1, %eax
jb 0x112042
cltq
shlq $0x6, %rax
movb (%r15), %cl
cmpb (%r14,%rax), %cl
jne 0x112049
addq %rax, %r14
movzbl 0x1(%r15), %eax
movzbl 0x1(%r14), %ecx
cmpl %ecx, 0x20(%rsp,%rax,4)
jne 0x112049
cmpb $0x1, 0x2(%r15)
jne 0x112072
cmpb $0x0, 0x2(%r14)
jne 0x11206d
movl 0x2c(%r15), %ecx
movl %r12d, %eax
cmpl 0x2c(%r14), %ecx
jne 0x11208f
cmpl 0x28(%r14), %eax
jne 0x1120b8
movl 0x28(%r15), %eax
cmpl 0x24(%r14), %eax
jne 0x1120c2
movl 0x4(%r15), %eax
cmpl 0xc(%r14), %eax
jne 0x1120cc
movl 0x8(%r15), %eax
cmpl 0x10(%r14), %eax
jne 0x1120d6
movl 0xc(%r15), %eax
cmpl 0x4(%r14), %eax
jne 0x1120e0
movl 0x10(%r15), %eax
cmpl 0x8(%r14), %eax
jne 0x1120ea
movl 0x14(%r15), %eax
cmpl 0x1c(%r14), %eax
jne 0x1120f4
movl 0x18(%r15), %eax
cmpl 0x20(%r14), %eax
jne 0x1120fe
movl 0x1c(%r15), %eax
cmpl 0x14(%r14), %eax
jne 0x112108
movl 0x20(%r15), %eax
cmpl 0x18(%r14), %eax
jne 0x11211a
movq 0x18(%rsp), %rax
movq (%rax), %rax
leaq (%r12,%r12,2), %rdx
movq (%rax,%rdx,8), %rcx
testq %rcx, %rcx
je 0x112072
leaq (%rax,%rdx,8), %rax
movq 0x10(%rax), %rax
movl $0x1, %edx
xorl %esi, %esi
shlq $0x6, %rsi
cmpl %r12d, 0x24(%rax,%rsi)
jne 0x112037
addq %rax, %rsi
cmpl %ebx, 0x28(%rsi)
je 0x112050
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x112024
jmp 0x112072
callq 0x1353f
jmp 0x112072
callq 0x133a1
jmp 0x112072
subl $0x1, %edx
jb 0x112072
movslq %edx, %rcx
shlq $0x6, %rcx
movl 0x2c(%rax,%rcx), %eax
cmpl 0x2c(%r15), %eax
jbe 0x112072
callq 0x13523
jmp 0x112072
callq 0x133bd
incl %r13d
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %r13, %rdx
cmpq %r13, (%rax,%rbp,8)
ja 0x111ec6
jmp 0x112124
movq 0x182f4a(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
movl $0x8, %esi
movl $0x1, %edx
leaq 0x1277f2(%rip), %rdi    # 0x23989c
callq 0x2410
movl 0x24(%r15), %eax
jmp 0x111f78
callq 0x133d9
jmp 0x111f82
callq 0x133f5
jmp 0x111f90
callq 0x13411
jmp 0x111f9e
callq 0x1342d
jmp 0x111fac
callq 0x13449
jmp 0x111fba
callq 0x13465
jmp 0x111fc8
callq 0x13481
jmp 0x111fd6
callq 0x1349d
jmp 0x111fe4
leaq 0x1c(%r15), %rdi
leaq 0x14(%r14), %rsi
callq 0x134b9
jmp 0x111ff2
callq 0x13507
jmp 0x112000
movq 0x8(%rsp), %rcx
movl 0x8(%rcx), %ecx
movq 0x10(%rsp), %rsi
incq %rsi
movl %ecx, %edx
cmpq %rdx, %rsi
jb 0x111ead
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq