// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdx, 0x28(%rsp)
movq %rdi, 0x18(%rsp)
movl $0x4449534d, 0x10(%rsp) # imm = 0x4449534D
movq 0x110de9(%rip), %r14    # 0x252fe0
leaq 0xe(%rsp), %r15
xorl %ecx, %ecx
movq %rsi, 0x20(%rsp)
cmpq (%rsi), %rcx
jae 0x14239e
movq 0x28(%rsp), %rax
movq (%rax), %r13
movq 0x10(%rsi), %rax
movq %rcx, 0x38(%rsp)
movl (%rax,%rcx,8), %eax
imulq $0x1c, %rax, %rbx
movq (%r14), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl (%r13,%rbx), %r12d
movl 0xc(%r13,%rbx), %ecx
imulq $0xa8, %rcx, %rdx
movl 0x10(%rax,%rdx), %ecx
movl 0x30(%rax,%rdx), %esi
movq %rsi, 0x30(%rsp)
leaq 0x111fdc(%rip), %rsi    # 0x254230
movq 0x40(%rsi), %rsi
movq 0x58(%rax,%rdx), %rax
movq %r12, %rdx
shlq $0x5, %rdx
movl (%rax,%rdx), %ebp
movq %r15, %r11
movl 0x4(%rax,%rdx), %r15d
movq %r14, %r10
movswl 0x14(%rax,%rdx), %r14d
leal 0x1(%rcx), %eax
movl (%rsi,%rax,8), %r8d
movq (%rsi,%rcx,8), %r9
subl %r9d, %r8d
leaq 0x111fa3(%rip), %rax    # 0x254230
addq 0x8(%rax), %r9
incl %r15d
subq $0x8, %rsp
leaq 0xae1f5(%rip), %rsi     # 0x1f0494
leaq 0xae23d(%rip), %rdx     # 0x1f04e3
xorl %eax, %eax
pushq 0x38(%rsp)
pushq %r14
movq %r10, %r14
pushq %r15
movq %r11, %r15
pushq %rbp
leaq 0xa2000(%rip), %rbp     # 0x1e42be
pushq %r12
leaq 0x44(%rsp), %r12
callq 0x22b0
addq $0x30, %rsp
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl (%r13,%rbx), %ecx
movl 0xc(%r13,%rbx), %edx
leaq 0xe8(%rsp), %rbx
imulq $0xa8, %rdx, %rdx
movq 0x58(%rax,%rdx), %rsi
shlq $0x5, %rcx
movl 0x18(%rsi,%rcx), %edi
addq %rdi, %rdi
addq 0x70(%rax,%rdx), %rdi
movq %rdi, 0xf8(%rsp)
movl 0x1c(%rsi,%rcx), %eax
movq %rax, 0xf0(%rsp)
movq %rax, 0xe8(%rsp)
movq (%rsi,%rcx), %rdx
movq %rdx, 0x5c(%rsp)
movq 0x8(%rsi,%rcx), %rdx
movq %rdx, 0x50(%rsp)
movswl 0x14(%rsi,%rcx), %ecx
movl %ecx, 0x6c(%rsp)
movl %ecx, 0x68(%rsp)
xorl %r13d, %r13d
cmpq %rax, %r13
jae 0x142381
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x53a7d
movl %eax, %r13d
movq (%r14), %rdi
movl 0x14(%rsp), %edx
movzwl 0xe(%rsp), %eax
movsbl 0x10(%rsp,%rax), %ecx
movq %rbp, %rsi
xorl %eax, %eax
callq 0x22b0
movq 0xe8(%rsp), %rax
jmp 0x142343
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x2270
movq 0x38(%rsp), %rcx
incq %rcx
movq 0x20(%rsp), %rsi
jmp 0x142203
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq