// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: dbg_prt_utg_trans(kv_u_trans_t*, ma_ug_t*, char const*)
void dbg_prt_utg_trans(kv_u_trans_t *ta, ma_ug_t *ug, const char *o_n)
{
    char* gfa_name = (char*)malloc(strlen(o_n)+100); 
    FILE *fn = NULL; sprintf(gfa_name, "%s.tran.dbg.ovlp.log", o_n);
    u_trans_t *p = NULL; uint32_t i; fn = fopen(gfa_name, "w");
    for (i = 0; i < ta->n; i++) {
        p = &(ta->a[i]);
        fprintf(fn, "utg%.6u%c\t%u\t%u\t%u\t%c\tutg%.6u%c\t%u\t%u\t%u\tw(%f)\tf(%u)\n", 
        p->qn+1, "lc"[ug->u.a[p->qn].circ], ug->u.a[p->qn].len, p->qs, p->qe, "+-"[p->rev],
        p->tn+1, "lc"[ug->u.a[p->tn].circ], ug->u.a[p->tn].len, p->ts, p->te, p->nw, p->f);
    }
    fclose(fn); free(gfa_name); fprintf(stderr, "[M::%s::] done\n", __func__);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x64, %rdi
callq 0x2270
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x283c43(%rip), %rsi    # 0x3876d0
movb $0x0, %al
callq 0x2050
movq $0x0, -0x58(%rbp)
movq -0x48(%rbp), %rdi
leaq 0x29592b(%rip), %rsi    # 0x3993d2
callq 0x2200
movq %rax, -0x50(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x103c1c
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %edx
addl $0x1, %edx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rcx
movl 0x8(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x2817f2(%rip), %rax    # 0x385303
movsbl (%rax,%rcx), %ecx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rsi
movl 0x8(%rsi), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq -0x58(%rbp), %rax
movl (%rax), %r9d
movq -0x58(%rbp), %rax
movl 0x4(%rax), %r13d
movq -0x58(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %esi
leaq 0x27f33f(%rip), %rax    # 0x382e9b
movsbl (%rax,%rsi), %r12d
movq -0x58(%rbp), %rax
movl 0x14(%rax), %r15d
addl $0x1, %r15d
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rsi
movl 0x14(%rsi), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x281770(%rip), %rax    # 0x385303
movsbl (%rax,%rsi), %r14d
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rsi
movl 0x14(%rsi), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq -0x58(%rbp), %rax
movl 0xc(%rax), %r11d
movq -0x58(%rbp), %rax
movl 0x10(%rax), %r10d
movq -0x58(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0x58(%rbp), %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
leaq 0x283b03(%rip), %rsi    # 0x3876e5
movl %r13d, (%rsp)
movl %r12d, 0x8(%rsp)
movl %r15d, 0x10(%rsp)
movl %r14d, 0x18(%rsp)
movl %ebx, 0x20(%rsp)
movl %r11d, 0x28(%rsp)
movl %r10d, 0x30(%rsp)
movl %eax, 0x38(%rsp)
movb $0x1, %al
callq 0x22a0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x103ab7
movq -0x50(%rbp), %rdi
callq 0x21a0
movq -0x48(%rbp), %rdi
callq 0x2210
movq 0x2c03ab(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x283adc(%rip), %rsi    # 0x38771b
leaq 0x283ae5(%rip), %rdx    # 0x38772b
movb $0x0, %al
callq 0x22a0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)