// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x470, %rsp            # imm = 0x470
leaq 0x70(%rsp), %rdi
callq 0x2250
leaq 0x270(%rsp), %rbx
movq %rbx, %rdi
callq 0x2250
leaq 0x21c5(%rip), %rsi      # 0xdfad
leaq 0x70(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x2040
leaq 0x21cb(%rip), %rsi      # 0xdfc7
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x2040
leaq 0x1522(%rip), %rax      # 0xd330
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
xorl %r15d, %r15d
leaq 0x1e0c(%rip), %rbx      # 0xdc2e
cmpq $0x2, %r15
je 0xbfee
xorl %edi, %edi
testq %r15, %r15
sete %dil
callq 0x37e3
movq %r15, %rax
shlq $0x9, %rax
leaq (%rsp,%rax), %r14
addq $0x70, %r14
movsd 0x1fef(%rip), %xmm1     # 0xde40
movsd 0x1fef(%rip), %xmm0     # 0xde48
ucomisd %xmm1, %xmm0
jbe 0xbfde
movsd 0x1fe5(%rip), %xmm0     # 0xde50
divsd %xmm1, %xmm0
movsd %xmm1, 0x28(%rsp)
mulsd 0x1fdb(%rip), %xmm1     # 0xde58
movapd %xmm1, (%rsp)
movapd %xmm0, 0x60(%rsp)
movapd %xmm0, %xmm1
xorpd 0x118c(%rip), %xmm1     # 0xd020
xorpd %xmm0, %xmm0
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd %xmm1, 0x10(%rsp)
callq 0x4e50
movsd %xmm0, 0x58(%rsp)
movapd (%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
movapd %xmm0, (%rsp)
xorpd 0x1158(%rip), %xmm0     # 0xd020
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd %xmm0, 0x30(%rsp)
movapd 0x10(%rsp), %xmm1
callq 0x4e50
movsd %xmm0, 0x50(%rsp)
xorpd %xmm0, %xmm0
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd 0x10(%rsp), %xmm1
xorl %edx, %edx
callq 0x5ec6
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 0x5ec6
movsd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd 0x60(%rsp), %xmm1
callq 0x84df
movsd %xmm0, 0x30(%rsp)
movapd (%rsp), %xmm0
movapd 0x60(%rsp), %xmm1
callq 0x84df
movsd %xmm0, (%rsp)
movq %r14, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x2230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movsd 0x50(%rsp), %xmm0
subsd 0x58(%rsp), %xmm0
movq %r14, %rdi
callq 0x2230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movsd 0x10(%rsp), %xmm0
subsd 0x48(%rsp), %xmm0
movq %r14, %rdi
callq 0x2230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movsd (%rsp), %xmm0
subsd 0x30(%rsp), %xmm0
movq %r14, %rdi
callq 0x2230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movq %r14, %rdi
callq 0x20d0
movsd 0x28(%rsp), %xmm1
addsd 0x1e87(%rip), %xmm1     # 0xde60
jmp 0xbe51
movq %r14, %rdi
callq 0x21f0
incq %r15
jmp 0xbe22
movl $0x200, %ebx            # imm = 0x200
movq $-0x200, %r14           # imm = 0xFE00
leaq (%rsp,%rbx), %rdi
addq $0x70, %rdi
callq 0x2200
addq %r14, %rbx
cmpq %r14, %rbx
jne 0xbffa
addq $0x470, %rsp            # imm = 0x470
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x2200
jmp 0xc054
jmp 0xc02f
jmp 0xc02f
movq %rax, %rbx
movl $0x200, %r14d           # imm = 0x200
movq $-0x200, %r15           # imm = 0xFE00
leaq (%rsp,%r14), %rdi
addq $0x70, %rdi
callq 0x2200
addq %r15, %r14
cmpq %r15, %r14
jne 0xc03f
movq %rbx, %rdi
callq 0x2280