// File: gvaumour[P]cache-simulator/src/PHC.cc
// Function: PHCPredictor::drawFeatureMaps()
void
PHCPredictor::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++)
		{
			file << stats_global_error[i][j] << ",";
		}
		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++)
		{
			file1 << stats_local_error[i][j] << ",";
		}
		file1 << endl;
	}
	file1.close();

}

// Assembly:
subq $0x468, %rsp            # imm = 0x468
movq %rdi, 0x460(%rsp)
movq 0x460(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x260(%rsp), %rdi
leaq 0x24437(%rip), %rsi     # 0x716e2
movl $0x10, %edx
callq 0x53f0
movl $0x0, 0x25c(%rsp)
movq 0x38(%rsp), %rdi
movl 0x25c(%rsp), %eax
movq %rax, 0x30(%rsp)
addq $0x418, %rdi            # imm = 0x418
callq 0xfb20
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x4d3eb
movl $0x0, 0x258(%rsp)
movq 0x38(%rsp), %rdi
movl 0x258(%rsp), %eax
movq %rax, 0x28(%rsp)
addq $0x418, %rdi            # imm = 0x418
movl 0x25c(%rsp), %eax
movl %eax, %esi
callq 0xef70
movq %rax, %rdi
callq 0x11020
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x4d3bd
movq 0x38(%rsp), %rdi
addq $0x418, %rdi            # imm = 0x418
movl 0x25c(%rsp), %eax
movl %eax, %esi
callq 0xef70
movq %rax, %rdi
movl 0x258(%rsp), %eax
movl %eax, %esi
callq 0xef90
movl (%rax), %esi
leaq 0x260(%rsp), %rdi
callq 0x5680
movq %rax, 0x20(%rsp)
jmp 0x4d379
movq 0x20(%rsp), %rdi
leaq 0x23cbd(%rip), %rsi     # 0x71042
callq 0x5380
jmp 0x4d38c
jmp 0x4d38e
movl 0x258(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x258(%rsp)
jmp 0x4d2f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
jmp 0x4d54f
movq 0x45bf4(%rip), %rsi     # 0x92fb8
leaq 0x260(%rsp), %rdi
callq 0x53d0
jmp 0x4d3d3
jmp 0x4d3d5
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
jmp 0x4d2c0
leaq 0x260(%rsp), %rdi
callq 0x5550
jmp 0x4d3fa
leaq 0x242f0(%rip), %rsi     # 0x716f1
leaq 0x48(%rsp), %rdi
movl $0x10, %edx
callq 0x53f0
jmp 0x4d412
movl $0x0, 0x44(%rsp)
movq 0x38(%rsp), %rdi
movl 0x44(%rsp), %eax
movq %rax, 0x18(%rsp)
addq $0x400, %rdi            # imm = 0x400
callq 0xfb20
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x4d524
movl $0x0, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movl 0x40(%rsp), %eax
movq %rax, 0x10(%rsp)
addq $0x400, %rdi            # imm = 0x400
movl 0x44(%rsp), %eax
movl %eax, %esi
callq 0xef70
movq %rax, %rdi
callq 0x11020
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x4d4ff
movq 0x38(%rsp), %rdi
addq $0x400, %rdi            # imm = 0x400
movl 0x44(%rsp), %eax
movl %eax, %esi
callq 0xef70
movq %rax, %rdi
movl 0x40(%rsp), %eax
movl %eax, %esi
callq 0xef90
movl (%rax), %esi
leaq 0x48(%rsp), %rdi
callq 0x5680
movq %rax, 0x8(%rsp)
jmp 0x4d4ba
movq 0x8(%rsp), %rdi
leaq 0x23b7c(%rip), %rsi     # 0x71042
callq 0x5380
jmp 0x4d4cd
jmp 0x4d4cf
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x4d44d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5770
jmp 0x4d54f
movq 0x45ab2(%rip), %rsi     # 0x92fb8
leaq 0x48(%rsp), %rdi
callq 0x53d0
jmp 0x4d512
jmp 0x4d514
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x4d41a
leaq 0x48(%rsp), %rdi
callq 0x5550
jmp 0x4d530
leaq 0x48(%rsp), %rdi
callq 0x5770
leaq 0x260(%rsp), %rdi
callq 0x5770
addq $0x468, %rsp            # imm = 0x468
retq
leaq 0x260(%rsp), %rdi
callq 0x5770
movq 0x250(%rsp), %rdi
callq 0x5690
nopl (%rax)