// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x470, %rsp            # imm = 0x470
xorl %r14d, %r14d
leaq (%rsp,%r14), %rdi
addq $0x70, %rdi
callq 0x2280
addq $0x200, %r14            # imm = 0x200
cmpq $0x400, %r14            # imm = 0x400
jne 0xe86e
leaq 0x1773(%rip), %rsi      # 0x10005
leaq 0x70(%rsp), %rdi
movl $0x10, %edx
callq 0x2050
leaq 0x270(%rsp), %rdi
leaq 0x176f(%rip), %rsi      # 0x1001f
movl $0x10, %edx
callq 0x2050
leaq 0xa6f(%rip), %rax       # 0xf330
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
xorl %r15d, %r15d
leaq 0x1389(%rip), %rbx      # 0xfc5e
xorl %edi, %edi
testq %r15, %r15
sete %dil
callq 0x3a4b
movq %r15, %rax
shlq $0x9, %rax
leaq (%rsp,%rax), %r14
addq $0x70, %r14
movsd 0x159e(%rip), %xmm1     # 0xfe98
movsd 0x159e(%rip), %xmm0     # 0xfea0
divsd %xmm1, %xmm0
movsd %xmm1, 0x28(%rsp)
mulsd 0x1594(%rip), %xmm1     # 0xfea8
movapd %xmm1, (%rsp)
movapd %xmm0, 0x60(%rsp)
movapd %xmm0, %xmm1
xorpd 0x6f5(%rip), %xmm1      # 0xf020
xorpd %xmm0, %xmm0
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd %xmm1, 0x10(%rsp)
callq 0x5477
movsd %xmm0, 0x58(%rsp)
movapd (%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
movapd %xmm0, (%rsp)
xorpd 0x6c1(%rip), %xmm0      # 0xf020
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd %xmm0, 0x30(%rsp)
movapd 0x10(%rsp), %xmm1
callq 0x5477
movsd %xmm0, 0x50(%rsp)
xorpd %xmm0, %xmm0
xorps %xmm2, %xmm2
xorl %edi, %edi
xorl %esi, %esi
movapd 0x10(%rsp), %xmm1
xorl %edx, %edx
callq 0x66a0
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 0x66a0
movsd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd 0x60(%rsp), %xmm1
callq 0xa241
movsd %xmm0, 0x30(%rsp)
movapd (%rsp), %xmm0
movapd 0x60(%rsp), %xmm1
callq 0xa241
movsd %xmm0, (%rsp)
movq %r14, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x2260
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movsd 0x50(%rsp), %xmm0
subsd 0x58(%rsp), %xmm0
movq %r14, %rdi
callq 0x2260
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movsd 0x10(%rsp), %xmm0
subsd 0x48(%rsp), %xmm0
movq %r14, %rdi
callq 0x2260
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movsd (%rsp), %xmm0
subsd 0x30(%rsp), %xmm0
movq %r14, %rdi
callq 0x2260
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %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 0x140d(%rip), %xmm1     # 0xfeb0
movsd 0x140d(%rip), %xmm0     # 0xfeb8
ucomisd %xmm1, %xmm0
ja 0xe8fa
movq %r14, %rdi
callq 0x2210
leaq 0x1(%r15), %rax
testq %r15, %r15
movq %rax, %r15
je 0xe8d5
movq 0x54f4(%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 0xeaea
addq $0x470, %rsp            # imm = 0x470
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xeb5a
movq %rax, %rbx
testq %r14, %r14
je 0xebb1
leaq -0x190(%rsp), %r15
leaq (%r15,%r14), %rdi
callq 0x2220
addq $-0x200, %r14           # imm = 0xFE00
jne 0xeb44
jmp 0xebb1
jmp 0xeb5a
movq %rax, %rbx
movq 0x5464(%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 0xeb7a
movq %rbx, %rdi
callq 0x22b0