// File: /workspace/github_cpp_makefile_star2_O3/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 0x28593(%rip), %rsi     # 0x346b6
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x5320
movq 0x490(%rbx), %rax
cmpq %rax, 0x498(%rbx)
je 0xc204
xorl %r12d, %r12d
leaq 0x27ec3(%rip), %r15     # 0x34016
leaq (%r12,%r12,2), %rbp
movq (%rax,%rbp,8), %rcx
cmpq %rcx, 0x8(%rax,%rbp,8)
je 0xc1ac
movl $0x1, %r13d
xorl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%rax,8), %xmm0
movq %r14, %rdi
callq 0x5500
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5360
movl %r13d, %eax
movq 0x490(%rbx), %rdx
movq (%rdx,%rbp,8), %rcx
movq 0x8(%rdx,%rbp,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
incl %r13d
cmpq %rax, %rdx
ja 0xc16a
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x52c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5200
incl %r12d
movq 0x490(%rbx), %rax
movq 0x498(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %r12, %rcx
ja 0xc153
leaq 0x8(%rsp), %rdi
callq 0x5430
leaq 0x284b0(%rip), %rsi     # 0x346c5
leaq 0x208(%rsp), %r15
movq %r15, %rdi
movl $0x10, %edx
callq 0x5320
movq 0x478(%rbx), %rax
cmpq %rax, 0x480(%rbx)
je 0xc301
xorl %ebp, %ebp
leaq 0x27dcf(%rip), %r12     # 0x34016
leaq (,%rbp,2), %r14
addq %rbp, %r14
movq (%rax,%r14,8), %rcx
cmpq %rcx, 0x8(%rax,%r14,8)
je 0xc2a7
movl $0x1, %r13d
xorl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%rax,8), %xmm0
movq %r15, %rdi
callq 0x5500
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x5360
movl %r13d, %eax
movq 0x478(%rbx), %rdx
movq (%rdx,%r14,8), %rcx
movq 0x8(%rdx,%r14,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
incl %r13d
cmpq %rax, %rdx
ja 0xc265
movq 0x208(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x52c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5200
incl %ebp
movq 0x478(%rbx), %rax
movq 0x480(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %rbp, %rcx
ja 0xc247
leaq 0x208(%rsp), %rbx
movq %rbx, %rdi
callq 0x5430
movq 0x38ca8(%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 0x5280
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 0x5280
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 0xc38d
jmp 0xc39f
jmp 0xc39f
jmp 0xc38d
jmp 0xc39f
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x5628
jmp 0xc3a2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5628
movq %rbx, %rdi
callq 0x55a0