// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x18
popq %rbp
xorl %r13d, %r13d
cmpq (%r12), %r13
jae 0x138349
movq 0x10(%r12), %rdi
cmpq $0x0, -0x8(%rdi,%rbp)
je 0x13833d
movq -0x18(%rdi,%rbp), %r9
leaq (%r9,%r9), %rdx
movb 0x48(%r12), %al
xorl %ecx, %ecx
subb %al, %cl
shrq %cl, %rdx
movq -0x10(%rdi,%rbp), %rsi
leaq (%rsi,%rsi), %r8
shrq %cl, %r8
cmpq %r15, %rdx
jne 0x138233
cmpq %r14, %r8
je 0x138245
cmpq %r14, %rdx
jne 0x13833d
cmpq %r15, %r8
jne 0x13833d
movq 0x50(%r12), %rax
movq %rax, %r11
andq %r9, %r11
testq %r9, %r9
js 0x138269
movq (%rdi,%rbp), %r9
movq %r9, %rcx
shrq $0x20, %rcx
leaq (%r11,%rcx), %rdi
decq %rdi
jmp 0x138284
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
imulq $0x28, %rdx, %rcx
movl (%r10,%rcx), %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 0x1382cf
movl %r9d, %esi
leaq (%rax,%rsi), %r9
decq %r9
jmp 0x1382e3
leaq 0x1(%rax), %rsi
movl %r9d, %r9d
subq %r9, %rsi
movl $0x0, %r9d
cmovaeq %rsi, %r9
imulq $0x28, %r8, %rsi
movl (%r10,%rsi), %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 0x11acba(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
incq %rdx
incq %r8
leaq 0xb7546(%rip), %rsi     # 0x1ef87c
xorl %eax, %eax
callq 0x22b0
incq %r13
addq $0x20, %rbp
jmp 0x1381ed
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq