// File: chhylp123[P]hifiasm/Hash_Table.cpp
// Function: debug_cigar(Fake_Cigar*, overlap_region*, long, k_mer_hit*, unsigned long)
void debug_cigar(Fake_Cigar* z, overlap_region *o, int64_t apend_be, k_mer_hit* hit, uint64_t n_hit)
{
    gen_fake_cigar(z, o, apend_be, hit, n_hit);
    if(!((z->length==o->f_cigar.length) && 
                    (!memcmp(z->buffer, o->f_cigar.buffer, sizeof((*(o->f_cigar.buffer)))*o->f_cigar.length)))) {
        uint64_t k;
        fprintf(stderr, "\n[M::%s] z->n::%u, o->n::%u, rev::%u\n", __func__, z->length, o->f_cigar.length, o->y_pos_strand);
        for (k = 0; k < z->length; k++) {
            fprintf(stderr, "[z::k->%lu] pos::%d, off::%d\n", k, 
                                    get_fake_gap_pos(z, k), get_fake_gap_shift(z, k));
        }
        for (k = 0; k < o->f_cigar.length; k++) {
            fprintf(stderr, "[o::k->%lu] pos::%d, off::%d\n", k, 
                                    get_fake_gap_pos(&(o->f_cigar), k), get_fake_gap_shift(&(o->f_cigar), k));
        }
        // gen_fake_cigar(z, o, apend_be, hit, n_hit, 1);
        // for (k = 0; k < o->f_cigar.length; k++) {
        // 	fprintf(stderr, "[M::k->%lu] x::%u, y::%u, cnt::%u\n", 
		// 			k, hit[k].self_offset, hit[k].offset, hit[k].cnt&(0xffu));
        // }
        
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x1e3a0
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jne 0x1e72f
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x20b0
cmpl $0x0, %eax
je 0x1e861
movq 0x3a58aa(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x40(%rax), %r8d
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %r9d
leaq 0x3638d9(%rip), %rsi    # 0x382030
leaq 0x3638f8(%rip), %rdx    # 0x382056
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
jae 0x1e7de
movq 0x3a585c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %esi
callq 0x1e320
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %esi
callq 0x1e340
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movl -0x34(%rbp), %ecx
movl %eax, %r8d
leaq 0x363899(%rip), %rsi    # 0x382062
movb $0x0, %al
callq 0x22a0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1e76d
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x40(%rcx), %ecx
cmpq %rcx, %rax
jae 0x1e85f
movq 0x3a57e3(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movq -0x30(%rbp), %rax
movl %eax, %esi
callq 0x1e320
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movq -0x30(%rbp), %rax
movl %eax, %esi
callq 0x1e340
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
movl -0x4c(%rbp), %ecx
movl %eax, %r8d
leaq 0x363836(%rip), %rsi    # 0x382080
movb $0x0, %al
callq 0x22a0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1e7e6
jmp 0x1e861
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)