// File: chhylp123[P]hifiasm/hic.cpp
// Function: print_hits(ha_ug_index*, kvec_pe_hit*, enzyme const*, enzyme const*)
void print_hits(ha_ug_index* idx, kvec_pe_hit* hits, const enzyme *fn1, const enzyme *fn2)
{
    uint64_t k, shif = 64 - idx->uID_bits;
    reads_t r1;
    load_reads(&r1, fn1, fn2);
    char dir[2] = {'+', '-'};
    for (k = 0; k < hits->a.n; ++k) 
    { 
        fprintf(stderr, "%.*s\t%c\ts-utg%.6dl\t%lu\t%c\te-utg%.6dl\t%lu\ti:%lu\n", 
        (int)(r1.name_Len.a[hits->a.a[k].id + 1] - r1.name_Len.a[hits->a.a[k].id]), 
        r1.name.a + r1.name_Len.a[hits->a.a[k].id],
        dir[hits->a.a[k].s>>63], (int)((hits->a.a[k].s<<1)>>shif)+1, hits->a.a[k].s&idx->pos_mode,
        dir[hits->a.a[k].e>>63], (int)((hits->a.a[k].e<<1)>>shif)+1, hits->a.a[k].e&idx->pos_mode,
        hits->a.a[k].id);        
    }
    destory_reads(&r1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movl $0x40, %eax
subq 0x18(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x1c3780
movw 0x1c94e8(%rip), %ax     # 0x38d8b2
movw %ax, -0xaa(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1c4588
movq 0x1ffbef(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x80(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x38(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rdx
movq 0x10(%rdx), %rdx
movq -0x38(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rdx
movq 0x10(%rdx), %rdx
subq (%rcx,%rdx,8), %rax
movl %eax, %edx
movq -0x98(%rbp), %rax
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rsi
movq 0x10(%rsi), %rsi
movq -0x38(%rbp), %r8
shlq $0x5, %r8
addq %r8, %rsi
movq 0x10(%rsi), %rsi
addq (%rcx,%rsi,8), %rax
movq %rax, -0xb8(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x3f, %rax
movsbl -0xaa(%rbp,%rax), %r8d
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
shlq %rax
movq -0x40(%rbp), %rcx
shrq %cl, %rax
movl %eax, %r9d
addl $0x1, %r9d
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %r14
movq -0x18(%rbp), %rax
andq 0x30(%rax), %r14
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x3f, %rax
movsbl -0xaa(%rbp,%rax), %ebx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq -0x40(%rbp), %rcx
shrq %cl, %rax
movq -0xb8(%rbp), %rcx
movl %eax, %r11d
addl $0x1, %r11d
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x8(%rax), %r10
movq -0x18(%rbp), %rax
andq 0x30(%rax), %r10
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x10(%rax), %rax
leaq 0x1c7af3(%rip), %rsi    # 0x38c04c
movq %r14, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1c43d9
leaq -0xa8(%rbp), %rdi
callq 0x1c4330
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq