// File: /workspace/github_cpp_makefile_star2_O1/richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::runSSA()
void Swarm::runSSA() {
	if (options.verbosity >= 3) {
		cout << "Running an asynchronous PSADE fit" << endl;
	}

	// Initialize and/or fill our parameter vectors
	vector<unsigned int> isLocal = vector<unsigned int>(options.swarmSize, 0);
	vector<float> particleTemps = vector<float>(options.swarmSize + 1, 0);
	vector<float> particleRadii = vector<float>(options.swarmSize + 1, 0);
	vector<float> particleFs = generateParticleFs();
	vector<float> particleCRs = generateParticleCRs();
	vector<float> cpuToParticle = vector<float>(options.swarmSize + 1, 0);
	vector<vector<float> > trialParams = vector<vector<float> >(options.swarmSize + 1, vector<float>(2, 0));

	// Launch the initialization population and map
	// CPUs to particles
	for (int p = 1; p <= options.swarmSize; ++p) {
		launchParticle(p);
		cpuToParticle[p] = p;
	}

	unordered_map<unsigned int, vector<double> > finishedParticles;
	int numFinishedParticles = 0;

	// Wait for initialization population to finish simulations
	while (numFinishedParticles < options.swarmSize) {


	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xf0, %rsp
movq %rdi, %rbx
cmpl $0x3, 0x1614(%rdi)
jb 0x80e13
movq 0xf51b8(%rip), %r14     # 0x175f90
leaq 0x7fdd4(%rip), %rsi     # 0x100bb3
movl $0x21, %edx
movq %r14, %rdi
callq 0x22ab0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r14, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movslq 0x1620(%rbx), %rsi
xorl %ebp, %ebp
leaq 0x70(%rsp), %r14
movl %ebp, (%r14)
leaq 0xc0(%rsp), %rdi
leaq 0x58(%rsp), %rcx
movq %r14, %rdx
callq 0xa829a
movslq 0x1620(%rbx), %rsi
incq %rsi
movl %ebp, (%r14)
leaq 0x58(%rsp), %rdi
leaq 0x70(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0xa8bac
movslq 0x1620(%rbx), %rsi
incq %rsi
leaq 0x70(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rcx
callq 0xa8bac
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0xa212c
leaq 0xa8(%rsp), %rdi
movq %rbx, %rsi
callq 0xa21aa
movslq 0x1620(%rbx), %rsi
incq %rsi
leaq 0x70(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xd8(%rsp), %rcx
callq 0xa8bac
movslq 0x1620(%rbx), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
movl $0x8, %edi
callq 0x22980
leaq 0x70(%rsp), %rdx
movq %rax, (%rdx)
movq %rax, 0x8(%rdx)
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x10(%rdx)
movq $0x0, (%rax)
movq %rcx, 0x8(%rdx)
incq %r14
leaq 0xd8(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movq %r14, %rsi
callq 0xa8c2e
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x80f3b
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
cmpl $0x0, 0x1620(%rbx)
jle 0x80f7d
movl $0x1, %r14d
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x8c82e
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
movq 0x10(%rsp), %rax
movss %xmm0, (%rax,%r14,4)
leaq 0x1(%r14), %rax
movslq 0x1620(%rbx), %rcx
cmpq %rcx, %r14
movq %rax, %r14
jl 0x80f4a
leaq 0xa0(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x70(%rsp), %rdi
callq 0xad720
leaq 0xd8(%rsp), %rdi
callq 0xa8d46
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x80fd1
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x80fee
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x81005
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x8101c
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x81033
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x81050
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
addq $0xf0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x810ac
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x810ac
movq %rax, %rbx
jmp 0x810ac
movq %rax, %rbx
jmp 0x810c3
movq %rax, %rbx
jmp 0x810e0
movq %rax, %rbx
jmp 0x810f7
movq %rax, %rbx
jmp 0x8110e
movq %rax, %rbx
jmp 0x81125
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0xa8d46
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x810c3
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x810e0
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x810f7
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x8110e
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x81125
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x81142
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq %rbx, %rdi
callq 0x23240