// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x10(%rdi), %r12b
leaq 0x8(%rdi), %r14
cmpb $0x1, %r12b
leaq 0x2b05b(%rip), %r15     # 0x3e9f0
movq %r15, %rax
cmoveq %r14, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rax
movq (%rax), %rax
cmpq 0x2d907(%rip), %rax     # 0x412b8
je 0x139e4
movq %rbx, %rdi
callq 0x13d3d
testl %eax, %eax
je 0x13a65
movq 0x2a3ae(%rip), %rdi     # 0x3dd78
callq 0xd3b4
movq %rax, %rdi
callq 0x13d3d
testl %eax, %eax
je 0x13a40
leaq 0x14603(%rip), %rdi     # 0x27fe5
jmp 0x13a2d
leaq 0xfa0c(%rip), %rdi      # 0x233f7
callq 0x12f84
cmpb $0x1, 0x10(%rbx)
leaq 0x2aff5(%rip), %rax     # 0x3e9f0
cmovneq %rax, %r14
movq (%r14), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x13a0e
movq 0x8(%rcx), %rcx
jmp 0x13a15
movq 0x2afdb(%rip), %rcx     # 0x3e9f0
cmpb $0x1, 0x10(%rcx)
jne 0x13a1e
movq %rcx, %rax
movq (%rax), %rdi
callq 0x12e6c
leaq 0x12a45(%rip), %rdi     # 0x26472
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12f84
movq 0x2a011(%rip), %rdi     # 0x3da58
callq 0xd3b4
movq %rax, %rdi
callq 0x13d3d
testl %eax, %eax
je 0x13a61
leaq 0x1420b(%rip), %rdi     # 0x27c6a
jmp 0x13a2d
movb 0x10(%rbx), %r12b
cmpb $0x1, %r12b
movq %r15, %rax
cmoveq %r14, %rax
movq (%rax), %r12
movb 0x10(%r12), %r13b
cmpb $0x1, %r13b
jne 0x13a85
movq 0x8(%r12), %rax
jmp 0x13a8c
movq 0x2af64(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x13a95
movq %rax, %r15
movq (%r15), %rdi
callq 0x8c2a
testl %eax, %eax
je 0x13ab7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13dcf
cmpb $0x1, %r13b
leaq 0x2af2e(%rip), %r15     # 0x3e9f0
cmovneq %r15, %r12
movq (%r12), %rdi
callq 0x1378d
leaq 0xf93b(%rip), %rdi      # 0x23411
callq 0x12f84
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %r14
movq (%r14), %rax
cmpb $0x1, 0x10(%rax)
jne 0x13af2
movq 0x8(%rax), %rax
jmp 0x13af9
movq 0x2aef7(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x13b02
movq %rax, %r15
movq (%r15), %rdi
movb 0x10(%rdi), %al
movzbl %al, %ecx
leal -0x4(%rcx), %edx
cmpl $0x2, %edx
jae 0x13b26
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x137f7
movq %rdi, %rdx
cmpl $0x1, %ecx
je 0x13b35
leaq 0x2aebb(%rip), %rdx     # 0x3e9f0
movq (%rdx), %rcx
cmpq 0x2d751(%rip), %rcx     # 0x41290
je 0x13b7f
cmpb $0x1, %al
leaq 0x2aea6(%rip), %rax     # 0x3e9f0
cmoveq %rdi, %rax
movq (%rax), %rax
cmpq 0x2d740(%rip), %rax     # 0x41298
je 0x13b7f
cmpq 0x2d73f(%rip), %rax     # 0x412a0
je 0x13b7f
cmpq 0x29586(%rip), %rax     # 0x3d0f0
je 0x13b7f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12e6c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13026