// File: /workspace/github_cpp_makefile_star2_O3/PeterDenton[P]Nu-Pert/src/GF.cpp
// Function: GF::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 L4E = km_per_GeV_to_per_eV2 * LE / 4; // in eV^-2 now

	double Dl21 = Check::Dl21(a, order);
	double Dl31 = Check::Dl31(a, order);
	double Dl32 = Check::Dl32(a, order);

	double Delta21 = Dl21 * L4E;
	double Delta31 = Dl31 * L4E;
	double Delta32 = Dl32 * L4E;

	double deltaalphabeta = alpha == beta ? 1 : 0;

	double C21 = GF::C21(alpha, beta, a, delta, order);
	double C31 = GF::C31(alpha, beta, a, delta, order);
	double C32 = GF::C32(alpha, beta, a, delta, order);
	double D = GF::D(alpha, beta, a, delta, order);

	double P = deltaalphabeta + 4 * C21 * pow(sin(Delta21), 2) + 4 * C31 * pow(sin(Delta31), 2) + 4 * C32 * pow(sin(Delta32), 2)
			+ 8 * D * sin(Delta21) * sin(Delta31) * sin(Delta32);
	ProbabilityWarning W(&P);
	return P;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movsd %xmm2, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
cmpl $0x3, %edi
jae 0x68df
movl %esi, %ebp
cmpl $0x3, %esi
jae 0x68fe
movl %edx, %ebx
cmpl $0x2, %edx
jae 0x691d
movl %edi, %r14d
leaq 0x7c84(%rip), %rax      # 0xe328
mulsd (%rax), %xmm1
mulsd 0x7c88(%rip), %xmm1     # 0xe338
movsd %xmm1, 0x18(%rsp)
movsd 0x8(%rsp), %xmm0
movl %ebx, %edi
callq 0x2a00
movsd %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
movl %ebx, %edi
callq 0x2a9f
movsd %xmm0, 0x28(%rsp)
movsd 0x8(%rsp), %xmm0
movl %ebx, %edi
callq 0x2b3e
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x20(%rsp)
movsd 0x28(%rsp), %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x28(%rsp)
mulsd %xmm1, %xmm0
cmpl %ebp, %r14d
movsd %xmm0, 0x48(%rsp)
je 0x6724
xorpd %xmm0, %xmm0
jmp 0x672c
movsd 0x78ec(%rip), %xmm0     # 0xe018
movsd %xmm0, 0x40(%rsp)
movl %r14d, %edi
movl %ebp, %esi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl %ebx, %edx
callq 0x60b0
movsd %xmm0, 0x30(%rsp)
movl %r14d, %edi
movl %ebp, %esi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl %ebx, %edx
callq 0x61c5
movsd %xmm0, 0x38(%rsp)
movl %r14d, %edi
movl %ebp, %esi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl %ebx, %edx
callq 0x62fc
movsd %xmm0, 0x18(%rsp)
movl %r14d, %edi
movl %ebp, %esi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl %ebx, %edx
callq 0x6435
movsd %xmm0, 0x8(%rsp)
movsd 0x30(%rsp), %xmm0
mulsd 0x7d58(%rip), %xmm0     # 0xe510
movsd %xmm0, 0x30(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x2070
mulsd %xmm0, %xmm0
mulsd 0x30(%rsp), %xmm0
addsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x38(%rsp), %xmm0
mulsd 0x7d23(%rip), %xmm0     # 0xe510
movsd %xmm0, 0x38(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0x2070
mulsd %xmm0, %xmm0
mulsd 0x38(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
mulsd 0x7cee(%rip), %xmm0     # 0xe510
movsd %xmm0, 0x18(%rsp)
movsd 0x48(%rsp), %xmm0
callq 0x2070
mulsd %xmm0, %xmm0
mulsd 0x18(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
mulsd 0x7cc1(%rip), %xmm0     # 0xe518
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x2070
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0x2070
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x48(%rsp), %xmm0
callq 0x2070
mulsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
leaq 0x50(%rsp), %rbx
movsd %xmm0, (%rbx)
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcf56
movsd (%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0xcaf4
movsd 0x8(%rsp), %xmm0
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7899(%rip), %rdi      # 0xe17f
leaq 0x7c33(%rip), %rsi      # 0xe520
leaq 0x7d89(%rip), %rcx      # 0xe67d
movl $0x80, %edx
callq 0x20f0
leaq 0x78df(%rip), %rdi      # 0xe1e4
leaq 0x7c14(%rip), %rsi      # 0xe520
leaq 0x7d6a(%rip), %rcx      # 0xe67d
movl $0x81, %edx
callq 0x20f0
leaq 0x7c8a(%rip), %rdi      # 0xe5ae
leaq 0x7bf5(%rip), %rsi      # 0xe520
leaq 0x7d4b(%rip), %rcx      # 0xe67d
movl $0x82, %edx
callq 0x20f0