// File: /workspace/github_cpp_makefile_star2_O1/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 0x37848
movq 0x6a0(%rbx), %r12
movq 0x6a8(%rbx), %r13
cmpq %r13, %r12
je 0x35b66
movl 0x3c(%rbx), %esi
addl %esi, %esi
movq %r12, %rdi
callq 0x37848
addq $0x18, %r12
jmp 0x35b4e
movq 0x1d42b(%rip), %r12     # 0x52f98
leaq 0x1196c(%rip), %rsi     # 0x474e0
movl $0x31, %edx
movq %r12, %rdi
callq 0x64a0
movl %r15d, %esi
movq %r12, %rdi
callq 0x62f0
movq %rax, %r12
leaq 0x122d9(%rip), %rsi     # 0x47e6f
movl $0x1, %edx
movq %rax, %rdi
callq 0x64a0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x6430
movsbl %al, %esi
movq %r12, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6300
movq 0x678(%rbx), %r12
movq 0x680(%rbx), %r13
cmpq %r13, %r12
je 0x35bf9
leal 0x1(%r15), %ebp
movq %r12, %rdi
movl %r15d, %esi
callq 0x3bfe8
addq $0x9f8, %r12            # imm = 0x9F8
movl %ebp, %r15d
jmp 0x35bd9
movq 0x1d398(%rip), %r15     # 0x52f98
leaq 0x1190b(%rip), %rsi     # 0x47512
movl $0xd, %edx
movq %r15, %rdi
callq 0x64a0
movq 0xd0(%rbx), %rsi
subq 0xc8(%rbx), %rsi
sarq $0x4, %rsi
movabsq $0x2c3f35ba781948b1, %r12 # imm = 0x2C3F35BA781948B1
imulq %r12, %rsi
movq %r15, %rdi
callq 0x62f0
leaq 0x118dd(%rip), %rsi     # 0x47520
movl $0x9, %edx
movq %r15, %rdi
callq 0x64a0
movq 0xd0(%rbx), %rax
subq 0xc8(%rbx), %rax
sarq $0x4, %rax
imulq %r12, %rax
xorl %edx, %edx
cmpq $0x2, %rax
setae %dl
leaq 0x9d88(%rip), %rax      # 0x3f9fe
leaq 0x9e24(%rip), %rsi      # 0x3faa1
cmovaeq %rax, %rsi
movq %r15, %rdi
callq 0x64a0
leaq 0x1189a(%rip), %rsi     # 0x4752a
movl $0x12, %edx
movq %r15, %rdi
callq 0x64a0
movq %r15, %rdi
callq 0x6300
movq 0xc8(%rbx), %rdi
cmpq %rdi, 0xd0(%rbx)
je 0x35d43
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
addq %r15, %rdi
movq %r14, %rsi
callq 0xd5e4
movq 0xc8(%rbx), %rdi
addq %r15, %rdi
callq 0x114f4
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x3c02c
movaps %xmm0, %xmm1
movq %r12, %rdi
movsd (%rsp), %xmm0
callq 0x3b586
movq 0xe0(%rbx), %rax
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rax,%rbp)
incq %r13
movq 0xc8(%rbx), %rdi
movq 0xd0(%rbx), %rax
subq %rdi, %rax
sarq $0x4, %rax
movabsq $0x2c3f35ba781948b1, %rcx # imm = 0x2C3F35BA781948B1
imulq %rcx, %rax
addq $0x510, %r15            # imm = 0x510
addq $0x10, %rbp
cmpq %rax, %r13
jb 0x35cc6
leaq 0x117f3(%rip), %rsi     # 0x4753d
movl $0x5, %edx
movq 0x1d242(%rip), %r14     # 0x52f98
movq %r14, %rdi
callq 0x64a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6430
movsbl %al, %esi
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6300
movq %rbx, %rdi
callq 0x378f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq