// File: chhylp123[P]hifiasm/ecovlp.cpp
// Function: print_debug_ovlp_cigar(overlap_region_alloc*, asg64_v*, kv_ul_ov_t*)
void print_debug_ovlp_cigar(overlap_region_alloc* ol, asg64_v* idx, kv_ul_ov_t *c_idx)
{
    uint64_t k, ci; uint32_t cl; ul_ov_t *cp; bit_extz_t ez; uint16_t c; char cm[4]; 
    cm[0] = 'M'; cm[1] = 'S'; cm[2] = 'I'; cm[3] = 'D';  
    for (k = 0; k < idx->n; k++) {
        cp = &(c_idx->a[(uint32_t)idx->a[k]]);
        fprintf(stderr, "**********[M::%s] tid::%u\t%.*s\twid::%u\tq::[%u, %u)\terr::%d\toerr::%u**********\n", __func__, ol->list[ovlp_id(*cp)].y_id, (int)Get_NAME_LENGTH(R_INF, ol->list[ovlp_id(*cp)].y_id), Get_NAME(R_INF, ol->list[ovlp_id(*cp)].y_id),
        ovlp_cur_wid(*cp), ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].x_start, ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].x_end+1, ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].error, ol->list[ovlp_id(*cp)].non_homopolymer_errors);
        set_bit_extz_t(ez, ol->list[ovlp_id(*cp)], ovlp_cur_wid(*cp)); ci = 0;
        while (ci < ez.cigar.n) {
            ci = pop_trace(&(ez.cigar), ci, &c, &cl);
            fprintf(stderr, "%u%c", cl, cm[c]);
        }
        fprintf(stderr, "\n");
    }    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movb $0x4d, -0x126(%rbp)
movb $0x53, -0x125(%rbp)
movb $0x49, -0x124(%rbp)
movb $0x44, -0x123(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2548a5
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq 0x16fb06(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
leaq 0x170dd1(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
movq -0x48(%rbp), %rsi
movl 0xc(%rsi), %esi
imulq $0xa8, %rsi, %rsi
addq %rsi, %rdx
movl 0x10(%rdx), %edx
addl $0x1, %edx
movl %edx, %edx
movq (%rax,%rdx,8), %rax
leaq 0x170da2(%rip), %rdx    # 0x3c52d0
movq 0x40(%rdx), %rdx
movq -0x18(%rbp), %rsi
movq (%rsi), %rsi
movq -0x48(%rbp), %r8
movl 0xc(%r8), %r8d
imulq $0xa8, %r8, %r8
addq %r8, %rsi
movl 0x10(%rsi), %esi
subq (%rdx,%rsi,8), %rax
movl %eax, %r8d
leaq 0x170d74(%rip), %rax    # 0x3c52d0
movq 0x8(%rax), %r9
leaq 0x170d69(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
movq -0x48(%rbp), %rsi
movl 0xc(%rsi), %esi
imulq $0xa8, %rsi, %rsi
addq %rsi, %rdx
movl 0x10(%rdx), %edx
addq (%rax,%rdx,8), %r9
movq -0x48(%rbp), %rax
movl (%rax), %r14d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rdx
movl 0xc(%rdx), %edx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rdx
movl (%rdx), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movl (%rax), %ebx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rdx
movl 0xc(%rdx), %edx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rdx
movl (%rdx), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0x4(%rax), %r11d
addl $0x1, %r11d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rdx
movl 0xc(%rdx), %edx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rdx
movl (%rdx), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movswl 0x14(%rax), %r10d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rdx
movl 0xc(%rdx), %edx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl 0x30(%rax), %eax
leaq 0x13ab74(%rip), %rsi    # 0x38f1b1
leaq 0x13abbc(%rip), %rdx    # 0x38f200
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq 0x70(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq -0x48(%rbp), %rdx
movl 0xc(%rdx), %edx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rcx
movq 0x58(%rcx), %rcx
movq -0x48(%rbp), %rdx
movl (%rdx), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq %rax, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x104(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x100(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x110(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x10c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x14(%rax), %eax
movl %eax, -0xf4(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x14(%rax), %eax
movl %eax, -0xf8(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0x25487c
leaq -0x120(%rbp), %rdi
addq $0xa8, %rdi
movq -0x38(%rbp), %rax
movl %eax, %esi
leaq -0x122(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
callq 0xa1ee0
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq 0x16f789(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x3c(%rbp), %edx
movzwl -0x122(%rbp), %eax
movsbl -0x126(%rbp,%rax), %ecx
leaq 0x12e6c3(%rip), %rsi    # 0x382f36
movb $0x0, %al
callq 0x22a0
jmp 0x25481c
movq 0x16f75d(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x13219b(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x25449e
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)