// File: /workspace/github_c_makefile_star2_O2/georgeweigt[P]eigenmath/eigenmath.c
// Function: expform
void
expform(void)
{
	int h, i, n;
	struct atom *p1, *num, *den;

	p1 = pop();

	if (istensor(p1)) {
		p1 = copy_tensor(p1);
		n = p1->u.tensor->nelem;
		for (i = 0; i < n; i++) {
			push(p1->u.tensor->elem[i]);
			expform();
			p1->u.tensor->elem[i] = pop();
		}
		push(p1);
		return;
	}

	if (!iscons(p1)) {
		push(p1);
		return;
	}

	if (car(p1) == symbol(ADD)) {
		h = tos;
		p1 = cdr(p1);
		while (iscons(p1)) {
			push(car(p1));
			expform();
			p1 = cdr(p1);
		}
		add_terms(tos - h);
		return;
	}

	if (car(p1) == symbol(MULTIPLY)) {

		push(p1);
		numden();
		num = pop();
		den = pop();

		p1 = num;
		if (car(p1) == symbol(MULTIPLY)) {
			h = tos;
			p1 = cdr(p1);
			while (iscons(p1)) {
				push(car(p1));
				expform();
				p1 = cdr(p1);
			}
			multiply_factors(tos - h);
		} else {
			push(p1);
			expform();
		}
		num = pop();

		p1 = den;
		if (car(p1) == symbol(MULTIPLY)) {
			h = tos;
			p1 = cdr(p1);
			while (iscons(p1)) {
				push(car(p1));
				expform();
				p1 = cdr(p1);
			}
			multiply_factors(tos - h);
		} else {
			push(p1);
			expform();
		}
		den = pop();

		push(num);
		push(den);
		divide();
		return;
	}

	if (car(p1) == symbol(POWER)) {
		push(cadr(p1));
		expform();
		push(caddr(p1));
		expform();
		power();
		return;
	}

	if (car(p1) == symbol(COS)) {
		push(cadr(p1));
		expform();
		expcos();
		return;
	}

	if (car(p1) == symbol(SIN)) {
		push(cadr(p1));
		expform();
		expsin();
		return;
	}

	if (car(p1) == symbol(TAN)) {
		push(cadr(p1));
		expform();
		exptan();
		return;
	}

	if (car(p1) == symbol(COSH)) {
		push(cadr(p1));
		expform();
		expcosh();
		return;
	}

	if (car(p1) == symbol(SINH)) {
		push(cadr(p1));
		expform();
		expsinh();
		return;
	}

	if (car(p1) == symbol(TANH)) {
		push(cadr(p1));
		expform();
		exptanh();
		return;
	}

	h = tos;
	push(car(p1));
	p1 = cdr(p1);
	while (iscons(p1)) {
		push(car(p1));
		expform();
		p1 = cdr(p1);
	}
	list(tos - h);
	evalf();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
callq 0x868d
movq %rax, %rbx
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
je 0x1180e
cmpl $0x7, %eax
jne 0x117fe
movq %rbx, %rdi
callq 0x8f1b
movq %rax, %rbx
movq (%rax), %rax
movl 0x64(%rax), %r14d
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x117fe
movq (%rbx), %rax
movq 0x68(%rax,%r15,8), %rdi
callq 0x861b
callq 0x11798
callq 0x868d
movq (%rbx), %rcx
movq %rax, 0x68(%rcx,%r15,8)
incq %r15
jmp 0x117d5
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x861b
movq (%rbx), %rdi
cmpq 0x2fa78(%rip), %rdi     # 0x41290
je 0x118c1
cmpq 0x2fa73(%rip), %rdi     # 0x41298
je 0x11913
cmpq 0x2fa6e(%rip), %rdi     # 0x412a0
je 0x11968
cmpq 0x2afa1(%rip), %rdi     # 0x3c7e0
je 0x119ad
cmpq 0x2e164(%rip), %rdi     # 0x3f9b0
je 0x11ad8
cmpq 0x2e467(%rip), %rdi     # 0x3fcc0
je 0x11b05
cmpq 0x2af82(%rip), %rdi     # 0x3c7e8
je 0x11b32
cmpq 0x2e145(%rip), %rdi     # 0x3f9b8
je 0x11b7a
cmpq 0x2e448(%rip), %rdi     # 0x3fcc8
je 0x11ba7
movl 0x26a1b(%rip), %r14d    # 0x382a8
callq 0x861b
leaq 0x2d157(%rip), %r15     # 0x3e9f0
leaq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %rax
movq (%rax), %rbx
cmpb $0x1, 0x10(%rbx)
jne 0x11b5f
movq (%rbx), %rdi
callq 0x861b
callq 0x11798
jmp 0x11899
movl 0x269e0(%rip), %r14d    # 0x382a8
addq $0x8, %rbx
leaq 0x2d11d(%rip), %r15     # 0x3e9f0
movq (%rbx), %r12
cmpb $0x1, 0x10(%r12)
jne 0x118fd
movq (%r12), %rdi
callq 0x861b
callq 0x11798
leaq 0x8(%r12), %rbx
cmpb $0x1, 0x10(%r12)
cmovneq %r15, %rbx
jmp 0x118d3
movl 0x269a5(%rip), %edi     # 0x382a8
subl %r14d, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa0fd
movq %rbx, %rdi
callq 0x861b
callq 0xcea2
callq 0x868d
movq %rax, %r14
callq 0x868d
movq %rax, %rbx
cmpb $0x1, 0x10(%r14)
leaq 0x2d0b4(%rip), %r15     # 0x3e9f0
movq %r14, %rcx
cmovneq %r15, %rcx
sete %al
movq (%rcx), %rcx
cmpq 0x2f948(%rip), %rcx     # 0x41298
je 0x119da
movq %r14, %rdi
callq 0x861b
callq 0x11798
jmp 0x11a1a
movq %rbx, %r15
addq $0x8, %r15
movq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rax)
leaq 0x2d072(%rip), %r14     # 0x3e9f0
cmovneq %r14, %rax
movq (%rax), %rdi
callq 0x861b
callq 0x11798
cmpb $0x1, 0x10(%rbx)
cmovneq %r14, %r15
movq (%r15), %rax
cmpb $0x1, 0x10(%rax)
jne 0x11aae
movq 0x8(%rax), %rax
jmp 0x11ab5
movq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rax)
leaq 0x2d034(%rip), %rcx     # 0x3e9f0
cmoveq %rax, %rcx
movq (%rcx), %rdi
callq 0x861b
callq 0x11798
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1165c
movl 0x268c7(%rip), %r12d    # 0x382a8
addq $0x8, %r14
testb $0x1, %al
cmoveq %r15, %r14
movq (%r14), %r14
cmpb $0x1, 0x10(%r14)
jne 0x11a0c
movq (%r14), %rdi
callq 0x861b
callq 0x11798
cmpb $0x1, 0x10(%r14)
sete %al
jmp 0x119e1
movl 0x26896(%rip), %edi     # 0x382a8
subl %r12d, %edi
callq 0xa04c
callq 0x868d
cmpb $0x1, 0x10(%rbx)
movq %rax, %r14
movq %rbx, %rcx
cmovneq %r15, %rcx
sete %al
movq (%rcx), %rcx
cmpq 0x2f85e(%rip), %rcx     # 0x41298
je 0x11a4b
movq %rbx, %rdi
callq 0x861b
callq 0x11798
jmp 0x11a89
movl 0x26856(%rip), %r12d    # 0x382a8
addq $0x8, %rbx
testb $0x1, %al
cmoveq %r15, %rbx
movq (%rbx), %rbx
cmpb $0x1, 0x10(%rbx)
jne 0x11a7b
movq (%rbx), %rdi
callq 0x861b
callq 0x11798
cmpb $0x1, 0x10(%rbx)
sete %al
jmp 0x11a52
movl 0x26827(%rip), %edi     # 0x382a8
subl %r12d, %edi
callq 0xa04c
callq 0x868d
movq %rax, %rbx
movq %r14, %rdi
callq 0x861b
movq %rbx, %rdi
callq 0x861b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xca0b
movq 0x2cf3b(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x11abe
movq %rax, %r14
movq (%r14), %rdi
callq 0x861b
callq 0x11798
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9a87
movq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rax)
leaq 0x2cf09(%rip), %rcx     # 0x3e9f0
cmoveq %rax, %rcx
movq (%rcx), %rdi
callq 0x861b
callq 0x11798
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11bd4
movq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rax)
leaq 0x2cedc(%rip), %rcx     # 0x3e9f0
cmoveq %rax, %rcx
movq (%rcx), %rdi
callq 0x861b
callq 0x11798
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11c80
movq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rax)
leaq 0x2ceaf(%rip), %rcx     # 0x3e9f0
cmoveq %rax, %rcx
movq (%rcx), %rdi
callq 0x861b
callq 0x11798
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1171b
movl 0x26743(%rip), %edi     # 0x382a8
subl %r14d, %edi
callq 0x85eb
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8fbb
movq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rax)
leaq 0x2ce67(%rip), %rcx     # 0x3e9f0
cmoveq %rax, %rcx
movq (%rcx), %rdi
callq 0x861b
callq 0x11798
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11cf9
movq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rax)
leaq 0x2ce3a(%rip), %rcx     # 0x3e9f0
cmoveq %rax, %rcx
movq (%rcx), %rdi
callq 0x861b
callq 0x11798
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11d41