// File: /workspace/github_cpp_makefile_star2_O3/PeterDenton[P]Nu-Pert/src/Hyperbolas.cpp
// Function: Hyperbolas::Palphabeta(int, int, double, double, double)
double Palphabeta(int alpha, int beta, double a, double LE, double delta)
{
	assert (alpha >= 0 && alpha <= 2); // alpha valid for 0, 1, 2
	assert (beta >= 0 && beta <= 2); // beta valid for 0, 1, 2

	double L2E = km_per_GeV_to_per_eV2 * LE / 2; // in eV^-2 now

	// See eq. 4.0.1 or eq. 3.12 in arXiv:1505.01826
	std::complex<double> A(0, 0);
	A += Talphabetai(alpha, beta, 0, a, delta) * std::complex<double>(cos(Hyperbolas::l1(a) * L2E), -sin(Hyperbolas::l1(a) * L2E));
	A += Talphabetai(alpha, beta, 1, a, delta) * std::complex<double>(cos(Hyperbolas::l2(a) * L2E), -sin(Hyperbolas::l2(a) * L2E));
	A += Talphabetai(alpha, beta, 2, a, delta) * std::complex<double>(cos(Hyperbolas::l3(a) * L2E), -sin(Hyperbolas::l3(a) * L2E));

	return std::norm(A);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpl $0x3, %edi
jae 0x9922
movl %esi, %ebx
cmpl $0x3, %esi
jae 0x9941
movl %edi, %ebp
leaq 0x4df9(%rip), %rax      # 0xe328
mulsd (%rax), %xmm1
mulsd 0x4acd(%rip), %xmm1     # 0xe008
movsd %xmm1, 0x20(%rsp)
movl %ebx, %esi
xorl %edx, %edx
movsd %xmm0, (%rsp)
movaps %xmm2, %xmm1
movsd %xmm2, 0x38(%rsp)
callq 0x93c5
movsd %xmm0, 0x30(%rsp)
movsd %xmm1, 0x28(%rsp)
leaq 0x4d9d(%rip), %rax      # 0xe308
movsd (%rax), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
callq 0x22c0
leaq 0x9c0b(%rip), %r13      # 0x13190
mulsd (%r13), %xmm0
leaq 0x9bf6(%rip), %r12      # 0x13188
mulsd (%r12), %xmm0
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
mulsd %xmm1, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x2070
mulsd (%r13), %xmm0
mulsd (%r12), %xmm0
mulsd %xmm0, %xmm0
addsd 0x8(%rsp), %xmm0
sqrtsd %xmm0, %xmm0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x4a20(%rip), %xmm1     # 0xe008
addsd 0x9bc0(%rip), %xmm1     # 0x131b0
mulsd 0x20(%rsp), %xmm1
movapd %xmm1, %xmm0
callq 0x22c0
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x22c0
mulsd (%r13), %xmm0
mulsd (%r12), %xmm0
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
mulsd %xmm1, %xmm1
movsd %xmm1, 0x40(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x2070
mulsd (%r13), %xmm0
mulsd (%r12), %xmm0
mulsd %xmm0, %xmm0
addsd 0x40(%rsp), %xmm0
sqrtsd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x499c(%rip), %xmm1     # 0xe008
addsd 0x9b3c(%rip), %xmm1     # 0x131b0
mulsd 0x20(%rsp), %xmm1
movapd %xmm1, %xmm0
callq 0x2070
xorpd 0x4995(%rip), %xmm0     # 0xe020
leaq 0x48(%rsp), %r14
movsd 0x10(%rsp), %xmm1
movsd %xmm1, (%r14)
movlpd %xmm0, 0x8(%r14)
leaq 0x58(%rsp), %r15
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%r15)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3968
xorpd %xmm0, %xmm0
movsd (%r15), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x30(%rsp)
addsd 0x8(%r15), %xmm0
movsd %xmm0, 0x18(%rsp)
movl %ebp, %edi
movl %ebx, %esi
movl $0x1, %edx
movsd (%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0x93c5
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd (%rsp), %xmm0
callq 0x8385
mulsd 0x20(%rsp), %xmm0
callq 0x22c0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8385
mulsd 0x20(%rsp), %xmm0
callq 0x2070
xorpd 0x48dc(%rip), %xmm0     # 0xe020
movsd 0x8(%rsp), %xmm1
movsd %xmm1, (%r14)
movlpd %xmm0, 0x8(%r14)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%r15)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%r15)
leaq 0x58(%rsp), %r14
leaq 0x48(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3968
movsd 0x30(%rsp), %xmm0
addsd (%r14), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x18(%rsp), %xmm0
addsd 0x8(%r14), %xmm0
movsd %xmm0, 0x18(%rsp)
movl %ebp, %edi
movl %ebx, %esi
movl $0x2, %edx
movsd (%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0x93c5
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x28(%rsp)
leaq 0x4ad8(%rip), %rax      # 0xe2a8
movsd (%rax), %xmm1
movsd %xmm1, 0x8(%rsp)
leaq 0x4ab7(%rip), %rax      # 0xe298
movsd (%rax), %xmm2
movsd %xmm2, 0x40(%rsp)
movsd (%r13), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
mulsd (%r12), %xmm0
addsd (%rsp), %xmm0
movsd 0x99ac(%rip), %xmm1     # 0x131b8
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
subsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
movsd 0x999c(%rip), %xmm1     # 0x131c0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
addsd %xmm2, %xmm0
mulsd 0x47c9(%rip), %xmm0     # 0xe008
mulsd 0x20(%rsp), %xmm0
callq 0x22c0
movsd %xmm0, 0x10(%rsp)
movsd 0x40(%rsp), %xmm2
mulsd (%r13), %xmm2
addsd 0x8(%rsp), %xmm2
mulsd (%r12), %xmm2
addsd (%rsp), %xmm2
movsd 0x9943(%rip), %xmm0     # 0x131b8
movapd %xmm2, %xmm1
addsd %xmm0, %xmm1
subsd %xmm0, %xmm2
mulsd %xmm2, %xmm2
movsd 0x9933(%rip), %xmm0     # 0x131c0
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
sqrtsd %xmm0, %xmm0
addsd %xmm1, %xmm0
mulsd 0x4763(%rip), %xmm0     # 0xe008
mulsd 0x20(%rsp), %xmm0
callq 0x2070
xorpd 0x4768(%rip), %xmm0     # 0xe020
movsd 0x10(%rsp), %xmm1
movsd %xmm1, (%r15)
movlpd %xmm0, 0x8(%r15)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, (%r14)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%r14)
leaq 0x58(%rsp), %rbx
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x3968
movsd 0x30(%rsp), %xmm0
addsd (%rbx), %xmm0
movsd 0x18(%rsp), %xmm1
addsd 0x8(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4856(%rip), %rdi      # 0xe17f
leaq 0x4e9e(%rip), %rsi      # 0xe7ce
leaq 0x4ef6(%rip), %rcx      # 0xe82d
movl $0xb1, %edx
callq 0x20f0
leaq 0x489c(%rip), %rdi      # 0xe1e4
leaq 0x4e7f(%rip), %rsi      # 0xe7ce
leaq 0x4ed7(%rip), %rcx      # 0xe82d
movl $0xb2, %edx
callq 0x20f0