// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_binned_reads(ma_hit_t_alloc*, unsigned long, ma_sub_t*)
void print_binned_reads(ma_hit_t_alloc* paf, uint64_t n_read, ma_sub_t* coverage_cut)
{
    uint64_t i, j, binned_flag;

    for (i = 0; i < n_read; ++i)
    {
        if(coverage_cut!=NULL && coverage_cut[i].del) continue;
        binned_flag = R_INF.trio_flag[i];
        fprintf(stdout, "\n***i: %u, binned_flag: %u\n", (uint32_t)i, (uint32_t)binned_flag);
        if(coverage_cut!=NULL)
        {
            fprintf(stdout, "coverage_cut[i].c: %u, coverage_cut[i].s: %u, coverage_cut[i].e: %u, coverage_cut[i].e: %u\n",
            coverage_cut[i].c, coverage_cut[i].s, coverage_cut[i].e, coverage_cut[i].del);
        }
        for (j = 0; j < paf[i].length; j++)
        {
            if(paf[i].buffer[j].del) continue;
            ///fprintf(stdout, "j: %u\n", (uint32_t)j);
            fprintf(stdout, "qn: %u, qs: %u, qe: %u, tn: %u, ts: %u, te: %u\n", 
            (uint32_t)Get_qn(paf[i].buffer[j]), (uint32_t)Get_qs(paf[i].buffer[j]), (uint32_t)Get_qe(paf[i].buffer[j]),
            (uint32_t)Get_tn(paf[i].buffer[j]), (uint32_t)Get_ts(paf[i].buffer[j]), (uint32_t)Get_te(paf[i].buffer[j]));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x161d85
cmpq $0x0, -0x18(%rbp)
je 0x161bac
movq -0x18(%rbp), %rax
imulq $0xc, -0x20(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x161bac
jmp 0x161d74
leaq 0x26371d(%rip), %rax    # 0x3c52d0
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x30(%rbp)
movq 0x2623fe(%rip), %rax    # 0x3c3fc8
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rax
movl %eax, %ecx
leaq 0x227f28(%rip), %rsi    # 0x389b08
movb $0x0, %al
callq 0x22a0
cmpq $0x0, -0x18(%rbp)
je 0x161c4d
movq 0x2623d3(%rip), %rax    # 0x3c3fc8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
imulq $0xc, -0x20(%rbp), %rcx
addq %rcx, %rax
movzbl 0x8(%rax), %edx
movq -0x18(%rbp), %rax
imulq $0xc, -0x20(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x18(%rbp), %rax
imulq $0xc, -0x20(%rbp), %rsi
addq %rsi, %rax
movl 0x4(%rax), %r8d
movq -0x18(%rbp), %rax
imulq $0xc, -0x20(%rbp), %rsi
addq %rsi, %rax
movl (%rax), %r9d
shrl $0x1f, %r9d
leaq 0x227ede(%rip), %rsi    # 0x389b24
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
imulq $0x18, -0x20(%rbp), %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x161d72
movq -0x8(%rbp), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x28(%rbp), %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
je 0x161c9a
jmp 0x161d61
movq 0x262327(%rip), %rax    # 0x3c3fc8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x28(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x28(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
imulq $0x18, -0x20(%rbp), %rsi
addq %rsi, %rax
movq (%rax), %rax
imulq $0x28, -0x28(%rbp), %rsi
addq %rsi, %rax
movl 0x8(%rax), %r8d
movq -0x8(%rbp), %rax
imulq $0x18, -0x20(%rbp), %rsi
addq %rsi, %rax
movq (%rax), %rax
imulq $0x28, -0x28(%rbp), %rsi
addq %rsi, %rax
movl 0xc(%rax), %r9d
movq -0x8(%rbp), %rax
imulq $0x18, -0x20(%rbp), %rsi
addq %rsi, %rax
movq (%rax), %rax
imulq $0x28, -0x28(%rbp), %rsi
addq %rsi, %rax
movl 0x10(%rax), %r10d
movq -0x8(%rbp), %rax
imulq $0x18, -0x20(%rbp), %rsi
addq %rsi, %rax
movq (%rax), %rax
imulq $0x28, -0x28(%rbp), %rsi
addq %rsi, %rax
movl 0x14(%rax), %eax
leaq 0x227e2e(%rip), %rsi    # 0x389b80
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x161c55
jmp 0x161d74
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x161b7c
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)