// File: chhylp123[P]hifiasm/ecovlp.cpp
// Function: prt_correct0_dbg(overlap_region*)
void prt_correct0_dbg(overlap_region *in)
{
    int64_t wn = in->w_list.n, k; uint32_t ci, len; asg16_v ff; uint16_t c, b; 
    char cm[4], cc[4]; 
    cm[0] = 'M'; cm[1] = 'S'; cm[2] = 'I'; cm[3] = 'D';
    cc[0] = 'A'; cc[1] = 'C'; cc[2] = 'G'; cc[3] = 'T';

    for (k = 0; k < wn; k++) {
        fprintf(stderr, "\n[M::%s] w[%ld] [%d, %d) clen::%u\n", __func__, k, in->w_list.a[k].x_start, in->w_list.a[k].x_end + 1, in->w_list.a[k].clen);

        ci = 0; ff.n = ff.m = in->w_list.a[k].clen; ff.a = in->w_list.c.a + in->w_list.a[k].cidx;
        while (ci < ff.n) {
            ci = pop_trace_bp(&ff, ci, &c, &b, &len);
            fprintf(stderr, "|%u%c(%c)", len, cm[c], ((c==1)||(c==2))?(cc[b]):('*')); 
        }

        fprintf(stderr, "|\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x10(%rbp)
movb $0x4d, -0x40(%rbp)
movb $0x53, -0x3f(%rbp)
movb $0x49, -0x3e(%rbp)
movb $0x44, -0x3d(%rbp)
movb $0x41, -0x44(%rbp)
movb $0x43, -0x43(%rbp)
movb $0x47, -0x42(%rbp)
movb $0x54, -0x41(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x253c33
movq 0x17051b(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl (%rax), %r8d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0x4(%rax), %r9d
addl $0x1, %r9d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0x1c(%rax), %eax
leaq 0x13b656(%rip), %rsi    # 0x38f170
leaq 0x13b672(%rip), %rdx    # 0x38f193
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq %rax, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq -0x18(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
cmpq -0x38(%rbp), %rax
jae 0x253c0a
movl -0x1c(%rbp), %esi
leaq -0x38(%rbp), %rdi
leaq -0x3a(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x20(%rbp), %r8
callq 0x26db30
movl %eax, -0x1c(%rbp)
movq 0x170439(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x4c(%rbp)
movzwl -0x3a(%rbp), %eax
movsbl -0x40(%rbp,%rax), %eax
movl %eax, -0x48(%rbp)
movzwl -0x3a(%rbp), %eax
cmpl $0x1, %eax
je 0x253bd2
movzwl -0x3a(%rbp), %eax
cmpl $0x2, %eax
jne 0x253bdf
movzwl -0x3c(%rbp), %eax
movb -0x44(%rbp,%rax), %al
movb %al, -0x59(%rbp)
jmp 0x253be6
movb $0x2a, %al
movb %al, -0x59(%rbp)
jmp 0x253be6
movl -0x48(%rbp), %ecx
movl -0x4c(%rbp), %edx
movq -0x58(%rbp), %rdi
movb -0x59(%rbp), %al
movsbl %al, %r8d
leaq 0x13b5a6(%rip), %rsi    # 0x38f1a4
movb $0x0, %al
callq 0x22a0
jmp 0x253b78
movq 0x1703cf(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x13b593(%rip), %rsi    # 0x38f1ae
movb $0x0, %al
callq 0x22a0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x253ab0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)