// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Hierarchy.cc
// Function: Hierarchy::printResults(std::ostream&)
void
Hierarchy::printResults(ostream& out)
{
//	out << "***************" << endl;
	for(unsigned j = 0 ; j < m_private_caches.size() ; j++)
	{
//		out << "Core n°" << j << endl;		
		m_private_caches[j]->printResults(out);
	}
//	out << "***************" << endl;
//	out << "Last Level Cache : " << endl;
	m_LLC->printResults(out);
	out << "***************" << endl;

	out << "Prefetcher:Stats" << endl;
	out << "Prefetcher:issuedPrefetch\t"<< stats_issuedPrefetchs << endl;
	out << "Prefetcher:hitPrefecth\t"<< stats_hitsPrefetch << endl;
	out << "Prefetcher:prefetchErrors\t"<< stats_issuedPrefetchs - stats_hitsPrefetch << endl;


//	out << "MainMem" << endl;
	out << "MainMem:ReadFetch\t" << stats_readMainMem << endl;
	out << "MainMem:WriteFetch\t" << stats_writeMainMem << endl;
	out << "MainMem:CleanWB\t" << stats_cleanWB_MainMem << endl;
	out << "MainMem:DirtyWB\t" << stats_dirtyWB_MainMem << endl;
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x16ab8
movl $0x1, %ebp
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x1ec62
movl %ebp, %ecx
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x16a95
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x1ec62
leaq 0x1f4bb(%rip), %rsi     # 0x35f86
movl $0xf, %edx
movq %rbx, %rdi
callq 0x5360
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x52c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5200
leaq 0x1e86c(%rip), %rsi     # 0x35372
movl $0x10, %edx
movq %rbx, %rdi
callq 0x5360
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x52c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5200
leaq 0x1e842(%rip), %rsi     # 0x35383
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x5360
movq 0x90(%r14), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e810(%rip), %rsi     # 0x3539e
movl $0x17, %edx
movq %rbx, %rdi
callq 0x5360
movq 0x98(%r14), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e7db(%rip), %rsi     # 0x353b6
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x5360
movq 0x90(%r14), %rsi
subq 0x98(%r14), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e7a2(%rip), %rsi     # 0x353d1
movl $0x12, %edx
movq %rbx, %rdi
callq 0x5360
movq 0x80(%r14), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e768(%rip), %rsi     # 0x353e4
movl $0x13, %edx
movq %rbx, %rdi
callq 0x5360
movq 0x88(%r14), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e72f(%rip), %rsi     # 0x353f8
movl $0x10, %edx
movq %rbx, %rdi
callq 0x5360
movq 0x70(%r14), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e6f6(%rip), %rsi     # 0x35409
movl $0x10, %edx
movq %rbx, %rdi
callq 0x5360
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x52c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5200