// File: /workspace/github_c_makefile_star2_O3/oridb[P]mc/6/genp9.c
// Function: writeasm
static void
writeasm(FILE *fd, Isel *s, Func *fn)
{
	size_t i, j;
	char *hidden;

	hidden = "";
	if (fn->isexport)
		hidden = "";
	/* we don't use the stack size directive: myrddin handle
	 * the stack frobbing on its own */
	fprintf(fd, "TEXT %s%s+0(SB),2,$0\n", fn->name, hidden);
	for (j = 0; j < s->cfg->nbb; j++) {
		if (!s->bb[j])
			continue;
		for (i = 0; i < s->bb[j]->nlbls; i++)
			fprintf(fd, "%s:\n", s->bb[j]->lbls[i]);
		for (i = 0; i < s->bb[j]->ni; i++)
			iprintf(fd, s->bb[j]->il[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x29220(%rip), %rsi     # 0x302df
leaq 0x2ad84(%rip), %rcx     # 0x31e4a
xorl %eax, %eax
callq 0x4240
movq 0x10(%r15), %rax
cmpq $0x0, 0x20(%rax)
je 0x7307
movq 0x18(%r15), %rax
leaq 0x28c74(%rip), %r12     # 0x2fd5b
xorl %r13d, %r13d
movq %r15, 0x8(%rsp)
movq (%rax,%r13,8), %rcx
testq %rcx, %rcx
je 0x72ef
cmpq $0x0, 0x10(%rcx)
je 0x712d
xorl %ebx, %ebx
movq 0x8(%rcx), %rax
movq (%rax,%rbx,8), %rdx
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x4240
incq %rbx
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rcx
cmpq 0x10(%rcx), %rbx
jb 0x7105
jmp 0x7131
movq (%rax,%r13,8), %rcx
cmpq $0x0, 0x20(%rcx)
je 0x72ef
xorl %ebx, %ebx
movq %r13, 0x10(%rsp)
movq 0x18(%rcx), %rax
movq (%rax,%rbx,8), %r12
movl 0x8(%r12), %eax
cmpl $0x1, %eax
je 0x71af
cmpl $0x27, %eax
je 0x71a8
cmpl $0x3, %eax
jne 0x7226
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
cmpl $0x3, 0x4(%rdi)
jne 0x71f9
cmpl $0x4, 0x4(%rsi)
jne 0x71f9
cmpl $0x0, 0x18(%rsi)
je 0x71f9
movl $0x1, 0x8(%r12)
movl 0x18(%rsi), %edi
movl $0x3, %esi
callq 0xaacd
movq %rax, %rsi
movq %rax, 0x18(%r12)
movq 0x10(%r12), %rdi
jmp 0x71f9
movq 0x10(%r12), %rdi
jmp 0x71f4
movq 0x10(%r12), %rax
movl 0x4(%rax), %edi
callq 0xa7a3
testl %eax, %eax
jne 0x7326
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
callq 0xb411
movq 0x10(%r12), %rdi
testl %eax, %eax
je 0x71f4
movl 0x18(%rdi), %edi
movq 0x18(%r12), %rax
movl 0x4(%rax), %esi
callq 0xaacd
movq %rax, %rdi
movq %rax, 0x10(%r12)
movq 0x18(%r12), %rsi
callq 0xb46b
testl %eax, %eax
je 0x7226
incq %rbx
movq 0x8(%rsp), %r15
movq 0x18(%r15), %rax
movq 0x10(%rsp), %r13
movq (%rax,%r13,8), %rcx
cmpq 0x20(%rcx), %rbx
jb 0x7143
jmp 0x72ef
movl 0x8(%r12), %eax
leaq 0x28c72(%rip), %rcx     # 0x2fea4
movslq (%rcx,%rax,4), %r13
addq %rcx, %r13
xorl %r15d, %r15d
movq %r13, (%rsp)
movzbl (%r13), %eax
cmpl $0x25, %eax
je 0x725b
testl %eax, %eax
je 0x7202
movsbl %al, %edi
movq %r14, %rsi
callq 0x41f0
jmp 0x72c8
incq %r13
movq %r13, (%rsp)
movl %r15d, %eax
movzbl (%r13), %ecx
movsbq %cl, %rbp
leal -0x46(%rcx), %edx
cmpl $0x12, %edx
ja 0x7285
movl $0x59089, %esi          # imm = 0x59089
btl %edx, %esi
jb 0x72b4
cmpl $0xe, %edx
je 0x72d0
testl %ecx, %ecx
je 0x7202
callq 0x4390
movq (%rax), %rax
testb $0x8, 0x1(%rax,%rbp,2)
je 0x7316
movq %r13, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x4260
decl %eax
movq (%rsp), %r13
jmp 0x7265
cltq
movq 0x10(%r12,%rax,8), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x7345
incl %r15d
incq %r13
jmp 0x723c
cltq
movq 0x10(%r12,%rax,8), %rax
movl 0x4(%rax), %eax
leaq 0x3c31f(%rip), %rcx     # 0x43600
movq (%rcx,%rax,8), %rdi
movq %r14, %rsi
callq 0x4190
jmp 0x72c8
incq %r13
movq 0x10(%r15), %rcx
cmpq 0x20(%rcx), %r13
leaq 0x28a5a(%rip), %r12     # 0x2fd5b
jb 0x70ef
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2831a(%rip), %rdi     # 0x2f637
movl %ebp, %esi
xorl %eax, %eax
callq 0x13844
leaq 0x282c2(%rip), %rdi     # 0x2f5ef
leaq 0x28e18(%rip), %rsi     # 0x3014c
leaq 0x282df(%rip), %rcx     # 0x2f61a
movl $0x87, %edx
callq 0x4180