// File: /workspace/github_cpp_makefile_star2_O2/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, 0x10(%rsp)
leaq 0x90(%rdi), %rax
movq %rax, 0x8(%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 0x5094c
leaq 0x85973(%rip), %rsi     # 0xd6288
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x33402
leaq 0x28(%rsp), %rdi
callq 0x9f54b
leaq 0x28(%rsp), %rdi
callq 0x295a0
movq 0x78(%rbx), %rax
cmpq %rax, 0x80(%rbx)
je 0x5094c
movq %rax, 0x80(%rbx)
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x5095a
movq %rax, 0x50(%rbx)
movq 0x8(%rsp), %rdi
callq 0x59dbe
movq %rbx, %rdi
callq 0x59dc6
movq (%rsp), %rdi
callq 0x59dce
leaq 0x50(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0xb0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x80(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x20(%rsp), %rbp
leaq 0x48(%rsp), %r15
leaq 0xa8(%rsp), %r14
leaq 0x78(%rsp), %r12
subl $0x1, %r13d
jb 0x50a32
andq $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x5b4da
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x59dd6
andq $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x5bcf4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x59e02
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x59e2e
jmp 0x509e0
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xb0(%rbx)
leaq 0x78(%rsp), %rdi
callq 0x5a990
leaq 0xa8(%rsp), %rdi
callq 0x495ac
leaq 0x48(%rsp), %rdi
callq 0x5a9e8
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
leaq 0x28(%rsp), %rdi
callq 0x295a0
jmp 0x50ab9
movq %rax, %rbp
jmp 0x50ab9
jmp 0x50a95
jmp 0x50a95
movq %rax, %rbp
leaq 0x78(%rsp), %rdi
callq 0x5a990
leaq 0xa8(%rsp), %rdi
callq 0x495ac
leaq 0x48(%rsp), %rdi
callq 0x5a9e8
leaq 0x60(%rbx), %r14
movq 0x8(%rsp), %rdi
callq 0x59e5a
movq 0x10(%rsp), %rdi
callq 0x5b3b4
movq %r14, %rdi
callq 0x5b268
movq 0x18(%rsp), %rdi
callq 0x5b380
movq (%rsp), %rdi
callq 0x59e7c
movq %rbx, %rdi
callq 0x59e9e
movq %rbp, %rdi
callq 0x292f0