// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_overlaps(ma_hit_t_alloc*, long long, long long, long long)
void print_overlaps(ma_hit_t_alloc* paf, long long rLen, long long interval_s, long long interval_e)
{
    long long j;

    fprintf(stderr, "left: \n");
    for (j = 0; j < paf->length; j++)
    {
        if(Get_qs(paf->buffer[j]) == 0)
        {
            fprintf(stderr, "?????? interval_s: %lld, interval_e: %lld, qn: %u, tn: %u, j: %lld, qs: %u, qe: %u, ts: %u, te: %u, dir: %u\n",
            interval_s, interval_e,
            Get_qn(paf->buffer[j]), Get_tn(paf->buffer[j]),
            j, Get_qs(paf->buffer[j]), Get_qe(paf->buffer[j]),
            Get_ts(paf->buffer[j]), Get_te(paf->buffer[j]),
            paf->buffer[j].rev);

            fprintf(stderr, "%.*s\n", (int)Get_NAME_LENGTH(R_INF, Get_tn(paf->buffer[j])),
                Get_NAME(R_INF, Get_tn(paf->buffer[j])));
        }   
    }

    fprintf(stderr, "right: \n");
    for (j = 0; j < paf->length; j++)
    {
        if(Get_qe(paf->buffer[j]) == rLen)
        {
            fprintf(stderr, "?????? interval_s: %lld, interval_e: %lld, qn: %u, tn: %u, j: %lld, qs: %u, qe: %u, ts: %u, te: %u, dir: %u\n",
            interval_s, interval_e,
            Get_qn(paf->buffer[j]), Get_tn(paf->buffer[j]),
            j, Get_qs(paf->buffer[j]), Get_qe(paf->buffer[j]),
            Get_ts(paf->buffer[j]), Get_te(paf->buffer[j]),
            paf->buffer[j].rev);
            
            fprintf(stderr, "%.*s\n", (int)Get_NAME_LENGTH(R_INF, Get_tn(paf->buffer[j])),
                Get_NAME(R_INF, Get_tn(paf->buffer[j])));
        }
    }


    fprintf(stderr, "middle: \n");
    for (j = 0; j < paf->length; j++)
    {
        if(Get_qs(paf->buffer[j]) != 0 && Get_qe(paf->buffer[j]) != rLen)
        {
            fprintf(stderr, "?????? interval_s: %lld, interval_e: %lld, qn: %u, tn: %u, j: %lld, qs: %u, qe: %u, ts: %u, te: %u, dir: %u\n",
            interval_s, interval_e,
            Get_qn(paf->buffer[j]), Get_tn(paf->buffer[j]),
            j, Get_qs(paf->buffer[j]), Get_qe(paf->buffer[j]),
            Get_ts(paf->buffer[j]), Get_te(paf->buffer[j]),
            paf->buffer[j].rev);
            
            fprintf(stderr, "%.*s\n", (int)Get_NAME_LENGTH(R_INF, Get_tn(paf->buffer[j])),
                Get_NAME(R_INF, Get_tn(paf->buffer[j])));
        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %r12
movq 0x28ec49(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
leaq 0x22fbd1(%rip), %rdi    # 0x235f72
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movl 0xc(%r12), %eax
testl %eax, %eax
jne 0x64e2
movq 0x28ec20(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
leaq 0x22fc1d(%rip), %rdi    # 0x235fe7
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movl 0xc(%r12), %eax
testl %eax, %eax
jne 0x659c
movq 0x28ebf7(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
leaq 0x22fbfd(%rip), %rdi    # 0x235ff0
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movl 0xc(%r12), %eax
testl %eax, %eax
je 0x64d3
pushq $0xc
popq %rbp
xorl %ebx, %ebx
movq (%r12), %rcx
movq -0xc(%rcx,%rbp), %r10
testl %r10d, %r10d
je 0x6428
movl -0x4(%rcx,%rbp), %r11d
cmpq %r15, %r11
jne 0x643b
incq %rbx
movl %eax, %ecx
addq $0x28, %rbp
cmpq %rcx, %rbx
jb 0x6410
jmp 0x64d3
movq 0x28eb9e(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movq %r10, %r8
shrq $0x20, %r8
movl (%rcx,%rbp), %r9d
movl 0x4(%rcx,%rbp), %eax
movq %rax, (%rsp)
movl 0x8(%rcx,%rbp), %r13d
movl 0xc(%rcx,%rbp), %r14d
shrl $0x1f, %r14d
leaq 0x22fb0d(%rip), %rsi    # 0x235f7a
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
xorl %eax, %eax
pushq %r14
pushq %r13
pushq 0x10(%rsp)
pushq %r11
pushq %r10
pushq %rbx
callq 0x22b0
addq $0x30, %rsp
movq 0x28eb4a(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x28fd90(%rip), %rsi    # 0x296230
movq 0x40(%rsi), %rax
movq (%r12), %rcx
movl (%rcx,%rbp), %ecx
leal 0x1(%rcx), %edx
movl (%rax,%rdx,8), %edx
movq (%rax,%rcx,8), %rcx
subl %ecx, %edx
addq 0x8(%rsi), %rcx
leaq 0x23fcd8(%rip), %rsi    # 0x24619a
xorl %eax, %eax
callq 0x22b0
movl 0xc(%r12), %eax
jmp 0x6428
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0xc
popq %rbx
xorl %r14d, %r14d
movq (%r12), %rcx
movq -0xc(%rcx,%rbx), %r8
testl %r8d, %r8d
je 0x6509
incq %r14
movl %eax, %ecx
addq $0x28, %rbx
cmpq %rcx, %r14
jb 0x64e8
jmp 0x63b9
movq 0x28ead0(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
shrq $0x20, %r8
movl -0x4(%rcx,%rbx), %r10d
movl (%rcx,%rbx), %r9d
movl 0x4(%rcx,%rbx), %r11d
movl 0x8(%rcx,%rbx), %r13d
movl 0xc(%rcx,%rbx), %ebp
shrl $0x1f, %ebp
leaq 0x22fa42(%rip), %rsi    # 0x235f7a
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
xorl %eax, %eax
pushq %rbp
pushq %r13
pushq %r11
pushq %r10
pushq $0x0
pushq %r14
callq 0x22b0
addq $0x30, %rsp
movq 0x28ea81(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x28fcc7(%rip), %rsi    # 0x296230
movq 0x40(%rsi), %rax
movq (%r12), %rcx
movl (%rcx,%rbx), %ecx
leal 0x1(%rcx), %edx
movl (%rax,%rdx,8), %edx
movq (%rax,%rcx,8), %rcx
subl %ecx, %edx
addq 0x8(%rsi), %rcx
leaq 0x23fc0f(%rip), %rsi    # 0x24619a
xorl %eax, %eax
callq 0x22b0
movl 0xc(%r12), %eax
jmp 0x64f6
pushq $0xc
popq %rbp
xorl %r14d, %r14d
movq (%r12), %rcx
movl -0x4(%rcx,%rbp), %r10d
cmpq %r15, %r10
je 0x65c3
incq %r14
movl %eax, %ecx
addq $0x28, %rbp
cmpq %rcx, %r14
jb 0x65a2
jmp 0x63e2
movq 0x28ea16(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movq -0xc(%rcx,%rbp), %r11
movq %r11, %r8
shrq $0x20, %r8
movl (%rcx,%rbp), %r9d
movl 0x4(%rcx,%rbp), %eax
movq %rax, (%rsp)
movl 0x8(%rcx,%rbp), %ebx
movl 0xc(%rcx,%rbp), %r13d
shrl $0x1f, %r13d
leaq 0x22f981(%rip), %rsi    # 0x235f7a
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
xorl %eax, %eax
pushq %r13
pushq %rbx
pushq 0x10(%rsp)
pushq %r10
pushq %r11
pushq %r14
callq 0x22b0
addq $0x30, %rsp
movq 0x28e9be(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x28fc04(%rip), %rsi    # 0x296230
movq 0x40(%rsi), %rax
movq (%r12), %rcx
movl (%rcx,%rbp), %ecx
leal 0x1(%rcx), %edx
movl (%rax,%rdx,8), %edx
movq (%rax,%rcx,8), %rcx
subl %ecx, %edx
addq 0x8(%rsi), %rcx
leaq 0x23fb4c(%rip), %rsi    # 0x24619a
xorl %eax, %eax
callq 0x22b0
movl 0xc(%r12), %eax
jmp 0x65b0