// File: /workspace/github_cpp_makefile_star2_O3/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 0x53ba8
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xa47f2(%rip), %rsi     # 0xf8368
leaq 0xa4813(%rip), %rdx     # 0xf8390
leaq 0x28(%rsp), %rdi
callq 0x321d2
leaq 0x28(%rsp), %rdi
callq 0xbfa27
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x53ba8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x78(%rbx), %rax
cmpq %rax, 0x80(%rbx)
je 0x53bbc
movq %rax, 0x80(%rbx)
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x53bca
movq %rax, 0x50(%rbx)
movq 0x90(%rbx), %r15
movq 0x98(%rbx), %r12
cmpq %r15, %r12
je 0x53bf8
movq %r15, %r14
movq %r14, %rdi
callq 0x6680a
addq $0x30, %r14
cmpq %r12, %r14
jne 0x53be0
movq %r15, 0x98(%rbx)
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r15, %r12
je 0x53c1c
movq %r15, %r14
movq %r14, %rdi
callq 0x4a472
addq $0x30, %r14
cmpq %r12, %r14
jne 0x53c07
movq %r15, 0x8(%rbx)
movq 0x18(%rbx), %r15
movq 0x20(%rbx), %r12
cmpq %r15, %r12
je 0x53c41
movq %r15, %r14
movq %r14, %rdi
callq 0x667ba
addq $0x30, %r14
cmpq %r12, %r14
jne 0x53c2c
movq %r15, 0x20(%rbx)
xorl %eax, %eax
leaq 0xb0(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x80(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x50(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
testl %r13d, %r13d
je 0x53cff
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 0x66fe2
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x65b86
movq $0x0, 0x20(%rsp)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x67786
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65bb2
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x65bde
decl %r13d
jne 0x53caa
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xb0(%rbx)
leaq 0x48(%rsp), %rdi
callq 0x667ba
leaq 0x78(%rsp), %rdi
callq 0x4a472
leaq 0xa8(%rsp), %rdi
callq 0x6680a
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 0x53d93
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x53d93
movq %rax, %rbp
jmp 0x53d93
jmp 0x53d6f
jmp 0x53d6f
movq %rax, %rbp
leaq 0x48(%rsp), %rdi
callq 0x667ba
leaq 0x78(%rsp), %rdi
callq 0x4a472
leaq 0xa8(%rsp), %rdi
callq 0x6680a
movq 0x10(%rsp), %rdi
callq 0x65c0a
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x53db9
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x53dce
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x53de7
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x229c0
movq (%rsp), %rdi
callq 0x65c52
movq %rbx, %rdi
callq 0x65c9a
movq %rbp, %rdi
callq 0x23240