// File: /workspace/github_cpp_makefile_star2_O1/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 0x690b
movl %esi, %ebp
cmpl $0x3, %esi
jae 0x692a
movl %edx, %ebx
cmpl $0x2, %edx
jae 0x6949
movl %edi, %r14d
leaq 0x7c58(%rip), %rax      # 0xe328
mulsd (%rax), %xmm1
mulsd 0x7c5c(%rip), %xmm1     # 0xe338
movsd %xmm1, 0x18(%rsp)
movsd 0x8(%rsp), %xmm0
movl %ebx, %edi
callq 0x2a2b
movsd %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
movl %ebx, %edi
callq 0x2aca
movsd %xmm0, 0x28(%rsp)
movsd 0x8(%rsp), %xmm0
movl %ebx, %edi
callq 0x2b69
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 0x6750
xorpd %xmm0, %xmm0
jmp 0x6758
movsd 0x78c0(%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 0x60dc
movsd %xmm0, 0x30(%rsp)
movl %r14d, %edi
movl %ebp, %esi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl %ebx, %edx
callq 0x61f1
movsd %xmm0, 0x38(%rsp)
movl %r14d, %edi
movl %ebp, %esi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl %ebx, %edx
callq 0x6328
movsd %xmm0, 0x18(%rsp)
movl %r14d, %edi
movl %ebp, %esi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl %ebx, %edx
callq 0x6461
movsd %xmm0, 0x8(%rsp)
movsd 0x30(%rsp), %xmm0
mulsd 0x7d2c(%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 0x7cf7(%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 0x7cc2(%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 0x7c95(%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 0xd2da
movsd (%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0xce78
movsd 0x8(%rsp), %xmm0
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x786d(%rip), %rdi      # 0xe17f
leaq 0x7c07(%rip), %rsi      # 0xe520
leaq 0x7d5d(%rip), %rcx      # 0xe67d
movl $0x80, %edx
callq 0x20f0
leaq 0x78b3(%rip), %rdi      # 0xe1e4
leaq 0x7be8(%rip), %rsi      # 0xe520
leaq 0x7d3e(%rip), %rcx      # 0xe67d
movl $0x81, %edx
callq 0x20f0
leaq 0x7c5e(%rip), %rdi      # 0xe5ae
leaq 0x7bc9(%rip), %rsi      # 0xe520
leaq 0x7d1f(%rip), %rcx      # 0xe67d
movl $0x82, %edx
callq 0x20f0