// File: /workspace/github_cpp_makefile_star2_O3/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 0x5733
movl %esi, %ebx
cmpl $0x3, %esi
jae 0x5752
movl %edi, %ebp
leaq 0x8ec6(%rip), %rax      # 0xe328
mulsd (%rax), %xmm1
mulsd 0x8b9a(%rip), %xmm1     # 0xe008
movsd %xmm1, 0x8(%rsp)
movl %ebx, %esi
xorl %edx, %edx
movsd %xmm0, (%rsp)
movsd %xmm2, 0x28(%rsp)
movaps %xmm2, %xmm1
callq 0x52fc
movsd %xmm0, 0x20(%rsp)
movsd (%rsp), %xmm0
movsd %xmm1, 0x18(%rsp)
leaq 0xdcf5(%rip), %r15      # 0x13198
cmpb $0x1, (%r15)
jne 0x54b0
callq 0x4078
jmp 0x54b5
callq 0x4356
mulsd 0x8(%rsp), %xmm0
callq 0x22c0
movsd %xmm0, 0x10(%rsp)
cmpb $0x1, (%r15)
jne 0x54d8
movsd (%rsp), %xmm0
callq 0x4078
jmp 0x54e2
movsd (%rsp), %xmm0
callq 0x4356
mulsd 0x8(%rsp), %xmm0
callq 0x2070
xorpd 0x8b2b(%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 0x3968
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 0x52fc
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x38(%rsp)
cmpb $0x1, (%r15)
jne 0x557b
movsd (%rsp), %xmm0
callq 0x4356
jmp 0x5585
movsd (%rsp), %xmm0
callq 0x44a4
mulsd 0x8(%rsp), %xmm0
callq 0x22c0
movsd %xmm0, 0x30(%rsp)
cmpb $0x1, (%r15)
jne 0x55a8
movsd (%rsp), %xmm0
callq 0x4356
jmp 0x55b2
movsd (%rsp), %xmm0
callq 0x44a4
mulsd 0x8(%rsp), %xmm0
callq 0x2070
xorpd 0x8a5b(%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 0x3968
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 0x52fc
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x10(%rsp)
cmpb $0x1, (%r15)
jne 0x564b
movsd (%rsp), %xmm0
callq 0x44a4
jmp 0x5655
movsd (%rsp), %xmm0
callq 0x4078
mulsd 0x8(%rsp), %xmm0
callq 0x22c0
movsd %xmm0, 0x40(%rsp)
cmpb $0x1, (%r15)
jne 0x5678
movsd (%rsp), %xmm0
callq 0x44a4
jmp 0x5682
movsd (%rsp), %xmm0
callq 0x4078
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 0x8953(%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 0x3968
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 0x8a45(%rip), %rdi      # 0xe17f
leaq 0x8c4f(%rip), %rsi      # 0xe390
leaq 0x8c9d(%rip), %rcx      # 0xe3e5
movl $0xd2, %edx
callq 0x20f0
leaq 0x8a8b(%rip), %rdi      # 0xe1e4
leaq 0x8c30(%rip), %rsi      # 0xe390
leaq 0x8c7e(%rip), %rcx      # 0xe3e5
movl $0xd3, %edx
callq 0x20f0
nopl (%rax)