// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: print_gaf(ma_ug_t const*, mg_gres_a*, mg_dbn_t*)
void print_gaf(const ma_ug_t *ug, mg_gres_a *hits, mg_dbn_t *name)
{
	uint64_t i, q;
	int32_t k, nl, m;
	char *nn; mg_gchain_t *gc; mg_lres_t *lc; 
	for (i = 0; i < hits->n; i++) {
		q = hits->a[i].qid;
		nn = name->cc.a + (q>0?name->a[q-1]:0);
		nl = name->a[q] - (q>0?name->a[q-1]:0);
		for (k = 0; k < hits->a[i].n_gc; k++) {
			gc = &(hits->a[i].gc[k]);
			fprintf(stderr, "S\t%.*s\tq:id:%lu\tl:n:%d\n", nl, nn, q, gc->cnt);
			for (m = 0; m < gc->cnt; m++) {
				lc = &(hits->a[i].lc[gc->off + m]);
				fprintf(stderr, "*\tA\tutg%.6d%c\t%c\tqs:%u\tqe:%u\tql:%lu\tts:%u\tte:%u\ttl:%u\tcnt:%d\n", 
				(lc->v>>1)+1, "lc"[ug->u.a[lc->v>>1].circ], "+-"[lc->v&1], lc->qs, lc->qe, hits->a[i].qlen, lc->ts, lc->te, ug->u.a[lc->v>>1].len, lc->cnt);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x38(%rsp)
cmpq $0x0, (%rsi)
je 0x1d8857
movq %rsi, %r15
movq 0xb193e(%rip), %r12     # 0x289fe0
xorl %ecx, %ecx
movq %rdx, 0x8(%rsp)
movq 0x10(%r15), %rax
leaq (%rcx,%rcx,4), %r13
movq 0x18(%rax,%r13,8), %r8
testq %r8, %r8
movq %rcx, 0x18(%rsp)
je 0x1d86cb
movq 0x10(%rdx), %rax
movq -0x8(%rax,%r8,8), %rcx
jmp 0x1d86cd
xorl %ecx, %ecx
movq 0x10(%rdx), %rdi
testq %r8, %r8
je 0x1d86dd
movq -0x8(%rdi,%r8,8), %rdx
jmp 0x1d86df
xorl %edx, %edx
movq 0x10(%r15), %rax
cmpl $0x0, (%rax,%r13,8)
jle 0x1d8841
movq 0x8(%rsp), %rsi
addq 0x30(%rsi), %rcx
movq (%rdi,%r8,8), %rsi
subl %edx, %esi
movq %rsi, 0x20(%rsp)
xorl %edx, %edx
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x8(%rax,%r13,8), %rbx
movq %rdx, 0x40(%rsp)
leaq (%rdx,%rdx,8), %r14
movq (%r12), %rdi
movl 0xc(%rbx,%r14,8), %r9d
leaq 0x5fa97(%rip), %rsi     # 0x2381c3
movq 0x20(%rsp), %rdx
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0xc(%rbx,%r14,8)
jle 0x1d881e
leaq (%rbx,%r14,8), %rax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
movq 0x10(%r15), %rdx
movq %rdx, 0x50(%rsp)
movq 0x10(%rsp), %rax
movslq 0x8(%rax), %rcx
addq %rbp, %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
movq (%r12), %rdi
movq 0x10(%rdx,%r13,8), %rcx
movl (%rcx,%rax), %edx
movq %rdx, 0x48(%rsp)
movl 0x4(%rcx,%rax), %esi
movl %esi, %edx
shrl %edx
leaq (%rdx,%rdx,4), %r8
incl %edx
movq 0x38(%rsp), %r9
movq 0x10(%r9), %r9
movl (%r9,%r8,8), %ebx
movl 0xc(%rcx,%rax), %r9d
movl 0x10(%rcx,%rax), %r14d
movq %r13, %r11
movl 0x14(%rcx,%rax), %r13d
movq %r12, %r10
movq %r15, %r12
movl 0x18(%rcx,%rax), %r15d
movl %ebx, %eax
shrl $0x1f, %eax
leaq 0x4fe67(%rip), %rcx     # 0x22862b
movsbl (%rax,%rcx), %ecx
andl $0x1, %esi
leaq 0x4d9f1(%rip), %rax     # 0x2261c3
movsbl (%rsi,%rax), %r8d
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
leaq 0x5f9f7(%rip), %rsi     # 0x2381db
xorl %eax, %eax
pushq 0x48(%rsp)
pushq %rbx
pushq %r15
movq %r12, %r15
movq %r10, %r12
pushq %r13
movq %r11, %r13
movq 0x70(%rsp), %r10
pushq 0x20(%r10,%r11,8)
pushq %r14
callq 0x22b0
addq $0x30, %rsp
incq %rbp
movq 0x10(%rsp), %rax
cmpl 0xc(%rax), %ebp
jl 0x1d874f
movq 0x40(%rsp), %rdx
incq %rdx
movq 0x10(%r15), %rax
movslq (%rax,%r13,8), %rcx
cmpq %rcx, %rdx
movq 0x30(%rsp), %r8
movq 0x28(%rsp), %rcx
jl 0x1d870e
movq 0x18(%rsp), %rcx
incq %rcx
cmpq (%r15), %rcx
movq 0x8(%rsp), %rdx
jb 0x1d86a9
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq