// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: prt_dbg_rid_ovlp(ma_hit_t_alloc*, long, char*, char const*)
void prt_dbg_rid_ovlp(ma_hit_t_alloc *ov, int64_t rid, char *rn, const char *cmd)
{
    uint64_t k; ma_hit_t *h = NULL;
    if(rid < 0) {
        for (k = 0; k < R_INF.total_reads; k++) {
            if (memcmp(rn, Get_NAME((R_INF), k), Get_NAME_LENGTH((R_INF), k)) == 0) break;
        }
        if(k >= R_INF.total_reads) return;
        rid = k;
    }

    fprintf(stderr, "\n[M::%s::%s::id::%ld]\n", __func__, cmd, rid);
    for (k = 0; k < ov[rid].length; k++) {
        h = &(ov[rid].buffer[k]);
        if(h->del) continue;
        fprintf(stderr, "%.*s(qn::%u)\t%u\t%u\t%u\t%c\t%.*s(tn::%u)\t%u\t%u\t%u\t%u\t%u\t255\n", (int)Get_NAME_LENGTH(R_INF, Get_qn(*h)), Get_NAME((R_INF), Get_qn(*h)), Get_qn(*h), (uint32_t)Get_READ_LENGTH(R_INF, Get_qn(*h)), Get_qs(*h), Get_qe(*h), "+-"[h->rev], 
        (int)Get_NAME_LENGTH(R_INF, Get_tn(*h)), Get_NAME((R_INF), Get_tn(*h)), Get_tn(*h), (uint32_t)Get_READ_LENGTH(R_INF, Get_tn(*h)), Get_ts(*h), Get_te(*h), h->ml, h->bl);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
jns 0xc1354
movq %rdx, %r12
leaq 0x192f1d(%rip), %rax    # 0x254230
movq 0x8(%rax), %r13
movq 0x40(%rax), %rbp
xorl %r14d, %r14d
subq 0x50(%rax), %r14
pushq $-0x1
popq %r15
leaq (%r14,%r15), %rax
cmpq $-0x1, %rax
je 0xc148d
movq 0x8(%rbp,%r15,8), %rax
movq 0x10(%rbp,%r15,8), %rdx
leaq (%rax,%r13), %rsi
subq %rax, %rdx
movq %r12, %rdi
callq 0x21a0
incq %r15
testl %eax, %eax
jne 0xc1326
movq 0x191c85(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x129bb3(%rip), %rsi    # 0x1eaf18
leaq 0x129bc3(%rip), %rdx    # 0x1eaf2f
movq 0x8(%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x22b0
imulq $0x18, %r15, %rax
addq %rax, %rbx
pushq $0x18
popq %r15
xorl %ebp, %ebp
movl 0xc(%rbx), %eax
cmpq %rax, %rbp
jae 0xc148d
movq (%rbx), %rax
movq (%rax,%r15), %r14
testq %r14, %r14
jns 0xc13a9
incq %rbp
addq $0x28, %r15
jmp 0xc1388
movq 0x191c30(%rip), %rcx    # 0x252fe0
movq (%rcx), %rdi
leaq 0x192e76(%rip), %r9     # 0x254230
movq 0x40(%r9), %rsi
movq -0x18(%rax,%r15), %r8
movq %r8, 0x8(%rsp)
shrq $0x20, %r8
leal 0x1(%r8), %ecx
movl (%rsi,%rcx,8), %edx
movq (%rsi,%r8,8), %rcx
subl %ecx, %edx
movq 0x8(%r9), %r12
movq 0x18(%r9), %r10
addq %r12, %rcx
movl (%r10,%r8,8), %r9d
movl -0x10(%rax,%r15), %r11d
movq %r11, 0x30(%rsp)
movl %r14d, %r11d
shrl $0x1f, %r11d
leaq 0x122e23(%rip), %r13    # 0x1e4223
movsbl (%r11,%r13), %r11d
movq %r11, 0x28(%rsp)
movl -0xc(%rax,%r15), %r11d
leal 0x1(%r11), %r13d
movl (%rsi,%r13,8), %r13d
movq (%rsi,%r11,8), %rsi
subl %esi, %r13d
addq %rsi, %r12
movl (%r10,%r11,8), %esi
movq %rsi, 0x20(%rsp)
movl -0x8(%rax,%r15), %esi
movq %rsi, 0x18(%rsp)
movl -0x4(%rax,%r15), %eax
movq %rax, 0x10(%rsp)
movl %r14d, %r10d
shrl $0x1e, %r10d
andl $0x1, %r10d
shrq $0x20, %r14
subq $0x8, %rsp
leaq 0x129ae8(%rip), %rsi    # 0x1eaf40
xorl %eax, %eax
pushq %r14
pushq %r10
pushq 0x28(%rsp)
pushq 0x38(%rsp)
pushq 0x48(%rsp)
pushq %r11
pushq %r12
pushq %r13
pushq 0x70(%rsp)
pushq 0x80(%rsp)
pushq 0x60(%rsp)
callq 0x22b0
addq $0x60, %rsp
jmp 0xc13a0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq