// File: chhylp123[P]hifiasm/inter.cpp
// Function: prt_chains(ul_ov_t*, long, ul_ov_t*, unsigned long*, long, vec_mg_lchain_t*, long)
void prt_chains(ul_ov_t *l_idx, int64_t l_idx_n, ul_ov_t *l_a, uint64_t *g_idx, int64_t g_idx_n, vec_mg_lchain_t *g_a, int64_t ql)
{
	int64_t k, i, s, e;
	if(l_idx && l_a) {
		fprintf(stderr, "\n[M::%s::qlen->%ld] print linear chains\n", __func__, ql);
		for (k = 0; k < l_idx_n; k++) {
			s = l_idx[k].ts; e = l_idx[k].te;
			fprintf(stderr, "[M::%s::linear_chain] sc::%u, occ::%ld\n", __func__, l_idx[k].qn, e-s);
			for (i = s; i < e; i++) {
				fprintf(stderr, "[M::%s::utg%.6dl] q::[%u, %u)\n", __func__, (int32_t)l_a[i].tn+1, l_a[i].qs, l_a[i].qe);
			}
		}
	}

	if(g_idx && g_a) {
		fprintf(stderr, "\n[M::%s::qlen->%ld] print graph chains\n", __func__, ql);
		for (k = s = e = 0; k < g_idx_n; ++k) {
			s = e; e += ((uint32_t)g_idx[k]);
			fprintf(stderr, "[M::%s::grapn_chain] sc::%lu, occ::%ld\n", __func__, g_idx[k]>>32, e-s);
			for (i = s; i < e; i++) {
				fprintf(stderr, "[M::%s::utg%.6dl] q::[%u, %u)\n", __func__, (int32_t)(g_a->a[i].v>>1)+1, g_a->a[i].qs, g_a->a[i].qe);
			}
    	}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2a84a4
cmpq $0x0, -0x18(%rbp)
je 0x2a84a4
movq 0x11bc4f(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq 0x10(%rbp), %rcx
leaq 0xe9e18(%rip), %rsi     # 0x3921b7
leaq 0xe9e3a(%rip), %rdx     # 0x3921e0
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x2a84a2
movq -0x8(%rbp), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq %rax, -0x50(%rbp)
movq 0x11bbf0(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x50(%rbp), %r8
subq -0x48(%rbp), %r8
leaq 0xe9ddb(%rip), %rsi     # 0x3921eb
leaq 0xe9dc9(%rip), %rdx     # 0x3921e0
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x50(%rbp), %rax
jge 0x2a848f
movq 0x11bba9(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
imulq $0x1c, -0x40(%rbp), %rdx
addq %rdx, %rax
movl 0x4(%rax), %r8d
movq -0x18(%rbp), %rax
imulq $0x1c, -0x40(%rbp), %rdx
addq %rdx, %rax
movl 0x8(%rax), %r9d
leaq 0xe9da0(%rip), %rsi     # 0x392213
leaq 0xe9d66(%rip), %rdx     # 0x3921e0
movb $0x0, %al
callq 0x22a0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x2a8426
jmp 0x2a8491
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2a83b5
jmp 0x2a84a4
cmpq $0x0, -0x20(%rbp)
je 0x2a85e9
cmpq $0x0, -0x30(%rbp)
je 0x2a85e9
movq 0x11bb1f(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq 0x10(%rbp), %rcx
leaq 0xe9d63(%rip), %rsi     # 0x392232
leaq 0xe9d0a(%rip), %rdx     # 0x3921e0
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x2a85e7
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x11bab8(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
shrq $0x20, %rcx
movq -0x50(%rbp), %r8
subq -0x48(%rbp), %r8
leaq 0xe9d10(%rip), %rsi     # 0x39225a
leaq 0xe9c8f(%rip), %rdx     # 0x3921e0
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x50(%rbp), %rax
jge 0x2a85d4
movq 0x11ba6f(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
shrl %ecx
addl $0x1, %ecx
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rax
movl 0x14(%rax), %r8d
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rax
movl 0x18(%rax), %r9d
leaq 0xe9c5b(%rip), %rsi     # 0x392213
leaq 0xe9c21(%rip), %rdx     # 0x3921e0
movb $0x0, %al
callq 0x22a0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x2a8560
jmp 0x2a85d6
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2a84f5
jmp 0x2a85e9
addq $0x50, %rsp
popq %rbp
retq
nop