// File: j-faria[P]kima/examples/trends/../../DNest4/code/SamplerImpl.h
// Function: DNest4::Sampler<RVmodel>::save_levels() const
void Sampler<ModelType>::save_levels() const
{
	if(!save_to_disk)
		return;

	// Output file
	std::fstream fout;
	fout.open(options.levels_file, std::ios::out);
	fout<<"# log_X, log_likelihood, tiebreaker, accepts, tries, exceeds, visits";
	fout<<std::endl;
    fout<<std::setprecision(12);


	for(const Level& level: levels)
	{
		fout<<level.get_log_X()<<' ';
		fout<<level.get_log_likelihood().get_value()<<' ';
		fout<<level.get_log_likelihood().get_tiebreaker()<<' ';
		fout<<level.get_accepts()<<' ';
		fout<<level.get_tries()<<' ';
		fout<<level.get_exceeds()<<' ';
		fout<<level.get_visits()<<std::endl;
	}
	fout.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x250(%rbp)
testb $0x1, (%rax)
jne 0xa8f74
jmp 0xa9330
leaq -0x218(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x65b0
movq -0x250(%rbp), %rsi
movq -0x258(%rbp), %rdi
addq $0xa8, %rsi
movl $0x10, %edx
callq 0x66a0
jmp 0xa8fa8
leaq -0x208(%rbp), %rdi
leaq 0x22681(%rip), %rsi     # 0xcb637
callq 0x64f0
jmp 0xa8fbd
leaq -0x208(%rbp), %rdi
movq 0x70f4d(%rip), %rsi     # 0x119f18
callq 0x6530
jmp 0xa8fd2
leaq -0x208(%rbp), %rax
movq %rax, -0x268(%rbp)
movl $0xc, %edi
callq 0xa9350
movl %eax, -0x25c(%rbp)
jmp 0xa8ff2
movq -0x268(%rbp), %rdi
movl -0x25c(%rbp), %eax
movl %eax, -0x228(%rbp)
movl -0x228(%rbp), %esi
callq 0x6750
jmp 0xa9012
movq -0x250(%rbp), %rax
addq $0x630, %rax            # imm = 0x630
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rdi
callq 0xa42a0
movq %rax, -0x238(%rbp)
movq -0x230(%rbp), %rdi
callq 0xa42d0
movq %rax, -0x240(%rbp)
leaq -0x238(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0xa43e0
testb $0x1, %al
jne 0xa9068
jmp 0xa9316
leaq -0x238(%rbp), %rdi
callq 0xa4420
movq %rax, -0x248(%rbp)
leaq -0x208(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x248(%rbp), %rdi
callq 0xa9370
movsd %xmm0, -0x270(%rbp)
jmp 0xa909f
movsd -0x270(%rbp), %xmm0
movq -0x278(%rbp), %rdi
callq 0x68f0
movq %rax, -0x280(%rbp)
jmp 0xa90bc
movq -0x280(%rbp), %rdi
movl $0x20, %esi
callq 0x6590
jmp 0xa90cf
leaq -0x208(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x248(%rbp), %rdi
callq 0xa9390
movq %rax, -0x288(%rbp)
jmp 0xa90f2
movq -0x288(%rbp), %rdi
callq 0xa93a0
movsd %xmm0, -0x298(%rbp)
jmp 0xa9108
movsd -0x298(%rbp), %xmm0
movq -0x290(%rbp), %rdi
callq 0x68f0
movq %rax, -0x2a0(%rbp)
jmp 0xa9125
movq -0x2a0(%rbp), %rdi
movl $0x20, %esi
callq 0x6590
jmp 0xa9138
leaq -0x208(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x248(%rbp), %rdi
callq 0xa9390
movq %rax, -0x2a8(%rbp)
jmp 0xa915b
movq -0x2a8(%rbp), %rdi
callq 0xa93c0
movsd %xmm0, -0x2b8(%rbp)
jmp 0xa9171
movsd -0x2b8(%rbp), %xmm0
movq -0x2b0(%rbp), %rdi
callq 0x68f0
movq %rax, -0x2c0(%rbp)
jmp 0xa918e
movq -0x2c0(%rbp), %rdi
movl $0x20, %esi
callq 0x6590
jmp 0xa91a1
leaq -0x208(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x248(%rbp), %rdi
callq 0xa93e0
movl %eax, -0x2c4(%rbp)
jmp 0xa91c3
movl -0x2c4(%rbp), %esi
movq -0x2d0(%rbp), %rdi
callq 0x6650
movq %rax, -0x2d8(%rbp)
jmp 0xa91de
movq -0x2d8(%rbp), %rdi
movl $0x20, %esi
callq 0x6590
jmp 0xa91f1
leaq -0x208(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movq -0x248(%rbp), %rdi
callq 0xa9400
movl %eax, -0x2dc(%rbp)
jmp 0xa9213
movl -0x2dc(%rbp), %esi
movq -0x2e8(%rbp), %rdi
callq 0x6650
movq %rax, -0x2f0(%rbp)
jmp 0xa922e
movq -0x2f0(%rbp), %rdi
movl $0x20, %esi
callq 0x6590
jmp 0xa9241
leaq -0x208(%rbp), %rax
movq %rax, -0x300(%rbp)
movq -0x248(%rbp), %rdi
callq 0xa9420
movl %eax, -0x2f4(%rbp)
jmp 0xa9263
movl -0x2f4(%rbp), %esi
movq -0x300(%rbp), %rdi
callq 0x6650
movq %rax, -0x308(%rbp)
jmp 0xa927e
movq -0x308(%rbp), %rdi
movl $0x20, %esi
callq 0x6590
jmp 0xa9291
leaq -0x208(%rbp), %rax
movq %rax, -0x318(%rbp)
movq -0x248(%rbp), %rdi
callq 0xa9440
movl %eax, -0x30c(%rbp)
jmp 0xa92b3
movl -0x30c(%rbp), %esi
movq -0x318(%rbp), %rdi
callq 0x6650
movq %rax, -0x320(%rbp)
jmp 0xa92ce
movq -0x320(%rbp), %rdi
movq 0x70c3c(%rip), %rsi     # 0x119f18
callq 0x6530
jmp 0xa92e3
jmp 0xa92e5
leaq -0x238(%rbp), %rdi
callq 0xa4440
jmp 0xa904c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x60f0
jmp 0xa9339
leaq -0x218(%rbp), %rdi
callq 0x6060
jmp 0xa9324
leaq -0x218(%rbp), %rdi
callq 0x60f0
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
movq -0x220(%rbp), %rdi
callq 0x6830
nopw %cs:(%rax,%rax)
nop