// File: gvaumour[P]cache-simulator/src/DBAMBPredictor.cc
// Function: DBAMBPredictor::reportMigration(DHPEntry*, CacheEntry*, bool)
void
DBAMBPredictor::reportMigration(DHPEntry* rap_current, CacheEntry* current, bool fromNVM)
{
	string cl_location = fromNVM ? "from NVM" : "from SRAM";
	
	if(simu_parameters.printDebug)
	{
		dataset_file << "Migration:Dataset n°" << rap_current->id << ": [" << \
		str_RW_status[rap_current->state_rw] << ","  << str_RD_status[rap_current->state_rd] << "], Migration " << cl_location << \
		" Cl 0x" << std::hex << current->address << std::dec << " allocated in " << cl_location << endl;	
	}
	
}

// Assembly:
subq $0xd8, %rsp
movb %cl, %al
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
andb $0x1, %al
movb %al, 0xbf(%rsp)
movb 0xbf(%rsp), %dl
leaq 0x53d16(%rip), %rcx     # 0x7181e
leaq 0x53d18(%rip), %rax     # 0x71827
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x70(%rsp)
leaq 0x97(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x56a0
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0x98(%rsp), %rdi
callq 0x5530
jmp 0x1db46
leaq 0x97(%rsp), %rdi
callq 0x53e0
leaq 0x76496(%rip), %rax     # 0x93ff0
testb $0x1, (%rax)
je 0x1dd41
leaq 0x75b9e(%rip), %rdi     # 0x93708
leaq 0x53cc0(%rip), %rsi     # 0x71831
callq 0x5380
movq %rax, 0x68(%rsp)
jmp 0x1db7d
movq 0x68(%rsp), %rdi
movq 0xc8(%rsp), %rax
movl 0x18(%rax), %esi
callq 0x5680
movq %rax, 0x60(%rsp)
jmp 0x1db99
movq 0x60(%rsp), %rdi
leaq 0x53f88(%rip), %rsi     # 0x71b2d
callq 0x5380
movq %rax, 0x58(%rsp)
jmp 0x1dbb1
movq 0x58(%rsp), %rdi
movq 0xc8(%rsp), %rax
movl 0x98(%rax), %eax
movl %eax, %ecx
leaq 0x758d3(%rip), %rax     # 0x934a0
movq (%rax,%rcx,8), %rsi
callq 0x5380
movq %rax, 0x50(%rsp)
jmp 0x1dbdd
movq 0x50(%rsp), %rdi
leaq 0x53459(%rip), %rsi     # 0x71042
callq 0x5380
movq %rax, 0x48(%rsp)
jmp 0x1dbf5
movq 0x48(%rsp), %rdi
movq 0xc8(%rsp), %rax
movl 0x9c(%rax), %eax
movl %eax, %ecx
leaq 0x758bf(%rip), %rax     # 0x934d0
movq (%rax,%rcx,8), %rsi
callq 0x5380
movq %rax, 0x40(%rsp)
jmp 0x1dc21
movq 0x40(%rsp), %rdi
leaq 0x53f78(%rip), %rsi     # 0x71ba5
callq 0x5380
movq %rax, 0x38(%rsp)
jmp 0x1dc39
movq 0x38(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x5330
movq %rax, 0x30(%rsp)
jmp 0x1dc52
movq 0x30(%rsp), %rdi
leaq 0x53eac(%rip), %rsi     # 0x71b0a
callq 0x5380
movq %rax, 0x28(%rsp)
jmp 0x1dc6a
movq 0x28(%rsp), %rdi
leaq -0xe476(%rip), %rsi     # 0xf800
callq 0x5160
movq %rax, 0x20(%rsp)
jmp 0x1dc82
movq 0x20(%rsp), %rdi
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x50f0
movq %rax, 0x18(%rsp)
jmp 0x1dc9f
movq 0x18(%rsp), %rdi
leaq -0xe48b(%rip), %rsi     # 0xf820
callq 0x5160
movq %rax, 0x10(%rsp)
jmp 0x1dcb7
movq 0x10(%rsp), %rdi
leaq 0x53576(%rip), %rsi     # 0x71239
callq 0x5380
movq %rax, 0x8(%rsp)
jmp 0x1dccf
movq 0x8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x5330
movq %rax, (%rsp)
jmp 0x1dce7
movq (%rsp), %rdi
movq 0x752c6(%rip), %rsi     # 0x92fb8
callq 0x53d0
jmp 0x1dcf9
jmp 0x1dd41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x97(%rsp), %rdi
callq 0x53e0
jmp 0x1dd56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x5768
jmp 0x1dd56
leaq 0x98(%rsp), %rdi
callq 0x5768
addq $0xd8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x5690
nopw %cs:(%rax,%rax)