// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Exact.cpp
// Function: Exact::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(M1sq(a) * L2E), -sin(M1sq(a) * L2E));
	A += Talphabetai(alpha, beta, 1, a, delta) * std::complex<double>(cos(M2sq(a) * L2E), -sin(M2sq(a) * L2E));
	A += Talphabetai(alpha, beta, 2, a, delta) * std::complex<double>(cos(M3sq(a) * L2E), -sin(M3sq(a) * L2E));

	return std::norm(A);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
cmpl $0x3, %edi
jae 0x575f
movl %esi, %ebx
cmpl $0x3, %esi
jae 0x577e
movl %edi, %ebp
leaq 0x8e9a(%rip), %rax      # 0xe328
mulsd (%rax), %xmm1
mulsd 0x8b6e(%rip), %xmm1     # 0xe008
movsd %xmm1, 0x8(%rsp)
movl %ebx, %esi
xorl %edx, %edx
movsd %xmm0, (%rsp)
movsd %xmm2, 0x28(%rsp)
movaps %xmm2, %xmm1
callq 0x5328
movsd %xmm0, 0x20(%rsp)
movsd (%rsp), %xmm0
movsd %xmm1, 0x18(%rsp)
leaq 0xdcc9(%rip), %r15      # 0x13198
cmpb $0x1, (%r15)
jne 0x54dc
callq 0x40a4
jmp 0x54e1
callq 0x4382
mulsd 0x8(%rsp), %xmm0
callq 0x22c0
movsd %xmm0, 0x10(%rsp)
cmpb $0x1, (%r15)
jne 0x5504
movsd (%rsp), %xmm0
callq 0x40a4
jmp 0x550e
movsd (%rsp), %xmm0
callq 0x4382
mulsd 0x8(%rsp), %xmm0
callq 0x2070
xorpd 0x8aff(%rip), %xmm0     # 0xe020
leaq 0x48(%rsp), %rsi
movsd 0x10(%rsp), %xmm1
movsd %xmm1, (%rsi)
movlpd %xmm0, 0x8(%rsi)
leaq 0x58(%rsp), %r14
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%r14)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%r14)
movq %r14, %rdi
callq 0x3994
movsd (%r14), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x8(%r14), %xmm0
movsd %xmm0, 0x18(%rsp)
movl %ebp, %edi
movl %ebx, %esi
movl $0x1, %edx
movsd (%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x5328
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x38(%rsp)
cmpb $0x1, (%r15)
jne 0x55a7
movsd (%rsp), %xmm0
callq 0x4382
jmp 0x55b1
movsd (%rsp), %xmm0
callq 0x44d0
mulsd 0x8(%rsp), %xmm0
callq 0x22c0
movsd %xmm0, 0x30(%rsp)
cmpb $0x1, (%r15)
jne 0x55d4
movsd (%rsp), %xmm0
callq 0x4382
jmp 0x55de
movsd (%rsp), %xmm0
callq 0x44d0
mulsd 0x8(%rsp), %xmm0
callq 0x2070
xorpd 0x8a2f(%rip), %xmm0     # 0xe020
leaq 0x48(%rsp), %rsi
movsd 0x30(%rsp), %xmm1
movsd %xmm1, (%rsi)
movlpd %xmm0, 0x8(%rsi)
leaq 0x58(%rsp), %r14
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%r14)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x8(%r14)
movq %r14, %rdi
callq 0x3994
movsd (%r14), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x8(%r14), %xmm0
movsd %xmm0, 0x30(%rsp)
movl %ebp, %edi
movl %ebx, %esi
movl $0x2, %edx
movsd (%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x5328
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x10(%rsp)
cmpb $0x1, (%r15)
jne 0x5677
movsd (%rsp), %xmm0
callq 0x44d0
jmp 0x5681
movsd (%rsp), %xmm0
callq 0x40a4
mulsd 0x8(%rsp), %xmm0
callq 0x22c0
movsd %xmm0, 0x40(%rsp)
cmpb $0x1, (%r15)
jne 0x56a4
movsd (%rsp), %xmm0
callq 0x44d0
jmp 0x56ae
movsd (%rsp), %xmm0
callq 0x40a4
xorpd %xmm1, %xmm1
movsd 0x18(%rsp), %xmm2
addsd %xmm1, %xmm2
addsd 0x30(%rsp), %xmm2
movsd %xmm2, 0x18(%rsp)
movsd 0x20(%rsp), %xmm2
addsd %xmm1, %xmm2
addsd 0x38(%rsp), %xmm2
movsd %xmm2, 0x20(%rsp)
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x2070
xorpd 0x8927(%rip), %xmm0     # 0xe020
leaq 0x48(%rsp), %rsi
movsd 0x40(%rsp), %xmm1
movsd %xmm1, (%rsi)
movlpd %xmm0, 0x8(%rsi)
leaq 0x58(%rsp), %rbx
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x3994
movsd 0x20(%rsp), %xmm1
addsd (%rbx), %xmm1
movsd 0x18(%rsp), %xmm0
addsd 0x8(%rbx), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8a19(%rip), %rdi      # 0xe17f
leaq 0x8c23(%rip), %rsi      # 0xe390
leaq 0x8c71(%rip), %rcx      # 0xe3e5
movl $0xd2, %edx
callq 0x20f0
leaq 0x8a5f(%rip), %rdi      # 0xe1e4
leaq 0x8c04(%rip), %rsi      # 0xe390
leaq 0x8c52(%rip), %rcx      # 0xe3e5
movl $0xd3, %edx
callq 0x20f0
nopl (%rax)