// File: /workspace/github_c_makefile_star2_O1/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 0xb304(%rip), %r15      # 0xffc8
leaq 0x678a(%rip), %rsi      # 0xb455
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 0x6309(%rip), %xmm0     # 0xb010
movq %r14, %rdi
callq 0x4aa4
movsd 0x6399(%rip), %xmm1     # 0xb0b0
ucomisd %xmm0, %xmm1
movsd 0x62ed(%rip), %xmm0     # 0xb010
jbe 0x4d56
movsd 0x62e3(%rip), %xmm0     # 0xb010
addsd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x4aa4
movsd 0x6365(%rip), %xmm1     # 0xb0b0
ucomisd %xmm0, %xmm1
movsd (%rsp), %xmm0
ja 0x4d2d
movq %r14, %rdi
movsd %xmm0, (%rsp)
callq 0x4aa4
ucomisd 0x6345(%rip), %xmm0     # 0xb0b0
jbe 0x4d9d
movsd (%rsp), %xmm0
mulsd 0x62ae(%rip), %xmm0     # 0xb028
movsd %xmm0, (%rsp)
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x4aa4
ucomisd 0x631c(%rip), %xmm0     # 0xb0b0
movsd (%rsp), %xmm0
ja 0x4d72
jmp 0x4db1
movsd (%rsp), %xmm0
jmp 0x4db1
movsd (%rsp), %xmm0
mulsd 0x6307(%rip), %xmm0     # 0xb0b8
movq %r14, %rdi
movsd %xmm0, (%rsp)
callq 0x4aa4
movsd 0x62ea(%rip), %xmm1     # 0xb0b0
ucomisd %xmm0, %xmm1
ja 0x4da4
movq 0xb1f5(%rip), %r15      # 0xffc8
leaq 0x66a3(%rip), %rsi      # 0xb47d
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 0x4aa4
ucomisd 0x6275(%rip), %xmm0     # 0xb0a8
movsd (%rsp), %xmm0
jbe 0x4e7b
movsd (%rsp), %xmm0
mulsd 0x61e1(%rip), %xmm0     # 0xb028
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x4aa4
ucomisd 0x6245(%rip), %xmm0     # 0xb0a8
movsd 0x8(%rsp), %xmm0
ja 0x4e3f
jmp 0x4e7b
movsd 0x8(%rsp), %xmm0
mulsd 0x623d(%rip), %xmm0     # 0xb0b8
movq %r14, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x4aa4
movsd 0x6217(%rip), %xmm1     # 0xb0a8
ucomisd %xmm0, %xmm1
ja 0x4e6d
movq 0xb12a(%rip), %r15      # 0xffc8
leaq 0x65e9(%rip), %rsi      # 0xb48e
movl $0xb, %edx
movq %r15, %rdi
callq 0x22b0
movq %r15, %rdi
movsd (%rsp), %xmm0
callq 0x23d0
movq %rax, %r15
leaq 0x65d1(%rip), %rsi      # 0xb49a
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 0x3410
nop