// File: /workspace/github_c_makefile_star2_O2/georgeweigt[P]eigenmath/eigenmath.c
// Function: power_natural_number
void
power_natural_number(struct atom *EXPO)
{
	double x, y;

	// exp(x + i y) = exp(x) (cos(y) + i sin(y))

	if (isdoublez(EXPO)) {
		if (car(EXPO) == symbol(ADD)) {
			x = cadr(EXPO)->u.d;
			y = cadaddr(EXPO)->u.d;
		} else {
			x = 0.0;
			y = cadr(EXPO)->u.d;
		}
		push_double(exp(x));
		push_double(y);
		cosfunc();
		push(imaginaryunit);
		push_double(y);
		sinfunc();
		multiply();
		add();
		multiply();
		return;
	}

	// e^log(expr) = expr

	if (car(EXPO) == symbol(LOG)) {
		push(cadr(EXPO));
		return;
	}

	if (isdenormalpolar(EXPO)) {
		normalize_polar(EXPO);
		return;
	}

	push_symbol(POWER);
	push_symbol(EXP1);
	push(EXPO);
	list(3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xb876
movb 0x10(%rbx), %dl
cmpb $0x1, %dl
leaq 0x26e57(%rip), %rcx     # 0x3e9f0
movq %rcx, %rsi
cmoveq %rbx, %rsi
movq (%rsi), %rsi
testl %eax, %eax
je 0x17c24
addq $0x8, %rbx
cmpb $0x1, %dl
cmovneq %rcx, %rbx
movq (%rbx), %rax
movb 0x10(%rax), %dl
cmpq 0x296d1(%rip), %rsi     # 0x41290
je 0x17c4b
cmpb $0x1, %dl
cmoveq %rax, %rcx
xorps %xmm0, %xmm0
movq (%rcx), %rax
movsd (%rax), %xmm1
movsd %xmm1, -0x10(%rbp)
callq 0x7360
callq 0xaf59
movsd -0x10(%rbp), %xmm0
callq 0xaf59
callq 0xe086
movq 0xeced5(%rip), %rdi     # 0x104ad0
callq 0x861b
movsd -0x10(%rbp), %xmm0
callq 0xaf59
callq 0xe75b
callq 0x9fae
callq 0xa1f6
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9fae
cmpq 0x26795(%rip), %rsi     # 0x3e3c0
je 0x17c7f
movq %rbx, %rdi
callq 0x186d1
testl %eax, %eax
je 0x17d36
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1874e
cmpb $0x1, %dl
jne 0x17caa
movq 0x8(%rax), %rdi
cmpb $0x1, 0x10(%rdi)
movq (%rax), %r8
leaq 0x26d8e(%rip), %rsi     # 0x3e9f0
cmovneq %rsi, %rdi
movsd (%r8), %xmm0
movq (%rdi), %rdi
cmpb $0x1, 0x10(%rdi)
jne 0x17ce7
cmpb $0x1, %dl
jne 0x17ccc
movq 0x8(%rax), %rsi
jmp 0x17cd3
addq $0x8, %rbx
cmpb $0x1, %dl
leaq 0x26d63(%rip), %rax     # 0x3e9f0
cmovneq %rax, %rbx
movq (%rbx), %rcx
cmpb $0x1, 0x10(%rcx)
cmoveq %rcx, %rax
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x861b
movq 0x26d3f(%rip), %rsi     # 0x3e9f0
movsd (%rsi), %xmm0
cmpb $0x1, 0x10(%rsi)
jne 0x17bcf
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x17d64
movq 0x26d1d(%rip), %rsi     # 0x3e9f0
cmpb $0x1, 0x10(%rsi)
je 0x17ce0
leaq 0x26d10(%rip), %rsi     # 0x3e9f0
movq (%rsi), %rsi
addq $0x8, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x17bcf
cmpb $0x1, %dl
jne 0x17d75
movq 0x8(%rax), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x17dab
movq (%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x17dc1
movq 0x8(%rax), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x17dca
addq $0x8, %rax
cmpb $0x1, %dl
leaq 0x26cc0(%rip), %rcx     # 0x3e9f0
cmoveq %rax, %rcx
jmp 0x17da6
movq 0x29563(%rip), %rdi     # 0x412a0
callq 0x861b
movq 0x2956f(%rip), %rdi     # 0x412b8
callq 0x861b
movq %rbx, %rdi
callq 0x861b
pushq $0x3
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x85eb
movq 0x26c85(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x17bcf
movq 0x26c74(%rip), %rax     # 0x3e9f0
leaq 0x26c6d(%rip), %rcx     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x17dd8
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x17dd8
leaq 0x26c57(%rip), %rcx     # 0x3e9f0
movq 0x26c50(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x17dd1
movq (%rcx), %rcx
jmp 0x17dd1
leaq 0x26c3e(%rip), %rcx     # 0x3e9f0
movq 0x26c37(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
je 0x17dd1
jmp 0x17dd8
leaq 0x26c28(%rip), %rcx     # 0x3e9f0
jmp 0x17dd8
leaq 0x26c1f(%rip), %rcx     # 0x3e9f0
movq (%rcx), %rcx
addq $0x8, %rcx
movq (%rcx), %rcx
jmp 0x17bcf