// File: 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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
cmpq $0x0, -0x38(%rbp)
jge 0x164243
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
leaq 0x261116(%rip), %rcx    # 0x3c52d0
cmpq 0x50(%rcx), %rax
jae 0x164225
movq -0x40(%rbp), %rdi
leaq 0x261105(%rip), %rax    # 0x3c52d0
movq 0x8(%rax), %rsi
leaq 0x2610fa(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x50(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
leaq 0x2610e7(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x50(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdx
leaq 0x2610d3(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x50(%rbp), %rcx
subq (%rax,%rcx,8), %rdx
callq 0x20b0
cmpl $0x0, %eax
jne 0x164215
jmp 0x164225
jmp 0x164217
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x1641af
movq -0x50(%rbp), %rax
leaq 0x2610a0(%rip), %rcx    # 0x3c52d0
cmpq 0x50(%rcx), %rax
jb 0x16423b
jmp 0x16449c
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x25fd96(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %r8
leaq 0x2259e7(%rip), %rsi    # 0x389c43
leaq 0x2259f7(%rip), %rdx    # 0x389c5a
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x30(%rbp), %rcx
imulq $0x18, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x16449c
movq -0x30(%rbp), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x50(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
je 0x1642bf
jmp 0x16448b
movq 0x25fd1a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x261000(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
leaq 0x260fe1(%rip), %rcx    # 0x3c52d0
movq 0x40(%rcx), %rcx
movq -0x58(%rbp), %rdx
movq (%rdx), %rdx
shrq $0x20, %rdx
movl %edx, %edx
subq (%rcx,%rdx,8), %rax
movl %eax, %edx
leaq 0x260fc3(%rip), %rax    # 0x3c52d0
movq 0x8(%rax), %rcx
leaq 0x260fb8(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x58(%rbp), %rsi
movq (%rsi), %rsi
shrq $0x20, %rsi
movl %esi, %esi
addq (%rax,%rsi,8), %rcx
movq -0x58(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, %r8d
leaq 0x260f8e(%rip), %rax    # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x58(%rbp), %rsi
movq (%rsi), %rsi
shrq $0x20, %rsi
movl %esi, %esi
movq (%rax,%rsi,8), %rax
movl %eax, %r9d
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq -0x58(%rbp), %rsi
movl 0x8(%rsi), %esi
movl %esi, -0x64(%rbp)
movq -0x58(%rbp), %rsi
movq 0x18(%rsi), %rsi
shrq $0x1f, %rsi
andq $0x1, %rsi
movl %esi, %esi
movl %esi, %r10d
leaq 0x21eb14(%rip), %rsi    # 0x382e9b
movsbl (%rsi,%r10), %esi
movl %esi, -0x60(%rbp)
leaq 0x260f3a(%rip), %rsi    # 0x3c52d0
movq 0x40(%rsi), %rsi
movq -0x58(%rbp), %r10
movl 0xc(%r10), %r10d
addl $0x1, %r10d
movl %r10d, %r10d
movq (%rsi,%r10,8), %rsi
leaq 0x260f1c(%rip), %r10    # 0x3c52d0
movq 0x40(%r10), %r10
movq -0x58(%rbp), %r11
movl 0xc(%r11), %r11d
subq (%r10,%r11,8), %rsi
movl %esi, %r13d
leaq 0x260f02(%rip), %rsi    # 0x3c52d0
movq 0x8(%rsi), %r12
leaq 0x260ef7(%rip), %rsi    # 0x3c52d0
movq 0x40(%rsi), %rsi
movq -0x58(%rbp), %r10
movl 0xc(%r10), %r10d
addq (%rsi,%r10,8), %r12
movq -0x58(%rbp), %rsi
movl 0xc(%rsi), %r15d
leaq 0x260ed8(%rip), %rsi    # 0x3c52d0
movq 0x18(%rsi), %rsi
movq -0x58(%rbp), %r10
movl 0xc(%r10), %r10d
movq (%rsi,%r10,8), %rsi
movl %esi, %r14d
movq -0x58(%rbp), %rsi
movl 0x10(%rsi), %ebx
movq -0x58(%rbp), %rsi
movl 0x14(%rsi), %r11d
movq -0x58(%rbp), %rsi
movq 0x18(%rsi), %rsi
shrq $0x1e, %rsi
andq $0x1, %rsi
movl %esi, %r10d
movq -0x58(%rbp), %rsi
movq 0x18(%rsi), %rsi
shrq $0x20, %rsi
andq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
movl %esi, -0x5c(%rbp)
leaq 0x225821(%rip), %rsi    # 0x389c6b
movl %eax, (%rsp)
movl -0x64(%rbp), %eax
movl %eax, 0x8(%rsp)
movl -0x60(%rbp), %eax
movl %eax, 0x10(%rsp)
movl -0x5c(%rbp), %eax
movl %r13d, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movl %r15d, 0x28(%rsp)
movl %r14d, 0x30(%rsp)
movl %ebx, 0x38(%rsp)
movl %r11d, 0x40(%rsp)
movl %r10d, 0x48(%rsp)
movl %eax, 0x50(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x164272
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop