// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: print_ul_ovlps(all_ul_t*, int)
void print_ul_ovlps(all_ul_t *x, int32_t prt_ovlp)
{
	uint64_t k, i, ucov_occ = 0, cov_occ = 0, ucov_len = 0, cov_len = 0, unaligned_len = 0, unaligned_occ = 0, aligned_occ = 0;
	ul_vec_t *p = NULL; nid_t *z = NULL; uc_block_t *m = NULL;
	for (k = 0; k < x->n; k++) {
		z = &(x->nid.a[k]);
		p = &(x->a[k]);
		fprintf(stderr, "S\t%.*s\tq:id:%lu\tl:%u\tdd:%d\n", (int32_t)z->n, z->a, k, p->rlen, 
		((p->bb.n == 1&&p->bb.a[0].base)||(p->bb.n==0))?-1:(int32_t)p->dd);
		if(prt_ovlp) {
			for (i = 0; i < p->bb.n; i++) {
				m = &(p->bb.a[i]);
				if(m->base) {
					ucov_occ++;
					ucov_len += (m->qe-(m->hid&FLANK_M)) - (m->qs+((m->hid>>15)&FLANK_M));
					fprintf(stderr, "B\t%.*s\t%u\t%u\t%u\n", 
					(int32_t)z->n, z->a, p->rlen, (m->qs+((m->hid>>15)&FLANK_M)), (m->qe-(m->hid&FLANK_M)));
				} else {
					fprintf(stderr, "A\t%.*s(%lu)\t%u\t%u\t%u\t%c\t%.*s(%u)\t%u\t%u\t%u\n", 
					(int32_t)z->n, z->a, k, p->rlen, m->qs, m->qe, "+-"[m->rev], 
					(int32_t)Get_NAME_LENGTH(R_INF, m->hid), Get_NAME(R_INF, m->hid), m->hid,
					(uint32_t)Get_READ_LENGTH(R_INF, m->hid), m->ts, m->te);
					if(m->el) cov_occ++;
				}
			}
		}
		if((p->bb.n == 1 && p->bb.a[0].base)||(p->bb.n == 0)) {
			unaligned_len += p->rlen; unaligned_occ++;
		} else {
			aligned_occ++;
		}
		cov_len += p->rlen;
	}
	cov_len -= ucov_len;
	fprintf(stderr, "[M::%s::] ==>aligned_occ:%lu, unaligned_occ:%lu\n", __func__, aligned_occ, unaligned_occ);
	fprintf(stderr, "[M::%s::] ==>cov_len:%lu, ucov_len:%lu, unaligned_len:%lu\n", 
																	__func__, cov_len, ucov_len-unaligned_len, unaligned_len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, 0x2c(%rsp)
cmpq $0x0, 0x50(%rdi)
jne 0x260bf
xorl %r12d, %r12d
xorl %r15d, %r15d
movq $0x0, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
jmp 0x26330
movq 0x263f1a(%rip), %r14    # 0x289fe0
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %rdi, 0x30(%rsp)
movq 0x48(%rdi), %rax
imulq $0x58, %r13, %rsi
leaq (%rax,%rsi), %rbp
movq 0x20(%rax,%rsi), %rcx
pushq $-0x1
popq %rdx
movl %edx, %r10d
testq %rcx, %rcx
je 0x2612c
cmpq $0x1, %rcx
jne 0x26127
movl %edx, %r10d
testq %rcx, %rcx
je 0x2612c
movq 0x30(%rbp), %rcx
movb 0x20(%rcx), %cl
movl %edx, %r10d
andb $0x40, %cl
jne 0x2612c
movzbl 0x50(%rbp), %r10d
movq %r13, %rbx
shlq $0x4, %rbx
movq 0x10(%rdi), %rcx
movq (%r14), %rdi
movl 0x8(%rcx,%rbx), %edx
movq %rcx, 0x18(%rsp)
movq (%rcx,%rbx), %rcx
movl 0x18(%rax,%rsi), %r9d
subq $0x8, %rsp
leaq 0x211a93(%rip), %rsi    # 0x237bea
movq %r13, %r8
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
cmpl $0x0, 0x2c(%rsp)
movq %r15, 0x38(%rsp)
movq %r13, 0x20(%rsp)
je 0x262dc
cmpq $0x0, 0x20(%rbp)
je 0x262dc
movq 0x18(%rsp), %rax
addq %rbx, %rax
movq %rax, %rbx
xorl %r15d, %r15d
xorl %r13d, %r13d
movq %rax, 0x18(%rsp)
movq 0x30(%rbp), %rax
movzbl 0x20(%rax,%r15), %esi
testb $0x40, %sil
jne 0x2627d
movq (%r14), %rdi
movl 0x8(%rbx), %edx
movq (%rbx), %rcx
movl 0x18(%rbp), %r9d
movl (%rax,%r15), %r14d
movl 0x4(%rax,%r15), %r8d
movq %r8, 0x58(%rsp)
movl 0x8(%rax,%r15), %r8d
movq %r8, 0x50(%rsp)
btl $0x5, %esi
leaq 0x1fffe4(%rip), %rsi    # 0x2261c3
adcq $0x0, %rsi
movsbl (%rsi), %esi
movq %rsi, 0x48(%rsp)
leaq 0x26503e(%rip), %rbx    # 0x28b230
movq 0x40(%rbx), %rsi
leal 0x1(%r14), %r8d
movl (%rsi,%r8,8), %r10d
movq (%rsi,%r14,8), %r11
subl %r11d, %r10d
addq 0x8(%rbx), %r11
movq 0x18(%rbx), %rsi
movq %r12, 0x60(%rsp)
movl (%rsi,%r14,8), %esi
movq %rsi, 0x40(%rsp)
movq %rbp, %r12
movl 0xc(%rax,%r15), %ebp
movl 0x10(%rax,%r15), %ebx
subq $0x8, %rsp
leaq 0x2119e4(%rip), %rsi    # 0x237c17
movq 0x28(%rsp), %r8
xorl %eax, %eax
pushq %rbx
movq 0x28(%rsp), %rbx
pushq %rbp
movq %r12, %rbp
pushq 0x58(%rsp)
movq 0x80(%rsp), %r12
pushq %r14
movq 0x263d87(%rip), %r14    # 0x289fe0
pushq %r11
pushq %r10
pushq 0x80(%rsp)
pushq 0x90(%rsp)
pushq 0xa0(%rsp)
callq 0x22b0
addq $0x50, %rsp
jmp 0x262cb
movl (%rax,%r15), %r9d
movl 0x8(%rax,%r15), %r10d
movl %r9d, %ecx
movl $0x7fff, %edx           # imm = 0x7FFF
andl %edx, %ecx
shrl $0xf, %r9d
andl %edx, %r9d
addl 0x4(%rax,%r15), %r9d
subl %ecx, %r10d
movl %r10d, %eax
subl %r9d, %eax
addq %rax, %r12
movq (%r14), %rdi
movl 0x8(%rbx), %edx
movq (%rbx), %rcx
movl 0x18(%rbp), %r8d
subq $0x8, %rsp
leaq 0x211946(%rip), %rsi    # 0x237c06
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
incq %r13
addq $0x24, %r15
cmpq 0x20(%rbp), %r13
jb 0x2619b
movq 0x20(%rbp), %rax
testq %rax, %rax
je 0x26301
cmpq $0x1, %rax
jne 0x262fb
testq %rax, %rax
je 0x26301
movq 0x30(%rbp), %rax
movb 0x20(%rax), %al
andb $0x40, %al
jne 0x26301
incq (%rsp)
jmp 0x2630e
movl 0x18(%rbp), %eax
addq %rax, 0x10(%rsp)
incq 0x8(%rsp)
movq 0x38(%rsp), %r15
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %r13
movl 0x18(%rbp), %eax
addq %rax, %r15
incq %r13
cmpq 0x50(%rdi), %r13
jb 0x260ee
subq %r12, %r15
movq 0x263ca6(%rip), %rbx    # 0x289fe0
movq (%rbx), %rdi
leaq 0x2118fe(%rip), %rsi    # 0x237c42
leaq 0x211928(%rip), %r14    # 0x237c73
movq %r14, %rdx
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
xorl %eax, %eax
callq 0x22b0
movq (%rbx), %rdi
movq 0x10(%rsp), %r9
subq %r9, %r12
leaq 0x211912(%rip), %rsi    # 0x237c82
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0