// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: debug_u_trans_t(kv_u_trans_t*)
void debug_u_trans_t(kv_u_trans_t *ta)
{
    u_trans_t *a = NULL, *r_a = NULL;
    uint32_t i, k, m, j, st, n, r_n, ovlp;
    for (i = 0; i < ta->n; ++i)
    {
        if(ta->a[i].nw <= 0) fprintf(stderr, "ERROR-1\n");
        if(ta->a[i].qe <= ta->a[i].qs) fprintf(stderr, "ERROR-2\n");
        if(ta->a[i].te <= ta->a[i].ts) fprintf(stderr, "ERROR-3\n");
    }
    for (k = 0; k < ta->idx.n; k++)
    {
        a = u_trans_a(*ta, k);
        n = u_trans_n(*ta, k);
        for (st = 0, i = 1; i <= n; ++i)
        {
            if (i == n || a[i].tn != a[st].tn)
            {
                get_u_trans_spec(ta, a[st].tn, a[st].qn, &r_a, &r_n);

                if(i - st != r_n) 
                {
                    fprintf(stderr, "ERROR-4, i - st: %u, r_n: %u\n", i - st, r_n);
                }
                
                for (m = st; m < i; m++)
                {
                    if(a[m].rev != a[st].rev) fprintf(stderr, "ERROR-5\n");
                    for (j = st; j < i; j++)
                    {
                        if(j == m) continue;

                        ovlp = ((MIN(a[m].qe, a[j].qe) > MAX(a[m].qs, a[j].qs))?
                                        MIN(a[m].qe, a[j].qe) - MAX(a[m].qs, a[j].qs):0);
                        if(ovlp > 0) fprintf(stderr, "ERROR-6\n");

                        ovlp = ((MIN(a[m].te, a[j].te) > MAX(a[m].ts, a[j].ts))?
                                        MIN(a[m].te, a[j].te) - MAX(a[m].ts, a[j].ts):0);
                        if(ovlp > 0) fprintf(stderr, "ERROR-7\n");
                    }

                    for (j = 0; j < r_n; j++)
                    {
                        if(r_a[j].rev != a[m].rev) fprintf(stderr, "ERROR-8\n");
                        if(r_a[j].tn == a[m].qn && r_a[j].qn == a[m].tn && 
                           r_a[j].ts == a[m].qs && r_a[j].te == a[m].qe && 
                           r_a[j].qs == a[m].ts && r_a[j].qe == a[m].te &&
                           r_a[j].nw == a[m].nw)
                        {
                            break;
                        }
                    }
                    if(j >= r_n) fprintf(stderr, "ERROR-9\n");
                    
                }
                st = i;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq $0x0, 0x18(%rsp)
cmpq $0x0, (%rdi)
movq %rdi, 0x8(%rsp)
je 0xccb20
movl $0x1, %ebx
xorl %eax, %eax
xorpd %xmm0, %xmm0
movq 0x1c855f(%rip), %r12    # 0x294fe0
leaq 0x170aa4(%rip), %r14    # 0x23d52c
leaq 0x16b3d8(%rip), %r15    # 0x237e67
movq 0x10(%rdi), %rcx
leaq (%rax,%rax,2), %r13
shlq $0x4, %r13
ucomisd 0x20(%rcx,%r13), %xmm0
jae 0xccacb
movl 0x4(%rcx,%r13), %eax
cmpl (%rcx,%r13), %eax
jbe 0xccaf0
movl 0x10(%rcx,%r13), %eax
cmpl 0xc(%rcx,%r13), %eax
jbe 0xccb15
movl %ebx, %eax
incl %ebx
movq 0x8(%rsp), %rdi
cmpq %rax, (%rdi)
ja 0xcca8f
jmp 0xccb20
movq (%r12), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x2410
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rcx
jmp 0xccaa4
movq (%r12), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x2410
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rcx
jmp 0xccaaf
callq 0x10bc7
xorpd %xmm0, %xmm0
jmp 0xccabb
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0xccdf1
xorl %ecx, %ecx
xorl %esi, %esi
movq 0x28(%rdi), %rdx
movq (%rdx,%rcx,8), %r12
testl %r12d, %r12d
je 0xccde3
movq %rsi, 0x28(%rsp)
movq 0x10(%rdi), %rax
movq %r12, %rcx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x10(%rsp)
addq %rcx, %rax
addq $0x10, %rax
movq %rax, 0x30(%rsp)
movl $0x1, %ebp
xorl %r13d, %r13d
movq %r12, 0x38(%rsp)
movl %ebp, %eax
movl %r13d, %ebx
cmpl %r12d, %ebp
jne 0xccb9b
movl %eax, %ebp
leaq (%rbx,%rbx,2), %rax
shlq $0x4, %rax
movq 0x10(%rsp), %rdx
movl 0x14(%rdx,%rax), %esi
jmp 0xccbc2
movl %eax, %ebp
movl %eax, %eax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq (%rbx,%rbx,2), %rcx
shlq $0x4, %rcx
movq 0x10(%rsp), %rdx
movl 0x14(%rdx,%rcx), %esi
cmpl %esi, 0x14(%rdx,%rax)
je 0xccdb0
leaq (%rbx,%rbx,2), %rax
shlq $0x4, %rax
movq %rax, %r14
movl 0x8(%rdx,%rax), %edx
movq %rdi, %r15
leaq 0x18(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0xcba40
movl %ebp, %edx
subl %r13d, %edx
movl 0x4(%rsp), %ecx
cmpl %ecx, %edx
jne 0xccdbd
cmpl %r13d, %ebp
movl %ebp, %r13d
movq %r15, %rdi
jbe 0xccdb0
movq 0x10(%rsp), %rax
addq %r14, %rax
movq %rax, 0x48(%rsp)
movl %ebp, %eax
movq %rax, 0x40(%rsp)
addq 0x30(%rsp), %r14
movq %r14, 0x50(%rsp)
movl %ebp, 0x24(%rsp)
movl %ebp, %r13d
subl %ebx, %r13d
xorl %ebp, %ebp
leaq (%rbx,%rbx,2), %r12
shlq $0x4, %r12
movq 0x48(%rsp), %rax
movb 0x28(%rax), %al
movq 0x10(%rsp), %r14
xorb 0x28(%r14,%r12), %al
testb $0x40, %al
jne 0xccd72
addq %r14, %r12
movq 0x50(%rsp), %r14
xorl %r15d, %r15d
cmpq %r15, %rbp
je 0xccc9d
movl (%r12), %eax
movl 0x4(%r12), %ecx
movl -0x10(%r14), %edx
movl -0xc(%r14), %esi
cmpl %esi, %ecx
cmovbl %ecx, %esi
cmpl %edx, %eax
cmoval %eax, %edx
cmpl %edx, %esi
ja 0xcccab
movl 0xc(%r12), %eax
movl 0x10(%r12), %ecx
movl -0x4(%r14), %edx
movl (%r14), %esi
cmpl %esi, %ecx
cmovbl %ecx, %esi
cmpl %edx, %eax
cmoval %eax, %edx
cmpl %edx, %esi
ja 0xcccb2
incq %r15
addq $0x30, %r14
cmpl %r15d, %r13d
jne 0xccc5a
jmp 0xcccb9
callq 0x10c05
jmp 0xccc7e
callq 0x10c27
jmp 0xccc9d
cmpl $0x0, 0x4(%rsp)
je 0xccd98
movq 0x18(%rsp), %rax
xorl %r15d, %r15d
xorl %r14d, %r14d
movb 0x28(%r12), %cl
xorb 0x28(%rax,%r15), %cl
testb $0x40, %cl
jne 0xccd48
movl 0x14(%rax,%r15), %ecx
cmpl 0x8(%r12), %ecx
jne 0xccd36
movl 0x8(%rax,%r15), %ecx
cmpl 0x14(%r12), %ecx
jne 0xccd36
movl 0xc(%rax,%r15), %ecx
cmpl (%r12), %ecx
jne 0xccd36
movl 0x10(%rax,%r15), %ecx
cmpl 0x4(%r12), %ecx
jne 0xccd36
movl (%rax,%r15), %ecx
cmpl 0xc(%r12), %ecx
jne 0xccd36
movl 0x4(%rax,%r15), %ecx
cmpl 0x10(%r12), %ecx
jne 0xccd36
movsd 0x20(%rax,%r15), %xmm0
ucomisd 0x20(%r12), %xmm0
jne 0xccd36
jnp 0xccd7c
incq %r14
movl 0x4(%rsp), %ecx
addq $0x30, %r15
cmpq %rcx, %r14
jb 0xccccf
jmp 0xccd80
movq 0x1c8291(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
movl $0x8, %esi
movl $0x1, %edx
leaq 0x16a352(%rip), %rdi    # 0x2370b5
callq 0x2410
movq 0x18(%rsp), %rax
jmp 0xcccde
callq 0x10be3
jmp 0xccc4f
movl 0x4(%rsp), %ecx
cmpl %r14d, %ecx
jbe 0xccd98
incq %rbx
incq %rbp
cmpq 0x40(%rsp), %rbx
jne 0xccc2d
jmp 0xccd9f
callq 0x10c49
jmp 0xccd85
movl 0x24(%rsp), %ebp
movl %ebp, %r13d
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %r12
incl %ebp
cmpl %r12d, %ebp
jbe 0xccb7c
jmp 0xccdda
movq 0x1c821c(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x16a2ae(%rip), %rsi    # 0x23707c
xorl %eax, %eax
callq 0x22b0
jmp 0xccbf4
movq 0x18(%rdi), %rax
movq 0x28(%rsp), %rsi
incl %esi
movq %rsi, %rcx
cmpq %rsi, %rax
ja 0xccb31
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq