// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_ctg_trans_ovlp(kv_u_trans_t*, ma_ug_t*, ma_ug_t*, scaf_res_t*, ma_ug_t*, scaf_res_t*)
void print_ctg_trans_ovlp(kv_u_trans_t *os, ma_ug_t *ref, ma_ug_t *hu1, scaf_res_t *cp1, ma_ug_t *hu2, scaf_res_t *cp2)
{
    u_trans_t *p = NULL; uint32_t i, qui, tui, qid, tid; ma_utg_t *uq, *ut; 
    for (i = 0; i < os->n; i++) {
        p = &(os->a[i]); 
        qui = p->qn<hu1->u.n?1:2; qid = ((p->qn<hu1->u.n)?p->qn:p->qn-hu1->u.n);
        tui = p->tn<hu1->u.n?1:2; tid = ((p->tn<hu1->u.n)?p->tn:p->tn-hu1->u.n);
        uq = ((p->qn<hu1->u.n)?&(hu1->u.a[p->qn]):&(hu2->u.a[p->qn-hu1->u.n]));
        ut = ((p->tn<hu1->u.n)?&(hu1->u.a[p->tn]):&(hu2->u.a[p->tn-hu1->u.n]));
        fprintf(stderr, "************\n");
        fprintf(stderr, "[M::%s] h%utg%.6u%c\t%u\t%u\t%u\t%c\th%utg%.6u%c\t%u\t%u\t%u\tw(%f)\tf(%u)\n", __func__,
        qui, qid+1, "lc"[uq->circ], uq->len, p->qs, p->qe, "+-"[p->rev],
        tui, tid+1, "lc"[ut->circ], ut->len, p->ts, p->te, p->nw, p->f);

        prt_scaf_res_t(ref, qui==1?cp1:cp2, qui==1?hu1:hu2, (p->qn<hu1->u.n)?p->qn:p->qn-hu1->u.n, p->qs, p->qe, qui==1?"h1tg":"h2tg", 3);
        prt_scaf_res_t(ref, tui==1?cp1:cp2, tui==1?hu1:hu2, (p->tn<hu1->u.n)?p->tn:p->tn-hu1->u.n, p->ts, p->te, tui==1?"h1tg":"h2tg", 3);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x128ab0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movl $0x2, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1285d4
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x90(%rbp)
jmp 0x1285e9
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl %eax, -0x70(%rbp)
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movl $0x2, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, -0x6c(%rbp)
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x40(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x128636
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movq %rax, -0x98(%rbp)
jmp 0x12864b
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x40(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl %eax, -0x74(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x128684
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movl 0x8(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
jmp 0x1286a8
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x40(%rbp), %rdx
subq (%rdx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x40(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1286e2
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movl 0x14(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
jmp 0x128706
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movl 0x14(%rcx), %ecx
movq -0x40(%rbp), %rdx
subq (%rdx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x29b8c5(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x260ce9(%rip), %rsi    # 0x38940e
movb $0x0, %al
callq 0x22a0
movq 0x29b8ad(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x68(%rbp), %ecx
movl -0x70(%rbp), %r8d
addl $0x1, %r8d
movq -0x80(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %edx
leaq 0x25cbae(%rip), %rax    # 0x385303
movsbl (%rax,%rdx), %r9d
movq -0x80(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x60(%rbp), %rdx
movl (%rdx), %edx
movl %edx, -0xbc(%rbp)
movq -0x60(%rbp), %rdx
movl 0x4(%rdx), %edx
movl %edx, -0xb8(%rbp)
movq -0x60(%rbp), %rdx
movb 0x28(%rdx), %dl
shrb $0x6, %dl
andb $0x1, %dl
movzbl %dl, %edx
movl %edx, %esi
leaq 0x25a704(%rip), %rdx    # 0x382e9b
movsbl (%rdx,%rsi), %r13d
movl -0x6c(%rbp), %r12d
movl -0x74(%rbp), %r15d
addl $0x1, %r15d
movq -0x88(%rbp), %rdx
movl (%rdx), %edx
shrl $0x1f, %edx
movl %edx, %edx
movl %edx, %esi
leaq 0x25cb44(%rip), %rdx    # 0x385303
movsbl (%rdx,%rsi), %r14d
movq -0x88(%rbp), %rdx
movl (%rdx), %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq -0x60(%rbp), %rdx
movl 0xc(%rdx), %r11d
movq -0x60(%rbp), %rdx
movl 0x10(%rdx), %r10d
movq -0x60(%rbp), %rdx
movsd 0x20(%rdx), %xmm0
movq -0x60(%rbp), %rdx
movb 0x28(%rdx), %dl
andb $0x3f, %dl
movzbl %dl, %edx
movl %edx, -0xb4(%rbp)
leaq 0x25fd24(%rip), %rsi    # 0x38852a
leaq 0x25fd5f(%rip), %rdx    # 0x38856c
movl %eax, (%rsp)
movl -0xbc(%rbp), %eax
movl %eax, 0x8(%rsp)
movl -0xb8(%rbp), %eax
movl %eax, 0x10(%rsp)
movl -0xb4(%rbp), %eax
movl %r13d, 0x18(%rsp)
movl %r12d, 0x20(%rsp)
movl %r15d, 0x28(%rsp)
movl %r14d, 0x30(%rsp)
movl %ebx, 0x38(%rsp)
movl %r11d, 0x40(%rsp)
movl %r10d, 0x48(%rsp)
movl %eax, 0x50(%rsp)
movb $0x1, %al
callq 0x22a0
movq -0x38(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpl $0x1, -0x68(%rbp)
jne 0x128875
movq -0x48(%rbp), %rax
movq %rax, -0xc8(%rbp)
jmp 0x128880
movq -0x58(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpl $0x1, -0x68(%rbp)
jne 0x1288a1
movq -0x40(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0x1288ac
movq -0x50(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1288da
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0xe8(%rbp)
jmp 0x1288ef
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movl %eax, -0xf4(%rbp)
movq -0x60(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xf0(%rbp)
movq -0x60(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xec(%rbp)
cmpl $0x1, -0x68(%rbp)
jne 0x12892b
leaq 0x25fa0d(%rip), %rax    # 0x38832f
movq %rax, -0x100(%rbp)
jmp 0x12893b
leaq 0x25fa02(%rip), %rax    # 0x388334
movq %rax, -0x100(%rbp)
jmp 0x12893b
movl -0xec(%rbp), %r9d
movl -0xf0(%rbp), %r8d
movl -0xf4(%rbp), %ecx
movq -0xe0(%rbp), %rdx
movq -0xd0(%rbp), %rsi
movq -0xb0(%rbp), %rdi
movq -0x100(%rbp), %rax
movq %rax, (%rsp)
movl $0x3, 0x8(%rsp)
callq 0x128290
movq -0x38(%rbp), %rax
movq %rax, -0x108(%rbp)
cmpl $0x1, -0x6c(%rbp)
jne 0x12899a
movq -0x48(%rbp), %rax
movq %rax, -0x110(%rbp)
jmp 0x1289a5
movq -0x58(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x118(%rbp)
cmpl $0x1, -0x6c(%rbp)
jne 0x1289c6
movq -0x40(%rbp), %rax
movq %rax, -0x120(%rbp)
jmp 0x1289d1
movq -0x50(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x40(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1289ff
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movq %rax, -0x130(%rbp)
jmp 0x128a14
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x40(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movl %eax, -0x13c(%rbp)
movq -0x60(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x138(%rbp)
movq -0x60(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x134(%rbp)
cmpl $0x1, -0x6c(%rbp)
jne 0x128a51
leaq 0x25f8e7(%rip), %rax    # 0x38832f
movq %rax, -0x148(%rbp)
jmp 0x128a61
leaq 0x25f8dc(%rip), %rax    # 0x388334
movq %rax, -0x148(%rbp)
jmp 0x128a61
movl -0x134(%rbp), %r9d
movl -0x138(%rbp), %r8d
movl -0x13c(%rbp), %ecx
movq -0x128(%rbp), %rdx
movq -0x118(%rbp), %rsi
movq -0x108(%rbp), %rdi
movq -0x148(%rbp), %rax
movq %rax, (%rsp)
movl $0x3, 0x8(%rsp)
callq 0x128290
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x12856b
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)