// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x112cce
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
ucomisd 0x20(%rax), %xmm0
jb 0x112c37
movq 0x2b13ba(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x275e22(%rip), %rsi    # 0x388a52
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x1c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
ja 0x112c7a
movq 0x2b1377(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x27b509(%rip), %rsi    # 0x38e17c
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x1c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
ja 0x112cbe
movq 0x2b1333(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x274fa7(%rip), %rsi    # 0x387c5e
movb $0x0, %al
callq 0x22a0
jmp 0x112cc0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x112bf3
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x113339
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x20(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x30(%rbp), %eax
ja 0x113329
movl -0x1c(%rbp), %eax
cmpl -0x30(%rbp), %eax
je 0x112d68
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x2c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x14(%rcx), %eax
je 0x113319
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %esi
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
leaq -0x18(%rbp), %rcx
leaq -0x34(%rbp), %r8
callq 0x110ee0
movl -0x1c(%rbp), %eax
subl -0x2c(%rbp), %eax
cmpl -0x34(%rbp), %eax
je 0x112dc7
movq 0x2b1233(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
subl -0x2c(%rbp), %edx
movl -0x34(%rbp), %ecx
leaq 0x274ea7(%rip), %rsi    # 0x387c67
movb $0x0, %al
callq 0x22a0
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x113313
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
movq -0x10(%rbp), %rcx
movl -0x2c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movb 0x28(%rcx), %cl
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x112e28
movq 0x2b11c9(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x274e64(%rip), %rsi    # 0x387c85
movb $0x0, %al
callq 0x22a0
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x113163
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x112e47
jmp 0x113155
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
ja 0x112e81
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x112e95
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jb 0x112ed2
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0x112ee5
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x112f9e
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
ja 0x112f2d
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x48(%rbp)
jmp 0x112f41
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jb 0x112f7e
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0x112f91
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %eax
movl -0x50(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x54(%rbp)
jmp 0x112fa5
xorl %eax, %eax
movl %eax, -0x54(%rbp)
jmp 0x112fa5
movl -0x54(%rbp), %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jbe 0x112fc9
movq 0x2b1028(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x274ccc(%rip), %rsi    # 0x387c8e
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
ja 0x113003
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x113017
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jb 0x113057
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x60(%rbp)
jmp 0x11306b
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x5c(%rbp), %eax
movl -0x60(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x113128
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
ja 0x1130b3
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x64(%rbp)
jmp 0x1130c7
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jb 0x113107
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x6c(%rbp)
jmp 0x11311b
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x6c(%rbp)
movl -0x68(%rbp), %eax
movl -0x6c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x70(%rbp)
jmp 0x11312f
xorl %eax, %eax
movl %eax, -0x70(%rbp)
jmp 0x11312f
movl -0x70(%rbp), %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jbe 0x113153
movq 0x2b0e9e(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x274b4b(%rip), %rsi    # 0x387c97
movb $0x0, %al
callq 0x22a0
jmp 0x113155
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x112e2e
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x1132e3
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movb 0x28(%rcx), %cl
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x1131c5
movq 0x2b0e2c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x274ae2(%rip), %rsi    # 0x387ca0
movb $0x0, %al
callq 0x22a0
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x1132d3
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x14(%rcx), %eax
jne 0x1132d3
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x1132d3
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x1132d3
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x1132d3
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jne 0x1132d3
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movsd 0x20(%rax), %xmm0
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
ucomisd 0x20(%rax), %xmm0
jne 0x1132d3
jp 0x1132d3
jmp 0x1132e3
jmp 0x1132d5
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x11316a
movl -0x28(%rbp), %eax
cmpl -0x34(%rbp), %eax
jb 0x113303
movq 0x2b0cee(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x2749ad(%rip), %rsi    # 0x387ca9
movb $0x0, %al
callq 0x22a0
jmp 0x113305
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x112dcd
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x11331b
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x112d2c
jmp 0x11332b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x112cd5
addq $0x70, %rsp
popq %rbp
retq
nop