// File: /workspace/github_c_makefile_star2_O2/georgeweigt[P]eigenmath/eigenmath.c
// Function: floatfunc_subst
void
floatfunc_subst(void)
{
	int h, i, n;
	double a, b;
	struct atom *p1;

	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]);
			floatfunc_subst();
			p1->u.tensor->elem[i] = pop();
		}
		push(p1);
		return;
	}

	if (p1 == symbol(PI)) {
		push_double(M_PI);
		return;
	}

	if (p1 == symbol(EXP1)) {
		push_double(M_E);
		return;
	}

	if (isrational(p1)) {
		a = mfloat(p1->u.q.a);
		b = mfloat(p1->u.q.b);
		if (isnegativenumber(p1))
			a = -a;
		push_double(a / b);
		return;
	}

	// don't float exponential

	if (car(p1) == symbol(POWER) && cadr(p1) == symbol(EXP1)) {
		push_symbol(POWER);
		push_symbol(EXP1);
		push(caddr(p1));
		floatfunc_subst();
		list(3);
		return;
	}

	// don't float imaginary unit, but multiply it by 1.0

	if (car(p1) == symbol(POWER) && isminusone(cadr(p1))) {
		push_symbol(MULTIPLY);
		push_double(1.0);
		push_symbol(POWER);
		push(cadr(p1));
		push(caddr(p1));
		floatfunc_subst();
		list(3);
		list(3);
		return;
	}

	if (iscons(p1)) {
		h = tos;
		push(car(p1));
		p1 = cdr(p1);
		while (iscons(p1)) {
			push(car(p1));
			floatfunc_subst();
			p1 = cdr(p1);
		}
		list(tos - h);
		return;
	}

	push(p1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x868d
movq %rax, %rbx
movzbl 0x10(%rax), %r12d
cmpl $0x7, %r12d
jne 0x12056
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 0x12160
movq (%rbx), %rax
movq 0x68(%rax,%r15,8), %rdi
callq 0x861b
callq 0x11fe9
callq 0x868d
movq (%rbx), %rcx
movq %rax, 0x68(%rcx,%r15,8)
incq %r15
jmp 0x12029
cmpq 0x2cfe3(%rip), %rbx     # 0x3f040
je 0x120b9
movq %rax, %r14
movq 0x2f24f(%rip), %rax     # 0x412b8
cmpq %rax, %r14
je 0x120c6
movq %rbx, %rcx
cmpl $0x1, %r12d
je 0x120da
cmpl $0x4, %r12d
jne 0x120d3
movq (%rbx), %rdi
callq 0x7878
movaps %xmm0, -0x40(%rbp)
movq 0x8(%rbx), %rdi
callq 0x7878
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
callq 0x8c2a
testl %eax, %eax
je 0x12208
movapd -0x40(%rbp), %xmm0
xorpd 0x1105c(%rip), %xmm0    # 0x23110
jmp 0x1220d
movsd 0x11077(%rip), %xmm0    # 0x23138
jmp 0x12212
movsd 0x11062(%rip), %xmm0    # 0x23130
jmp 0x12212
leaq 0x2c916(%rip), %rcx     # 0x3e9f0
movq 0x2f1bf(%rip), %rdi     # 0x412a0
cmpq %rdi, (%rcx)
jne 0x12110
leaq 0x8(%r14), %r13
cmpl $0x1, %r12d
leaq 0x2c8fb(%rip), %r15     # 0x3e9f0
movq %r15, %rcx
cmoveq %r13, %rcx
movq (%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
cmovneq %r15, %rcx
cmpq %rax, (%rcx)
je 0x12225
cmpl $0x1, %r12d
leaq 0x2c8d5(%rip), %r15     # 0x3e9f0
movq %r15, %rax
cmoveq %r14, %rax
cmpq %rdi, (%rax)
je 0x12184
cmpb $0x1, %r12b
jne 0x12160
movl 0x26174(%rip), %r14d    # 0x382a8
movq (%rbx), %rdi
callq 0x861b
leaq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %rax
movq (%rax), %rbx
cmpb $0x1, 0x10(%rbx)
jne 0x12176
movq (%rbx), %rdi
callq 0x861b
callq 0x11fe9
jmp 0x1213c
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x861b
movl 0x2612c(%rip), %edi     # 0x382a8
subl %r14d, %edi
jmp 0x12299
addq $0x8, %r14
cmpb $0x1, %r12b
movq %r15, %rax
cmoveq %r14, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rax
movq (%rax), %rdi
callq 0xbfac
testl %eax, %eax
je 0x12127
movq 0x2f0e3(%rip), %rdi     # 0x41298
callq 0x861b
movsd 0x10f7e(%rip), %xmm0    # 0x23140
callq 0xaf59
movq 0x2f0d2(%rip), %rdi     # 0x412a0
callq 0x861b
cmpb $0x1, 0x10(%rbx)
movq %r15, %rax
cmoveq %r14, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rax
movq (%rax), %rdi
callq 0x861b
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %r14
movq (%r14), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1224e
movq 0x8(%rax), %rax
jmp 0x12255
movapd -0x40(%rbp), %xmm0
divsd -0x30(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xaf59
callq 0x861b
movq 0x2f087(%rip), %rdi     # 0x412b8
callq 0x861b
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %r13
movq (%r13), %rax
cmpb $0x1, 0x10(%rax)
jne 0x12279
movq 0x8(%rax), %rax
jmp 0x12280
movq 0x2c79b(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x1225e
movq %rax, %r15
movq (%r15), %rdi
callq 0x861b
callq 0x11fe9
pushq $0x3
popq %rbx
movl %ebx, %edi
callq 0x85eb
movl %ebx, %edi
jmp 0x12299
movq 0x2c770(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x12289
movq %rax, %r15
movq (%r15), %rdi
callq 0x861b
callq 0x11fe9
pushq $0x3
popq %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x85eb