// File: /workspace/github_c_makefile_star2_O2/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 0xf772
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x10(%rdi)
leaq 0x2f4f5(%rip), %rax     # 0x3e9f0
cmoveq %rdi, %rax
movq (%rax), %rax
cmpq 0x2d5c7(%rip), %rax     # 0x3cad0
je 0xf636
cmpq 0x2e562(%rip), %rax     # 0x3da78
je 0xf645
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8760
testl %eax, %eax
je 0xf654
cmpb $0x1, 0x10(%r14)
jne 0xf659
movq (%r14), %rax
cmpq 0x31d4c(%rip), %rax     # 0x41290
je 0xf664
cmpq 0x31d47(%rip), %rax     # 0x41298
je 0xf673
cmpq 0x31d42(%rip), %rax     # 0x412a0
je 0xf682
cmpq 0x2ee55(%rip), %rax     # 0x3e3c0
je 0xf691
cmpq 0x30438(%rip), %rax     # 0x3f9b0
je 0xf6a0
cmpq 0x2d25b(%rip), %rax     # 0x3c7e0
je 0xf6af
cmpq 0x3072e(%rip), %rax     # 0x3fcc0
je 0xf6be
cmpq 0x2cbd9(%rip), %rax     # 0x3c178
je 0xf6cd
cmpq 0x2cbbc(%rip), %rax     # 0x3c168
je 0xf6dc
cmpq 0x2cbcf(%rip), %rax     # 0x3c188
je 0xf6eb
cmpq 0x303f2(%rip), %rax     # 0x3f9b8
je 0xf6fa
cmpq 0x2d215(%rip), %rax     # 0x3c7e8
je 0xf709
cmpq 0x306e8(%rip), %rax     # 0x3fcc8
je 0xf718
cmpq 0x2cb93(%rip), %rax     # 0x3c180
je 0xf727
cmpq 0x2cb76(%rip), %rax     # 0x3c170
je 0xf736
cmpq 0x2cb89(%rip), %rax     # 0x3c190
je 0xf745
cmpq 0x2d7c4(%rip), %rax     # 0x3cdd8
je 0xf754
cmpq 0x2d7bf(%rip), %rax     # 0x3cde0
je 0xf763
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x104fc
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xf77e
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xf8fb
pushq $0x1
popq %rdi
jmp 0xf65b
xorl %edi, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0xa426
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xf973
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xf9d6
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xfa9f
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xfc7a
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xfcea
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xfd5f
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xfdd9
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xfe5b
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xfef6
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xff96
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x10025
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1009a
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1010f
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x10191
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1022c
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x102cb
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1035a
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1042b
leaq 0x13bac(%rip), %rdi     # 0x23325
callq 0x7756