// File: /workspace/github_c_makefile_star2_O1/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
movb 0x10(%rdi), %r15b
cmpb $0x1, %r15b
setne %al
leaq 0x2573a(%rip), %r14     # 0x40a00
movq %rdi, %rcx
cmovneq %r14, %rcx
movq (%rcx), %rcx
cmpq 0x27fd1(%rip), %rcx     # 0x432a8
setne %cl
orb %al, %cl
jne 0x1b396
movq %rdi, %rbx
movl $0x3, %eax
movq %rdi, %rcx
movq 0x8(%rcx), %rcx
decl %eax
cmpb $0x1, 0x10(%rcx)
je 0x1b2ed
testl %eax, %eax
je 0x1b308
cmpb $0x1, %r15b
je 0x1b37e
jmp 0x1b396
leaq 0x8(%rbx), %rax
cmpb $0x1, %r15b
leaq 0x256e9(%rip), %r12     # 0x40a00
cmovneq %r12, %rax
movq (%rax), %r13
movb 0x10(%r13), %al
movb %al, -0x29(%rbp)
cmpb $0x1, %al
movq %r12, %rax
cmoveq %r13, %rax
movq (%rax), %rdi
callq 0x15b7a
testl %eax, %eax
je 0x1b2fd
addq $0x8, %r13
movb -0x29(%rbp), %cl
cmpb $0x1, %cl
movq %r12, %rax
cmoveq %r13, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1b365
cmpb $0x1, %cl
leaq 0x256a2(%rip), %rax     # 0x40a00
cmoveq %r13, %rax
movq (%rax), %r12
cmpb $0x1, %r15b
setne %cl
movq (%r12), %rax
cmpq 0x25cd9(%rip), %rax     # 0x41050
sete %al
orb %al, %cl
jne 0x1b398
movl $0x4, %eax
movq %rbx, %rcx
movq 0x8(%rcx), %rcx
decl %eax
cmpb $0x1, 0x10(%rcx)
je 0x1b386
testl %eax, %eax
je 0x1b3aa
xorl %eax, %eax
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %rbx
cmpb $0x1, %r15b
cmovneq %r14, %rbx
movq (%rbx), %rbx
movb 0x10(%rbx), %r15b
cmpb $0x1, %r15b
movq %r14, %rax
cmoveq %rbx, %rax
movq (%rax), %rax
cmpb $0x4, 0x10(%rax)
je 0x1b3e5
cmpb $0x1, %r15b
movq %r14, %rax
cmoveq %rbx, %rax
movq (%rax), %rax
cmpb $0x5, 0x10(%rax)
jne 0x1b396
leaq 0x8(%rbx), %r12
cmpb $0x1, %r15b
movq %r14, %rax
cmoveq %r12, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1b40f
cmpb $0x1, %r15b
leaq 0x255f8(%rip), %rax     # 0x40a00
cmoveq %r12, %rax
movq (%rax), %r14
movq (%r14), %rdi
callq 0x15b7a
testl %eax, %eax
je 0x1b396
cmpb $0x1, %r15b
leaq 0x255d6(%rip), %rax     # 0x40a00
movq %rax, %rcx
cmoveq %r12, %rcx
movq (%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %rax, %rcx
jne 0x1b453
cmpb $0x1, %r15b
leaq 0x255b8(%rip), %rcx     # 0x40a00
cmoveq %r12, %rcx
movq (%rcx), %rcx
addq $0x8, %rcx
movq (%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x1b490
cmpb $0x1, %r15b
leaq 0x25599(%rip), %rax     # 0x40a00
movq %rax, %rcx
cmoveq %r12, %rcx
movq (%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x1b48d
cmpb $0x1, %r15b
leaq 0x2557e(%rip), %rax     # 0x40a00
cmoveq %r12, %rax
movq (%rax), %rax
addq $0x8, %rax
movq (%rax), %rax
movq (%rax), %rax
cmpq 0x25bb6(%rip), %rax     # 0x41050
jne 0x1b396
cmpb $0x1, %r15b
leaq 0x25555(%rip), %rax     # 0x40a00
cmoveq %rbx, %rax
movq (%rax), %rdi
movzbl 0x10(%rdi), %eax
cmpl $0x5, %eax
je 0x1b4c9
cmpl $0x4, %eax
jne 0x1b4de
cmpb $0x1, 0x12(%rdi)
sete %cl
jmp 0x1b4d4
xorpd %xmm0, %xmm0
ucomisd (%rdi), %xmm0
seta %cl
movb $0x1, %al
testb %cl, %cl
jne 0x1b398
callq 0x8b01
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x2, %esi
callq 0xa1f4
movl $0x2, %edi
callq 0xa975
callq 0x8b78
movzbl 0x10(%rax), %ecx
cmpl $0x5, %ecx
je 0x1b518
cmpl $0x4, %ecx
jne 0x1b525
cmpb $0x1, 0x12(%rax)
sete %al
jmp 0x1b527
xorpd %xmm0, %xmm0
ucomisd (%rax), %xmm0
seta %al
jmp 0x1b527
xorl %eax, %eax
xorb $0x1, %al
jmp 0x1b398