// File: /workspace/github_cpp_makefile_star2_O2/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 $0x68, %rsp
movl %r9d, %ebx
movl %r8d, %r15d
movl %ecx, %r13d
movq %rdx, 0x58(%rsp)
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
movl 0xa8(%rsp), %ecx
leaq 0x34(%rsp), %r8
andl $0x0, (%r8)
leal 0x1(%r13), %eax
movl %eax, 0x20(%rsp)
movl %r13d, %eax
leal (%rcx,%rcx), %edx
movl %edx, 0x1c(%rsp)
imulq $0x24, %rcx, %rcx
movq %rcx, 0x60(%rsp)
leaq 0x38(%rsp), %r10
leaq 0x2c(%rsp), %r11
imulq $0x28, %rax, %rax
movq %rax, 0x40(%rsp)
leaq 0x30(%rsp), %rax
leaq 0xc(%rsp), %r9
movl %ebx, 0x28(%rsp)
movl %r15d, 0x24(%rsp)
movq %rsi, 0x50(%rsp)
movq %r13, 0x48(%rsp)
subq $0x8, %rsp
movq %r12, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %ebx, %ecx
pushq %r10
movq %r11, %rbp
pushq %r11
movq %rax, %r14
pushq %rax
callq 0x9e595
addq $0x20, %rsp
testl %eax, %eax
je 0x9e918
movq 0x1b4874(%rip), %r13    # 0x252fe0
movq (%r13), %rdi
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x40(%rsp), %rcx
movl (%rax,%rcx), %r9d
movl %r9d, %eax
shrl $0x1f, %eax
leaq 0x147efc(%rip), %rcx    # 0x1e668b
movsbl (%rax,%rcx), %r8d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl 0xc(%rsp), %r10d
movl 0x30(%rsp), %r11d
movl 0x2c(%rsp), %ebx
subq $0x8, %rsp
leaq 0x14b06a(%rip), %rsi    # 0x1e981e
movq 0xa8(%rsp), %rdx
movl 0x28(%rsp), %ecx
xorl %eax, %eax
pushq %rbx
pushq %r11
pushq %r10
callq 0x22b0
addq $0x20, %rsp
movq 0x38(%rsp), %r15
cmpl 0x1c(%rsp), %ebx
ja 0x9e828
imulq $0x24, %rbx, %rbx
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x9e8df
movq (%r13), %rdi
movl (%r15,%r12), %eax
leal 0x1(%rax), %edx
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x28, %rax, %rax
movl (%rcx,%rax), %eax
shrl $0x1f, %eax
leaq 0x147e7b(%rip), %rcx    # 0x1e668b
movsbl (%rax,%rcx), %ecx
leaq 0x14afe6(%rip), %rsi    # 0x1e9801
xorl %eax, %eax
callq 0x22b0
addq $0x24, %r12
jmp 0x9e7e2
xorl %r12d, %r12d
movq (%r13), %rax
cmpq %r12, 0x60(%rsp)
je 0x9e872
movl (%r15,%r12), %ecx
leal 0x1(%rcx), %edx
movq 0x10(%rsp), %rsi
movq 0x10(%rsi), %rsi
imulq $0x28, %rcx, %rcx
movl (%rsi,%rcx), %ecx
shrl $0x1f, %ecx
leaq 0x147e34(%rip), %rsi    # 0x1e668b
movsbl (%rcx,%rsi), %ecx
movq %rax, %rdi
leaq 0x14af9c(%rip), %rsi    # 0x1e9801
xorl %eax, %eax
callq 0x22b0
addq $0x24, %r12
jmp 0x9e82b
leaq 0x14afbe(%rip), %rdi    # 0x1e9837
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0x2410
movl %ebx, %r12d
movl 0xa8(%rsp), %eax
subl %eax, %r12d
imulq $0x24, %r12, %rax
addq %rax, %r15
cmpq %rbx, %r12
jae 0x9e8df
movq (%r13), %rdi
movl (%r15), %eax
leal 0x1(%rax), %edx
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x28, %rax, %rax
movl (%rcx,%rax), %eax
shrl $0x1f, %eax
leaq 0x147dc7(%rip), %rcx    # 0x1e668b
movsbl (%rax,%rcx), %ecx
leaq 0x14af32(%rip), %rsi    # 0x1e9801
xorl %eax, %eax
callq 0x22b0
incq %r12
addq $0x24, %r15
jmp 0x9e89b
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x2270
movl 0x28(%rsp), %ebx
movl 0x24(%rsp), %r15d
movq 0x50(%rsp), %r12
leaq 0x34(%rsp), %r8
movq 0x48(%rsp), %r13
leaq 0x38(%rsp), %r10
movq %rbp, %r11
movq %r14, %rax
leaq 0xc(%rsp), %r9
jmp 0x9e73a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq