// File: gvaumour[P]cache-simulator/src/DBAMBPredictor.cc
// Function: DBAMBPredictor::reportSpilling(DHPEntry*, unsigned long, bool, bool)
void 
DBAMBPredictor::reportSpilling(DHPEntry* rap_current, uint64_t addr, bool isAlloc,  bool inNVM)
{
	string cl_location = inNVM ? "NVM" : "SRAM";
	string a = isAlloc ? "ALLOC" : "MIGRATION";
	
	dataset_file << "SPILLING:Dataset n°" << rap_current->id << ": DEFLECT " <<  a \
		<< ", Cl 0x" << std::hex << addr << std::dec <<  " cl alloc=" \
		<< cl_location << ", Dataset alloc=" << str_allocDecision[rap_current->des] << endl;
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movb %r8b, %al
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movq %rdx, 0xf0(%rsp)
andb $0x1, %cl
movb %cl, 0xef(%rsp)
andb $0x1, %al
movb %al, 0xee(%rsp)
movb 0xee(%rsp), %dl
leaq 0x56590(%rip), %rcx     # 0x71823
leaq 0x56592(%rip), %rax     # 0x7182c
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x78(%rsp)
leaq 0xc7(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x56a0
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0xc8(%rsp), %rdi
callq 0x5530
jmp 0x1b2d7
leaq 0xc7(%rsp), %rdi
callq 0x53e0
movb 0xef(%rsp), %dl
leaq 0x567e7(%rip), %rcx     # 0x71ad9
leaq 0x567e6(%rip), %rax     # 0x71adf
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x68(%rsp)
leaq 0x8f(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x56a0
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x90(%rsp), %rdi
callq 0x5530
jmp 0x1b330
leaq 0x8f(%rsp), %rdi
callq 0x53e0
leaq 0x783c4(%rip), %rdi     # 0x93708
leaq 0x5679e(%rip), %rsi     # 0x71ae9
callq 0x5380
movq %rax, 0x60(%rsp)
jmp 0x1b357
movq 0x60(%rsp), %rdi
movq 0xf8(%rsp), %rax
movl 0x18(%rax), %esi
callq 0x5680
movq %rax, 0x58(%rsp)
jmp 0x1b373
movq 0x58(%rsp), %rdi
leaq 0x5677f(%rip), %rsi     # 0x71afe
callq 0x5380
movq %rax, 0x50(%rsp)
jmp 0x1b38b
movq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x5330
movq %rax, 0x48(%rsp)
jmp 0x1b3a4
movq 0x48(%rsp), %rdi
leaq 0x56759(%rip), %rsi     # 0x71b09
callq 0x5380
movq %rax, 0x40(%rsp)
jmp 0x1b3bc
movq 0x40(%rsp), %rdi
leaq -0xbbc8(%rip), %rsi     # 0xf800
callq 0x5160
movq %rax, 0x38(%rsp)
jmp 0x1b3d4
movq 0x38(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x50f0
movq %rax, 0x30(%rsp)
jmp 0x1b3ed
movq 0x30(%rsp), %rdi
leaq -0xbbd9(%rip), %rsi     # 0xf820
callq 0x5160
movq %rax, 0x28(%rsp)
jmp 0x1b405
movq 0x28(%rsp), %rdi
leaq 0x56700(%rip), %rsi     # 0x71b11
callq 0x5380
movq %rax, 0x20(%rsp)
jmp 0x1b41d
movq 0x20(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x5330
movq %rax, 0x18(%rsp)
jmp 0x1b436
movq 0x18(%rsp), %rdi
leaq 0x566da(%rip), %rsi     # 0x71b1c
callq 0x5380
movq %rax, 0x10(%rsp)
jmp 0x1b44e
movq 0x10(%rsp), %rdi
movq 0xf8(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, %ecx
leaq 0x77fc9(%rip), %rax     # 0x93430
movq (%rax,%rcx,8), %rsi
callq 0x5380
movq %rax, 0x8(%rsp)
jmp 0x1b477
movq 0x8(%rsp), %rdi
movq 0x77b35(%rip), %rsi     # 0x92fb8
callq 0x53d0
jmp 0x1b48a
leaq 0x90(%rsp), %rdi
callq 0x5768
leaq 0xc8(%rsp), %rdi
callq 0x5768
addq $0x108, %rsp            # imm = 0x108
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xc7(%rsp), %rdi
callq 0x53e0
jmp 0x1b520
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x8f(%rsp), %rdi
callq 0x53e0
jmp 0x1b513
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x5768
leaq 0xc8(%rsp), %rdi
callq 0x5768
movq 0xb8(%rsp), %rdi
callq 0x5690
nopl (%rax)