// File: /workspace/github_cpp_makefile_star2_O1/richardposner[P]BioNetFit2/src/code/Particle.cpp
// Function: Particle::Particle(Swarm*, int)
Particle::Particle(Swarm * swarm, int id) {
	id_ = id;
	swarm_ = swarm;

	//razi: init vectors corresponding to multiple models
	unsigned int nModel = swarm_->getNumModels();
	if(nModel < 1) outputError("Can not create particle without a model.");
	models.clear();
	subParticles.clear();
	dataFiles_.clear();
	simParams_.clear();
	fitCalcs.clear();

	//razi: fill with dummay fileds
	std::map<std::string, std::map<int, Data*> > dummyFile;
	std::map<std::string, double> dummyParam;
	std::map<int, double> dummy_fit;
	for (unsigned int i=0; i< nModel; i++){
		subParticles.push_back(0);
		dataFiles_.push_back(dummyFile);
		models.push_back(0);
		simParams_.push_back(dummyParam);
		fitCalcs.push_back(dummy_fit);
	}


	objFuncPtr = 0;
	currentGeneration_ = 1;
	island_ = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, (%rsp)
leaq 0x48(%rdi), %rax
movq %rax, 0x18(%rsp)
leaq 0x78(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x90(%rdi), %rax
movq %rax, 0x10(%rsp)
movb $0x0, 0xb8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movups %xmm0, 0x88(%rdi)
movups %xmm0, 0x98(%rdi)
movl %edx, 0x40(%rdi)
movq %rsi, 0xa8(%rdi)
movq 0x15c8(%rsi), %r13
subq 0x15c0(%rsi), %r13
shrq $0x3, %r13
testl %r13d, %r13d
jne 0x53e98
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xa4522(%rip), %rsi     # 0xf8388
leaq 0xa4543(%rip), %rdx     # 0xf83b0
leaq 0x28(%rsp), %rdi
callq 0x32210
leaq 0x28(%rsp), %rdi
callq 0xc0396
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x53e98
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x78(%rbx), %rax
cmpq %rax, 0x80(%rbx)
je 0x53eac
movq %rax, 0x80(%rbx)
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x53eba
movq %rax, 0x50(%rbx)
movq 0x90(%rbx), %r15
movq 0x98(%rbx), %r12
cmpq %r15, %r12
je 0x53ee8
movq %r15, %r14
movq %r14, %rdi
callq 0x66cd8
addq $0x30, %r14
cmpq %r12, %r14
jne 0x53ed0
movq %r15, 0x98(%rbx)
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r15, %r12
je 0x53f0c
movq %r15, %r14
movq %r14, %rdi
callq 0x4a694
addq $0x30, %r14
cmpq %r12, %r14
jne 0x53ef7
movq %r15, 0x8(%rbx)
movq 0x18(%rbx), %r15
movq 0x20(%rbx), %r12
cmpq %r15, %r12
je 0x53f31
movq %r15, %r14
movq %r14, %rdi
callq 0x66c88
addq $0x30, %r14
cmpq %r12, %r14
jne 0x53f1c
movq %r15, 0x20(%rbx)
leaq 0xb0(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x80(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x50(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
testl %r13d, %r13d
je 0x53fef
leaq 0x20(%rsp), %rbp
leaq 0xa8(%rsp), %r14
leaq 0x78(%rsp), %r15
leaq 0x48(%rsp), %r12
movq $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x674b0
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x66064
movq $0x0, 0x20(%rsp)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x67c5a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x66090
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x660bc
decl %r13d
jne 0x53f9a
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xb0(%rbx)
leaq 0x48(%rsp), %rdi
callq 0x66c88
leaq 0x78(%rsp), %rdi
callq 0x4a694
leaq 0xa8(%rsp), %rdi
callq 0x66cd8
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x54083
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x54083
movq %rax, %rbp
jmp 0x54083
jmp 0x5405f
jmp 0x5405f
movq %rax, %rbp
leaq 0x48(%rsp), %rdi
callq 0x66c88
leaq 0x78(%rsp), %rdi
callq 0x4a694
leaq 0xa8(%rsp), %rdi
callq 0x66cd8
movq 0x10(%rsp), %rdi
callq 0x660e8
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x540a9
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x540be
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x540d7
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x229c0
movq (%rsp), %rdi
callq 0x6612a
movq %rbx, %rdi
callq 0x6616c
movq %rbp, %rdi
callq 0x23240