// File: PeterDenton[P]Nu-Pert/src/Figures.cpp
// Function: Figures::Phases()
void Phases()
{
	std::ofstream data[2];
	data[0].open("data/Phases_NO.txt");
	data[1].open("data/Phases_IO.txt");

	double a;

	for (int i = 0; i < 2; i++)
	{
		set_ordering(i == 0);
		for (double Yrho = -40; Yrho <= 40; Yrho += 0.02)
		{
			a = Yrho * Y_to_a;
			data[i] << Yrho << " " << Hat::phi(a) << " " << Check::psi(a) << std::endl;
		} // Yrho
		data[i].close();
	} // i, ordering
}

// Assembly:
subq $0x4c8, %rsp            # imm = 0x4C8
leaq 0xc0(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %rax, %rcx
addq $0x400, %rcx            # imm = 0x400
movq %rcx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x2260
jmp 0x11755
movq 0x88(%rsp), %rcx
movq 0x78(%rsp), %rax
addq $0x200, %rax            # imm = 0x200
cmpq %rcx, %rax
movq %rax, 0x90(%rsp)
jne 0x11741
leaq 0x3684(%rip), %rsi      # 0x14e00
leaq 0xc0(%rsp), %rdi
movl $0x10, %edx
callq 0x2040
jmp 0x11790
leaq 0x2c0(%rsp), %rdi
leaq 0x3674(%rip), %rsi      # 0x14e13
movl $0x10, %edx
callq 0x2040
jmp 0x117ab
movl $0x0, 0xa4(%rsp)
cmpl $0x2, 0xa4(%rsp)
jge 0x119c6
movl 0xa4(%rsp), %eax
testl %eax, %eax
sete %al
movzbl %al, %edi
callq 0x49d0
jmp 0x117da
movsd 0x3586(%rip), %xmm0     # 0x14d68
movsd %xmm0, 0x98(%rsp)
movsd 0x357d(%rip), %xmm0     # 0x14d70
ucomisd 0x98(%rsp), %xmm0
jb 0x11993
movsd 0x98(%rsp), %xmm0
leaq 0x2ace(%rip), %rax      # 0x142e0
movsd (%rax), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0xa8(%rsp)
movslq 0xa4(%rsp), %rax
shlq $0x9, %rax
leaq 0xc0(%rsp,%rax), %rdi
movsd 0x98(%rsp), %xmm0
callq 0x22c0
movq %rax, 0x70(%rsp)
jmp 0x1184c
movq 0x70(%rsp), %rdi
leaq 0x333e(%rip), %rsi      # 0x14b96
callq 0x2160
movq %rax, 0x68(%rsp)
jmp 0x11864
movsd 0xa8(%rsp), %xmm0
callq 0x94c0
movsd %xmm0, 0x60(%rsp)
jmp 0x1187a
movsd 0x60(%rsp), %xmm0
movq 0x68(%rsp), %rdi
callq 0x22c0
movq %rax, 0x58(%rsp)
jmp 0x11891
movq 0x58(%rsp), %rdi
leaq 0x32f9(%rip), %rsi      # 0x14b96
callq 0x2160
movq %rax, 0x50(%rsp)
jmp 0x118a9
movsd 0xa8(%rsp), %xmm0
callq 0x2e80
movsd %xmm0, 0x48(%rsp)
jmp 0x118bf
movsd 0x48(%rsp), %xmm0
movq 0x50(%rsp), %rdi
callq 0x22c0
movq %rax, 0x40(%rsp)
jmp 0x118d6
movq 0x40(%rsp), %rdi
movq 0x76e6(%rip), %rsi      # 0x18fc8
callq 0x2180
jmp 0x118e9
jmp 0x118eb
movsd 0x348d(%rip), %xmm0     # 0x14d80
addsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
jmp 0x117eb
movq 0x80(%rsp), %rcx
movq %rax, %rsi
movq 0x78(%rsp), %rax
movq %rsi, 0xb8(%rsp)
movl %edx, 0xb4(%rsp)
cmpq %rax, %rcx
movq %rax, 0x38(%rsp)
je 0x11960
movq 0x38(%rsp), %rdi
addq $-0x200, %rdi           # imm = 0xFE00
movq %rdi, 0x30(%rsp)
callq 0x2220
movq 0x80(%rsp), %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x38(%rsp)
jne 0x11933
jmp 0x11a3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xc0(%rsp), %rax
movq %rax, 0x20(%rsp)
addq $0x400, %rax            # imm = 0x400
movq %rax, 0x28(%rsp)
jmp 0x11a10
movslq 0xa4(%rsp), %rax
shlq $0x9, %rax
leaq 0xc0(%rsp,%rax), %rdi
callq 0x2210
jmp 0x119ae
jmp 0x119b0
movl 0xa4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa4(%rsp)
jmp 0x117b6
leaq 0xc0(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x400, %rax            # imm = 0x400
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
addq $-0x200, %rdi           # imm = 0xFE00
movq %rdi, 0x8(%rsp)
callq 0x2220
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0x119de
addq $0x4c8, %rsp            # imm = 0x4C8
retq
movq 0x28(%rsp), %rdi
addq $-0x200, %rdi           # imm = 0xFE00
movq %rdi, (%rsp)
callq 0x2220
movq 0x20(%rsp), %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x28(%rsp)
jne 0x11a10
jmp 0x11a3a
movq 0xb8(%rsp), %rdi
callq 0x2290
nopw (%rax,%rax)