// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: prt_scaf_res_t(ma_ug_t*, scaf_res_t*, ma_ug_t*, unsigned int, unsigned int, unsigned int, char const*, unsigned int)
void prt_scaf_res_t(ma_ug_t *ref, scaf_res_t *cp, ma_ug_t *ug, uint32_t uid, uint32_t s, uint32_t e, const char *pfx, uint32_t bw)
{
    uint32_t in, rs, re, rn, z; uc_block_t *ra;

    in = 0;
    while (get_scaf_res_t(cp, uid, s, e, &in, &rs, &re, &rn, &ra)) {
        fprintf(stderr, "%s%.6u%c\t%u\t%u\t%u\tn(%u)\n", pfx, uid+1, "lc"[ug->u.a[uid].circ], ug->u.a[uid].len, rs, re, rn);
        if(rn <= (bw<<1)) {
            for (z = 0; z < rn; z++) fprintf(stderr, "utg%.6u%c,", (ra[z].hid)+1, "lc"[ref->u.a[ra[z].hid].circ]);
        } else {
            for (z = 0; z < bw; z++) fprintf(stderr, "utg%.6u%c,", (ra[z].hid)+1, "lc"[ref->u.a[ra[z].hid].circ]);
            fprintf(stderr, "......,");
            for (z = rn-bw; z < rn; z++) fprintf(stderr, "utg%.6u%c,", (ra[z].hid)+1, "lc"[ref->u.a[ra[z].hid].circ]);
        }
        fprintf(stderr, "\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, 0x40(%rsp)
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
leaq 0x2c(%rsp), %r8
movl $0x0, (%r8)
subq $0x8, %rsp
leaq 0x20(%rsp), %rax
leaq 0xc(%rsp), %r10
leaq 0x10(%rsp), %r11
leaq 0x14(%rsp), %r9
movq %rsi, %rdi
movl %ecx, %esi
movl %ebp, %edx
movl %ebx, %ecx
pushq %rax
pushq %r10
pushq %r11
callq 0xdbc81
addq $0x20, %rsp
testl %eax, %eax
je 0xdbfc0
movl 0x88(%rsp), %ecx
leal 0x1(%r14), %eax
movl %eax, 0x28(%rsp)
movl %r14d, %eax
leal (%rcx,%rcx), %edx
movl %edx, 0x24(%rsp)
addq $0x10, 0x10(%rsp)
movl %ecx, %ecx
movq %rcx, 0x30(%rsp)
movq 0x1b916b(%rip), %r15    # 0x294fe0
leaq (%rax,%rax,4), %rax
movq %rax, 0x38(%rsp)
movq %r15, %r13
movq (%r15), %rdi
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rsp), %rcx
movl (%rax,%rcx,8), %r9d
movl %r9d, %eax
shrl $0x1f, %eax
leaq 0x158898(%rip), %rcx    # 0x23473b
movsbl (%rax,%rcx), %r8d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl 0xc(%rsp), %r10d
movl 0x8(%rsp), %r11d
movl 0x4(%rsp), %r15d
subq $0x8, %rsp
leaq 0x15ba55(%rip), %rsi    # 0x23791e
movq 0x88(%rsp), %rdx
movl 0x30(%rsp), %ecx
xorl %eax, %eax
pushq %r15
pushq %r11
pushq %r10
callq 0x22b0
addq $0x20, %rsp
cmpl 0x24(%rsp), %r15d
ja 0xdbf44
testl %r15d, %r15d
jne 0xdbfa9
movq %r13, %r15
movq (%r13), %rsi
movl $0xa, %edi
callq 0x2270
subq $0x8, %rsp
movq %r12, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %ecx
leaq 0x34(%rsp), %r8
leaq 0x14(%rsp), %r9
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
callq 0xdbc81
addq $0x20, %rsp
testl %eax, %eax
jne 0xdbe7e
jmp 0xdbfc0
movl 0x88(%rsp), %eax
testl %eax, %eax
je 0xdbf63
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x1119d
movq (%r13), %rcx
movl $0x7, %esi
movl $0x1, %edx
leaq 0x15b9bf(%rip), %rdi    # 0x237937
callq 0x2410
movl %r15d, %esi
movl 0x88(%rsp), %eax
subl %eax, %esi
cmpl %r15d, %esi
jae 0xdbef6
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
callq 0x11204
jmp 0xdbef6
leaq 0x18(%rsp), %rdi
movl %r15d, %esi
movq 0x10(%rsp), %rdx
callq 0x11137
jmp 0xdbef6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq