// File: /workspace/github_c_makefile_star2_O1/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
movq (%rdx), %rdx
leaq 0x2915e(%rip), %rsi     # 0x302df
leaq 0x2acb2(%rip), %rcx     # 0x31e3a
xorl %eax, %eax
callq 0x4240
movq 0x10(%r15), %rax
cmpq $0x0, 0x20(%rax)
je 0x73c0
xorl %r13d, %r13d
movq %r15, 0x8(%rsp)
movq 0x18(%r15), %rax
cmpq $0x0, (%rax,%r13,8)
je 0x73af
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rax
cmpq $0x0, 0x10(%rax)
leaq 0x28b92(%rip), %r12     # 0x2fd5b
je 0x71f3
xorl %ebx, %ebx
movq 0x8(%rax), %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), %rax
cmpq 0x10(%rax), %rbx
jb 0x71cd
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x73af
xorl %ebx, %ebx
movq %r13, 0x10(%rsp)
movq 0x18(%rax), %rax
movq (%rax,%rbx,8), %r12
movl 0x8(%r12), %eax
cmpl $0x1, %eax
je 0x726a
cmpl $0x27, %eax
je 0x72ac
cmpl $0x3, %eax
jne 0x72e3
movq 0x10(%r12), %rax
cmpl $0x3, 0x4(%rax)
jne 0x72ac
movq 0x18(%r12), %rax
cmpl $0x4, 0x4(%rax)
jne 0x72ac
cmpl $0x0, 0x18(%rax)
je 0x72ac
movl $0x1, 0x8(%r12)
movl 0x18(%rax), %edi
movl $0x3, %esi
callq 0xac01
movq %rax, 0x18(%r12)
jmp 0x72ac
movq 0x10(%r12), %rax
movl 0x4(%rax), %edi
callq 0xa8d7
testl %eax, %eax
jne 0x73e0
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
callq 0xb555
testl %eax, %eax
je 0x72ac
movq 0x10(%r12), %rax
movq 0x18(%r12), %rcx
movl 0x18(%rax), %edi
movl 0x4(%rcx), %esi
callq 0xac01
movq %rax, 0x10(%r12)
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
callq 0xb5af
testl %eax, %eax
je 0x72e3
incq %rbx
movq 0x8(%rsp), %r15
movq 0x18(%r15), %rax
movq 0x10(%rsp), %r13
movq (%rax,%r13,8), %rax
cmpq 0x20(%rax), %rbx
jb 0x720d
jmp 0x73af
movl 0x8(%r12), %eax
leaq 0x28bb5(%rip), %rcx     # 0x2fea4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
xorl %r15d, %r15d
movq %rax, (%rsp)
movzbl (%rax), %ecx
cmpl $0x25, %ecx
je 0x7316
testl %ecx, %ecx
je 0x72bf
movsbl %cl, %edi
movq %r14, %rsi
callq 0x41f0
jmp 0x7384
incq %rax
movq %rax, (%rsp)
movl %r15d, %eax
movq (%rsp), %rbp
movzbl (%rbp), %ecx
movsbq %cl, %r13
leal -0x46(%rcx), %edx
cmpl $0x12, %edx
ja 0x7343
movl $0x59089, %esi          # imm = 0x59089
btl %edx, %esi
jb 0x736f
cmpl $0xe, %edx
je 0x7390
testl %ecx, %ecx
je 0x72bf
callq 0x4390
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r13,2)
je 0x73cf
movq %rbp, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x4260
decl %eax
jmp 0x7320
cltq
movq 0x10(%r12,%rax,8), %rsi
movq %r14, %rdi
movl %r13d, %edx
callq 0x73ff
incl %r15d
movq (%rsp), %rax
incq %rax
jmp 0x72f9
cltq
movq 0x10(%r12,%rax,8), %rax
movl 0x4(%rax), %eax
leaq 0x3c25f(%rip), %rcx     # 0x43600
movq (%rcx,%rax,8), %rdi
movq %r14, %rsi
callq 0x4190
jmp 0x7384
incq %r13
movq 0x10(%r15), %rax
cmpq 0x20(%rax), %r13
jb 0x71a6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28261(%rip), %rdi     # 0x2f637
movl %r13d, %esi
xorl %eax, %eax
callq 0x13a00
leaq 0x28208(%rip), %rdi     # 0x2f5ef
leaq 0x28d5e(%rip), %rsi     # 0x3014c
leaq 0x28225(%rip), %rcx     # 0x2f61a
movl $0x87, %edx
callq 0x4180