// File: /workspace/github_c_makefile_star2_O3/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::autoSchedule(unsigned long long)
void Genome::autoSchedule(iteration_t iterations) {
	cout << "Finding optimal temperature schedule..." << endl;

	double tInitial = 1;
	while (this->findPbad(tInitial) < TARGET_PBAD_START) tInitial *= 2;
	while (this->findPbad(tInitial) > TARGET_PBAD_START) tInitial /= 2;
	while (this->findPbad(tInitial) < TARGET_PBAD_START) tInitial *= 1.2;
	cout << "tInitial found: " << tInitial << endl;
	double tEnd = tInitial;
	while (this->findPbad(tEnd) > TARGET_PBAD_END) tEnd /= 2;
	while (this->findPbad(tEnd) < TARGET_PBAD_END) tEnd *= 1.2;

	cout << "tInitial = " << tInitial << ", tEnd = " << tEnd << endl;

	this->setParameters(tInitial, tEnd, iterations);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0xb366(%rip), %r15      # 0xffc8
leaq 0x687c(%rip), %rsi      # 0xb4e5
movl $0x27, %edx
movq %r15, %rdi
callq 0x22b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2250
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x21a0
movsd 0x643b(%rip), %xmm0     # 0xb0e0
movq %r14, %rdi
callq 0x4a3c
movsd 0x64cb(%rip), %xmm1     # 0xb180
ucomisd %xmm0, %xmm1
movsd 0x641f(%rip), %xmm0     # 0xb0e0
jbe 0x4cf4
movsd 0x6415(%rip), %xmm0     # 0xb0e0
addsd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x4a3c
movsd 0x6497(%rip), %xmm1     # 0xb180
ucomisd %xmm0, %xmm1
movsd (%rsp), %xmm0
ja 0x4ccb
movq %r14, %rdi
movsd %xmm0, (%rsp)
callq 0x4a3c
ucomisd 0x6477(%rip), %xmm0     # 0xb180
jbe 0x4d3b
movsd (%rsp), %xmm0
mulsd 0x63e8(%rip), %xmm0     # 0xb100
movsd %xmm0, (%rsp)
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x4a3c
ucomisd 0x644e(%rip), %xmm0     # 0xb180
movsd (%rsp), %xmm0
ja 0x4d10
jmp 0x4d4f
movsd (%rsp), %xmm0
jmp 0x4d4f
movsd (%rsp), %xmm0
mulsd 0x6439(%rip), %xmm0     # 0xb188
movq %r14, %rdi
movsd %xmm0, (%rsp)
callq 0x4a3c
movsd 0x641c(%rip), %xmm1     # 0xb180
ucomisd %xmm0, %xmm1
ja 0x4d42
movq 0xb257(%rip), %r15      # 0xffc8
leaq 0x6795(%rip), %rsi      # 0xb50d
movl $0x10, %edx
movq %r15, %rdi
callq 0x22b0
movq %r15, %rdi
movsd (%rsp), %xmm0
callq 0x23d0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2250
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x21a0
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x4a3c
ucomisd 0x63a7(%rip), %xmm0     # 0xb178
movsd (%rsp), %xmm0
jbe 0x4e19
movsd (%rsp), %xmm0
mulsd 0x631b(%rip), %xmm0     # 0xb100
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x4a3c
ucomisd 0x6377(%rip), %xmm0     # 0xb178
movsd 0x8(%rsp), %xmm0
ja 0x4ddd
jmp 0x4e19
movsd 0x8(%rsp), %xmm0
mulsd 0x636f(%rip), %xmm0     # 0xb188
movq %r14, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x4a3c
movsd 0x6349(%rip), %xmm1     # 0xb178
ucomisd %xmm0, %xmm1
ja 0x4e0b
movq 0xb18c(%rip), %r15      # 0xffc8
leaq 0x66db(%rip), %rsi      # 0xb51e
movl $0xb, %edx
movq %r15, %rdi
callq 0x22b0
movq %r15, %rdi
movsd (%rsp), %xmm0
callq 0x23d0
movq %rax, %r15
leaq 0x66c3(%rip), %rsi      # 0xb52a
movl $0x9, %edx
movq %rax, %rdi
callq 0x22b0
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x23d0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2250
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x21a0
movq %r14, %rdi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x33ee
nop