// File: /workspace/github_c_makefile_star2_O1/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 0x10c9c
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x10(%rdi)
leaq 0x2ffe4(%rip), %rax     # 0x40a00
cmoveq %rdi, %rax
movq (%rax), %rax
cmpq 0x2e0b6(%rip), %rax     # 0x3eae0
je 0x10b57
cmpq 0x2f051(%rip), %rax     # 0x3fa88
je 0x10b66
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8c79
testl %eax, %eax
je 0x10b75
cmpb $0x1, 0x10(%r14)
jne 0x10b7e
movq (%r14), %rax
cmpq 0x3283b(%rip), %rax     # 0x432a0
je 0x10b8e
cmpq 0x32836(%rip), %rax     # 0x432a8
je 0x10b9d
cmpq 0x32831(%rip), %rax     # 0x432b0
je 0x10bac
cmpq 0x2f944(%rip), %rax     # 0x403d0
je 0x10bbb
cmpq 0x30f27(%rip), %rax     # 0x419c0
je 0x10bca
cmpq 0x2dd4a(%rip), %rax     # 0x3e7f0
je 0x10bd9
cmpq 0x3121d(%rip), %rax     # 0x41cd0
je 0x10be8
cmpq 0x2d6c8(%rip), %rax     # 0x3e188
je 0x10bf7
cmpq 0x2d6ab(%rip), %rax     # 0x3e178
je 0x10c06
cmpq 0x2d6be(%rip), %rax     # 0x3e198
je 0x10c15
cmpq 0x30ee1(%rip), %rax     # 0x419c8
je 0x10c24
cmpq 0x2dd04(%rip), %rax     # 0x3e7f8
je 0x10c33
cmpq 0x311d7(%rip), %rax     # 0x41cd8
je 0x10c42
cmpq 0x2d682(%rip), %rax     # 0x3e190
je 0x10c51
cmpq 0x2d665(%rip), %rax     # 0x3e180
je 0x10c60
cmpq 0x2d678(%rip), %rax     # 0x3e1a0
je 0x10c6f
cmpq 0x2e2b3(%rip), %rax     # 0x3ede8
je 0x10c7e
cmpq 0x2e2ae(%rip), %rax     # 0x3edf0
je 0x10c8d
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11be1
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x10ca8
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x10e2d
movq 0xf5f5c(%rip), %rdi     # 0x106ad8
jmp 0x10b85
movq 0x2d5bb(%rip), %rdi     # 0x3e140
popq %rbx
popq %r14
popq %rbp
jmp 0x8b01
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x10eaf
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x10f28
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x10ff2
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11207
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1128d
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11307
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11397
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11420
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x114e4
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x115be
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11669
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x116e3
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1175d
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x117e6
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11894
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11942
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11a03
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x11af2
leaq 0x1562a(%rip), %rdi     # 0x262cd
callq 0x77c8