// File: /workspace/github_c_makefile_star2_O3/georgeweigt[P]eigenmath/eigenmath.c
// Function: infixform_power
void
infixform_power(struct atom *p)
{
	if (cadr(p) == symbol(EXP1)) {
		outbuf_puts("exp(");
		infixform_expr(caddr(p));
		outbuf_puts(")");
		return;
	}

	if (isimaginaryunit(p)) {
		if (isimaginaryunit(get_binding(symbol(J_LOWER)))) {
			outbuf_puts("j");
			return;
		}
		if (isimaginaryunit(get_binding(symbol(I_LOWER)))) {
			outbuf_puts("i");
			return;
		}
	}

	if (isnegativenumber(caddr(p))) {
		infixform_reciprocal(p);
		return;
	}

	infixform_base(cadr(p));

	outbuf_puts("^");

	p = caddr(p); // p now points to exponent

	if (isnum(p))
		infixform_numeric_exponent(p);
	else if (car(p) == symbol(ADD) || car(p) == symbol(MULTIPLY) || car(p) == symbol(POWER) || car(p) == symbol(FACTORIAL))
		infixform_subexpr(p);
	else
		infixform_expr(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movb 0x10(%rdi), %r12b
leaq 0x8(%rdi), %r14
cmpb $0x1, %r12b
leaq 0x2e9d7(%rip), %r15     # 0x45a00
movq %r15, %rax
cmoveq %r14, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rax
movq (%rax), %rax
cmpq 0x31283(%rip), %rax     # 0x482c8
je 0x17078
movq %rbx, %rdi
callq 0x173ff
testl %eax, %eax
je 0x170f3
movq 0x2dd2a(%rip), %rdi     # 0x44d88
callq 0xf05c
movq %rax, %rdi
callq 0x173ff
testl %eax, %eax
je 0x170ce
leaq 0x17f37(%rip), %rdi     # 0x2efad
jmp 0x170c1
leaq 0x13340(%rip), %rdi     # 0x2a3bf
callq 0x16573
cmpb $0x1, 0x10(%rbx)
leaq 0x2e971(%rip), %rax     # 0x45a00
cmovneq %rax, %r14
movq (%r14), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x170a2
movq 0x8(%rcx), %rcx
jmp 0x170a9
movq 0x2e957(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
jne 0x170b2
movq %rcx, %rax
movq (%rax), %rdi
callq 0x1642d
leaq 0x16379(%rip), %rdi     # 0x2d43a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x16573
movq 0x2d993(%rip), %rdi     # 0x44a68
callq 0xf05c
movq %rax, %rdi
callq 0x173ff
testl %eax, %eax
je 0x170ef
leaq 0x17b45(%rip), %rdi     # 0x2ec32
jmp 0x170c1
movb 0x10(%rbx), %r12b
cmpb $0x1, %r12b
movq %r15, %rax
cmoveq %r14, %rax
movq (%rax), %rax
movb 0x10(%rax), %cl
cmpb $0x1, %cl
jne 0x1710f
movq 0x8(%rax), %rdx
jmp 0x17116
movq 0x2e8ea(%rip), %rdx     # 0x45a00
cmpb $0x1, 0x10(%rdx)
jne 0x1711f
movq %rdx, %r15
movq (%r15), %rdx
movzbl 0x10(%rdx), %esi
cmpl $0x5, %esi
je 0x17146
cmpl $0x4, %esi
jne 0x17150
cmpb $0x1, 0x12(%rdx)
jne 0x17150
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x17497
xorpd %xmm0, %xmm0
ucomisd (%rdx), %xmm0
ja 0x17136
cmpb $0x1, %cl
leaq 0x2e8a6(%rip), %r15     # 0x45a00
cmovneq %r15, %rax
movq (%rax), %rdi
callq 0x16de4
leaq 0x1326c(%rip), %rdi     # 0x2a3d9
callq 0x16573
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %r14
movq (%r14), %rax
cmpb $0x1, 0x10(%rax)
jne 0x17189
movq 0x8(%rax), %rax
jmp 0x17190
movq 0x2e870(%rip), %rax     # 0x45a00
cmpb $0x1, 0x10(%rax)
jne 0x17199
movq %rax, %r15
movq (%r15), %rbx
movb 0x10(%rbx), %al
movzbl %al, %ecx
leal -0x4(%rcx), %edx
cmpl $0x2, %edx
jae 0x171ba
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x16e83
movq %rbx, %rdx
cmpl $0x1, %ecx
je 0x171c9
leaq 0x2e837(%rip), %rdx     # 0x45a00
movq (%rdx), %rcx
cmpq 0x310cd(%rip), %rcx     # 0x482a0
je 0x17210
cmpb $0x1, %al
leaq 0x2e822(%rip), %rax     # 0x45a00
cmoveq %rbx, %rax
movq (%rax), %rax
cmpq 0x310bc(%rip), %rax     # 0x482a8
je 0x17210
cmpq 0x310bb(%rip), %rax     # 0x482b0
je 0x17210
cmpq 0x2cf02(%rip), %rax     # 0x44100
je 0x17210
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1642d
leaq 0x131ab(%rip), %rdi     # 0x2a3c2
callq 0x16573
movq %rbx, %rdi
jmp 0x170b5