// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::outputRunSummary()
void Swarm::outputRunSummary() {
	// Output first two fields of header
	cout<<"Swarm::outputRunSummary() may need some modifications ...."<<endl; //mypause(); //razi TODO: later test
	//Raquel

	cout << left << setw(16) << "Fit" << left << setw(16) << "Iteration" << endl;

	cout << left << setw(16) << "Fit" << left << setw(16) << "Iteration";

	// Output parameter names
	//for (autoDE i: options.model->freeParams_) {
	for (auto i = options.freeParams_.begin(); i != options.freeParams_.end(); ++i) {

		cout  << left << setw(16) << i->first << endl;

		cout << left << setw(16) << i->first;
	}

	cout << endl;

	vector<string> paramVals;

	//for (auto i: allGenFits) {
	for (auto i = allGenFits.begin(); i != allGenFits.end(); ++i) {   //razi: TODO later check if allGenFits filled correctly when different model have different list of free parameters
		split(i->second, paramVals);

		cout << left << setw(16) << i->first << left << setw(16) << paramVals[0];

		for (unsigned int i = 1; i < paramVals.size(); i++) {
			cout << left << setw(16) << stod(paramVals[i]);
		}

		paramVals.clear();

		cout << endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0xeaff4(%rip), %r14     # 0x165f98
leaq 0x64917(%rip), %rsi     # 0xdf8c2
movq %r14, %rdi
callq 0x289f0
movq %rax, %rdi
callq 0x284a0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl $0xffffff4f, %ebp       # imm = 0xFFFFFF4F
movl 0x18(%r14,%rcx), %edx
andl %ebp, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
pushq $0x10
popq %r13
movq %r13, 0x10(%r14,%rax)
leaq 0x647ea(%rip), %r15     # 0xdf7d4
movq %r14, %rdi
movq %r15, %rsi
callq 0x289f0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl %ebp, %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq %r13, 0x10(%rax,%rcx)
leaq 0x60f5b(%rip), %r12     # 0xdbf74
movq %rax, %rdi
movq %r12, %rsi
callq 0x289f0
movq %rax, %rdi
callq 0x284a0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %ebp, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq %r13, 0x10(%r14,%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x289f0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl %ebp, %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq %r13, 0x10(%rax,%rcx)
movq %rax, %rdi
movq %r12, %rsi
callq 0x289f0
movq 0x15a8(%rbx), %r15
movq %rbx, 0x8(%rsp)
addq $0x1598, %rbx           # imm = 0x1598
cmpq %rbx, %r15
je 0x7b103
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %ebp, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq %r13, 0x10(%r14,%rax)
leaq 0x20(%r15), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x28910
movq %rax, %rdi
callq 0x284a0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %ebp, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq %r13, 0x10(%r14,%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x28910
movq %r15, %rdi
callq 0x28700
movq %rax, %r15
jmp 0x7b091
movq %r14, %rdi
callq 0x284a0
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbp
andq $0x0, 0x10(%rbp)
movaps %xmm0, (%rbp)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r12
addq $0x10, %rax
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %r15
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
cmpq 0x8(%rsp), %r12
je 0x7b250
movq %r15, %rdi
leaq 0x644bf(%rip), %rsi     # 0xdf60d
leaq 0x7(%rsp), %rdx
callq 0x33402
leaq 0x28(%r12), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x9ec69
movq %r15, %rdi
callq 0x295a0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq $0x10, 0x10(%r14,%rax)
movsd 0x20(%r12), %xmm0
movq %r14, %rdi
callq 0x290f0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl %r13d, %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x10, 0x10(%rax,%rcx)
movq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x28910
pushq $0x1
popq %rax
movl %eax, %ebx
movl %ebx, %ebx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %rbx, %rax
jbe 0x7b230
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq $0x10, 0x10(%r14,%rax)
movq %rbx, %rax
shlq $0x5, %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x33525
movq %r14, %rdi
callq 0x290f0
incl %ebx
jmp 0x7b1d7
movq %rbp, %rdi
callq 0x3376e
movq %r14, %rdi
callq 0x284a0
movq %r12, %rdi
callq 0x28700
movq %rax, %r12
jmp 0x7b139
leaq 0x10(%rsp), %rdi
callq 0x3355a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x295a0
jmp 0x7b27f
jmp 0x7b27c
jmp 0x7b27c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3355a
movq %rbx, %rdi
callq 0x292f0
nop