// File: /workspace/github_cpp_makefile_star2_O3/PeterDenton[P]Nu-Pert/src/Tilde.cpp
// Function: Tilde::W(double, int)
Matrix<std::complex<double> > W(double a, int order)
{
	assert (order >= 0 && order <= 1); // order valid for 0, 1

	Matrix<std::complex<double> > W(3, 3);
	double coef;

	switch (order)
	{
		case 1:
			W(0, 2) += c13 * s13 * Dmsqee / Dlca(a);
			W(2, 0) -= c13 * s13 * Dmsqee / Dlca(a);

			coef = eps * c12 * s12 * Dmsqee;
			W(0, 1) += coef * c13 / Dlba(a);
			W(1, 0) -= coef * c13 / Dlba(a);
			W(1, 2) -= coef * s13 / Dlcb(a);
			W(2, 1) += coef * s13 / Dlcb(a);

		case 0:
			// zeroth order
			for (int i = 0; i < 3; i++)
				W(i, i) += 1;
	}
	return W;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movsd %xmm0, 0x10(%rsp)
cmpl $0x2, %esi
jae 0xc47d
movl %esi, %ebp
movq %rdi, %rbx
movl $0x3, %esi
movl $0x3, %edx
callq 0xa076
testb $0x1, %bpl
je 0xc445
leaq 0x707a(%rip), %r14      # 0x13188
movsd (%r14), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x7070(%rip), %r15      # 0x13190
movsd (%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x2, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa1d2
leaq 0x21bf(%rip), %rcx      # 0xe300
movsd (%rcx), %xmm3
leaq 0x219c(%rip), %rcx      # 0xe2e8
movsd (%rcx), %xmm1
leaq 0x2179(%rip), %rcx      # 0xe2d0
movsd (%rcx), %xmm2
leaq 0x2136(%rip), %rcx      # 0xe298
movsd (%rcx), %xmm0
leaq 0x213b(%rip), %rcx      # 0xe2a8
movsd (%rcx), %xmm4
movsd %xmm0, 0x30(%rsp)
movsd 0x8(%rsp), %xmm5
mulsd %xmm0, %xmm5
movapd %xmm5, %xmm0
movsd %xmm2, 0x40(%rsp)
addsd %xmm2, %xmm0
movsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd %xmm4, 0x8(%rsp)
addsd %xmm4, %xmm5
mulsd %xmm2, %xmm5
addsd 0x10(%rsp), %xmm5
subsd %xmm5, %xmm0
movsd %xmm3, 0x48(%rsp)
movsd %xmm1, 0x38(%rsp)
mulsd %xmm1, %xmm3
movsd %xmm3, 0x28(%rsp)
mulsd %xmm3, %xmm2
divsd %xmm0, %xmm2
addsd (%rax), %xmm2
movsd %xmm2, (%rax)
movsd (%r14), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd (%r15), %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0x2, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa1d2
movsd 0x20(%rsp), %xmm1
mulsd 0x30(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd 0x40(%rsp), %xmm0
movsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm1
addsd 0x10(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd 0x28(%rsp), %xmm1
mulsd %xmm2, %xmm1
divsd %xmm0, %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd (%r15), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd (%r14), %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa1d2
leaq 0x207a(%rip), %rcx      # 0xe2f0
movsd (%rcx), %xmm2
movsd 0x28(%rsp), %xmm3
mulsd %xmm3, %xmm2
leaq 0x204d(%rip), %rcx      # 0xe2d8
mulsd (%rcx), %xmm2
movsd 0x20(%rsp), %xmm4
mulsd %xmm4, %xmm2
leaq 0x2020(%rip), %rcx      # 0xe2c0
movsd (%rcx), %xmm1
movapd %xmm3, %xmm0
movsd %xmm1, 0x18(%rsp)
mulsd %xmm1, %xmm0
mulsd %xmm4, %xmm0
mulsd 0x30(%rsp), %xmm3
addsd 0x8(%rsp), %xmm3
mulsd %xmm4, %xmm3
addsd 0x10(%rsp), %xmm3
subsd %xmm3, %xmm0
movsd 0x48(%rsp), %xmm1
movsd %xmm2, 0x50(%rsp)
mulsd %xmm2, %xmm1
movsd %xmm1, 0x48(%rsp)
divsd %xmm0, %xmm1
addsd (%rax), %xmm1
movsd %xmm1, (%rax)
movsd (%r15), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd (%r14), %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0x1, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa1d2
movsd 0x18(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm2
mulsd %xmm2, %xmm0
mulsd 0x30(%rsp), %xmm1
addsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm1
addsd 0x10(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd 0x48(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd (%r15), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x1, %esi
movl $0x2, %edx
movq %rbx, %rdi
callq 0xa1d2
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd 0x30(%rsp), %xmm1
addsd 0x40(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
mulsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
divsd %xmm1, %xmm0
movsd (%rax), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rax)
movsd (%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%r14), %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0xa1d2
movsd 0x30(%rsp), %xmm1
movsd 0x8(%rsp), %xmm3
mulsd %xmm3, %xmm1
addsd 0x40(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
mulsd %xmm2, %xmm1
movsd 0x18(%rsp), %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
divsd %xmm1, %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0xa1d2
movsd (%rax), %xmm0
addsd 0x1bb6(%rip), %xmm0     # 0xe018
movsd %xmm0, (%rax)
incq %r14
cmpq $0x3, %r14
jne 0xc448
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x212a(%rip), %rdi      # 0xe5ae
leaq 0x27e6(%rip), %rsi      # 0xec71
leaq 0x27ed(%rip), %rcx      # 0xec7f
movl $0x26, %edx
callq 0x20f0
jmp 0xc49e
movq %rax, %r14
movq %rbx, %rdi
callq 0xa1c4
movq %r14, %rdi
callq 0x22a0