// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/HybridCache.cc
// Function: HybridCache::initializeLearningCl(CacheEntry*)
void
HybridCache::initializeLearningCl(CacheEntry* entry)
{

	if(m_policy == "Perceptron")
	{
		entry->perceptron_BPpred = vector<int>(simu_parameters.perceptron_BP_features.size() , 0);
		entry->perceptron_BPHash = vector<int>(simu_parameters.perceptron_BP_features.size() , 0);
		entry->predictedReused = vector<bool>(simu_parameters.perceptron_BP_features.size() , false);

		entry->perceptron_Allocpred = vector<int>(simu_parameters.perceptron_Allocation_features.size() , 0);
		entry->perceptron_AllocHash = vector<int>(simu_parameters.perceptron_Allocation_features.size() , 0);	
	}

	if(m_policy == "PHC" || m_policy == "Cerebron")
	{
		entry->PHC_allocation_pred = vector< pair<int,allocDecision> >(simu_parameters.PHC_features.size()\
			 , pair<int,allocDecision>(0, ALLOCATE_IN_SRAM) );
	}
	
	if( m_policy == "SimplePerceptron")
	{
		entry->simple_perceptron_pred =  vector<allocDecision>(simu_parameters.simple_perceptron_features.size() , ALLOCATE_IN_NVM);
		entry->simple_perceptron_hash = vector<int>(simu_parameters.simple_perceptron_features.size() , 0);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x70, %r14
leaq 0x15d2a(%rip), %rsi     # 0x2a7d6
movq %r14, %rdi
callq 0x9f59
testb %al, %al
je 0x14c1d
leaq 0x2948d(%rip), %r13     # 0x3df50
movq 0x188(%r13), %rsi
subq 0x180(%r13), %rsi
sarq $0x5, %rsi
leaq 0x10(%rsp), %r15
andl $0x0, (%r15)
leaq 0x18(%rsp), %r12
leaq 0xf(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rdx
callq 0x9c8a
leaq 0x48(%rbx), %rdi
movq %r12, %rsi
callq 0xa52e
movq %r12, %rdi
callq 0xa49a
movq 0x188(%r13), %rsi
subq 0x180(%r13), %rsi
sarq $0x5, %rsi
andl $0x0, (%r15)
leaq 0x18(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x9c8a
leaq 0x78(%rbx), %rdi
movq %r15, %rsi
callq 0xa52e
movq %r15, %rdi
callq 0xa49a
movq 0x188(%r13), %rsi
subq 0x180(%r13), %rsi
sarq $0x5, %rsi
movb $0x0, (%r12)
leaq 0x18(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x174e0
leaq 0xa8(%rbx), %rdi
movq %r15, %rsi
callq 0x17544
movq %r15, %rdi
callq 0xe9b4
movq 0x1a0(%r13), %rsi
subq 0x198(%r13), %rsi
sarq $0x5, %rsi
andl $0x0, (%r12)
leaq 0x18(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x9c8a
leaq 0x60(%rbx), %rdi
movq %r15, %rsi
callq 0xa52e
movq %r15, %rdi
callq 0xa49a
movq 0x1a0(%r13), %rsi
subq 0x198(%r13), %rsi
sarq $0x5, %rsi
andl $0x0, (%r12)
leaq 0x18(%rsp), %r15
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
callq 0x9c8a
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0xa52e
movq %r15, %rdi
callq 0xa49a
leaq 0x15b9f(%rip), %rsi     # 0x2a7c3
movq %r14, %rdi
callq 0x9f59
testb %al, %al
jne 0x14c43
leaq 0x15b90(%rip), %rsi     # 0x2a7c7
movq %r14, %rdi
callq 0x9f59
testb %al, %al
je 0x14c8e
leaq 0x29306(%rip), %rax     # 0x3df50
movq 0x1d8(%rax), %rsi
subq 0x1d0(%rax), %rsi
sarq $0x5, %rsi
leaq 0x10(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x18(%rsp), %r15
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
callq 0x17596
leaq 0xd0(%rbx), %rdi
movq %r15, %rsi
callq 0x17f62
movq %r15, %rdi
callq 0x17a3e
leaq 0x15b3b(%rip), %rsi     # 0x2a7d0
movq %r14, %rdi
callq 0x9f59
testb %al, %al
je 0x14d41
leaq 0x292a4(%rip), %r12     # 0x3df50
movq 0x238(%r12), %rsi
subq 0x230(%r12), %rsi
sarq $0x5, %rsi
leaq 0x10(%rsp), %r14
movl $0x1, (%r14)
leaq 0x18(%rsp), %r15
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rdx
callq 0x175ec
leaq 0xe8(%rbx), %rdi
movq %r15, %rsi
callq 0x1806a
movq %r15, %rdi
callq 0xea6a
movq 0x238(%r12), %rsi
subq 0x230(%r12), %rsi
sarq $0x5, %rsi
andl $0x0, (%r14)
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
movq %r14, %rdi
callq 0x9c8a
addq $0x100, %rbx            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa52e
movq %r14, %rdi
callq 0xa49a
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop