// File: /workspace/github_c_makefile_star2_O3/georgeweigt[P]eigenmath/eigenmath.c
// Function: eval_integral
void
eval_integral(struct atom *p1)
{
	int flag, i, n;
	struct atom *X, *Y = NULL; // silence compiler

	push(cadr(p1));
	evalf();

	p1 = cddr(p1);

	if (!iscons(p1)) {
		push_symbol(X_LOWER);
		integral();
		return;
	}

	flag = 0;

	while (iscons(p1) || flag) {

		if (flag) {
			X = Y;
			flag = 0;
		} else {
			push(car(p1));
			evalf();
			X = pop();
			p1 = cdr(p1);
		}

		if (isnum(X)) {
			push(X);
			n = pop_integer();
			push_symbol(X_LOWER);
			X = pop();
			for (i = 0; i < n; i++) {
				push(X);
				integral();
			}
			continue;
		}

		if (!isusersymbol(X))
			stopf("integral");

		if (iscons(p1)) {

			push(car(p1));
			evalf();
			Y = pop();
			p1 = cdr(p1);

			if (isnum(Y)) {
				push(Y);
				n = pop_integer();
				for (i = 0; i < n; i++) {
					push(X);
					integral();
				}
				continue;
			}

			flag = 1;
		}

		push(X);
		integral();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
cmpb $0x1, 0x10(%rdi)
leaq 0x2e1f2(%rip), %r15     # 0x45a00
movq %r15, %rax
cmoveq %r14, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rax
movq (%rax), %rdi
callq 0x8ba5
callq 0x96e2
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %r14
movq (%r14), %rax
leaq 0x8(%rax), %rcx
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rcx
movq (%rcx), %rbx
cmpb $0x1, 0x10(%rbx)
jne 0x17a1c
leaq 0x10(%rbx), %r14
movb $0x1, %al
xorl %r15d, %r15d
movl $0xfffe795f, %r13d      # imm = 0xFFFE795F
movq $0x0, -0x30(%rbp)
movq %rbx, %r12
testb $0x1, %al
leaq 0x2e18c(%rip), %rbx     # 0x45a00
cmovneq %r12, %rbx
testb $0x1, %r15b
je 0x17887
movq %r12, %rbx
movq -0x30(%rbp), %r14
jmp 0x178d1
movq (%rbx), %rdi
callq 0x8ba5
callq 0x96e2
movl 0x27a1e(%rip), %eax     # 0x3f2b8
leal (%rax,%r13), %ecx
cmpl %r13d, %ecx
jbe 0x17a3b
decl %eax
movl %eax, 0x27a09(%rip)     # 0x3f2b8
addq $0x8, %r12
cmpb $0x1, (%r14)
leaq 0x30d02(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %r14
leaq 0x2e137(%rip), %rax     # 0x45a00
cmovneq %rax, %r12
movq (%r12), %rbx
movzbl 0x10(%r14), %eax
leal -0x4(%rax), %ecx
cmpl $0x2, %ecx
jae 0x17950
movq %r14, %rdi
callq 0x8ba5
callq 0xf8e6
movl %eax, %r14d
movq 0x30053(%rip), %rdi     # 0x47948
callq 0x8ba5
movl 0x279b8(%rip), %eax     # 0x3f2b8
leal (%rax,%r13), %ecx
cmpl %r13d, %ecx
jbe 0x17a3b
decl %eax
movl %eax, 0x279a3(%rip)     # 0x3f2b8
testl %r14d, %r14d
jle 0x17937
leaq 0x30c9f(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %r15
movq %r15, %rdi
callq 0x8ba5
callq 0x115b1
decl %r14d
jne 0x17925
leaq 0x10(%rbx), %r14
xorl %r15d, %r15d
cmpb $0x1, 0x10(%rbx)
movq %rbx, %r12
je 0x17878
jmp 0x17a0d
cmpl $0x3, %eax
jne 0x17a47
cmpb $0x1, 0x10(%rbx)
sete %r15b
jne 0x179e1
movq (%rbx), %rdi
callq 0x8ba5
callq 0x96e2
movl 0x27942(%rip), %eax     # 0x3f2b8
leal (%rax,%r13), %ecx
cmpl %r13d, %ecx
jbe 0x17a3b
decl %eax
movl %eax, 0x2792d(%rip)     # 0x3f2b8
leaq 0x30c2e(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %rdi
leaq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rbx)
leaq 0x2e05b(%rip), %rcx     # 0x45a00
cmovneq %rcx, %rax
movq (%rax), %rbx
movb 0x10(%rdi), %al
andb $-0x2, %al
cmpb $0x4, %al
movq %rdi, -0x30(%rbp)
jne 0x179e1
callq 0x8ba5
callq 0xf8e6
testl %eax, %eax
jle 0x179dc
movl %eax, %r15d
movq %r14, %rdi
callq 0x8ba5
callq 0x115b1
decl %r15d
jne 0x179ca
xorl %r15d, %r15d
jmp 0x179ee
movq %r14, %rdi
callq 0x8ba5
callq 0x115b1
leaq 0x10(%rbx), %r14
movb 0x10(%rbx), %cl
cmpb $0x1, %cl
sete %al
testb %r15b, %r15b
jne 0x17868
cmpb $0x1, %cl
je 0x17868
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2ff25(%rip), %rdi     # 0x47948
callq 0x8ba5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x115b1
leaq 0x174ff(%rip), %rdi     # 0x2ef41
callq 0x780b
leaq 0x12896(%rip), %rdi     # 0x2a2e4
callq 0x780b