// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
xorpd %xmm0, %xmm0
pushq $0x8
popq %r15
pushq $0x1
popq %r12
leaq 0x15e736(%rip), %r13    # 0x1ef3ec
leaq 0x1590aa(%rip), %rbp    # 0x1e9d67
movq %rdi, 0x8(%rsp)
movl %ebx, %ebx
cmpq %rbx, (%rdi)
jbe 0x90d6e
movq 0x10(%rdi), %rax
imulq $0x30, %rbx, %r14
ucomisd 0x20(%rax,%r14), %xmm0
jae 0x90cfe
movl 0x4(%rax,%r14), %ecx
cmpl (%rax,%r14), %ecx
jbe 0x90d25
movl 0x10(%rax,%r14), %ecx
cmpl 0xc(%rax,%r14), %ecx
jbe 0x90d4c
incl %ebx
movq 0x8(%rsp), %rdi
jmp 0x90cc2
movq 0x1c22db(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2410
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
jmp 0x90cde
movq 0x1c22b4(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2410
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
jmp 0x90ce9
movq 0x1c228d(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x158216(%rip), %rdi    # 0x1e8f73
movq %r15, %rsi
movq %r12, %rdx
callq 0x2410
xorpd %xmm0, %xmm0
jmp 0x90cf5
xorl %edx, %edx
movl %edx, %edx
cmpq %rdx, 0x18(%rdi)
jbe 0x91029
movq 0x10(%rdi), %rax
movq 0x28(%rdi), %rcx
movq %rdx, 0x20(%rsp)
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x30(%rsp)
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
leaq (%rax,%rcx), %r12
addq %rcx, %rax
addq $0x10, %rax
movq %rax, 0x28(%rsp)
xorl %ebx, %ebx
pushq $0x1
popq %rdx
movq %r12, 0x38(%rsp)
cmpl 0x30(%rsp), %edx
ja 0x91018
movl %edx, %r14d
movl %ebx, %r13d
jne 0x90dd1
imulq $0x30, %r13, %rax
movl 0x14(%r12,%rax), %esi
jmp 0x90de9
imulq $0x30, %r14, %rax
imulq $0x30, %r13, %rcx
movl 0x14(%r12,%rcx), %esi
cmpl %esi, 0x14(%r12,%rax)
je 0x90ff4
movl %edx, %ebp
imulq $0x30, %r13, %r15
movl 0x8(%r12,%r15), %edx
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x8feef
movl %ebp, 0x1c(%rsp)
movl %ebp, %edx
subl %ebx, %edx
movl 0x4(%rsp), %ecx
cmpl %ecx, %edx
jne 0x90ffb
leaq (%r12,%r15), %rax
movq %rax, 0x40(%rsp)
addq 0x28(%rsp), %r15
xorl %ebx, %ebx
movq %r13, %rax
movq %r13, 0x48(%rsp)
cmpq %r14, %rax
jae 0x90fee
movq %rax, 0x50(%rsp)
imulq $0x30, %rax, %rbp
movq 0x40(%rsp), %rax
movb 0x28(%rax), %al
xorb 0x28(%r12,%rbp), %al
testb $0x40, %al
jne 0x90f8b
addq %r12, %rbp
xorl %r12d, %r12d
cmpq %r14, %r13
jae 0x90eef
cmpq %r12, %rbx
je 0x90eaa
movl (%rbp), %eax
movl 0x4(%rbp), %ecx
movl -0x10(%r15,%r12), %edx
movl -0xc(%r15,%r12), %esi
cmpl %esi, %ecx
cmovbl %ecx, %esi
cmpl %edx, %eax
cmoval %eax, %edx
cmpl %edx, %esi
ja 0x90eb3
movl 0xc(%rbp), %eax
movl 0x10(%rbp), %ecx
movl -0x4(%r15,%r12), %edx
movl (%r15,%r12), %esi
cmpl %esi, %ecx
cmovbl %ecx, %esi
cmpl %edx, %eax
cmoval %eax, %edx
cmpl %edx, %esi
ja 0x90ed1
incq %r13
addq $0x30, %r12
jmp 0x90e61
movq 0x1c2126(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x1580df(%rip), %rdi    # 0x1e8fa3
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x90e8d
movq 0x1c2108(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x1580ca(%rip), %rdi    # 0x1e8fac
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x90eaa
xorl %r13d, %r13d
xorl %r12d, %r12d
movl 0x4(%rsp), %eax
cmpq %rax, %r12
jae 0x90fb0
movq 0x10(%rsp), %rax
movb 0x28(%rbp), %cl
xorb 0x28(%rax,%r13), %cl
testb $0x40, %cl
jne 0x90f68
movl 0x14(%rax,%r13), %ecx
cmpl 0x8(%rbp), %ecx
jne 0x90f5f
movl 0x8(%rax,%r13), %ecx
cmpl 0x14(%rbp), %ecx
jne 0x90f5f
movl 0xc(%rax,%r13), %ecx
cmpl (%rbp), %ecx
jne 0x90f5f
movl 0x10(%rax,%r13), %ecx
cmpl 0x4(%rbp), %ecx
jne 0x90f5f
movl (%rax,%r13), %ecx
cmpl 0xc(%rbp), %ecx
jne 0x90f5f
movl 0x4(%rax,%r13), %ecx
cmpl 0x10(%rbp), %ecx
jne 0x90f5f
movsd 0x20(%rax,%r13), %xmm0
ucomisd 0x20(%rbp), %xmm0
jne 0x90f5f
jnp 0x90fac
incq %r12
addq $0x30, %r13
jmp 0x90ef5
movq 0x1c2071(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x15803c(%rip), %rdi    # 0x1e8fb5
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq 0x10(%rsp), %rax
jmp 0x90f14
movq 0x1c204e(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x157ffe(%rip), %rdi    # 0x1e8f9a
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x90e5b
movl 0x4(%rsp), %eax
cmpl %r12d, %eax
movq 0x48(%rsp), %r13
jbe 0x90fd0
movq 0x50(%rsp), %rax
incq %rax
addq $0x30, %rbx
movq 0x38(%rsp), %r12
jmp 0x90e34
movq 0x1c2009(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x157fdd(%rip), %rdi    # 0x1e8fbe
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x90fba
movl 0x1c(%rsp), %edx
movl %edx, %ebx
incl %edx
jmp 0x90db4
movq 0x1c1fde(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x157f70(%rip), %rsi    # 0x1e8f7c
xorl %eax, %eax
callq 0x22b0
jmp 0x90e1c
movq 0x20(%rsp), %rdx
incl %edx
movq 0x8(%rsp), %rdi
jmp 0x90d70
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq