// File: /workspace/github_c_makefile_star2_O0/rikuu[P]kermit/miniasm/asm.c
// Function: ma_ug_print
void ma_ug_print(const ma_ug_t *ug, const sdict_t *d, const ma_sub_t *sub, FILE *fp)
{
	uint32_t i, j, l;
	char name[32];
	for (i = 0; i < ug->u.n; ++i) { // the Segment lines in GFA
		ma_utg_t *p = &ug->u.a[i];
		sprintf(name, "utg%.6d%c", i + 1, "lc"[p->circ]);
		fprintf(fp, "S\t%s\t%s\tLN:i:%d\n", name, p->s? p->s : "*", p->len);
		for (j = l = 0; j < p->n; l += (uint32_t)p->a[j++]) {
			uint32_t x = p->a[j]>>33;
			if (sub) fprintf(fp, "a\t%s\t%d\t%s:%d-%d\t%c\t%d\n", name, l, d->seq[x].name, sub[x].s + 1, sub[x].e, "+-"[p->a[j]>>32&1], (uint32_t)p->a[j]);
			else fprintf(fp, "a\t%s\t%d\t%s\t%c\t%d\n", name, l, d->seq[x].name, "+-"[p->a[j]>>32&1], (uint32_t)p->a[j]);
		}
	}
	for (i = 0; i < ug->g->n_arc; ++i) { // the Link lines in GFA
		uint32_t u = ug->g->arc[i].ul>>32, v = ug->g->arc[i].v;
		fprintf(fp, "L\tutg%.6d%c\t%c\tutg%.6d%c\t%c\t%dM\tSD:i:%d\n", (u>>1)+1, "lc"[ug->u.a[u>>1].circ], "+-"[u&1],
				(v>>1)+1, "lc"[ug->u.a[v>>1].circ], "+-"[v&1], ug->g->arc[i].ol, asg_arc_len(ug->g->arc[i]));
	}
	for (i = 0; i < ug->u.n; ++i) { // summary of unitigs
		uint32_t cnt[2];
		ma_utg_t *u = &ug->u.a[i];
		if (u->start == UINT32_MAX) {
			fprintf(fp, "x\tutg%.6dc\t%d\t%d\n", i + 1, u->len, u->n);
		} else {
			for (j = 0; j < 2; ++j) cnt[j] = asg_arc_n(ug->g, i<<1|j);
			if (sub)
				fprintf(fp, "x\tutg%.6dl\t%d\t%d\t%d\t%d\t%s:%d-%d\t%c\t%s:%d-%d\t%c\n", i + 1, u->len, u->n, cnt[1], cnt[0],
						d->seq[u->start>>1].name, sub[u->start>>1].s + 1, sub[u->start>>1].e, "+-"[u->start&1],
						d->seq[u->end>>1].name, sub[u->end>>1].s + 1, sub[u->end>>1].e, "+-"[u->end&1]);
			else
				fprintf(fp, "x\tutg%.6dl\t%d\t%d\t%d\t%d\t%s\t%c\t%s\t%c\n", i + 1, u->len, u->n, cnt[1], cnt[0],
						d->seq[u->start>>1].name, "+-"[u->start&1], d->seq[u->end>>1].name, "+-"[u->end&1]);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x89b0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
movl -0x4c(%rbp), %edx
addl $0x1, %edx
movq -0x88(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x6def(%rip), %rax      # 0xf584
movsbl (%rax,%rcx), %ecx
leaq 0x6dda(%rip), %rsi      # 0xf57a
movb $0x0, %al
callq 0x11e0
movq -0x48(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x88(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x87df
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xc0(%rbp)
jmp 0x87ef
leaq 0x6db2(%rip), %rax      # 0xf598
movq %rax, -0xc0(%rbp)
jmp 0x87ef
movq -0xb0(%rbp), %rdx
movq -0xb8(%rbp), %rdi
movq -0xc0(%rbp), %rcx
movq -0x88(%rbp), %rax
movl (%rax), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
leaq 0x6d6b(%rip), %rsi      # 0xf587
movb $0x0, %al
callq 0x1110
movl $0x0, -0x54(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x88(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x89a0
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x50(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, -0x8c(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x890b
movq -0x48(%rbp), %rdi
leaq -0x80(%rbp), %rdx
movl -0x54(%rbp), %ecx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x8c(%rbp), %esi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %r8
movq -0x40(%rbp), %rax
movl -0x8c(%rbp), %esi
movl (%rax,%rsi,8), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
addl $0x1, %r9d
movq -0x40(%rbp), %rax
movl -0x8c(%rbp), %esi
movl 0x4(%rax,%rsi,8), %r11d
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x50(%rbp), %esi
movq (%rax,%rsi,8), %rsi
shrq $0x20, %rsi
andq $0x1, %rsi
leaq 0x6c85(%rip), %rax      # 0xf55c
movsbl (%rax,%rsi), %r10d
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x50(%rbp), %esi
movq (%rax,%rsi,8), %rax
leaq 0x6ca5(%rip), %rsi      # 0xf59a
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x1110
jmp 0x8977
movq -0x48(%rbp), %rdi
leaq -0x80(%rbp), %rdx
movl -0x54(%rbp), %ecx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x8c(%rbp), %esi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %r8
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x50(%rbp), %esi
movq (%rax,%rsi,8), %rsi
shrq $0x20, %rsi
andq $0x1, %rsi
leaq 0x6c0d(%rip), %rax      # 0xf55c
movsbl (%rax,%rsi), %r9d
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x50(%rbp), %esi
movq (%rax,%rsi,8), %rax
leaq 0x6c45(%rip), %rsi      # 0xf5b2
movl %eax, (%rsp)
movb $0x0, %al
callq 0x1110
jmp 0x8979
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x50(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x50(%rbp)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x8831
jmp 0x89a2
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x874b
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x4(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x8b25
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x94(%rbp)
movq -0x48(%rbp), %rdi
movl -0x90(%rbp), %edx
shrl %edx
addl $0x1, %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x90(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x6b37(%rip), %rax      # 0xf584
movsbl (%rax,%rcx), %ecx
movl -0x90(%rbp), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x6af7(%rip), %rax      # 0xf55c
movsbl (%rax,%rsi), %r8d
movl -0x94(%rbp), %r9d
shrl %r9d
addl $0x1, %r9d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x94(%rbp), %esi
shrl %esi
movl %esi, %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x6ae3(%rip), %rax      # 0xf584
movsbl (%rax,%rsi), %ebx
movl -0x94(%rbp), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x6aa3(%rip), %rax      # 0xf55c
movsbl (%rax,%rsi), %r11d
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %esi
shlq $0x4, %rsi
addq %rsi, %rax
movl 0xc(%rax), %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %esi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %rax
leaq 0x6ac5(%rip), %rsi      # 0xf5c4
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x1110
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x89b7
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x8e31
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0x8b99
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %edx
addl $0x1, %edx
movq -0xa8(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0xa8(%rbp), %rax
movl 0x10(%rax), %r8d
leaq 0x6a60(%rip), %rsi      # 0xf5ed
movb $0x0, %al
callq 0x1110
jmp 0x8e21
movl $0x0, -0x50(%rbp)
cmpl $0x2, -0x50(%rbp)
jae 0x8bd7
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
orl -0x50(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movl -0x50(%rbp), %eax
movl %ecx, -0x9c(%rbp,%rax,4)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x8ba0
cmpq $0x0, -0x40(%rbp)
je 0x8d4f
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %edx
addl $0x1, %edx
movq -0xa8(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0xa8(%rbp), %rax
movl 0x10(%rax), %r8d
movl -0x98(%rbp), %r9d
movl -0x9c(%rbp), %eax
movl %eax, -0xc8(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0xa8(%rbp), %rsi
movl 0x4(%rsi), %esi
shrl %esi
movl %esi, %esi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %r13
movq -0x40(%rbp), %rax
movq -0xa8(%rbp), %rsi
movl 0x4(%rsi), %esi
shrl %esi
movl %esi, %esi
movl (%rax,%rsi,8), %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
addl $0x1, %r12d
movq -0x40(%rbp), %rax
movq -0xa8(%rbp), %rsi
movl 0x4(%rsi), %esi
shrl %esi
movl %esi, %esi
movl 0x4(%rax,%rsi,8), %r15d
movq -0xa8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x68d3(%rip), %rax      # 0xf55c
movsbl (%rax,%rsi), %r14d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0xa8(%rbp), %rsi
movl 0x8(%rsi), %esi
shrl %esi
movl %esi, %esi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %rbx
movq -0x40(%rbp), %rax
movq -0xa8(%rbp), %rsi
movl 0x8(%rsi), %esi
shrl %esi
movl %esi, %esi
movl (%rax,%rsi,8), %r11d
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
addl $0x1, %r11d
movq -0x40(%rbp), %rax
movq -0xa8(%rbp), %rsi
movl 0x8(%rsi), %esi
shrl %esi
movl %esi, %esi
movl 0x4(%rax,%rsi,8), %r10d
movq -0xa8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movl %eax, %eax
leaq 0x6860(%rip), %rsi      # 0xf55c
movsbl (%rsi,%rax), %esi
movl -0xc8(%rbp), %eax
movl %esi, -0xc4(%rbp)
leaq 0x68ec(%rip), %rsi      # 0xf5ff
movl %eax, (%rsp)
movl -0xc4(%rbp), %eax
movq %r13, 0x8(%rsp)
movl %r12d, 0x10(%rsp)
movl %r15d, 0x18(%rsp)
movl %r14d, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movl %r11d, 0x30(%rsp)
movl %r10d, 0x38(%rsp)
movl %eax, 0x40(%rsp)
movb $0x0, %al
callq 0x1110
jmp 0x8e1f
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %edx
addl $0x1, %edx
movq -0xa8(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0xa8(%rbp), %rax
movl 0x10(%rax), %r8d
movl -0x98(%rbp), %r9d
movl -0x9c(%rbp), %r14d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0xa8(%rbp), %rsi
movl 0x4(%rsi), %esi
shrl %esi
movl %esi, %esi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %rbx
movq -0xa8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x67a3(%rip), %rax      # 0xf55c
movsbl (%rax,%rsi), %r11d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0xa8(%rbp), %rsi
movl 0x8(%rsi), %esi
shrl %esi
movl %esi, %esi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %r10
movq -0xa8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x6766(%rip), %rax      # 0xf55c
movsbl (%rax,%rsi), %eax
leaq 0x682e(%rip), %rsi      # 0xf62f
movl %r14d, (%rsp)
movq %rbx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x1110
jmp 0x8e21
jmp 0x8e23
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x8b2c
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)