// File: /workspace/github_cpp_makefile_star2_O2/j-faria[P]kima/examples/trends/../../DNest4/code/SamplerImpl.h
// Function: DNest4::Sampler<RVmodel>::initialise(unsigned int)
void Sampler<ModelType>::initialise(unsigned int first_seed)
{
	// Reference to an RNG to use
	RNG& rng = rngs[0];

	// Assign memory for storage
	all_above.reserve(2*options.new_level_interval);
	for(auto& a: above)
		a.reserve(2*options.new_level_interval);

	std::cout<<"# Seeding random number generators. First seed = ";
	std::cout<<first_seed<<"."<<std::endl;
	// Seed the RNGs, incrementing the seed each time
	for(RNG& rng: rngs)
		rng.set_seed(first_seed++);

	std::cout<<"# Generating "<<particles.size();
	std::cout<<" particle"<<((particles.size() > 1)?("s"):(""));
	std::cout<<" from the prior..."<<std::flush;
	for(size_t i=0; i<particles.size(); ++i)
	{
		particles[i].from_prior(rng);
		log_likelihoods[i] = LikelihoodType(particles[i].log_likelihood(),
																rng.rand());
	}
	std::cout<<"done."<<std::endl;
	initialise_output_files();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movq 0x678(%rdi), %r14
addq $0x660, %rdi            # imm = 0x660
movl 0x3c(%rbx), %esi
addl %esi, %esi
callq 0x35220
movq 0x6a0(%rbx), %r12
movq 0x6a8(%rbx), %r13
cmpq %r13, %r12
je 0x33632
movl 0x3c(%rbx), %esi
addl %esi, %esi
movq %r12, %rdi
callq 0x35220
addq $0x18, %r12
jmp 0x3361a
movq 0x3095f(%rip), %r12     # 0x63f98
leaq 0x1822d(%rip), %rsi     # 0x4b86d
movq %r12, %rdi
callq 0x6430
movl %r15d, %esi
movq %r12, %rdi
callq 0x62f0
leaq 0x18ba5(%rip), %rsi     # 0x4c1ff
movq %rax, %rdi
callq 0x6430
movq %rax, %rdi
callq 0x61c0
movq 0x678(%rbx), %r12
movq 0x680(%rbx), %r13
cmpq %r13, %r12
je 0x33698
leal 0x1(%r15), %ebp
movq %r12, %rdi
movl %r15d, %esi
callq 0x38b68
addq $0x9f8, %r12            # imm = 0x9F8
movl %ebp, %r15d
jmp 0x33678
movq 0x308f9(%rip), %r15     # 0x63f98
leaq 0x181f9(%rip), %rsi     # 0x4b89f
movq %r15, %rdi
callq 0x6430
movq %rax, %rdi
movq 0xd0(%rbx), %rax
subq 0xc8(%rbx), %rax
movl $0x510, %r12d           # imm = 0x510
cqto
idivq %r12
movq %rax, %rsi
callq 0x62f0
leaq 0x181d4(%rip), %rsi     # 0x4b8ad
movq %r15, %rdi
callq 0x6430
movq %rax, %rdi
movq 0xd0(%rbx), %rax
subq 0xc8(%rbx), %rax
cqto
idivq %r12
cmpq $0x2, %rax
leaq 0x92e8(%rip), %rax      # 0x3c9ea
leaq 0x9384(%rip), %rsi      # 0x3ca8d
cmovaeq %rax, %rsi
callq 0x6430
leaq 0x1819e(%rip), %rsi     # 0x4b8b7
movq %r15, %rdi
callq 0x6430
movq %rax, %rdi
callq 0x6300
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0xc8(%rbx), %rdi
movq 0xd0(%rbx), %rax
subq %rdi, %rax
cqto
movl $0x510, %ecx            # imm = 0x510
idivq %rcx
cmpq %rax, %r12
jae 0x337ad
addq %r13, %rdi
movq %r14, %rsi
callq 0xcc60
movq 0xc8(%rbx), %rdi
addq %r13, %rdi
callq 0xfc60
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x38b70
movaps %xmm0, %xmm1
movq %r15, %rdi
movsd (%rsp), %xmm0
callq 0x383a8
movq 0xe0(%rbx), %rax
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rax,%rbp)
incq %r12
addq $0x10, %rbp
addq $0x510, %r13            # imm = 0x510
jmp 0x33736
movq 0x307e4(%rip), %rdi     # 0x63f98
leaq 0x1810f(%rip), %rsi     # 0x4b8ca
callq 0x6430
movq %rax, %rdi
callq 0x61c0
movq %rbx, %rdi
callq 0x352c8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop