// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Mixed.cpp
// Function: Mixed::cdeltam(double, double, int)
double cdeltam(double D, double delta, int order)
{
	// tmp
	double Et = E(D, order);
	double Ft = F(D, order);
	// denominator
	double densq1 = pow(Et, 2) * s23sq + pow(Ft, 2) * c23sq + 2 * Et * Ft * c23 * s23 * cos(delta);
	double densq2 = pow(Et, 2) * c23sq + pow(Ft, 2) * s23sq - 2 * Et * Ft * c23 * s23 * cos(delta);
	// numerator c23sq -> c23 typo corrected
	return ((pow(Et, 2) - pow(Ft, 2)) * cos(delta) * s23 * c23 + Et * Ft * (c23sq - s23sq)) / sqrt(densq1 * densq2);
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movl %edi, %ebx
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
callq 0xada9
movaps %xmm0, 0x60(%rsp)
movsd 0x10(%rsp), %xmm0
movl %ebx, %edi
callq 0x28c0
leaq 0x7e79(%rip), %rax      # 0x13180
subsd (%rax), %xmm0
leaq 0x2f9e(%rip), %rax      # 0xe2b0
mulsd (%rax), %xmm0
leaq 0x2fd3(%rip), %rax      # 0xe2f0
mulsd (%rax), %xmm0
leaq 0x2fb0(%rip), %rax      # 0xe2d8
mulsd (%rax), %xmm0
leaq 0x2fcd(%rip), %rax      # 0xe300
mulsd (%rax), %xmm0
leaq 0x2f62(%rip), %rax      # 0xe2a0
movsd (%rax), %xmm1
movaps %xmm1, 0x30(%rsp)
movapd 0x60(%rsp), %xmm1
movapd %xmm1, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movapd %xmm0, 0x90(%rsp)
mulpd %xmm2, %xmm2
movapd %xmm2, 0x10(%rsp)
leaq 0x2f59(%rip), %rax      # 0xe2c8
movsd (%rax), %xmm2
movaps %xmm2, 0x40(%rsp)
addsd %xmm1, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, 0x80(%rsp)
leaq 0x2f68(%rip), %rax      # 0xe2f8
movsd (%rax), %xmm0
movaps %xmm0, 0x70(%rsp)
leaq 0x2f40(%rip), %rax      # 0xe2e0
movsd (%rax), %xmm0
movaps %xmm0, 0x50(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x22c0
movaps %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x22c0
movapd 0x2c54(%rip), %xmm7     # 0xe020
movapd 0x80(%rsp), %xmm8
xorpd %xmm8, %xmm7
movapd 0x30(%rsp), %xmm5
movapd %xmm5, %xmm1
movapd 0x40(%rsp), %xmm6
unpcklpd %xmm6, %xmm1            # xmm1 = xmm1[0],xmm6[0]
movapd 0x10(%rsp), %xmm4
movapd %xmm4, %xmm2
unpckhpd %xmm4, %xmm2            # xmm2 = xmm2[1],xmm4[1]
mulpd %xmm2, %xmm1
movapd %xmm4, %xmm3
movapd %xmm4, %xmm9
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
movapd %xmm6, %xmm4
unpcklpd %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0]
mulpd %xmm3, %xmm4
addpd %xmm1, %xmm4
unpcklpd %xmm8, %xmm7            # xmm7 = xmm7[0],xmm8[0]
movapd 0x70(%rsp), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm7, %xmm1
movapd 0x50(%rsp), %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm1, %xmm3
unpcklpd 0x20(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
mulpd %xmm3, %xmm0
addpd %xmm4, %xmm0
movapd %xmm0, 0x20(%rsp)
subsd %xmm2, %xmm9
movapd %xmm9, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x22c0
movapd %xmm0, %xmm2
mulsd 0x10(%rsp), %xmm2
mulsd 0x50(%rsp), %xmm2
movapd 0x90(%rsp), %xmm1
mulsd 0x60(%rsp), %xmm1
movapd 0x40(%rsp), %xmm0
subsd 0x30(%rsp), %xmm0
mulsd %xmm1, %xmm0
mulsd 0x70(%rsp), %xmm2
addsd %xmm0, %xmm2
movapd 0x20(%rsp), %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
mulsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xb4c5
sqrtsd %xmm0, %xmm0
jmp 0xb4d6
movsd %xmm2, 0x8(%rsp)
callq 0x2120
movsd 0x8(%rsp), %xmm2
divsd %xmm0, %xmm2
movapd %xmm2, %xmm0
addq $0xa0, %rsp
popq %rbx
retq