// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/horder.cpp
// Function: print_specfic_hic_hits(kvec_pe_hit*, unsigned long, unsigned long, ma_ug_t*)
void print_specfic_hic_hits(kvec_pe_hit *hits, uint64_t v, uint64_t w, ma_ug_t *ug)
{
    uint64_t i, suid, euid, slen, elen, p0s, p0e, p1s, p1e, span_s, span_e, sd, ed;
    for (i = 0; i < hits->a.n; i++)
    {
        if(!hits->a.a[i].id) continue;
        suid = get_hit_suid(*hits, i);
        euid = get_hit_euid(*hits, i);
        if((suid == v && euid == w) || (suid == w && euid == v))
        {
            slen = ug->u.a[suid].len;
            elen = ug->u.a[euid].len;

            p0s = get_hit_spos(*hits, i);
            p0e = get_hit_spos_e(*hits, i);
            span_s = MIN(p0s, p0e);
            span_s = MIN(span_s, slen-1);
            span_e = MAX(p0s, p0e);
            span_e =  MIN(span_e, slen-1);
            span_s = ((span_s+span_e)>>1);
            sd = span_s;


            p1s = get_hit_epos(*hits, i);
            p1e = get_hit_epos_e(*hits, i);
            span_s = MIN(p1s, p1e);
            span_s = MIN(span_s, elen-1);
            span_e = MAX(p1s, p1e);
            span_e =  MIN(span_e, elen-1);
            span_s = ((span_s+span_e)>>1);
            ed = span_s;

            fprintf(stderr, "u-stg%.6lul\t%lu\tv-stg%.6lul\t%lu\n", suid+1, sd, euid + 1, ed);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq (%rdi), %rax
testq %rax, %rax
je 0x17c36b
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x18, %ebp
xorl %r13d, %r13d
movq 0x10(%r12), %rdi
cmpq $0x0, -0x8(%rdi,%rbp)
je 0x17c35b
movq -0x18(%rdi,%rbp), %r9
leaq (%r9,%r9), %rdx
movb 0x48(%r12), %sil
xorl %ecx, %ecx
subb %sil, %cl
shrq %cl, %rdx
movq -0x10(%rdi,%rbp), %rsi
leaq (%rsi,%rsi), %r8
shrq %cl, %r8
cmpq %r15, %rdx
jne 0x17c24d
cmpq %r14, %r8
je 0x17c25f
cmpq %r14, %rdx
jne 0x17c35b
cmpq %r15, %r8
jne 0x17c35b
movq 0x50(%r12), %rax
movq %rax, %r11
andq %r9, %r11
testq %r9, %r9
js 0x17c283
movq (%rdi,%rbp), %r9
movq %r9, %rcx
shrq $0x20, %rcx
leaq (%r11,%rcx), %rdi
decq %rdi
jmp 0x17c29e
leaq 0x1(%r11), %rcx
movq (%rdi,%rbp), %r9
movq %r9, %rdi
shrq $0x20, %rdi
subq %rdi, %rcx
movl $0x0, %edi
cmovaeq %rcx, %rdi
movq (%rsp), %rcx
movq 0x10(%rcx), %r10
leaq (%rdx,%rdx,4), %rcx
movl (%r10,%rcx,8), %ebx
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andq %rcx, %rbx
decq %rbx
cmpq %rdi, %r11
movq %rdi, %rcx
cmovbq %r11, %rcx
cmovaq %r11, %rdi
cmpq %rbx, %rcx
cmovaeq %rbx, %rcx
cmpq %rbx, %rdi
cmovaeq %rbx, %rdi
andq %rsi, %rax
testq %rsi, %rsi
js 0x17c2e9
movl %r9d, %esi
leaq (%rax,%rsi), %r9
decq %r9
jmp 0x17c2fd
leaq 0x1(%rax), %rsi
movl %r9d, %r9d
subq %r9, %rsi
movl $0x0, %r9d
cmovaeq %rsi, %r9
leaq (%r8,%r8,4), %rsi
movl (%r10,%rsi,8), %esi
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
andq %r10, %rsi
addq %rdi, %rcx
shrq %rcx
decq %rsi
cmpq %r9, %rax
movq %r9, %rdi
cmovbq %rax, %rdi
cmovaq %rax, %r9
cmpq %rsi, %rdi
cmovaeq %rsi, %rdi
cmpq %rsi, %r9
cmovaeq %rsi, %r9
addq %rdi, %r9
shrq %r9
movq 0x118ca0(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
incq %rdx
incq %r8
leaq 0xc166c(%rip), %rsi     # 0x23d9bc
xorl %eax, %eax
callq 0x22b0
movq (%r12), %rax
incq %r13
addq $0x20, %rbp
cmpq %rax, %r13
jb 0x17c210
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq