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

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

	double lm = Hat::lm(a);
	double l0 = Hat::l0(a);
	double lp = Hat::lp(a);

	std::complex<double> A(0, 0);
	A += Talphabetai(alpha, beta, 0, a, delta, order) * std::complex<double>(cos(lm * L2E), -sin(lm * L2E));
	A += Talphabetai(alpha, beta, 1, a, delta, order) * std::complex<double>(cos(l0 * L2E), -sin(l0 * L2E));
	A += Talphabetai(alpha, beta, 2, a, delta, order) * std::complex<double>(cos(lp * L2E), -sin(lp * L2E));

	double P = std::norm(A);
	ProbabilityWarning W(&P);
	return P;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movsd %xmm2, 0x38(%rsp)
cmpl $0x3, %edi
jae 0x822e
movl %esi, %ebp
cmpl $0x3, %esi
jae 0x824d
movl %edx, %ebx
cmpl $0x2, %edx
jae 0x826c
movapd %xmm0, %xmm3
movl %edi, %r14d
leaq 0x64e7(%rip), %rax      # 0xe328
mulsd (%rax), %xmm1
leaq 0xb33c(%rip), %r15      # 0x13188
movsd (%r15), %xmm0
movapd %xmm0, %xmm4
addsd %xmm3, %xmm4
leaq 0xb33c(%rip), %r12      # 0x1319c
cvtsi2sdl (%r12), %xmm7
movapd %xmm0, %xmm2
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm2
leaq 0x642f(%rip), %rax      # 0xe2a8
movsd (%rax), %xmm5
mulsd 0x668b(%rip), %xmm5     # 0xe510
mulsd %xmm3, %xmm5
mulsd %xmm5, %xmm0
addsd %xmm2, %xmm0
xorpd %xmm6, %xmm6
ucomisd %xmm6, %xmm0
movsd %xmm3, 0x20(%rsp)
jb 0x7ea7
sqrtsd %xmm0, %xmm0
jmp 0x7ee4
movsd %xmm1, 0x8(%rsp)
movsd %xmm4, (%rsp)
movsd %xmm5, 0x18(%rsp)
movsd %xmm7, 0x30(%rsp)
callq 0x2120
movsd 0x30(%rsp), %xmm7
xorpd %xmm6, %xmm6
movsd 0x18(%rsp), %xmm5
movsd (%rsp), %xmm4
movsd 0x20(%rsp), %xmm3
movsd 0x8(%rsp), %xmm1
mulsd %xmm7, %xmm0
subsd %xmm0, %xmm4
mulsd 0x6114(%rip), %xmm1     # 0xe008
movsd %xmm1, 0x8(%rsp)
leaq 0xb28f(%rip), %r13      # 0x13190
movsd (%r13), %xmm2
movsd (%r15), %xmm0
movapd %xmm2, %xmm1
mulsd %xmm0, %xmm1
leaq 0x637d(%rip), %rax      # 0xe298
movsd (%rax), %xmm7
mulsd 0x60e1(%rip), %xmm4     # 0xe008
mulsd %xmm7, %xmm1
leaq 0x638e(%rip), %rax      # 0xe2c0
mulsd (%rax), %xmm2
addsd %xmm1, %xmm4
movsd %xmm4, (%rsp)
mulsd %xmm0, %xmm2
movsd %xmm2, 0x30(%rsp)
movapd %xmm0, %xmm1
addsd %xmm3, %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl (%r12), %xmm2
mulsd %xmm0, %xmm5
subsd %xmm3, %xmm0
mulsd %xmm0, %xmm0
addsd %xmm5, %xmm0
ucomisd %xmm6, %xmm0
jb 0x7f76
sqrtsd %xmm0, %xmm0
jmp 0x7fa5
movsd %xmm1, 0x18(%rsp)
movsd %xmm7, 0x10(%rsp)
movsd %xmm2, 0x28(%rsp)
callq 0x2120
movsd 0x28(%rsp), %xmm2
movsd 0x10(%rsp), %xmm7
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm3
mulsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movsd (%r13), %xmm0
mulsd (%r15), %xmm0
mulsd %xmm0, %xmm7
mulsd 0x6044(%rip), %xmm1     # 0xe008
addsd %xmm7, %xmm1
movsd %xmm1, 0x18(%rsp)
movl %r14d, %edi
movl %ebp, %esi
xorl %edx, %edx
movapd %xmm3, %xmm0
movsd 0x38(%rsp), %xmm1
movl %ebx, %ecx
callq 0x7c94
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x28(%rsp)
movsd (%rsp), %xmm0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsp)
callq 0x22c0
movsd %xmm0, 0x40(%rsp)
movsd (%rsp), %xmm0
callq 0x2070
xorps 0x6002(%rip), %xmm0     # 0xe020
leaq 0x50(%rsp), %r15
movsd 0x40(%rsp), %xmm1
movsd %xmm1, (%r15)
movlps %xmm0, 0x8(%r15)
leaq 0x60(%rsp), %r12
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%r12)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0x3968
xorpd %xmm0, %xmm0
movsd (%r12), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
addsd 0x8(%r12), %xmm0
movsd %xmm0, (%rsp)
movl %r14d, %edi
movl %ebp, %esi
movl $0x1, %edx
movsd 0x20(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movl %ebx, %ecx
callq 0x7c94
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x40(%rsp)
movsd 0x30(%rsp), %xmm0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
callq 0x22c0
movsd %xmm0, 0x48(%rsp)
movsd 0x30(%rsp), %xmm0
callq 0x2070
xorps 0x5f4c(%rip), %xmm0     # 0xe020
movsd 0x48(%rsp), %xmm1
movsd %xmm1, (%r15)
movlps %xmm0, 0x8(%r15)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%r12)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x8(%r12)
leaq 0x60(%rsp), %r15
leaq 0x50(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3968
movsd 0x10(%rsp), %xmm0
addsd (%r15), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
addsd 0x8(%r15), %xmm0
movsd %xmm0, (%rsp)
movl %r14d, %edi
movl %ebp, %esi
movl $0x2, %edx
movsd 0x20(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movl %ebx, %ecx
callq 0x7c94
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x20(%rsp)
movsd 0x18(%rsp), %xmm0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
callq 0x22c0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x2070
xorps 0x5e95(%rip), %xmm0     # 0xe020
movsd 0x8(%rsp), %xmm1
movsd %xmm1, (%r12)
movlps %xmm0, 0x8(%r12)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, (%r15)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%r15)
leaq 0x60(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3968
movsd 0x10(%rsp), %xmm0
addsd (%rbx), %xmm0
movsd (%rsp), %xmm1
addsd 0x8(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%r14)
leaq 0x60(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcf56
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0xcaf4
movsd 0x8(%rsp), %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f4a(%rip), %rdi      # 0xe17f
leaq 0x6494(%rip), %rsi      # 0xe6d0
leaq 0x654d(%rip), %rcx      # 0xe790
movl $0x8b, %edx
callq 0x20f0
leaq 0x5f90(%rip), %rdi      # 0xe1e4
leaq 0x6475(%rip), %rsi      # 0xe6d0
leaq 0x652e(%rip), %rcx      # 0xe790
movl $0x8c, %edx
callq 0x20f0
leaq 0x633b(%rip), %rdi      # 0xe5ae
leaq 0x6456(%rip), %rsi      # 0xe6d0
leaq 0x650f(%rip), %rcx      # 0xe790
movl $0x8d, %edx
callq 0x20f0
nop