// File: /workspace/github_cpp_makefile_star2_O3/j-faria[P]kima/DNest4/code/Options.cpp
// Function: DNest4::Options::load(char const*)
void Options::load(const char* filename)
{
	std::fstream fin(filename, std::ios::in);
	if(!fin)
	{
		std::cerr<<"ERROR: Cannot open file "<<filename<<"."<<std::endl;
		exit(0);
	}

	// Read past comment lines at the top of the file
	while(fin.peek() == '#')
		fin.ignore(1000000, '\n');

	fin>>num_particles;	fin.ignore(1000000, '\n');
	fin>>new_level_interval;	fin.ignore(1000000, '\n');
	fin>>save_interval;	fin.ignore(1000000, '\n');
	fin>>thread_steps;	fin.ignore(1000000, '\n');
	fin>>max_num_levels;	fin.ignore(1000000, '\n');
	fin>>lambda;		fin.ignore(1000000, '\n');
	fin>>beta;		fin.ignore(1000000, '\n');
	fin>>max_num_saves;		fin.ignore(1000000, '\n');
	fin>>sample_file;		fin.ignore(1000000, '\n');
	fin>>sample_info_file;	fin.ignore(1000000, '\n');
	fin>>levels_file;

	if (sample_file.compare("#") == 0) sample_file = "sample.txt";
	if (sample_info_file.compare("#") == 0) sample_info_file = "sample_info.txt";
	if (levels_file.compare("#") == 0) levels_file = "levels.txt";

	fin.close();

	assert(num_particles > 0 && new_level_interval > 0 &&
			thread_steps > 0 && max_num_levels > 0 && lambda > 0. &&
			beta >= 0.);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x6550
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
jne 0x39621
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x6150
cmpl $0x23, %eax
jne 0x393d0
movl $0xf4240, %esi          # imm = 0xF4240
movq %r14, %rdi
movl $0xa, %edx
callq 0x6290
jmp 0x393af
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x6700
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x4(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6700
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6700
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0xc(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6700
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x10(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6700
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x18(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x62c0
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x20(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x62c0
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x28(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6700
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x30(%rbx), %r12
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x6510
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x50(%rbx), %r15
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x6510
leaq 0x8(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movl $0xa, %edx
callq 0x6290
leaq 0x70(%rbx), %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6510
leaq 0xbc33(%rip), %rsi      # 0x45174
movq %r12, %rdi
callq 0x6100
testl %eax, %eax
jne 0x39568
movq 0x38(%rbx), %rdx
leaq 0xbaf5(%rip), %rcx      # 0x4504d
movl $0xa, %r8d
movq %r12, %rdi
xorl %esi, %esi
callq 0x6600
leaq 0xbc05(%rip), %rsi      # 0x45174
movq %r15, %rdi
callq 0x6100
testl %eax, %eax
jne 0x39596
movq 0x58(%rbx), %rdx
leaq 0xbad2(%rip), %rcx      # 0x45058
movl $0xf, %r8d
movq %r15, %rdi
xorl %esi, %esi
callq 0x6600
leaq 0xbbd7(%rip), %rsi      # 0x45174
movq %r14, %rdi
callq 0x6100
testl %eax, %eax
jne 0x395c4
movq 0x78(%rbx), %rdx
leaq 0xbab4(%rip), %rcx      # 0x45068
movl $0xa, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x6600
leaq 0x8(%rsp), %rdi
callq 0x6060
movdqu (%rbx), %xmm0
movdqu 0xc(%rbx), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
jne 0x3966e
movsd 0x20(%rbx), %xmm1
pxor %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x3966e
movsd 0x18(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3966e
leaq 0x8(%rsp), %rdi
callq 0x60c0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x169c0(%rip), %rdi     # 0x4ffe8
leaq 0xbb2c(%rip), %rsi      # 0x4515b
movl $0x18, %edx
callq 0x64a0
movq 0x169a8(%rip), %rdi     # 0x4ffe8
movq %r14, %rsi
callq 0x6440
movq %rax, %rbx
leaq 0xbd1d(%rip), %rsi      # 0x4536f
movl $0x1, %edx
movq %rax, %rdi
callq 0x64a0
movq %rbx, %rdi
callq 0x61c0
xorl %edi, %edi
callq 0x64e0
leaq 0xbb01(%rip), %rdi      # 0x45176
leaq 0xba56(%rip), %rsi      # 0x450d2
leaq 0xbb66(%rip), %rcx      # 0x451e9
movl $0x4c, %edx
callq 0x62b0
jmp 0x3968f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x60c0
movq %rbx, %rdi
callq 0x6710