// File: chhylp123[P]hifiasm/ecovlp.cpp
// Function: dbg_overlap_region_cigar(overlap_region*, unsigned long, char*, All_reads*, UC_Read*)
void dbg_overlap_region_cigar(overlap_region *a, uint64_t a_n, char *qstr, All_reads *rref, UC_Read *tu)
{
    bit_extz_t ez; uint64_t i, k;
    for (i = 0; i < a_n; i++) {
        if(a[i].y_pos_strand) {
            recover_UC_Read_RC(tu, rref, a[i].y_id);
        } else {
            recover_UC_Read(tu, rref, a[i].y_id);
        }
        for (k = 0; k < a[i].w_list.n; k++) {
            if(is_ualn_win((a[i].w_list.a[k]))) continue;
            set_bit_extz_t(ez, a[i], k);
            if(!cigar_check(tu->seq, qstr, &ez)) {
                fprintf(stderr, "\n-0-[M::%s] x_id::%u, y_id::%u, x::[%u, %u), y::[%u, %u)\n", __func__, a[i].x_id, a[i].y_id, a[i].x_pos_s, a[i].x_pos_e + 1, a[i].y_pos_s, a[i].y_pos_e + 1);
                exit(1);
            } else {
                // fprintf(stderr, "\n-1-[M::%s] x_id::%u, y_id::%u, x::[%u, %u), y::[%u, %u)\n", __func__, a[i].x_id, a[i].y_id, a[i].x_pos_s, a[i].x_pos_e + 1, a[i].y_pos_s, a[i].y_pos_e + 1);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x108(%rbp)
movq -0x108(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x25cfff
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
je 0x25cc89
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, %edx
callq 0xa500
jmp 0x25ccad
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, %edx
callq 0xa380
movq $0x0, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq -0x8(%rbp), %rcx
imulq $0xa8, -0x108(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x48(%rcx), %rax
jae 0x25cfe6
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x14(%rax), %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
jne 0x25cd66
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
jne 0x25cd66
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x12(%rax), %eax
cmpl $0x0, %eax
jge 0x25cd66
jmp 0x25cfcf
jmp 0x25cd68
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x70(%rax), %rax
movq -0x8(%rbp), %rcx
imulq $0xa8, -0x108(%rbp), %rdx
addq %rdx, %rcx
movq 0x58(%rcx), %rcx
movq -0x110(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq %rax, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0xe4(%rbp)
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0xe0(%rbp)
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xf0(%rbp)
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0xec(%rbp)
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x14(%rax), %eax
movl %eax, -0xd4(%rbp)
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq -0x110(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x14(%rax), %eax
movl %eax, -0xd8(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0xc0e50
cmpl $0x0, %eax
jne 0x25cfcb
movq 0x1670cc(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rdx
addq %rdx, %rax
movl 0x10(%rax), %r8d
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rdx
addq %rdx, %rax
movl 0x4(%rax), %r9d
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rdx
addq %rdx, %rax
movl 0x8(%rax), %r11d
addl $0x1, %r11d
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rdx
addq %rdx, %rax
movl 0x14(%rax), %r10d
movq -0x8(%rbp), %rax
imulq $0xa8, -0x108(%rbp), %rdx
addq %rdx, %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
leaq 0x132585(%rip), %rsi    # 0x38f52b
leaq 0x1325b8(%rip), %rdx    # 0x38f565
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x22a0
movl $0x1, %edi
callq 0x2240
jmp 0x25cfcd
jmp 0x25cfcf
movq -0x110(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x110(%rbp)
jmp 0x25ccb8
jmp 0x25cfe8
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x25cc3a
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)