// File: /workspace/github_cpp_makefile_star2_O3/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 %rdx, 0x18(%rsp)
movq %rdi, 0x38(%rsp)
movq (%rsi), %r9
testq %r9, %r9
je 0x1e291c
movq %rsi, %r15
movq 0x10(%rsi), %rax
movq 0xb285a(%rip), %r12     # 0x294fe0
xorl %edi, %edi
leaq (%rdi,%rdi,4), %r13
movq 0x18(%rax,%r13,8), %r8
movq 0x18(%rsp), %rsi
movq 0x10(%rsi), %rdx
movq 0x30(%rsi), %rcx
testq %r8, %r8
je 0x1e27b0
leaq (%rdx,%r8,8), %rdx
movq -0x8(%rdx), %rsi
addq %rsi, %rcx
jmp 0x1e27b2
xorl %esi, %esi
cmpl $0x0, (%rax,%r13,8)
jle 0x1e2910
movq %rdi, 0x20(%rsp)
movl (%rdx), %edx
subl %esi, %edx
movl %edx, 0xc(%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 0x61c9f(%rip), %rsi     # 0x244493
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0xc(%rbx,%r14,8)
jle 0x1e28e5
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 0x51eb0(%rip), %rcx     # 0x23473b
movsbl (%rax,%rcx), %ecx
andl $0x1, %esi
leaq 0x4fa3a(%rip), %rax     # 0x2322d3
movsbl (%rsi,%rax), %r8d
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
leaq 0x61c00(%rip), %rsi     # 0x2444ab
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 0x1e2816
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 0x1e27d6
movq (%r15), %r9
movq 0x20(%rsp), %rdi
incq %rdi
cmpq %r9, %rdi
jb 0x1e2788
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq