// File: /workspace/github_cpp_makefile_star2_O3/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 0x1965f(%rip), %rax     # 0x45f50
cmpb $0x1, (%rax)
jne 0x2d14a
movq %rdi, %r13
leaq 0x7edc(%rip), %rax      # 0x347e0
leaq 0x7ede(%rip), %rsi      # 0x347e9
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 0xcc6c
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x839d(%rip), %rsi      # 0x34ce8
leaq 0x8397(%rip), %rdx      # 0x34ce9
leaq 0x70(%rsp), %rdi
callq 0xcc6c
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x837c(%rip), %rsi      # 0x34ce8
leaq 0x8376(%rip), %rdx      # 0x34ce9
leaq 0x50(%rsp), %rdi
callq 0xcc6c
movq 0x278(%r13), %rax
subq 0x270(%r13), %rax
xorl %r14d, %r14d
cmpq $0x8, %rax
jne 0x2c99b
xorl %eax, %eax
jmp 0x2cc80
leaq 0xc0(%rsp), %r12
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 0xcbd6
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 0x159f0
movl %eax, %ebp
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2ca0b
callq 0x52b0
movq %r13, %r12
movq 0x270(%r13), %rax
movq (%rax,%r14,8), %rdi
movl %ebp, %esi
callq 0x2a034
movl %eax, %r13d
movl %eax, %r15d
negl %r15d
cmovsl %eax, %r15d
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0x2ca7a
movl $0x4, %ebx
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x2ca73
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x2ca78
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x2ca7a
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x2ca45
addl $-0x3, %ebx
jmp 0x2ca7a
addl $-0x2, %ebx
jmp 0x2ca7a
decl %ebx
movq %r14, 0x48(%rsp)
shrl $0x1f, %r13d
leal (%rbx,%r13), %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x2d, %edx
callq 0x5380
movl %r13d, %edi
addq 0x28(%rsp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0xcb17
movq %r14, %rdi
leaq 0x7cd1(%rip), %rsi      # 0x34790
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 0x2caed
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2caf4
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 0x70(%rsp), %rdi
callq 0x5100
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2cb32
callq 0x52b0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2cb41
callq 0x52b0
movl %ebp, %r15d
negl %r15d
cmovsl %ebp, %r15d
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0x2cb98
movl $0x4, %ebx
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x2cb91
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x2cb96
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x2cb98
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x2cb63
addl $-0x3, %ebx
jmp 0x2cb98
addl $-0x2, %ebx
jmp 0x2cb98
decl %ebx
shrl $0x1f, %ebp
leal (%rbx,%rbp), %esi
movq %r12, 0x28(%rsp)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x2d, %edx
callq 0x5380
movl %ebp, %edi
addq 0x28(%rsp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0xcb17
movq %r14, %rdi
leaq 0x7bc0(%rip), %rsi      # 0x34790
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 0x48(%rsp), %r14
je 0x2cc08
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2cc0f
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 0x50(%rsp), %rdi
callq 0x5100
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2cc48
callq 0x52b0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2cc57
callq 0x52b0
movq 0x278(%r13), %rax
subq 0x270(%r13), %rax
incl %r14d
sarq $0x3, %rax
decq %rax
cmpq %r14, %rax
leaq 0xc0(%rsp), %r12
ja 0x2c9ab
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 0xcbd6
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 0x159f0
movl %eax, %r15d
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0x2cceb
callq 0x52b0
movq %r13, 0x48(%rsp)
movq 0x278(%r13), %rax
movq -0x8(%rax), %rdi
movl %r15d, %esi
callq 0x2a034
movl %eax, %r12d
movl %eax, %ebp
negl %ebp
cmovsl %eax, %ebp
movl $0x1, %r13d
cmpl $0xa, %ebp
jb 0x2cd61
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x2cd58
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2cd5e
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2cd61
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2cd25
addl $-0x3, %r13d
jmp 0x2cd61
addl $-0x2, %r13d
jmp 0x2cd61
decl %r13d
shrl $0x1f, %r12d
leal (%r12,%r13), %esi
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x5380
movl %r12d, %edi
leaq 0x28(%rsp), %rbx
addq (%rbx), %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0xcb17
leaq 0xa1ac(%rip), %rsi      # 0x36f49
movq %rbx, %rdi
callq 0x55f0
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2cdcb
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2cdd3
movups (%rcx), %xmm0
movups %xmm0, (%r13)
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 0x70(%rsp), %rdi
callq 0x5100
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2ce0c
callq 0x52b0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x2ce1b
callq 0x52b0
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x2ce78
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x2ce6f
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2ce75
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2ce78
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2ce3c
addl $-0x3, %r12d
jmp 0x2ce78
addl $-0x2, %r12d
jmp 0x2ce78
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x28(%rsp), %rdi
movq %r14, (%rdi)
movl $0x2d, %edx
callq 0x5380
movl %r15d, %edi
leaq 0x28(%rsp), %rbx
addq (%rbx), %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xcb17
leaq 0xa09b(%rip), %rsi      # 0x36f49
movq %rbx, %rdi
callq 0x55f0
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2ced7
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2cedf
movups (%rcx), %xmm0
movups %xmm0, (%r13)
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 0x50(%rsp), %rdi
callq 0x5100
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2cf18
callq 0x52b0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
movq 0x48(%rsp), %rbx
je 0x2cf2c
callq 0x52b0
movq 0x288(%rbx), %rbx
leaq 0xe8(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %rdi
callq 0xcbd6
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 0x159f0
movl %eax, %ebx
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2cf8c
callq 0x52b0
leaq 0x18d7d(%rip), %rdi     # 0x45d10
leaq 0x9fd2(%rip), %rsi      # 0x36f6c
movl $0x14, %edx
callq 0x5360
leaq 0x18d65(%rip), %rdi     # 0x45d10
movl %ebx, %esi
callq 0x5580
movq %rax, %rbx
leaq 0x9fc5(%rip), %rsi      # 0x36f81
movl $0x7, %edx
movq %rax, %rdi
callq 0x5360
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 0x51f0
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 0x9f48(%rip), %rsi      # 0x36f56
movl $0xa, %edx
movq %rbx, %rdi
callq 0x5360
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %rbx
leaq 0x9f28(%rip), %rsi      # 0x36f61
movl $0xa, %edx
movq %rax, %rdi
callq 0x5360
movq 0x20(%rsp), %rax
movq 0x140(%rax), %rsi
movq %rbx, %rdi
callq 0x51f0
movq %rax, %rbx
leaq 0x71a9(%rip), %rsi      # 0x3420d
movl $0xe, %edx
movq %rax, %rdi
callq 0x5360
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq %rbx, %rdi
callq 0x5360
movq %rax, %rbx
leaq 0x9ef6(%rip), %rsi      # 0x36f89
movl $0x9, %edx
movq %rax, %rdi
callq 0x5360
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x5360
movq %rax, %rbx
leaq 0x9ed9(%rip), %rsi      # 0x36f95
movl $0xb, %edx
movq %rax, %rdi
callq 0x5360
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x5360
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
callq 0x5200
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2d119
callq 0x52b0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
leaq 0xa0(%rsp), %rbx
je 0x2d138
callq 0x52b0
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2d14a
callq 0x52b0
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 0x2d19a
jmp 0x2d172
jmp 0x2d185
jmp 0x2d1f9
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2d188
callq 0x52b0
jmp 0x2d188
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x2d19a
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
jne 0x2d1f2
jmp 0x2d1fc
jmp 0x2d1f9
movq %rax, %rbx
jmp 0x2d210
movq %rax, %rbx
jmp 0x2d227
jmp 0x2d1f9
jmp 0x2d1f9
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
jne 0x2d1f2
jmp 0x2d1fc
jmp 0x2d1f9
jmp 0x2d1f9
jmp 0x2d1cd
jmp 0x2d1d2
jmp 0x2d1f9
movq %rax, %rbx
jmp 0x2d1e3
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2d1e3
callq 0x52b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2d1fc
callq 0x52b0
jmp 0x2d1fc
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2d210
callq 0x52b0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x2d227
callq 0x52b0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x2d241
callq 0x52b0
movq %rbx, %rdi
callq 0x55a0
nop