// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x25df9(%rip), %rdi     # 0x2afc8
leaq 0x17277(%rip), %rsi     # 0x1c44d
callq 0x2230
movq %rax, %rdi
movq 0x25dcb(%rip), %rsi     # 0x2afb0
callq 0x2270
movsd 0x16e4e(%rip), %xmm0    # 0x1c040
movsd %xmm0, -0x18(%rbp)
movq -0x28(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x5030
movaps %xmm0, %xmm1
movsd 0x16ec3(%rip), %xmm0    # 0x1c0d8
ucomisd %xmm1, %xmm0
jbe 0x522f
movsd 0x16ec5(%rip), %xmm0    # 0x1c0e8
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x51f7
jmp 0x5231
movq -0x28(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x5030
movsd 0x16e8c(%rip), %xmm1    # 0x1c0d8
ucomisd %xmm1, %xmm0
jbe 0x526a
movsd -0x18(%rbp), %xmm0
movsd 0x16e89(%rip), %xmm1    # 0x1c0e8
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x5231
jmp 0x526c
movq -0x28(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x5030
movaps %xmm0, %xmm1
movsd 0x16e4e(%rip), %xmm0    # 0x1c0d8
ucomisd %xmm1, %xmm0
jbe 0x52a4
movsd 0x16e48(%rip), %xmm0    # 0x1c0e0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x526c
movq 0x25d1d(%rip), %rdi     # 0x2afc8
leaq 0x171c3(%rip), %rsi     # 0x1c475
callq 0x2230
movq %rax, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x2460
movq %rax, %rdi
movq 0x25ce2(%rip), %rsi     # 0x2afb0
callq 0x2270
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x5030
movsd 0x16dd8(%rip), %xmm1    # 0x1c0d0
ucomisd %xmm1, %xmm0
jbe 0x5316
movsd -0x20(%rbp), %xmm0
movsd 0x16ddd(%rip), %xmm1    # 0x1c0e8
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x52dd
jmp 0x5318
movq -0x28(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x5030
movaps %xmm0, %xmm1
movsd 0x16d9a(%rip), %xmm0    # 0x1c0d0
ucomisd %xmm1, %xmm0
jbe 0x5350
movsd 0x16d9c(%rip), %xmm0    # 0x1c0e0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x5318
movq 0x25c71(%rip), %rdi     # 0x2afc8
leaq 0x17128(%rip), %rsi     # 0x1c486
callq 0x2230
movq %rax, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x2460
movq %rax, %rdi
leaq 0x17118(%rip), %rsi     # 0x1c492
callq 0x2230
movq %rax, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2460
movq %rax, %rdi
movq 0x25c1a(%rip), %rsi     # 0x2afb0
callq 0x2270
movq -0x28(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movq -0x10(%rbp), %rsi
callq 0x33b0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)