// File: /workspace/github_c_makefile_star2_O3/georgeweigt[P]eigenmath/eigenmath.c
// Function: isdenormalpolarterm
int
isdenormalpolarterm(struct atom *p)
{
	if (car(p) != symbol(MULTIPLY))
		return 0;

	if (lengthf(p) == 3 && isimaginaryunit(cadr(p)) && caddr(p) == symbol(PI))
		return 1; // exp(i pi)

	if (lengthf(p) != 4 || !isnum(cadr(p)) || !isimaginaryunit(caddr(p)) || cadddr(p) != symbol(PI))
		return 0;

	p = cadr(p); // p = coeff of term

	if (isnegativenumber(p))
		return 1; // p < 0

	push(p);
	push_rational(-1, 2);
	add();
	p = pop();

	if (!isnegativenumber(p))
		return 1; // p >= 1/2

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpb $0x1, 0x10(%rdi)
leaq 0x2867b(%rip), %r12     # 0x45a00
movq %rdi, %rax
cmovneq %r12, %rax
jne 0x1d3cd
movq 0x2af13(%rip), %rcx     # 0x482a8
cmpq %rcx, (%rax)
jne 0x1d3cd
movq %rdi, %r14
movl $0x3, %eax
movq %rdi, %rcx
movq 0x8(%rcx), %rcx
decl %eax
cmpb $0x1, 0x10(%rcx)
je 0x1d3a5
testl %eax, %eax
je 0x1d3de
movl $0x4, %eax
movq %r14, %rcx
movq 0x8(%rcx), %rcx
decl %eax
cmpb $0x1, 0x10(%rcx)
je 0x1d3bd
testl %eax, %eax
je 0x1d3fb
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %r15
cmpb $0x1, 0x10(%r15)
jne 0x1d445
movq (%r15), %rdi
callq 0x173ff
testl %eax, %eax
je 0x1d3b5
movq 0x8(%r15), %r15
jmp 0x1d45c
movq 0x8(%r14), %r15
cmpb $0x1, 0x10(%r15)
jne 0x1d484
movq (%r15), %rax
movb 0x10(%rax), %al
andb $-0x2, %al
cmpb $0x4, %al
jne 0x1d3cd
movq 0x8(%r15), %r13
cmpb $0x1, 0x10(%r13)
jne 0x1d4ba
movq (%r13), %rdi
callq 0x173ff
testl %eax, %eax
je 0x1d3cd
movq 0x8(%r15), %r13
movq 0x8(%r13), %rax
cmpb $0x1, 0x10(%rax)
je 0x1d4d8
jmp 0x1d4ef
movq 0x285b4(%rip), %r15     # 0x45a00
movq %r15, %rdi
callq 0x173ff
testl %eax, %eax
je 0x1d3b5
cmpb $0x1, 0x10(%r15)
je 0x1d46a
leaq 0x28596(%rip), %r15     # 0x45a00
movq (%r15), %rax
cmpq 0x28bdc(%rip), %rax     # 0x46050
jne 0x1d3b5
movl $0x1, %ebx
jmp 0x1d3cd
movq 0x28575(%rip), %r14     # 0x45a00
movb 0x10(%r14), %r15b
movl %r15d, %eax
andb $-0x2, %al
cmpb $0x4, %al
jne 0x1d3cd
movq %r14, %rdi
callq 0x173ff
testl %eax, %eax
je 0x1d3cd
cmpq 0x28b9d(%rip), %r14     # 0x46050
je 0x1d507
jmp 0x1d3cd
movq 0x2853f(%rip), %r14     # 0x45a00
movq %r14, %rdi
callq 0x173ff
testl %eax, %eax
je 0x1d3cd
cmpb $0x1, 0x10(%r14)
jne 0x1d4ef
leaq 0x8(%r13), %rax
cmpb $0x1, 0x10(%r13)
leaq 0x28518(%rip), %rcx     # 0x45a00
cmoveq %rax, %rcx
movq (%rcx), %r12
movq (%r12), %rax
cmpq 0x28b56(%rip), %rax     # 0x46050
jne 0x1d3cd
movq (%r15), %r14
movb 0x10(%r14), %r15b
cmpb $0x5, %r15b
je 0x1d528
movzbl %r15b, %eax
cmpl $0x4, %eax
jne 0x1d53c
movl $0x1, %ebx
cmpb $0x1, 0x12(%r14)
je 0x1d3cd
jmp 0x1d53c
movl $0x1, %ebx
xorpd %xmm0, %xmm0
ucomisd (%r14), %xmm0
ja 0x1d3cd
movq %r14, %rdi
callq 0x8ba5
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x2, %esi
callq 0xa533
movl $0x2, %edi
callq 0xadb3
movl 0x21d55(%rip), %eax     # 0x3f2b8
movl $0xfffe795f, %ecx       # imm = 0xFFFE795F
leal (%rax,%rcx), %edx
cmpl %ecx, %edx
jbe 0x1d5b2
decl %eax
movl %eax, 0x21d41(%rip)     # 0x3f2b8
leaq 0x2b042(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %rax
movzbl 0x10(%rax), %ecx
cmpl $0x5, %ecx
je 0x1d599
cmpl $0x4, %ecx
jne 0x1d5a6
cmpb $0x1, 0x12(%rax)
sete %al
jmp 0x1d5a8
xorpd %xmm0, %xmm0
ucomisd (%rax), %xmm0
seta %al
jmp 0x1d5a8
xorl %eax, %eax
xorb $0x1, %al
movzbl %al, %ebx
jmp 0x1d3cd
leaq 0x11988(%rip), %rdi     # 0x2ef41
callq 0x780b