// File: dtsaras[P]GCW/GCW.cpp
// Function: output_stats_k_and_p(std::ostream*, double***, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int*, int*)
void output_stats_k_and_p(ostream * output, double *** data, string variable, string algorithms, int reps, int * eventsArray, int * budgetsArray){
	string names[3] = {"total similarity", "time", "memory"};
	for (int d = 0; d < 3; ++d){
		*output << names[d] << endl;
		*output << setw(16) << "#";
		for (int i = 0; i < reps; ++i){
			if (variable == "c")
				*output << setw(16) << eventsArray[i];
			else
				*output << setw(16) << budgetsArray[i];
		}
		*output << endl;

		for (int i = 0; i < algorithms.size(); i += 2){
			if (algorithms.substr(i,2) == "EG")
				*output << setw(16) << "GCW";
			else
				*output << setw(16) << algorithms.substr(i,2);
			for (int j = 0; j < reps; ++j){
				*output << setw(16) << data[d][i/2][j];
			}
			*output << endl;
		}
	}
}

// Assembly:
subq $0x248, %rsp            # imm = 0x248
movq %rcx, 0x108(%rsp)
movq %rdx, 0x110(%rsp)
movq 0x250(%rsp), %rax
movq %rdi, 0x240(%rsp)
movq %rsi, 0x238(%rsp)
movq %rdx, 0x230(%rsp)
movq %rcx, 0x228(%rsp)
movl %r8d, 0x224(%rsp)
movq %r9, 0x218(%rsp)
movb $0x1, 0x191(%rsp)
leaq 0x1b0(%rsp), %rax
movq %rax, 0x118(%rsp)
movq %rax, 0x1a8(%rsp)
leaq 0x1a7(%rsp), %rdi
movq %rdi, 0x120(%rsp)
callq 0x46a0
movq 0x118(%rsp), %rdi
movq 0x120(%rsp), %rdx
leaq 0x29e75(%rip), %rsi     # 0x32060
callq 0x4500
jmp 0x81f2
leaq 0x1d0(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq %rax, 0x1a8(%rsp)
leaq 0x193(%rsp), %rdi
movq %rdi, 0x100(%rsp)
callq 0x46a0
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rdx
leaq 0x29e3b(%rip), %rsi     # 0x32071
callq 0x4500
jmp 0x823d
leaq 0x1f0(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq %rax, 0x1a8(%rsp)
leaq 0x192(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
callq 0x46a0
movq 0xe8(%rsp), %rdi
movq 0xf0(%rsp), %rdx
leaq 0x29df5(%rip), %rsi     # 0x32076
callq 0x4500
jmp 0x8288
movb $0x0, 0x191(%rsp)
leaq 0x192(%rsp), %rdi
callq 0x4440
leaq 0x193(%rsp), %rdi
callq 0x4440
leaq 0x1a7(%rsp), %rdi
callq 0x4440
movl $0x0, 0x18c(%rsp)
cmpl $0x3, 0x18c(%rsp)
jge 0x887c
movq 0x240(%rsp), %rdi
movslq 0x18c(%rsp), %rax
shlq $0x5, %rax
leaq 0x1b0(%rsp,%rax), %rsi
callq 0x4390
movq %rax, 0xe0(%rsp)
jmp 0x82fb
movq 0xe0(%rsp), %rdi
movq 0x38ca6(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x8311
movq 0x240(%rsp), %rax
movq %rax, 0xd0(%rsp)
movl $0x10, %edi
callq 0xf370
movl %eax, 0xdc(%rsp)
jmp 0x8334
movq 0xd0(%rsp), %rdi
movl 0xdc(%rsp), %eax
movl %eax, 0x188(%rsp)
movl 0x188(%rsp), %esi
callq 0x4450
movq %rax, 0xc8(%rsp)
jmp 0x8360
movq 0xc8(%rsp), %rdi
leaq 0x29d0e(%rip), %rsi     # 0x3207d
callq 0x43f0
jmp 0x8376
movl $0x0, 0x184(%rsp)
movl 0x184(%rsp), %eax
cmpl 0x224(%rsp), %eax
jge 0x85a9
movq 0x110(%rsp), %rdi
leaq 0x2a6eb(%rip), %rsi     # 0x32a8f
callq 0xf390
movb %al, 0xc7(%rsp)
jmp 0x83b2
movb 0xc7(%rsp), %al
testb $0x1, %al
jne 0x83c2
jmp 0x851e
movq 0x240(%rsp), %rax
movq %rax, 0xb8(%rsp)
movl $0x10, %edi
callq 0xf370
movl %eax, 0xc0(%rsp)
jmp 0x83e5
movq 0xb8(%rsp), %rdi
movl 0xc0(%rsp), %eax
movl %eax, 0x180(%rsp)
movl 0x180(%rsp), %esi
callq 0x4450
movq %rax, 0xb0(%rsp)
jmp 0x8411
movq 0xb0(%rsp), %rdi
movq 0x218(%rsp), %rax
movslq 0x184(%rsp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x4670
jmp 0x8433
jmp 0x8591
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x198(%rsp)
movl %eax, 0x194(%rsp)
jmp 0x8492
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x198(%rsp)
movl %eax, 0x194(%rsp)
jmp 0x8485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x198(%rsp)
movl %eax, 0x194(%rsp)
leaq 0x192(%rsp), %rdi
callq 0x4440
leaq 0x193(%rsp), %rdi
callq 0x4440
leaq 0x1a7(%rsp), %rdi
callq 0x4440
testb $0x1, 0x191(%rsp)
jne 0x84ab
jmp 0x8500
movq 0x1a8(%rsp), %rax
leaq 0x1b0(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0xa8(%rsp)
je 0x84fe
movq 0xa8(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0xa0(%rsp)
callq 0x4260
movq 0xa0(%rsp), %rax
leaq 0x1b0(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0xa8(%rsp)
jne 0x84c8
jmp 0x8500
jmp 0x8900
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x198(%rsp)
movl %eax, 0x194(%rsp)
jmp 0x88c1
movq 0x240(%rsp), %rax
movq %rax, 0x90(%rsp)
movl $0x10, %edi
callq 0xf370
movl %eax, 0x9c(%rsp)
jmp 0x8541
movq 0x90(%rsp), %rdi
movl 0x9c(%rsp), %eax
movl %eax, 0x17c(%rsp)
movl 0x17c(%rsp), %esi
callq 0x4450
movq %rax, 0x88(%rsp)
jmp 0x856d
movq 0x88(%rsp), %rdi
movq 0x250(%rsp), %rax
movslq 0x184(%rsp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x4670
jmp 0x858f
jmp 0x8591
jmp 0x8593
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x8381
movq 0x240(%rsp), %rdi
movq 0x389f8(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x85bf
movl $0x0, 0x178(%rsp)
movq 0x108(%rsp), %rdi
movslq 0x178(%rsp), %rax
movq %rax, 0x80(%rsp)
callq 0x42c0
movq %rax, %rcx
movq 0x80(%rsp), %rax
cmpq %rcx, %rax
jae 0x8864
movq 0x108(%rsp), %rsi
movslq 0x178(%rsp), %rdx
leaq 0x158(%rsp), %rdi
movl $0x2, %ecx
callq 0x4410
jmp 0x861f
leaq 0x29a59(%rip), %rsi     # 0x3207f
leaq 0x158(%rsp), %rdi
callq 0xf390
movb %al, 0x7f(%rsp)
jmp 0x8639
leaq 0x158(%rsp), %rdi
callq 0x4260
movb 0x7f(%rsp), %al
testb $0x1, %al
jne 0x8650
jmp 0x86ce
movq 0x240(%rsp), %rax
movq %rax, 0x70(%rsp)
movl $0x10, %edi
callq 0xf370
movl %eax, 0x78(%rsp)
jmp 0x866d
movq 0x70(%rsp), %rdi
movl 0x78(%rsp), %eax
movl %eax, 0x154(%rsp)
movl 0x154(%rsp), %esi
callq 0x4450
movq %rax, 0x68(%rsp)
jmp 0x8690
movq 0x68(%rsp), %rdi
leaq 0x299e6(%rip), %rsi     # 0x32082
callq 0x43f0
jmp 0x86a3
jmp 0x877b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x198(%rsp)
movl %eax, 0x194(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x4260
jmp 0x88c1
movq 0x240(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x10, %edi
callq 0xf370
movl %eax, 0x64(%rsp)
jmp 0x86eb
movq 0x58(%rsp), %rdi
movl 0x64(%rsp), %eax
movl %eax, 0x150(%rsp)
movl 0x150(%rsp), %esi
callq 0x4450
movq %rax, 0x50(%rsp)
jmp 0x870e
movq 0x108(%rsp), %rsi
movslq 0x178(%rsp), %rdx
leaq 0x130(%rsp), %rdi
movl $0x2, %ecx
callq 0x4410
jmp 0x8732
movq 0x50(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x4390
jmp 0x8746
leaq 0x130(%rsp), %rdi
callq 0x4260
jmp 0x877b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x198(%rsp)
movl %eax, 0x194(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x4260
jmp 0x88c1
movl $0x0, 0x12c(%rsp)
movl 0x12c(%rsp), %eax
cmpl 0x224(%rsp), %eax
jge 0x8836
movq 0x240(%rsp), %rax
movq %rax, 0x40(%rsp)
movl $0x10, %edi
callq 0xf370
movl %eax, 0x4c(%rsp)
jmp 0x87b7
movq 0x40(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, 0x128(%rsp)
movl 0x128(%rsp), %esi
callq 0x4450
movq %rax, 0x38(%rsp)
jmp 0x87da
movq 0x38(%rsp), %rdi
movq 0x238(%rsp), %rax
movslq 0x18c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x178(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq 0x12c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x4730
jmp 0x881e
jmp 0x8820
movl 0x12c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x12c(%rsp)
jmp 0x8786
movq 0x240(%rsp), %rdi
movq 0x3876b(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x884c
jmp 0x884e
movl 0x178(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x178(%rsp)
jmp 0x85ca
jmp 0x8866
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x82c2
leaq 0x1b0(%rsp), %rax
movq %rax, 0x28(%rsp)
addq $0x60, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x20(%rsp)
callq 0x4260
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x30(%rsp)
jne 0x8892
addq $0x248, %rsp            # imm = 0x248
retq
leaq 0x1b0(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x60, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
addq $-0x20, %rdi
movq %rdi, 0x8(%rsp)
callq 0x4260
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0x88d7
jmp 0x8900
movq 0x198(%rsp), %rdi
callq 0x4690
nopl (%rax)