// File: /workspace/github_cpp_makefile_star2_O3/PeterDenton[P]Nu-Pert/src/Figures.cpp
// Function: Figures::Reno50_Matter()
void Reno50_Matter()
{
	std::ofstream data[2];
	data[0].open("data/Reno50_Matter_NO.txt");
	data[1].open("data/Reno50_Matter_IO.txt");

	int alpha = 0;		// electron type
	int beta = 0;		// electron type
	double delta = 0;	// irrelevant
	double Emin = 1.8e-3;	// 1 MeV in GeV
	double Emax = 1.2e-2;	// 10 MeV in GeV
	double L = 52.5;	// 52.5 km

	double LE;
	double Yrho = 2.6 * 0.5;
	double a;
	double P_vac, P_mat, P0_vac, P0_mat, PLWX_vac, PLWX_mat;

	for (int i = 0; i < 2; i++)
	{
		set_ordering(i == 0);
		for (double E = Emin; E < Emax; E += (Emax - Emin) / 2000)
		{
			LE = L / E;
			a = Yrho * E * Y_to_a;

			P_vac = Exact::Palphabeta(alpha, beta, 0, -LE, delta);	// -LE for anti-nus
			P_mat = Exact::Palphabeta(alpha, beta, -a, -LE, delta);	// -a, -LE for anti-nus

			P0_vac = GF::Palphabeta(alpha, beta, 0, -LE, delta, 0);	// -LE for anti-nus
			P0_mat = GF::Palphabeta(alpha, beta, -a, -LE, delta, 0);	// -a, -LE for anti-nus

			PLWX_vac = LWX::Pee(0, LE);	// formulas are already for anti-nus
			PLWX_mat = LWX::Pee(a, LE);	// formulas are already for anti-nus

			data[i] << E << " ";
			data[i] << P_mat - P_vac << " ";
			data[i] << P0_mat - P0_vac << " ";
			data[i] << PLWX_mat - PLWX_vac << " ";
			data[i] << std::endl;
		} // E
		data[i].close();
	} // i, ordering
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x478, %rsp            # imm = 0x478
leaq 0x70(%rsp), %rdi
callq 0x2280
leaq 0x270(%rsp), %rbx
movq %rbx, %rdi
callq 0x2280
leaq 0x1bbf(%rip), %rsi      # 0x10005
leaq 0x70(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x2050
leaq 0x1bc0(%rip), %rsi      # 0x1001f
movq %rbx, %rdi
movl $0x10, %edx
callq 0x2050
leaq 0xebd(%rip), %rax       # 0xf330
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movb $0x1, %bpl
leaq 0x17d7(%rip), %r15      # 0xfc5e
movzbl %bpl, %edi
andl $0x1, %edi
callq 0x3a1f
movsd 0x19fd(%rip), %xmm1     # 0xfe98
movsd 0x19fd(%rip), %xmm0     # 0xfea0
divsd %xmm1, %xmm0
movsd %xmm1, 0x28(%rsp)
mulsd 0x19f3(%rip), %xmm1     # 0xfea8
movapd %xmm1, (%rsp)
movapd %xmm0, 0x60(%rsp)
movapd %xmm0, %xmm1
xorpd 0xb54(%rip), %xmm1      # 0xf020
xorpd %xmm0, %xmm0
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd %xmm1, 0x10(%rsp)
callq 0x544b
movsd %xmm0, 0x58(%rsp)
movapd (%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
movapd %xmm0, (%rsp)
xorpd 0xb20(%rip), %xmm0      # 0xf020
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd %xmm0, 0x30(%rsp)
movapd 0x10(%rsp), %xmm1
callq 0x544b
movsd %xmm0, 0x50(%rsp)
xorpd %xmm0, %xmm0
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd 0x10(%rsp), %xmm1
xorl %edx, %edx
callq 0x6674
movsd %xmm0, 0x48(%rsp)
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd 0x30(%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
xorl %edx, %edx
callq 0x6674
movsd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd 0x60(%rsp), %xmm1
callq 0x9e81
movsd %xmm0, 0x30(%rsp)
movapd (%rsp), %xmm0
movapd 0x60(%rsp), %xmm1
callq 0x9e81
movsd %xmm0, (%rsp)
movq %r14, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x2260
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
movsd 0x50(%rsp), %xmm0
subsd 0x58(%rsp), %xmm0
movq %r14, %rdi
callq 0x2260
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
movsd 0x10(%rsp), %xmm0
subsd 0x48(%rsp), %xmm0
movq %r14, %rdi
callq 0x2260
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
movsd (%rsp), %xmm0
subsd 0x30(%rsp), %xmm0
movq %r14, %rdi
callq 0x2260
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movsd 0x28(%rsp), %xmm1
addsd 0x186c(%rip), %xmm1     # 0xfeb0
movsd 0x186c(%rip), %xmm0     # 0xfeb8
ucomisd %xmm1, %xmm0
ja 0xe49b
movq %r14, %rdi
callq 0x2210
movq %rbx, %r14
testb $0x1, %bpl
movl $0x0, %ebp
jne 0xe487
movq 0x5951(%rip), %rax      # 0x13fc8
movq (%rax), %r14
movq 0x18(%rax), %r15
movq $-0x400, %r12           # imm = 0xFC00
leaq 0x368(%rsp), %rbx
movq %r14, -0xf8(%rbx)
movq -0x18(%r14), %rax
movq %r15, -0xf8(%rbx,%rax)
leaq -0xf0(%rbx), %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x20a0
addq $-0x200, %rbx           # imm = 0xFE00
addq $0x200, %r12            # imm = 0x200
jne 0xe68d
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x2220
jmp 0xe740
jmp 0xe6e9
jmp 0xe6e9
movq %rax, %rbx
movq 0x58d5(%rip), %rax      # 0x13fc8
movq (%rax), %r15
movq 0x18(%rax), %r12
movq $-0x400, %r13           # imm = 0xFC00
leaq 0x368(%rsp), %r14
movq %r15, -0xf8(%r14)
movq -0x18(%r15), %rax
movq %r12, -0xf8(%r14,%rax)
leaq -0xf0(%r14), %rdi
callq 0x2150
movq %r14, %rdi
callq 0x20a0
addq $-0x200, %r14           # imm = 0xFE00
addq $0x200, %r13            # imm = 0x200
jne 0xe709
movq %rbx, %rdi
callq 0x22b0