// File: /workspace/github_cpp_makefile_star2_O1/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::drawFeatureMaps()
void
CerebronPredictor::drawFeatureMaps()
{

	ofstream file("output_PHC.out");
	for(unsigned i = 0 ; i < stats_global_error.size() ; i++)
	{
		for(unsigned j =  0 ; j < stats_global_error[i].size() ; j++)
		{
			double a = stats_global_error[i][j].first;
//			double b = stats_global_error[i][j].second;
//			double dummy = 0;
//			if( !(a == 0 && b == 0) )
//				dummy = a / (a + b);

			file << a << ",";
		}
		file << endl;
	}
	file.close();

	ofstream file1("output_PHC1.out");
	for(unsigned i = 0 ; i < stats_local_error.size() ; i++)
	{
		for(unsigned j =  0 ; j < stats_local_error[i].size() ; j++)
		{
			double a = stats_local_error[i][j].first;
//			double b = stats_local_error[i][j].second;
//			double dummy = a / (a + b);
			file1 << a << ",";
		}
		file1 << endl;
	}
	file1.close();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %rbx
leaq 0x28511(%rip), %rsi     # 0x346e2
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x5310
movq 0x498(%rbx), %rax
cmpq 0x490(%rbx), %rax
je 0xc2b6
xorl %r12d, %r12d
leaq 0x27e41(%rip), %r15     # 0x34042
movq 0x490(%rbx), %rcx
leaq (%r12,%r12,2), %rbp
movq (%rcx,%rbp,8), %rax
cmpq %rax, 0x8(%rcx,%rbp,8)
je 0xc261
movl $0x1, %r13d
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%rcx,8), %xmm0
movq %r14, %rdi
callq 0x5500
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5350
movl %r13d, %ecx
movq 0x490(%rbx), %rdx
movq (%rdx,%rbp,8), %rax
movq 0x8(%rdx,%rbp,8), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r13d
cmpq %rcx, %rdx
ja 0xc21f
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51f0
movq 0x498(%rbx), %rax
subq 0x490(%rbx), %rax
incl %r12d
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %r12, %rax
ja 0xc201
leaq 0x8(%rsp), %rdi
callq 0x5430
leaq 0x2842a(%rip), %rsi     # 0x346f1
leaq 0x208(%rsp), %r15
movq %r15, %rdi
movl $0x10, %edx
callq 0x5310
movq 0x480(%rbx), %rax
cmpq 0x478(%rbx), %rax
je 0xc3b7
xorl %ebp, %ebp
leaq 0x27d49(%rip), %r12     # 0x34042
movq 0x478(%rbx), %rcx
leaq (,%rbp,2), %r14
addq %rbp, %r14
movq (%rcx,%r14,8), %rax
cmpq %rax, 0x8(%rcx,%r14,8)
je 0xc360
movl $0x1, %r13d
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%rcx,8), %xmm0
movq %r15, %rdi
callq 0x5500
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x5350
movl %r13d, %ecx
movq 0x478(%rbx), %rdx
movq (%rdx,%r14,8), %rax
movq 0x8(%rdx,%r14,8), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r13d
cmpq %rcx, %rdx
ja 0xc31e
movq 0x208(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51f0
movq 0x480(%rbx), %rax
subq 0x478(%rbx), %rax
incl %ebp
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rbp, %rax
ja 0xc2f9
leaq 0x208(%rsp), %rbx
movq %rbx, %rdi
callq 0x5430
movq 0x38bf2(%rip), %rax     # 0x44fc0
movq (%rax), %r14
movq 0x18(%rax), %r15
leaq 0x210(%rsp), %rdi
movq %r14, -0x8(%rdi)
movq -0x18(%r14), %rax
movq %r15, 0x208(%rsp,%rax)
callq 0x5270
movl $0xf8, %r12d
addq %r12, %rbx
movq %rbx, %rdi
callq 0x5120
leaq 0x10(%rsp), %rdi
movq %r14, -0x8(%rdi)
movq -0x18(%r14), %rax
movq %r15, 0x8(%rsp,%rax)
callq 0x5270
leaq 0x8(%rsp), %rdi
addq %r12, %rdi
callq 0x5120
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc443
jmp 0xc455
jmp 0xc455
jmp 0xc443
jmp 0xc455
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x5628
jmp 0xc458
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5628
movq %rbx, %rdi
callq 0x55a0