// File: /workspace/github_c_makefile_star2_O1/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 0x8b78
movq %rax, %rbx
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
je 0x1320c
cmpl $0x7, %eax
jne 0x131fc
movq %rbx, %rdi
callq 0x953d
movq %rax, %rbx
movq (%rax), %rax
movslq 0x64(%rax), %r14
testq %r14, %r14
jle 0x131fc
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0x68(%rax,%r15,8), %rdi
callq 0x8b01
callq 0x1319a
callq 0x8b78
movq (%rbx), %rcx
movq %rax, 0x68(%rcx,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x131d5
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8b01
movq (%rbx), %rcx
cmpq 0x3008a(%rip), %rcx     # 0x432a0
je 0x132d2
leaq 0x2d7dd(%rip), %r14     # 0x40a00
cmpb $0x1, %al
movq %r14, %rcx
cmoveq %rbx, %rcx
movq (%rcx), %rdi
cmpq 0x30072(%rip), %rdi     # 0x432a8
je 0x13327
cmpq 0x3006d(%rip), %rdi     # 0x432b0
je 0x1337b
cmpq 0x2b5a0(%rip), %rdi     # 0x3e7f0
je 0x133f3
cmpq 0x2e763(%rip), %rdi     # 0x419c0
je 0x13507
cmpq 0x2ea66(%rip), %rdi     # 0x41cd0
je 0x13536
cmpq 0x2b581(%rip), %rdi     # 0x3e7f8
je 0x13565
cmpq 0x2e744(%rip), %rdi     # 0x419c8
je 0x135af
cmpq 0x2ea47(%rip), %rdi     # 0x41cd8
je 0x135de
movl 0x2701a(%rip), %r15d    # 0x3a2b8
callq 0x8b01
movq %rbx, %rax
addq $0x8, %rax
cmpb $0x1, 0x10(%rbx)
cmovneq %r14, %rax
movq (%rax), %rbx
cmpb $0x1, 0x10(%rbx)
jne 0x13594
movq (%rbx), %rdi
callq 0x8b01
callq 0x1319a
leaq 0x8(%rbx), %rax
jmp 0x132aa
addq $0x8, %rbx
cmpb $0x1, %al
leaq 0x2d721(%rip), %r15     # 0x40a00
cmovneq %r15, %rbx
movl 0x26fce(%rip), %r14d    # 0x3a2b8
movq (%rbx), %rbx
cmpb $0x1, 0x10(%rbx)
jne 0x13311
movq (%rbx), %rdi
callq 0x8b01
callq 0x1319a
leaq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %rax
movq (%rax), %rbx
jmp 0x132ed
movl 0x26fa1(%rip), %edi     # 0x3a2b8
subl %r14d, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa975
movq %rbx, %rdi
callq 0x8b01
callq 0xdee7
callq 0x8b78
movq %rax, %r14
callq 0x8b78
movb 0x10(%r14), %cl
cmpb $0x1, %cl
leaq 0x2d6b1(%rip), %r15     # 0x40a00
movq %r15, %rdx
cmoveq %r14, %rdx
movq %rax, %rbx
movq (%rdx), %rax
cmpq 0x2ff45(%rip), %rax     # 0x432a8
je 0x13422
movq %r14, %rdi
callq 0x8b01
callq 0x1319a
jmp 0x1346b
movq %rbx, %r15
addq $0x8, %r15
cmpb $0x1, %al
movq %r14, %rax
cmoveq %r15, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r14, %rax
movq (%rax), %rdi
callq 0x8b01
callq 0x1319a
cmpb $0x1, 0x10(%rbx)
cmovneq %r14, %r15
movq (%r15), %rax
movb 0x10(%rax), %cl
addq $0x8, %rax
cmpb $0x1, %cl
movq %r14, %rdx
cmoveq %rax, %rdx
movq (%rdx), %rdx
cmpb $0x1, 0x10(%rdx)
jne 0x133d9
cmpb $0x1, %cl
leaq 0x2d62e(%rip), %rcx     # 0x40a00
cmoveq %rax, %rcx
movq (%rcx), %r14
movq (%r14), %rdi
callq 0x8b01
callq 0x1319a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa234
addq $0x8, %rbx
cmpb $0x1, %al
cmovneq %r14, %rbx
movq (%rbx), %rax
cmpb $0x1, 0x10(%rax)
cmoveq %rax, %r14
movq (%r14), %rdi
callq 0x8b01
callq 0x1319a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12fd9
addq $0x8, %r14
cmpb $0x1, %cl
cmovneq %r15, %r14
movl 0x26e84(%rip), %r12d    # 0x3a2b8
movq (%r14), %r14
cmpb $0x1, 0x10(%r14)
jne 0x1345d
movq (%r14), %rdi
callq 0x8b01
callq 0x1319a
leaq 0x8(%r14), %rax
cmpb $0x1, 0x10(%r14)
cmovneq %r15, %rax
movq (%rax), %r14
jmp 0x13437
movl 0x26e55(%rip), %edi     # 0x3a2b8
subl %r12d, %edi
callq 0xa8bb
callq 0x8b78
movb 0x10(%rbx), %cl
cmpb $0x1, %cl
movq %r15, %rdx
cmoveq %rbx, %rdx
movq %rax, %r14
movq (%rdx), %rax
cmpq 0x2fe1e(%rip), %rax     # 0x432a8
je 0x1349b
movq %rbx, %rdi
callq 0x8b01
callq 0x1319a
jmp 0x134e2
addq $0x8, %rbx
cmpb $0x1, %cl
cmovneq %r15, %rbx
movl 0x26e0b(%rip), %r12d    # 0x3a2b8
movq (%rbx), %rbx
cmpb $0x1, 0x10(%rbx)
jne 0x134d4
movq (%rbx), %rdi
callq 0x8b01
callq 0x1319a
leaq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %rax
movq (%rax), %rbx
jmp 0x134b0
movl 0x26dde(%rip), %edi     # 0x3a2b8
subl %r12d, %edi
callq 0xa8bb
callq 0x8b78
movq %rax, %rbx
movq %r14, %rdi
callq 0x8b01
movq %rbx, %rdi
callq 0x8b01
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd9a4
addq $0x8, %rbx
cmpb $0x1, %al
cmovneq %r14, %rbx
movq (%rbx), %rax
cmpb $0x1, 0x10(%rax)
cmoveq %rax, %r14
movq (%r14), %rdi
callq 0x8b01
callq 0x1319a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1360d
addq $0x8, %rbx
cmpb $0x1, %al
cmovneq %r14, %rbx
movq (%rbx), %rax
cmpb $0x1, 0x10(%rax)
cmoveq %rax, %r14
movq (%r14), %rdi
callq 0x8b01
callq 0x1319a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x136f8
addq $0x8, %rbx
cmpb $0x1, %al
cmovneq %r14, %rbx
movq (%rbx), %rax
cmpb $0x1, 0x10(%rax)
cmoveq %rax, %r14
movq (%r14), %rdi
callq 0x8b01
callq 0x1319a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x130dc
movl 0x26d1e(%rip), %edi     # 0x3a2b8
subl %r15d, %edi
callq 0x8ad9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x95e2
addq $0x8, %rbx
cmpb $0x1, %al
cmovneq %r14, %rbx
movq (%rbx), %rax
cmpb $0x1, 0x10(%rax)
cmoveq %rax, %r14
movq (%r14), %rdi
callq 0x8b01
callq 0x1319a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x13794
addq $0x8, %rbx
cmpb $0x1, %al
cmovneq %r14, %rbx
movq (%rbx), %rax
cmpb $0x1, 0x10(%rax)
cmoveq %rax, %r14
movq (%r14), %rdi
callq 0x8b01
callq 0x1319a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x13818