// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: debug_info_of_specfic_read(char const*, ma_hit_t_alloc*, ma_hit_t_alloc*, int, char const*)
void debug_info_of_specfic_read(const char* name, ma_hit_t_alloc* sources, ma_hit_t_alloc* reverse_sources, int id, const char* command)
{
    long long i, j, Len;
    uint32_t tn;

    if(id == -1)
    {
        i = 0;
        Len = R_INF.total_reads;
    }
    else
    {
        i = id;
        Len = id + 1;
    }
    

    for (; i < Len; i++)
    {
        if(memcmp(name, Get_NAME(R_INF, i), Get_NAME_LENGTH(R_INF, i)) == 0)
        {
            fprintf(stderr, "\n\n\nafter %s\n", command);

            fprintf(stderr, "****************ma_hit_t (%lld)ref_read: %.*s, len: %lu****************\n", 
					i, (int)Get_NAME_LENGTH(R_INF, i), Get_NAME(R_INF, i), (unsigned long)Get_READ_LENGTH(R_INF, i));


            fprintf(stderr, "sources Len: %d, is_fully_corrected: %d\n", 
            sources[i].length, sources[i].is_fully_corrected);

            for (j = 0; j < sources[i].length; j++)
            {
                tn = Get_tn(sources[i].buffer[j]);
                fprintf(stderr, "target: %.*s, qs: %u, qe: %u, ts: %u, te: %u, ml: %u, rev: %u, el: %u, del: %u\n", 
                (int)Get_NAME_LENGTH(R_INF, tn), Get_NAME(R_INF, tn),
                Get_qs(sources[i].buffer[j]),
                Get_qe(sources[i].buffer[j]),
                Get_ts(sources[i].buffer[j]),
                Get_te(sources[i].buffer[j]),
                sources[i].buffer[j].ml,
                sources[i].buffer[j].rev,
                sources[i].buffer[j].el,
                (uint32_t)sources[i].buffer[j].del);
            }


            
            fprintf(stderr, "######reverse_query_read Len: %d\n", reverse_sources[i].length);



            for (j = 0; j < reverse_sources[i].length; j++)
            {
                tn = Get_tn(reverse_sources[i].buffer[j]);
                fprintf(stderr, "target: %.*s, qs: %u, qe: %u, ts: %u, te: %u, rev: %u, del: %u\n", 
                (int)Get_NAME_LENGTH(R_INF, tn), Get_NAME(R_INF, tn),
                Get_qs(reverse_sources[i].buffer[j]),
                Get_qe(reverse_sources[i].buffer[j]),
                Get_ts(reverse_sources[i].buffer[j]),
                Get_te(reverse_sources[i].buffer[j]),
                reverse_sources[i].buffer[j].rev,
                (uint32_t)sources[i].buffer[j].del);
            }

            break;
            
        }
    }

    fflush(stderr);

    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, (%rsp)
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, 0x18(%rsp)
xorl %eax, %eax
movl %ecx, %edx
incl %edx
leaq 0x1d368c(%rip), %rsi    # 0x28b230
cmovnel %ecx, %eax
movslq %edx, %rcx
cmoveq 0x50(%rsi), %rcx
movq %rcx, 0x20(%rsp)
cltq
movq 0x8(%rsi), %rcx
movq %rcx, 0x10(%rsp)
movq 0x40(%rsi), %rbp
movq %rax, 0x8(%rsp)
leaq -0x1(%rax), %rcx
leaq -0x18(%r12), %r14
addq $-0xc, %r12
leaq -0x18(%rbx), %r15
addq $-0xc, %rbx
leaq 0x1(%rcx), %r13
cmpq 0x20(%rsp), %r13
jge 0xb7cd6
movq 0x8(%rbp,%rcx,8), %rax
movq 0x10(%rbp,%rcx,8), %rdx
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax), %rsi
subq %rax, %rdx
movq 0x18(%rsp), %rdi
callq 0x21a0
addq $0x18, %r14
addq $0x18, %r12
addq $0x18, %r15
addq $0x18, %rbx
movq %r13, %rcx
testl %eax, %eax
jne 0xb7bdd
movq 0x1d23b6(%rip), %rbp    # 0x289fe0
movq (%rbp), %rdi
leaq 0x172832(%rip), %rsi    # 0x22a467
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
leaq 0x1d35e5(%rip), %rsi    # 0x28b230
movq 0x18(%rsi), %rax
movq 0x40(%rsi), %rdx
movl 0x8(%rdx,%r13,8), %ecx
movq (%rdx,%r13,8), %r8
subl %r8d, %ecx
addq 0x8(%rsi), %r8
movq (%rax,%r13,8), %r9
leaq 0x172806(%rip), %rsi    # 0x22a474
movq %r13, %rdx
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movq 0x8(%rsp), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r13
addq %r13, %r14
movl (%r12,%r13), %edx
movzbl 0x4(%r12,%r13), %ecx
leaq 0x172820(%rip), %rsi    # 0x22a4bd
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, (%r12,%r13)
je 0xb7cb9
addq %r13, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x1042e
movq (%rbp), %rdi
movl (%rbx,%r13), %edx
leaq 0x17286e(%rip), %rsi    # 0x22a536
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, (%rbx,%r13)
jne 0xb7cf3
movq 0x1d2303(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2200
addq %r13, %r15
addq %r13, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x104f2
jmp 0xb7cd6