// File: /workspace/github_cpp_makefile_star2_O1/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::reportEviction(CacheEntry*, bool)
void
SimplePerceptronPredictor::reportEviction(CacheEntry* entry, bool inNVM)
{
	if(!simu_parameters.printDebug)
		return;
		
	string cl_location = inNVM ? "NVM" : "SRAM";
	string counters = "[";
	string hashes = "[";	
	
	for(unsigned i = 0 ; i < m_features.size()-1; i++)
	{
		int hash = hashing_function1( m_features_hash[i] , entry->address , entry->missPC);		
		int counter = m_features[i]->getCounter(hash);
		counters += to_string(counter) + " , ";
		hashes += to_string(hash) + " , ";
	}
	
	int hash = hashing_function1( m_features_hash[m_features.size()-1] , entry->address , entry->missPC);		
	counters += to_string(m_features[m_features.size()-1]->getCounter(hash)) + " ]";
	hashes	+= to_string(hash) + " ]";
	int first_hash = hashing_function1( m_features_hash[0] , entry->address , entry->missPC);

	debug_file_simple_perceptron << "EVICTION:Dataset n°" << first_hash << ": Cl 0x" << std::hex << entry->address \
	<< std::dec << ", E_SRAM =" << entry->e_sram << " , E_NVM =" << entry->e_nvm << " allocated in " << cl_location << ", Hashes=" << hashes \
        << ", Counters=" << counters << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, 0x20(%rsp)
leaq 0x192cd(%rip), %rax     # 0x45f50
cmpb $0x1, (%rax)
jne 0x2d4cc
movq %rdi, %r13
leaq 0x7b76(%rip), %rax      # 0x3480c
leaq 0x7b78(%rip), %rsi      # 0x34815
testb %dl, %dl
cmovneq %rax, %rsi
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
movzbl %dl, %eax
negq %rax
leaq (%rsi,%rax), %rdx
addq $0x4, %rdx
leaq 0x90(%rsp), %rdi
callq 0xccac
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x802e(%rip), %rsi      # 0x34d08
leaq 0x8028(%rip), %rdx      # 0x34d09
leaq 0x68(%rsp), %rdi
callq 0xccac
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x800d(%rip), %rsi      # 0x34d08
leaq 0x8007(%rip), %rdx      # 0x34d09
leaq 0x48(%rsp), %rdi
callq 0xccac
movq 0x278(%r13), %rax
subq 0x270(%r13), %rax
sarq $0x3, %rax
decq %rax
je 0x2d018
leaq 0xc0(%rsp), %r12
xorl %r14d, %r14d
leaq 0xb0(%rsp), %rbp
movq 0x288(%r13), %rbx
leaq (%r14,%r14,4), %r15
movq %r12, 0xb0(%rsp)
movq (%rbx,%r15,8), %rsi
movq 0x8(%rbx,%r15,8), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xcc1c
leaq (%rbx,%r15,8), %rax
movq 0x20(%rax), %rax
movq %rax, 0xd0(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq %rbp, %rdi
callq 0x15bec
movl %eax, %ebp
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2cd9a
callq 0x52a0
movq %r13, %r12
movq 0x270(%r13), %rax
movq (%rax,%r14,8), %rdi
movl %ebp, %esi
callq 0x2a38a
movl %eax, %r15d
movl %eax, %ebx
negl %ebx
cmovsl %eax, %ebx
movl $0x1, %r13d
cmpl $0xa, %ebx
jb 0x2ce0a
movl $0x4, %r13d
movl %ebx, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x2ce01
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x2ce07
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x2ce0a
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r13d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x2cdd1
addl $-0x3, %r13d
jmp 0x2ce0a
addl $-0x2, %r13d
jmp 0x2ce0a
decl %r13d
movq %r14, 0x88(%rsp)
shrl $0x1f, %r15d
leal (%r15,%r13), %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x2d, %edx
callq 0x5370
movl %r15d, %edi
addq 0x28(%rsp), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0xcb5d
movq %r14, %rdi
leaq 0x796a(%rip), %rsi      # 0x347bc
callq 0x55f0
leaq 0x10(%rsp), %r15
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %r12, %r13
je 0x2ce80
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2ce87
movups (%rcx), %xmm0
movups %xmm0, (%r15)
leaq 0x38(%rsp), %r12
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x5100
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2cec5
callq 0x52a0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2ced4
callq 0x52a0
movl %ebp, %ebx
negl %ebx
cmovsl %ebp, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x2cf2c
movl $0x4, %r15d
movl %ebx, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x2cf23
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x2cf29
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x2cf2c
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x2cef3
addl $-0x3, %r15d
jmp 0x2cf2c
addl $-0x2, %r15d
jmp 0x2cf2c
decl %r15d
shrl $0x1f, %ebp
leal (%r15,%rbp), %esi
movq %r12, 0x28(%rsp)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x2d, %edx
callq 0x5370
movl %ebp, %edi
addq 0x28(%rsp), %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0xcb5d
movq %r14, %rdi
leaq 0x7857(%rip), %rsi      # 0x347bc
callq 0x55f0
leaq 0x10(%rsp), %r15
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0xb0(%rsp), %rbp
movq 0x88(%rsp), %r14
je 0x2cfa0
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2cfa7
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x5100
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2cfe0
callq 0x52a0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2cfef
callq 0x52a0
movq 0x278(%r13), %rax
subq 0x270(%r13), %rax
incl %r14d
sarq $0x3, %rax
decq %rax
cmpq %r14, %rax
leaq 0xc0(%rsp), %r12
ja 0x2cd3a
movq 0x288(%r13), %rbx
leaq (%rax,%rax,4), %r15
leaq 0x110(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx,%r15,8), %rsi
movq 0x8(%rbx,%r15,8), %rdx
addq %rsi, %rdx
leaq 0x100(%rsp), %rdi
callq 0xcc1c
leaq (%rbx,%r15,8), %rax
movq 0x20(%rax), %rax
leaq 0x100(%rsp), %rdi
movq %rax, 0x20(%rdi)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x15bec
movl %eax, %r15d
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0x2d083
callq 0x52a0
movq 0x278(%r13), %rax
movq -0x8(%rax), %rdi
movl %r15d, %esi
callq 0x2a38a
movl %eax, %ebx
movl %eax, %ebp
negl %ebp
cmovsl %eax, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x2d0f3
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x2d0ea
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2d0f0
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2d0f3
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2d0b7
addl $-0x3, %r12d
jmp 0x2d0f3
addl $-0x2, %r12d
jmp 0x2d0f3
decl %r12d
shrl $0x1f, %ebx
leal (%r12,%rbx), %esi
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x5370
movl %ebx, %edi
leaq 0x28(%rsp), %rbx
addq (%rbx), %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xcb5d
leaq 0x9e24(%rip), %rsi      # 0x36f51
movq %rbx, %rdi
callq 0x55f0
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2d15c
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2d164
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x5100
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2d19d
callq 0x52a0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x2d1ac
callq 0x52a0
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %ebx
cmpl $0xa, %ebp
jb 0x2d203
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x2d1fc
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2d201
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2d203
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2d1cb
addl $-0x3, %ebx
jmp 0x2d203
addl $-0x2, %ebx
jmp 0x2d203
decl %ebx
shrl $0x1f, %r15d
leal (%rbx,%r15), %esi
leaq 0x28(%rsp), %rdi
movq %r14, (%rdi)
movl $0x2d, %edx
callq 0x5370
movl %r15d, %edi
leaq 0x28(%rsp), %r15
addq (%r15), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0xcb5d
leaq 0x9d19(%rip), %rsi      # 0x36f51
movq %r15, %rdi
callq 0x55f0
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2d261
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2d269
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x5100
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2d2a2
callq 0x52a0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x2d2b1
callq 0x52a0
movq 0x288(%r13), %rbx
leaq 0xe8(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %rdi
callq 0xcc1c
movq 0x20(%rbx), %rax
leaq 0xd8(%rsp), %rdi
movq %rax, 0x20(%rdi)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x15bec
movl %eax, %ebx
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2d311
callq 0x52a0
leaq 0x189f8(%rip), %rdi     # 0x45d10
leaq 0x9c55(%rip), %rsi      # 0x36f74
movl $0x14, %edx
callq 0x5350
leaq 0x189e0(%rip), %rdi     # 0x45d10
movl %ebx, %esi
callq 0x5580
movq %rax, %rbx
leaq 0x9c48(%rip), %rsi      # 0x36f89
movl $0x7, %edx
movq %rax, %rdi
callq 0x5350
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0x9bcb(%rip), %rsi      # 0x36f5e
movl $0xa, %edx
movq %rbx, %rdi
callq 0x5350
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %rbx
leaq 0x9bab(%rip), %rsi      # 0x36f69
movl $0xa, %edx
movq %rax, %rdi
callq 0x5350
movq 0x20(%rsp), %rax
movq 0x140(%rax), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rax, %rbx
leaq 0x6e50(%rip), %rsi      # 0x34239
movl $0xe, %edx
movq %rax, %rdi
callq 0x5350
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq %rbx, %rdi
callq 0x5350
movq %rax, %rbx
leaq 0x9b79(%rip), %rsi      # 0x36f91
movl $0x9, %edx
movq %rax, %rdi
callq 0x5350
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %rbx, %rdi
callq 0x5350
movq %rax, %rbx
leaq 0x9b5c(%rip), %rsi      # 0x36f9d
movl $0xb, %edx
movq %rax, %rdi
callq 0x5350
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq %rbx, %rdi
callq 0x5350
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
callq 0x51f0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2d49e
callq 0x52a0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x2d4b2
callq 0x52a0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x2d4cc
callq 0x52a0
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
jmp 0x2d519
jmp 0x2d4f1
jmp 0x2d504
jmp 0x2d54c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2d507
callq 0x52a0
jmp 0x2d507
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x2d519
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
jne 0x2d576
jmp 0x2d57b
jmp 0x2d54c
movq %rax, %rbx
jmp 0x2d58f
movq %rax, %rbx
jmp 0x2d5a3
jmp 0x2d54c
jmp 0x2d54c
jmp 0x2d54c
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
jne 0x2d576
jmp 0x2d57b
jmp 0x2d54c
jmp 0x2d54c
jmp 0x2d551
jmp 0x2d556
movq %rax, %rbx
jmp 0x2d57b
movq %rax, %rbx
jmp 0x2d567
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2d567
callq 0x52a0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2d57b
callq 0x52a0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2d58f
callq 0x52a0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x2d5a3
callq 0x52a0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x2d5bd
callq 0x52a0
movq %rbx, %rdi
callq 0x55a0
nop