// File: /workspace/github_c_makefile_star2_O2/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 $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq (%rdx), %rdx
leaq 0x259ba(%rip), %rsi     # 0x2c2df
leaq 0x2751e(%rip), %rcx     # 0x2de4a
xorl %eax, %eax
callq 0x4240
pushq $0xa
popq %rbp
xorl %r12d, %r12d
movq %r15, 0x10(%rsp)
movq 0x10(%r15), %rax
cmpq 0x20(%rax), %r12
jae 0x6b3b
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rax
testq %rax, %rax
je 0x6b33
xorl %ebx, %ebx
cmpq 0x10(%rax), %rbx
jae 0x698b
movq 0x8(%rax), %rax
movq (%rax,%rbx,8), %rdx
movq %r14, %rdi
leaq 0x253e4(%rip), %rsi     # 0x2bd5b
xorl %eax, %eax
callq 0x4240
incq %rbx
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rax
jmp 0x695f
xorl %r13d, %r13d
movq %r12, 0x18(%rsp)
cmpq 0x20(%rax), %r13
jae 0x6b33
movq 0x18(%rax), %rax
movq (%rax,%r13,8), %rbx
movl 0x8(%rbx), %eax
cmpl $0x1, %eax
movq %r13, 0x20(%rsp)
je 0x69ff
cmpl $0x27, %eax
je 0x69f9
cmpl $0x3, %eax
jne 0x6a6a
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
cmpl $0x3, 0x4(%rdi)
jne 0x6a42
cmpl $0x4, 0x4(%rsi)
jne 0x6a42
cmpl $0x0, 0x18(%rsi)
je 0x6a42
movl $0x1, 0x8(%rbx)
movl 0x18(%rsi), %edi
pushq $0x3
popq %rsi
callq 0x9f13
movq %rax, %rsi
movq %rax, 0x18(%rbx)
movq 0x10(%rbx), %rdi
jmp 0x6a42
movq 0x10(%rbx), %rdi
jmp 0x6a3e
movq 0x10(%rbx), %rax
movl 0x4(%rax), %edi
callq 0x9cab
testl %eax, %eax
jne 0x6b5b
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0xa84d
movq 0x10(%rbx), %rdi
testl %eax, %eax
je 0x6a3e
movl 0x18(%rdi), %edi
movq 0x18(%rbx), %rax
movl 0x4(%rax), %esi
callq 0x9f13
movq %rax, %rdi
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rsi
callq 0xa8a3
testl %eax, %eax
je 0x6a6a
movq 0x20(%rsp), %r13
incq %r13
movq 0x10(%rsp), %r15
movq 0x18(%r15), %rax
movq 0x18(%rsp), %r12
movq (%rax,%r12,8), %rax
jmp 0x6993
movl 0x8(%rbx), %eax
leaq 0x25430(%rip), %rcx     # 0x2bea4
movslq (%rcx,%rax,4), %r13
addq %rcx, %r13
xorl %r12d, %r12d
movq %r13, 0x8(%rsp)
movzbl (%r13), %eax
cmpl $0x25, %eax
je 0x6a9e
testl %eax, %eax
je 0x6a4b
movsbl %al, %edi
movq %r14, %rsi
callq 0x41f0
jmp 0x6b0e
incq %r13
movq %r13, 0x8(%rsp)
movl %r12d, %eax
movzbl (%r13), %ecx
movsbq %cl, %r15
leal -0x46(%rcx), %edx
cmpl $0x12, %edx
ja 0x6acb
movl $0x59089, %esi          # imm = 0x59089
btl %edx, %esi
cltq
jb 0x6afb
cmpl $0xe, %edx
je 0x6b16
testl %ecx, %ecx
je 0x6a4b
callq 0x4390
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r15,2)
je 0x6b4a
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
movl %ebp, %edx
callq 0x4260
decl %eax
movq 0x8(%rsp), %r13
jmp 0x6aa9
movq 0x10(%rbx,%rax,8), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x6b7a
incl %r12d
incq %r13
jmp 0x6a7e
movq 0x10(%rbx,%rax,8), %rax
movl 0x4(%rax), %eax
leaq 0x39adb(%rip), %rcx     # 0x40600
movq (%rcx,%rax,8), %rdi
movq %r14, %rsi
callq 0x4190
jmp 0x6b0e
incq %r12
jmp 0x693e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24ae6(%rip), %rdi     # 0x2b637
movl %r15d, %esi
xorl %eax, %eax
callq 0x1205c
leaq 0x24a8d(%rip), %rdi     # 0x2b5ef
leaq 0x255e3(%rip), %rsi     # 0x2c14c
leaq 0x24aaa(%rip), %rcx     # 0x2b61a
movl $0x87, %edx
callq 0x4180