// File: /workspace/github_c_makefile_star2_O3/georgeweigt[P]eigenmath/eigenmath.c
// Function: static_reciprocate
void
static_reciprocate(void)
{
	struct atom *p1, *p2;

	p2 = pop();
	p1 = pop();

	// save divide by zero error for runtime

	if (iszero(p2)) {
		push(p1);
		push_symbol(POWER);
		push(p2);
		push_integer(-1);
		list(3);
		return;
	}

	if (isnum(p1) && isnum(p2)) {
		push(p1);
		push(p2);
		divide();
		return;
	}

	if (!isrational(p1) || !isequaln(p1, 1))
		push(p1); // p1 != 1

	if (isnum(p2)) {
		push(p2);
		reciprocate();
		return;
	}

	if (car(p2) == symbol(POWER) && isnum(caddr(p2))) {
		push_symbol(POWER);
		push(cadr(p2));
		push(caddr(p2));
		negate();
		list(3);
		return;
	}

	push_symbol(POWER);
	push(p2);
	push_integer(-1);
	list(3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x16715(%rip), %eax     # 0x3f2b8
movl $0xfffe795f, %ecx       # imm = 0xFFFE795F
leal (%rax,%rcx), %edx
cmpl %ecx, %edx
jbe 0x28ded
leal -0x1(%rax), %ecx
movl %ecx, 0x166fc(%rip)     # 0x3f2b8
cmpl $0x1, %eax
jbe 0x28ded
leaq 0x1f9f4(%rip), %rdx     # 0x485c0
movq (%rdx,%rcx,8), %rbx
addl $-0x2, %eax
movl %eax, 0x166df(%rip)     # 0x3f2b8
movq (%rdx,%rax,8), %r14
movq %rbx, %rdi
callq 0xb477
testl %eax, %eax
je 0x28c25
movq %r14, %rdi
callq 0x8ba5
movq 0x1f6b8(%rip), %rdi     # 0x482b0
callq 0x8ba5
movq %rbx, %rdi
callq 0x8ba5
movq 0xed7e4(%rip), %rdi     # 0x1163f0
callq 0x8ba5
movl $0x3, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8b7d
movb 0x10(%r14), %al
movl %eax, %ecx
andb $-0x2, %cl
cmpb $0x4, %cl
jne 0x28c91
movb 0x10(%rbx), %r15b
movl %r15d, %ecx
andb $-0x2, %cl
cmpb $0x4, %cl
jne 0x28c77
movq %r14, %rdi
callq 0x8ba5
movq %rbx, %rdi
callq 0x8ba5
movq 0xed797(%rip), %rdi     # 0x1163f0
callq 0x8ba5
callq 0xa573
movl $0x2, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xacef
cmpb $0x4, %al
jne 0x28c91
movq %r14, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0xd1c4
testl %eax, %eax
jne 0x28c9d
movq %r14, %rdi
callq 0x8ba5
movb 0x10(%rbx), %r15b
movzbl %r15b, %eax
leal -0x4(%rax), %ecx
cmpl $0x2, %ecx
jae 0x28ccc
movq %rbx, %rdi
callq 0x8ba5
movq 0xed738(%rip), %rdi     # 0x1163f0
callq 0x8ba5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa573
movq %rbx, %rcx
cmpl $0x1, %eax
je 0x28cdb
leaq 0x1cd25(%rip), %rcx     # 0x45a00
movq 0x1f5ce(%rip), %rdi     # 0x482b0
cmpq %rdi, (%rcx)
jne 0x28bf8
leaq 0x8(%rbx), %r14
cmpb $0x1, %r15b
leaq 0x1cd06(%rip), %rax     # 0x45a00
movq %rax, %rcx
cmoveq %r14, %rcx
movq (%rcx), %rcx
movb 0x10(%rcx), %dl
cmpb $0x1, %dl
jne 0x28d3e
movq 0x8(%rcx), %r8
cmpb $0x1, 0x10(%r8)
leaq 0x1cce4(%rip), %rsi     # 0x45a00
cmovneq %rsi, %r8
movq (%r8), %r8
cmpb $0x4, 0x10(%r8)
je 0x28d79
cmpb $0x1, %dl
jne 0x28d5c
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %rsi, %rax
je 0x28d69
jmp 0x28d6c
movq 0x1ccbb(%rip), %rcx     # 0x45a00
movzbl 0x10(%rcx), %edx
cmpl $0x4, %edx
je 0x28d79
cmpl $0x1, %edx
jne 0x28d6c
movq (%rcx), %rcx
cmpb $0x4, 0x10(%rcx)
je 0x28d79
movq 0x1cc9d(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
jne 0x28d6c
movq %rcx, %rax
movq (%rax), %rax
cmpb $0x5, 0x10(%rax)
jne 0x28bf8
callq 0x8ba5
cmpb $0x1, 0x10(%rbx)
leaq 0x1cc77(%rip), %r15     # 0x45a00
movq %r15, %rax
cmoveq %r14, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rax
movq (%rax), %rdi
callq 0x8ba5
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %r14
movq (%r14), %rax
cmpb $0x1, 0x10(%rax)
jne 0x28dba
movq 0x8(%rax), %rax
jmp 0x28dc1
movq 0x1cc3f(%rip), %rax     # 0x45a00
cmpb $0x1, 0x10(%rax)
jne 0x28dca
movq %rax, %r15
movq (%r15), %rdi
callq 0x8ba5
movq 0xed617(%rip), %rdi     # 0x1163f0
callq 0x8ba5
movl $0x2, %edi
callq 0xacef
jmp 0x28c11
leaq 0x614d(%rip), %rdi      # 0x2ef41
callq 0x780b