// File: /workspace/github_cpp_makefile_star2_O1/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::reportMigration(CacheEntry*, bool, bool)
void
CerebronPredictor::reportMigration(CacheEntry* current, bool fromNVM, bool isWrite)
{
	
	if(!simu_parameters.printDebug)
		return;	

	string cl_location = fromNVM ? "from NVM" : "from SRAM";

	string des = "[" , confidence = "[", hashes = "[";	
	for(unsigned i = 0 ; i < m_features.size() ; i++)
	{
		int hash = hashing_function1( m_features_hash[i] , current->address , current->missPC);		
		confidence += to_string(m_features[i]->getConfidence(hash, true)) + " , ";
		des += string(str_allocDecision[m_features[i]->getAllocDecision(hash, isWrite)]) + " , " ;
		hashes += to_string(hash) + " , ";
		
	}
	
	int first_hash = hashing_function1( m_features_hash[0] , current->address , current->missPC);
	
	debug_file << "Migration:Dataset n°" << first_hash << ", Migration " << cl_location \
	<< " Cl 0x" << std::hex << current->address << std::dec << ", Features Hashes=" << hashes \
	<< "] , Des=" << des << "] , Confidence="  << confidence << "]" << endl;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %ecx, 0xbc(%rsp)
movq %rsi, 0xb0(%rsp)
leaq 0x3bbff(%rip), %rax     # 0x45f50
cmpb $0x1, (%rax)
jne 0xaa07
movq %rdi, %r13
leaq 0x2a4a3(%rip), %rax     # 0x34807
leaq 0x2a4a5(%rip), %rsi     # 0x34810
testb %dl, %dl
cmovneq %rax, %rsi
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
movzbl %dl, %edx
xorq $0x9, %rdx
addq %rsi, %rdx
leaq 0x90(%rsp), %rdi
callq 0xccac
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2a960(%rip), %rsi     # 0x34d08
leaq 0x2a95a(%rip), %rdx     # 0x34d09
leaq 0x70(%rsp), %rdi
callq 0xccac
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2a93f(%rip), %rsi     # 0x34d08
leaq 0x2a939(%rip), %rdx     # 0x34d09
leaq 0x50(%rsp), %rdi
callq 0xccac
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2a91b(%rip), %rsi     # 0x34d08
leaq 0x2a915(%rip), %rdx     # 0x34d09
leaq 0xc8(%rsp), %rdi
callq 0xccac
movq 0x278(%r13), %rax
cmpq 0x270(%r13), %rax
je 0xa7dc
leaq 0x20(%rsp), %r14
xorl %r12d, %r12d
leaq 0xe8(%rsp), %rbp
movq %r13, 0xc0(%rsp)
movq 0x288(%r13), %rbx
leaq (%r12,%r12,4), %r15
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%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, 0x108(%rsp)
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq %rbp, %rdi
callq 0x15bec
movl %eax, %ebp
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0xa4a0
callq 0x52a0
movq 0x270(%r13), %rax
movq (%rax,%r12,8), %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x14a94
movl %eax, %r13d
movl %eax, %r15d
negl %r15d
cmovsl %eax, %r15d
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0xa511
movl $0x4, %ebx
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0xa50a
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xa50f
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xa511
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0xa4dc
addl $-0x3, %ebx
jmp 0xa511
addl $-0x2, %ebx
jmp 0xa511
decl %ebx
shrl $0x1f, %r13d
leal (%rbx,%r13), %esi
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
movl $0x2d, %edx
callq 0x5370
movl %r13d, %edi
addq 0x30(%rsp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0xcb5d
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2a269(%rip), %rsi     # 0x347bc
callq 0x55f0
movq %r14, %r15
movq %r14, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x40(%rsp), %r13
je 0xa583
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0xa58a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x50(%rsp), %rdi
callq 0x5100
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xa5c5
callq 0x52a0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xa5d4
callq 0x52a0
movq 0xc0(%rsp), %rax
movq 0x270(%rax), %rax
movq (%rax,%r12,8), %rdi
movzbl 0xbc(%rsp), %edx
movl %ebp, %esi
callq 0x1493e
movl %eax, %eax
leaq 0x3ad91(%rip), %rcx     # 0x45390
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5140
movq %rbx, %rdi
leaq 0x2a1a2(%rip), %rsi     # 0x347bc
callq 0x55f0
movq %r15, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa642
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0xa649
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0x5100
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xa684
callq 0x52a0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xa693
callq 0x52a0
movl %ebp, %r15d
negl %r15d
cmovsl %ebp, %r15d
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0xa6ea
movl $0x4, %ebx
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0xa6e3
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xa6e8
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xa6ea
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0xa6b5
addl $-0x3, %ebx
jmp 0xa6ea
addl $-0x2, %ebx
jmp 0xa6ea
decl %ebx
movq %r12, %r13
shrl $0x1f, %ebp
leal (%rbx,%rbp), %esi
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x5370
movl %ebp, %edi
addq 0x30(%rsp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0xcb5d
movq %r12, %rdi
leaq 0x2a092(%rip), %rsi     # 0x347bc
callq 0x55f0
movq %r14, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0xe8(%rsp), %rbp
movq %r13, %r12
je 0xa75d
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0xa764
movups (%rcx), %xmm0
movups %xmm0, (%r14)
leaq 0x40(%rsp), %rbx
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0xc8(%rsp), %rdi
callq 0x5100
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0xa7a7
callq 0x52a0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa7b6
callq 0x52a0
incl %r12d
movq 0xc0(%rsp), %r13
movq 0x278(%r13), %rax
subq 0x270(%r13), %rax
sarq $0x3, %rax
cmpq %r12, %rax
ja 0xa42d
movq 0x288(%r13), %rbx
leaq 0x120(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x110(%rsp), %rdi
leaq 0xa0(%rsp), %r15
leaq 0x80(%rsp), %r12
callq 0xcc1c
movq 0x20(%rbx), %rax
leaq 0x110(%rsp), %rdi
movq %rax, 0x20(%rdi)
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x15bec
movl %eax, %ebx
movq 0x110(%rsp), %rdi
cmpq %r14, %rdi
je 0xa84f
callq 0x52a0
leaq 0x3ac0a(%rip), %rdi     # 0x45460
leaq 0x29fbd(%rip), %rsi     # 0x3481a
movl $0x15, %edx
callq 0x5350
leaq 0x3abf2(%rip), %rdi     # 0x45460
movl %ebx, %esi
callq 0x5580
movq %rax, %rbx
leaq 0x2a357(%rip), %rsi     # 0x34bd6
movl $0xc, %edx
movq %rax, %rdi
callq 0x5350
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq %rbx, %rdi
callq 0x5350
movq %rax, %rbx
leaq 0x2a28c(%rip), %rsi     # 0x34b3a
movl $0x6, %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 0xb0(%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 0x29ea5(%rip), %rsi     # 0x347a8
movl $0x12, %edx
movq %rbx, %rdi
callq 0x5350
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movq %rbx, %rdi
callq 0x5350
movq %rax, %rbx
leaq 0x29efe(%rip), %rsi     # 0x34830
movl $0x8, %edx
movq %rax, %rdi
callq 0x5350
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x5350
movq %rax, %rbx
leaq 0x29e65(%rip), %rsi     # 0x347c0
movl $0xf, %edx
movq %rax, %rdi
callq 0x5350
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x5350
movq %rax, %rbx
leaq 0x2c5ce(%rip), %rsi     # 0x36f52
movl $0x1, %edx
movq %rax, %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
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0xa9d2
callq 0x52a0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xa9e6
callq 0x52a0
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0xa9f5
callq 0x52a0
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0xaa07
callq 0x52a0
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r14, %rdi
jne 0xaabc
jmp 0xaac6
movq %rax, %rbx
leaq 0xa0(%rsp), %r15
leaq 0x80(%rsp), %r12
leaq 0x60(%rsp), %r14
jmp 0xaaf5
movq %rax, %rbx
jmp 0xab04
movq %rax, %rbx
jmp 0xab13
movq %rax, %rbx
jmp 0xaad6
jmp 0xaac3
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
jmp 0xaab7
jmp 0xaa96
jmp 0xaa85
jmp 0xaac3
jmp 0xaac3
jmp 0xaa96
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
jne 0xaaa8
jmp 0xaaad
jmp 0xaac3
movq %rax, %rbx
jmp 0xaaad
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0xaaad
callq 0x52a0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xaac6
callq 0x52a0
jmp 0xaac6
movq %rax, %rbx
leaq 0xa0(%rsp), %r15
leaq 0x80(%rsp), %r12
leaq 0x60(%rsp), %r14
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0xaaf5
callq 0x52a0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0xab04
callq 0x52a0
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0xab13
callq 0x52a0
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0xab25
callq 0x52a0
movq %rbx, %rdi
callq 0x55a0
nop