// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
movsd %xmm0, (%rsp)
cmpl $0x2, %esi
jae 0xa4cf
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x3
popq %rdx
movq %rdx, %rsi
callq 0x8682
testb $0x1, %bpl
je 0xa497
leaq 0x6e95(%rip), %r14      # 0x11178
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0xa214
movsd %xmm0, 0x10(%rsp)
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x87b0
leaq 0x1fee(%rip), %rcx      # 0xc300
movsd (%rcx), %xmm1
leaq 0x1fcb(%rip), %rcx      # 0xc2e8
movsd (%rcx), %xmm0
movsd %xmm1, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
divsd 0x10(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0xa214
movsd %xmm0, 0x10(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x87b0
movsd 0x28(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
divsd 0x10(%rsp), %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
leaq 0x6de4(%rip), %rax      # 0x11180
movsd (%rax), %xmm0
leaq 0x1f49(%rip), %rax      # 0xc2f0
mulsd (%rax), %xmm0
leaq 0x1f26(%rip), %rax      # 0xc2d8
mulsd (%rax), %xmm0
mulsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0xa1c4
movsd %xmm0, 0x10(%rsp)
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x87b0
movsd 0x20(%rsp), %xmm0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
divsd 0x10(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movsd (%rsp), %xmm0
callq 0xa1c4
movsd %xmm0, (%rsp)
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x87b0
movsd 0x20(%rsp), %xmm1
divsd (%rsp), %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
callq 0xa264
movsd %xmm0, (%rsp)
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x87b0
movsd 0x18(%rsp), %xmm0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
divsd (%rsp), %xmm0
movsd (%rax), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rax)
callq 0xa264
movsd %xmm0, (%rsp)
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x87b0
movsd 0x18(%rsp), %xmm0
divsd (%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
xorl %r14d, %r14d
cmpq $0x3, %r14
je 0xa4c3
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x87b0
movsd (%rax), %xmm0
addsd 0x1b5e(%rip), %xmm0     # 0xc018
movsd %xmm0, (%rax)
incq %r14
jmp 0xa49a
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x20d8(%rip), %rdi      # 0xc5ae
leaq 0x2764(%rip), %rsi      # 0xcc41
leaq 0x276b(%rip), %rcx      # 0xcc4f
pushq $0x26
popq %rdx
callq 0x2100
jmp 0xa4ee
movq %rax, %r14
movq %rbx, %rdi
callq 0x87a2
movq %r14, %rdi
callq 0x2280