// File: /workspace/github_cpp_makefile_star2_O1/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 0x16d6c
movl $0x1, %ebp
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x1ed98
movl %ebp, %ecx
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x16d49
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x1ed98
leaq 0x1f20f(%rip), %rsi     # 0x35f8e
movl $0xf, %edx
movq %rbx, %rdi
callq 0x5350
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51f0
leaq 0x1e5e8(%rip), %rsi     # 0x353a2
movl $0x10, %edx
movq %rbx, %rdi
callq 0x5350
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x51f0
leaq 0x1e5be(%rip), %rsi     # 0x353b3
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x5350
movq 0x90(%r14), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e58c(%rip), %rsi     # 0x353ce
movl $0x17, %edx
movq %rbx, %rdi
callq 0x5350
movq 0x98(%r14), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e557(%rip), %rsi     # 0x353e6
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x5350
movq 0x90(%r14), %rsi
subq 0x98(%r14), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e51e(%rip), %rsi     # 0x35401
movl $0x12, %edx
movq %rbx, %rdi
callq 0x5350
movq 0x80(%r14), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e4e4(%rip), %rsi     # 0x35414
movl $0x13, %edx
movq %rbx, %rdi
callq 0x5350
movq 0x88(%r14), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e4ab(%rip), %rsi     # 0x35428
movl $0x10, %edx
movq %rbx, %rdi
callq 0x5350
movq 0x70(%r14), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %r15
movq (%rax), %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
leaq 0x1e472(%rip), %rsi     # 0x35439
movl $0x10, %edx
movq %rbx, %rdi
callq 0x5350
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x51f0