// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x6530
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rsp,%rax)
jne 0x388b5
movq %rsp, %r14
pushq $0xa
popq %rbp
movq %r14, %rdi
callq 0x6140
cmpl $0x23, %eax
jne 0x386cd
movl $0xf4240, %esi          # imm = 0xF4240
movq %r14, %rdi
movl %ebp, %edx
callq 0x6290
jmp 0x386af
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x66d0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x4(%rbx), %rsi
movq %rsp, %rdi
callq 0x66d0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x8(%rbx), %rsi
movq %rsp, %rdi
callq 0x66d0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0xc(%rbx), %rsi
movq %rsp, %rdi
callq 0x66d0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x10(%rbx), %rsi
movq %rsp, %rdi
callq 0x66d0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x18(%rbx), %rsi
movq %rsp, %rdi
callq 0x62c0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x20(%rbx), %rsi
movq %rsp, %rdi
callq 0x62c0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x28(%rbx), %rsi
movq %rsp, %rdi
callq 0x66d0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x30(%rbx), %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0x64e0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x50(%rbx), %r15
movq %rsp, %rdi
movq %r15, %rsi
callq 0x64e0
movq %rsp, %rdi
pushq $0xa
popq %rdx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6290
leaq 0x70(%rbx), %r12
movq %rsp, %rdi
movq %r12, %rsi
callq 0x64e0
leaq 0x13834(%rip), %rsi     # 0x4c034
movq %r14, %rdi
callq 0x6110
testl %eax, %eax
jne 0x3881b
leaq 0x136fa(%rip), %rsi     # 0x4bf0d
movq %r14, %rdi
callq 0x6770
leaq 0x13812(%rip), %rsi     # 0x4c034
movq %r15, %rdi
callq 0x6110
testl %eax, %eax
jne 0x3883d
leaq 0x136e3(%rip), %rsi     # 0x4bf18
movq %r15, %rdi
callq 0x6770
leaq 0x137f0(%rip), %rsi     # 0x4c034
movq %r12, %rdi
callq 0x6110
testl %eax, %eax
jne 0x3885f
leaq 0x136d1(%rip), %rsi     # 0x4bf28
movq %r12, %rdi
callq 0x6770
movq %rsp, %rdi
callq 0x6050
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 0x388f1
movsd 0x20(%rbx), %xmm1
pxor %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x388f1
movsd 0x18(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x388f1
movq %rsp, %rdi
callq 0x60c0
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x2b72c(%rip), %rdi     # 0x63fe8
leaq 0x13758(%rip), %rsi     # 0x4c01b
callq 0x6430
movq %rax, %rdi
movq %r14, %rsi
callq 0x6430
leaq 0x13925(%rip), %rsi     # 0x4c1ff
movq %rax, %rdi
callq 0x6430
movq %rax, %rdi
callq 0x61c0
xorl %edi, %edi
callq 0x64b0
leaq 0x1373e(%rip), %rdi     # 0x4c036
leaq 0x13693(%rip), %rsi     # 0x4bf92
leaq 0x137a3(%rip), %rcx     # 0x4c0a9
pushq $0x4c
popq %rdx
callq 0x62b0
jmp 0x38910
movq %rax, %rbx
movq %rsp, %rdi
callq 0x60c0
movq %rbx, %rdi
callq 0x66e0
nop