// File: chhylp123[P]hifiasm/Correct.cpp
// Function: debug_k_mer_hit_retrive(k_mer_hit*, hpc_t*, All_reads*, ul_idx_t const*, char*, UC_Read*, long, long)
int64_t debug_k_mer_hit_retrive(k_mer_hit *z, hpc_t *hpc_g, All_reads *rref, const ul_idx_t *uref, 
char* qstr, UC_Read *tu, int64_t id, int64_t rev)
{
    int64_t qs, qe, ts, te; char *q_string, *t_string;
    qe = z->self_offset+1; qs = qe - (z->cnt&(0xffu));
    te = z->offset+1; ts = te - (z->cnt&(0xffu));
    if(qe == qs) return 1;
    q_string = qstr + qs; 
    t_string = retrieve_str_seq_exz(tu, ts, te-ts, -1, -1, rev, uref, hpc_g, rref, id);
    fprintf(stderr, "[M::%s::] q_string::%.*s\n", __func__, (int32_t)(qe-qs), q_string);
    fprintf(stderr, "[M::%s::] t_string::%.*s\n", __func__, (int32_t)(te-ts), t_string);
    if(memcmp(q_string, t_string, qe-qs)) {
        fprintf(stderr, "[M::%s::] qsite::%u, tsite::%u\n", __func__, z->self_offset, z->offset);
        return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0xc(%rcx), %ecx
andl $0xff, %ecx
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0xc(%rcx), %ecx
andl $0xff, %ecx
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x64ac7
movq $0x1, -0x10(%rbp)
jmp 0x64bd8
movq -0x38(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
subq -0x58(%rbp), %rdx
movq 0x18(%rbp), %rax
movb %al, %r9b
movq -0x30(%rbp), %rbx
movq -0x20(%rbp), %r11
movq -0x28(%rbp), %r10
movq 0x10(%rbp), %rax
movq $-0x1, %r8
movq %r8, %rcx
movzbl %r9b, %r9d
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xc0c80
movq %rax, -0x70(%rbp)
movq 0x35f4b5(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x50(%rbp), %rax
subq -0x48(%rbp), %rax
movl %eax, %ecx
movq -0x68(%rbp), %r8
leaq 0x31f1e3(%rip), %rsi    # 0x383d26
leaq 0x31f1f6(%rip), %rdx    # 0x383d40
movb $0x0, %al
callq 0x22a0
movq 0x35f488(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x60(%rbp), %rax
subq -0x58(%rbp), %rax
movl %eax, %ecx
movq -0x70(%rbp), %r8
leaq 0x31f1e8(%rip), %rsi    # 0x383d58
leaq 0x31f1c9(%rip), %rdx    # 0x383d40
movb $0x0, %al
callq 0x22a0
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x50(%rbp), %rdx
subq -0x48(%rbp), %rdx
callq 0x20b0
cmpl $0x0, %eax
je 0x64bd0
movq 0x35f441(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %r8d
leaq 0x31f1ba(%rip), %rsi    # 0x383d72
leaq 0x31f181(%rip), %rdx    # 0x383d40
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x10(%rbp)
jmp 0x64bd8
movq $0x1, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)