// File: /workspace/github_c_makefile_star2_O3/georgeweigt[P]eigenmath/eigenmath.c
// Function: d_scalar_scalar
void
d_scalar_scalar(struct atom *F, struct atom *X)
{
	if (!isusersymbol(X))
		stopf("derivative: symbol expected");

	if (car(F) == symbol(DERIVATIVE)) {
		derivative_of_derivative(F, X);
		return;
	}

	if (car(F) == symbol(INTEGRAL)) {
		derivative_of_integral(F, X);
		return;
	}

	// d(x,x)?

	if (equal(F, X)) {
		push_integer(1);
		return;
	}

	// d(a,x)?

	if (!iscons(F)) {
		push_integer(0);
		return;
	}

	if (car(F) == symbol(ADD)) {
		dsum(F, X);
		return;
	}

	if (car(F) == symbol(MULTIPLY)) {
		dproduct(F, X);
		return;
	}

	if (car(F) == symbol(POWER)) {
		dpower(F, X);
		return;
	}

	if (car(F) == symbol(LOG)) {
		dlog(F, X);
		return;
	}

	if (car(F) == symbol(SIN)) {
		dsin(F, X);
		return;
	}

	if (car(F) == symbol(COS)) {
		dcos(F, X);
		return;
	}

	if (car(F) == symbol(TAN)) {
		dtan(F, X);
		return;
	}

	if (car(F) == symbol(ARCSIN)) {
		darcsin(F, X);
		return;
	}

	if (car(F) == symbol(ARCCOS)) {
		darccos(F, X);
		return;
	}

	if (car(F) == symbol(ARCTAN)) {
		darctan(F, X);
		return;
	}

	if (car(F) == symbol(SINH)) {
		dsinh(F, X);
		return;
	}

	if (car(F) == symbol(COSH)) {
		dcosh(F, X);
		return;
	}

	if (car(F) == symbol(TANH)) {
		dtanh(F, X);
		return;
	}

	if (car(F) == symbol(ARCSINH)) {
		darcsinh(F, X);
		return;
	}

	if (car(F) == symbol(ARCCOSH)) {
		darccosh(F, X);
		return;
	}

	if (car(F) == symbol(ARCTANH)) {
		darctanh(F, X);
		return;
	}

	if (car(F) == symbol(ERF)) {
		derf(F, X);
		return;
	}

	if (car(F) == symbol(ERFC)) {
		derfc(F, X);
		return;
	}

	dfunction(F, X);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpb $0x3, 0x10(%rsi)
jne 0x11f61
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x10(%rdi)
leaq 0x33d1f(%rip), %rax     # 0x45a00
cmoveq %rdi, %rax
movq (%rax), %rax
cmpq 0x31df1(%rip), %rax     # 0x43ae0
je 0x11e1c
cmpq 0x32d8c(%rip), %rax     # 0x44a88
je 0x11e2b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8d48
testl %eax, %eax
je 0x11e3a
cmpb $0x1, 0x10(%r14)
jne 0x11e43
movq (%r14), %rax
cmpq 0x36576(%rip), %rax     # 0x482a0
je 0x11e53
cmpq 0x36571(%rip), %rax     # 0x482a8
je 0x11e62
cmpq 0x3656c(%rip), %rax     # 0x482b0
je 0x11e71
cmpq 0x3367f(%rip), %rax     # 0x453d0
je 0x11e80
cmpq 0x34c62(%rip), %rax     # 0x469c0
je 0x11e8f
cmpq 0x31a85(%rip), %rax     # 0x437f0
je 0x11e9e
cmpq 0x34f58(%rip), %rax     # 0x46cd0
je 0x11ead
cmpq 0x31403(%rip), %rax     # 0x43188
je 0x11ebc
cmpq 0x313e6(%rip), %rax     # 0x43178
je 0x11ecb
cmpq 0x313f9(%rip), %rax     # 0x43198
je 0x11eda
cmpq 0x34c1c(%rip), %rax     # 0x469c8
je 0x11ee9
cmpq 0x31a3f(%rip), %rax     # 0x437f8
je 0x11ef8
cmpq 0x34f12(%rip), %rax     # 0x46cd8
je 0x11f07
cmpq 0x313bd(%rip), %rax     # 0x43190
je 0x11f16
cmpq 0x313a0(%rip), %rax     # 0x43180
je 0x11f25
cmpq 0x313b3(%rip), %rax     # 0x431a0
je 0x11f34
cmpq 0x31fee(%rip), %rax     # 0x43de8
je 0x11f43
cmpq 0x31fe9(%rip), %rax     # 0x43df0
je 0x11f52
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12ea3
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11f6d
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12105
movq 0xf9c97(%rip), %rdi     # 0x10bad8
jmp 0x11e4a
movq 0x312f6(%rip), %rdi     # 0x43140
popq %rbx
popq %r14
popq %rbp
jmp 0x8ba5
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1217d
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x121f9
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x122bf
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x124c9
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1254f
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x125c9
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12659
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x126e2
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x127a6
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12880
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1292b
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x129a5
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12a1f
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12aa8
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12b56
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12c04
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12cc5
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x12db4
leaq 0x18385(%rip), %rdi     # 0x2a2ed
callq 0x780b