// File: /workspace/github_c_makefile_star2_O0/georgeweigt[P]eigenmath/eigenmath.c
// Function: prefixform
void
prefixform(struct atom *p)
{
	char *s;
	switch (p->atomtype) {
	case CONS:
		outbuf_puts("(");
		prefixform(car(p));
		p = cdr(p);
		while (iscons(p)) {
			outbuf_puts(" ");
			prefixform(car(p));
			p = cdr(p);
		}
		if (p != symbol(NIL)) {
			outbuf_puts(" . ");
			prefixform(p);
		}
		outbuf_puts(")");
		break;
	case STR:
		outbuf_puts("\"");
		outbuf_puts(p->u.str);
		outbuf_puts("\"");
		break;
	case RATIONAL:
		if (p->sign == MMINUS)
			outbuf_puts("-");
		s = mstr(p->u.q.a);
		outbuf_puts(s);
		s = mstr(p->u.q.b);
		if (strcmp(s, "1") == 0)
			break;
		outbuf_puts("/");
		outbuf_puts(s);
		break;
	case DOUBLE:
		snprintf(strbuf, STRBUFLEN, "%g", p->u.d);
		outbuf_puts(strbuf);
		if (!strchr(strbuf, '.') && !strchr(strbuf, 'e'))
			outbuf_puts(".0");
		break;
	case KSYM:
	case USYM:
		outbuf_puts(printname(p));
		break;
	case TENSOR:
		outbuf_puts("(tensor)");
		break;
	default:
		outbuf_puts("(?)");
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x6, %eax
ja 0x2da16
movq -0x18(%rbp), %rax
leaq 0x1788c(%rip), %rcx     # 0x4505c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x17b92(%rip), %rdi     # 0x45372
callq 0x1f060
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x2d7ff
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2d80a
movq 0x311fa(%rip), %rax     # 0x5ea00
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2d7a0
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x2d82e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2d839
movq 0x311cb(%rip), %rax     # 0x5ea00
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x2d8b8
leaq 0x17af2(%rip), %rdi     # 0x45347
callq 0x1f060
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x2d874
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x2d87f
movq 0x31185(%rip), %rax     # 0x5ea00
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x2d7a0
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x2d8a3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x2d8ae
movq 0x31156(%rip), %rax     # 0x5ea00
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2d841
movq -0x8(%rbp), %rax
cmpq 0x3113d(%rip), %rax     # 0x5ea00
je 0x2d8da
leaq 0x1bfff(%rip), %rdi     # 0x498cb
callq 0x1f060
movq -0x8(%rbp), %rdi
callq 0x2d7a0
leaq 0x1ab09(%rip), %rdi     # 0x483ea
callq 0x1f060
jmp 0x2da22
leaq 0x1bfdd(%rip), %rdi     # 0x498cf
callq 0x1f060
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1f060
leaq 0x1bfc5(%rip), %rdi     # 0x498cf
callq 0x1f060
jmp 0x2da22
movq -0x8(%rbp), %rax
movzbl 0x12(%rax), %eax
cmpl $0x1, %eax
jne 0x2d92d
leaq 0x17a64(%rip), %rdi     # 0x4538c
callq 0x1f060
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x8000
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1f060
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x8000
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1878a(%rip), %rsi     # 0x460ec
callq 0x71e0
cmpl $0x0, %eax
jne 0x2d971
jmp 0x2da22
leaq 0x17a09(%rip), %rdi     # 0x45381
callq 0x1f060
movq -0x10(%rbp), %rdi
callq 0x1f060
jmp 0x2da22
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
leaq 0x101f76(%rip), %rdi    # 0x12f910
movl $0x3e8, %esi            # imm = 0x3E8
leaq 0x179dd(%rip), %rdx     # 0x45383
movb $0x1, %al
callq 0x7100
leaq 0x101f5c(%rip), %rdi    # 0x12f910
callq 0x1f060
leaq 0x101f50(%rip), %rdi    # 0x12f910
movl $0x2e, %esi
callq 0x70f0
cmpq $0x0, %rax
jne 0x2d9f3
leaq 0x101f39(%rip), %rdi    # 0x12f910
movl $0x65, %esi
callq 0x70f0
cmpq $0x0, %rax
jne 0x2d9f3
leaq 0x1bee3(%rip), %rdi     # 0x498d1
callq 0x1f060
jmp 0x2da22
movq -0x8(%rbp), %rdi
callq 0x9870
movq %rax, %rdi
callq 0x1f060
jmp 0x2da22
leaq 0x1bec5(%rip), %rdi     # 0x498d4
callq 0x1f060
jmp 0x2da22
leaq 0x1bec0(%rip), %rdi     # 0x498dd
callq 0x1f060
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)