LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::missingTagFeaturesHash(unsigned long, int)
vector<int>
Predictor::missingTagFeaturesHash(uint64_t block_addr, int set)
{
	if( m_policy == "Cerebron")
	{
		for(unsigned i = 0 ; i < m_SRAM_missing_tags[set].size() ; i++)
		{
			if(m_SRAM_missing_tags[set][i]->addr == block_addr && m_SRAM_missing_tags[set][i]->isValid)
			{
				return m_SRAM_missing_tags[set][i]->features_hash;
			}
		}	
	}
	return vector<int>();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x40(%rsi), %rdi
leaq 0xe964(%rip), %rsi      # 0x35817
callq 0x50f0
testl %eax, %eax
je 0x26ed8
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movslq %ebp, %rax
movq 0x88(%r15), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
je 0x26ebc
sarq $0x3, %rcx
movl $0x1, %edx
xorl %esi, %esi
movq (%rax,%rsi,8), %rsi
cmpq %r14, (%rsi)
jne 0x26f0e
cmpb $0x0, 0x14(%rsi)
jne 0x26f19
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x26eff
jmp 0x26ebc
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xcdaa
jmp 0x26eca
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::hitInSRAMMissingTags(unsigned long, int)
bool 
Predictor::hitInSRAMMissingTags(uint64_t block_addr, int id_set)
{
	/* Check if the block is in the missing tag array */ 
	if(m_trackError && !m_isWarmup){
		//An error in the SRAM part is a block that miss in the SRAM array 
		//but not in the MT array
		for(unsigned i = 0 ; i < m_SRAM_missing_tags[id_set].size() ; i++)
		{
			if(m_SRAM_missing_tags[id_set][i]->addr == block_addr && m_SRAM_missing_tags[id_set][i]->isValid)
			{
				////DPRINTF("BasePredictor::checkMissingTags Found SRAM error as %#lx is present in MT tag %i \n", block_addr ,i);  
				return true;
			}
		}	
	}
	return false;
}

// Assembly:
cmpb $0x1, 0x80(%rdi)
jne 0x27153
cmpb $0x0, 0x81(%rdi)
jne 0x27153
movslq %edx, %rax
movq 0x88(%rdi), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
je 0x27153
sarq $0x3, %rcx
movl $0x1, %edx
xorl %edi, %edi
movq (%rax,%rdi,8), %rdi
cmpq %rsi, (%rdi)
jne 0x2714a
cmpb $0x0, 0x14(%rdi)
jne 0x27156
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x2713b
xorl %eax, %eax
retq
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::hitInNVMMissingTags(unsigned long, int)
bool 
Predictor::hitInNVMMissingTags(uint64_t block_addr, int id_set)
{
	/* Check if the block is in the missing tag array */ 
	if(m_trackError && !m_isWarmup){
		//An error in the NVM part is a block that miss in the NVM array 
		//but not in the MT array
		for(unsigned i = 0 ; i < m_NVM_missing_tags[id_set].size() ; i++)
		{
			if(m_NVM_missing_tags[id_set][i]->addr == block_addr && m_NVM_missing_tags[id_set][i]->isValid)
			{
				return true;
			}
		}	
	}
	return false;
}

// Assembly:
cmpb $0x1, 0x80(%rdi)
jne 0x271ab
cmpb $0x0, 0x81(%rdi)
jne 0x271ab
movslq %edx, %rax
movq 0xa0(%rdi), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
je 0x271ab
sarq $0x3, %rcx
movl $0x1, %edx
xorl %edi, %edi
movq (%rax,%rdi,8), %rdi
cmpq %rsi, (%rdi)
jne 0x271a2
cmpb $0x0, 0x14(%rdi)
jne 0x271ae
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x27193
xorl %eax, %eax
retq
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::openNewTimeFrame()
void
Predictor::openNewTimeFrame()
{
	if(m_isWarmup)
		return;
		
	//DPRINTF("BasePredictor::openNewTimeFrame New Time Frame Start\n");  
	stats_NVM_errors.push_back(0);
	stats_SRAM_errors.push_back(0);
	stats_BP_errors.push_back(0);
	stats_MigrationErrors.push_back(0);
	stats_nbLLCaccessPerFrame = 0;

}

// Assembly:
cmpb $0x0, 0x81(%rdi)
jne 0x272c4
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
movq 0x1e8(%rdi), %rsi
cmpq 0x1f0(%rdi), %rsi
je 0x271f2
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x1e8(%rbx)
jmp 0x27203
leaq 0x1e0(%rbx), %rdi
leaq 0xc(%rsp), %rdx
callq 0x124c0
movl $0x0, 0xc(%rsp)
movq 0x200(%rbx), %rsi
cmpq 0x208(%rbx), %rsi
je 0x2722e
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x200(%rbx)
jmp 0x2723f
leaq 0x1f8(%rbx), %rdi
leaq 0xc(%rsp), %rdx
callq 0x124c0
movl $0x0, 0xc(%rsp)
movq 0x218(%rbx), %rsi
cmpq 0x220(%rbx), %rsi
je 0x2726a
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x218(%rbx)
jmp 0x2727b
leaq 0x210(%rbx), %rdi
leaq 0xc(%rsp), %rdx
callq 0x124c0
movl $0x0, 0xc(%rsp)
movq 0x230(%rbx), %rsi
cmpq 0x238(%rbx), %rsi
je 0x272a6
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x230(%rbx)
jmp 0x272b7
leaq 0x228(%rbx), %rdi
leaq 0xc(%rsp), %rdx
callq 0x124c0
movq $0x0, 0x78(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::updatePolicy(unsigned long, unsigned long, bool, Access, bool)
void
Predictor::updatePolicy(uint64_t set, uint64_t index, bool inNVM, Access element , bool isWBrequest = false)
{	
	updateCachePressure();
	
	uint64_t block_addr = bitRemove(element.m_address , 0 , log2(BLOCK_SIZE));
	updateFUcaches(block_addr , inNVM);

	if(m_trackError)
	{
		CacheEntry* current = inNVM ? m_tableNVM[set][index] : m_tableSRAM[set][index];
		updateBypassTag( current , set , inNVM);
	}

	if(!m_isWarmup)
	{	
		stats_nbLLCaccessPerFrame++;
		//An error in the NVM side is when handling a write 
		if(inNVM && element.isWrite()){
			stats_NVM_errors[stats_NVM_errors.size()-1]++;

			if(isWBrequest)
				stats_WBerrors++;
			else
				stats_COREerrors++;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
callq 0x26be6
movq 0x30(%rsp), %rdi
xorl %esi, %esi
movl $0x6, %edx
callq 0x2e38e
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0x26728
cmpb $0x1, 0x80(%r14)
jne 0x27340
movzbl %bpl, %ecx
movq 0x8(%r14,%rcx,8), %rax
movq (%rax), %rax
leaq (%r15,%r15,2), %rdx
movq (%rax,%rdx,8), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x26cca
cmpb $0x0, 0x81(%r14)
jne 0x2737d
incq 0x78(%r14)
testb %bpl, %bpl
je 0x2737d
leaq 0x30(%rsp), %rax
movl 0x1c(%rax), %eax
cmpl $0x6, %eax
je 0x27365
cmpl $0x3, %eax
jne 0x2737d
movq 0x1e8(%r14), %rax
incl -0x4(%rax)
xorb $0x1, %bl
movzbl %bl, %eax
incq 0x258(%r14,%rax,8)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::printBParray(int, std::basic_ofstream<char, std::char_traits<char>>&)
void
Predictor::printBParray(int set , ofstream& out)
{
	for(unsigned i = 0 ; i < BP_missing_tags[set].size() ; i++)
	{
		if(BP_missing_tags[set][i]->isValid)
		{
			string alloc_site = BP_missing_tags[set][i]->allocSite ? "NVM" : "SRAM";
			out << "Index " << i << " - Addr = " << std::hex << BP_missing_tags[set][i]->addr \
			<< std::dec << " - Time = " << BP_missing_tags[set][i]->last_time_touched << " - Allocation = " << alloc_site << endl;		
		}
	}
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movslq %esi, %rcx
movq 0x140(%rdi), %rax
leaq (%rcx,%rcx,2), %rbp
movq (%rax,%rbp,8), %rcx
cmpq %rcx, 0x8(%rax,%rbp,8)
je 0x27543
movq %rdx, %rbx
movq %rdi, %r14
movl $0x1, %r15d
xorl %r12d, %r12d
movq (%rcx,%r12,8), %rcx
cmpb $0x1, 0x14(%rcx)
jne 0x27524
movzbl 0x16(%rcx), %eax
testq %rax, %rax
leaq 0xd40d(%rip), %rsi      # 0x347e9
leaq 0xd3fd(%rip), %rcx      # 0x347e0
cmovneq %rcx, %rsi
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq %rsi, %rdx
subq %rax, %rdx
addq $0x4, %rdx
leaq 0x8(%rsp), %rdi
callq 0xcc6c
movl $0x6, %edx
movq %rbx, %rdi
leaq 0xf42e(%rip), %rsi      # 0x36842
callq 0x5360
movq %rbx, %rdi
movq %r12, %rsi
callq 0x51f0
movq %rax, %r13
movl $0xa, %edx
movq %rax, %rdi
leaq 0xf413(%rip), %rsi      # 0x36849
callq 0x5360
movq (%r13), %rax
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0x140(%r14), %rax
movq (%rax,%rbp,8), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %rsi
movq %r13, %rdi
callq 0x51f0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r13,%rax)
movl $0xa, %edx
movq %r13, %rdi
leaq 0xf3be(%rip), %rsi      # 0x36854
callq 0x5360
movq 0x140(%r14), %rax
movq (%rax,%rbp,8), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rsi
movq %r13, %rdi
callq 0x51f0
movq %rax, %r12
movl $0x10, %edx
movq %rax, %rdi
leaq 0xf397(%rip), %rsi      # 0x3685f
callq 0x5360
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x5360
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x52c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5200
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2751d
callq 0x52b0
movq 0x140(%r14), %rax
movl %r15d, %r12d
movq (%rax,%rbp,8), %rcx
movq 0x8(%rax,%rbp,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
incl %r15d
cmpq %r12, %rdx
ja 0x273c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x27569
callq 0x52b0
movq %rbx, %rdi
callq 0x55a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::getMissPCfromBPtags(unsigned long, int)
uint64_t 
Predictor::getMissPCfromBPtags(uint64_t block_addr , int set)
{
	for(unsigned i = 0 ; i < BP_missing_tags[set].size(); i++)
	{
		if( block_addr == BP_missing_tags[set][i]->addr && BP_missing_tags[set][i]->isValid)
			return BP_missing_tags[set][i]->missPC;
	}
	assert(false);
	return 0;
}

// Assembly:
pushq %rax
movslq %edx, %rax
movq 0x140(%rdi), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
je 0x27690
sarq $0x3, %rcx
movl $0x1, %edx
xorl %edi, %edi
movq (%rax,%rdi,8), %rdi
cmpq %rsi, (%rdi)
jne 0x27687
cmpb $0x0, 0x14(%rdi)
jne 0x276af
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x27678
leaq 0xde4b(%rip), %rdi      # 0x354e2
leaq 0xf0ed(%rip), %rsi      # 0x3678b
leaq 0xf1cb(%rip), %rcx      # 0x36870
movl $0x2e3, %edx            # imm = 0x2E3
callq 0x51d0
movq 0x18(%rdi), %rax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::getAllocSitefromBPtags(unsigned long, int)
bool 
Predictor::getAllocSitefromBPtags( uint64_t addr , int set)
{
	for(unsigned i = 0 ; i < BP_missing_tags[set].size(); i++)
	{
		if( addr == BP_missing_tags[set][i]->addr && BP_missing_tags[set][i]->isValid)
			return BP_missing_tags[set][i]->allocSite;
	}
	assert(false);
	return false;
}

// Assembly:
pushq %rax
movslq %edx, %rax
movq 0x140(%rdi), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
je 0x276f6
sarq $0x3, %rcx
movl $0x1, %edx
xorl %edi, %edi
movq (%rax,%rdi,8), %rdi
cmpq %rsi, (%rdi)
jne 0x276ed
cmpb $0x0, 0x14(%rdi)
jne 0x27715
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x276de
leaq 0xdde5(%rip), %rdi      # 0x354e2
leaq 0xf087(%rip), %rsi      # 0x3678b
leaq 0xf19c(%rip), %rcx      # 0x368a7
movl $0x2ef, %edx            # imm = 0x2EF
callq 0x51d0
movb 0x16(%rdi), %al
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Predictor.hh
// Function: MissingTagEntry::initFeaturesHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void initFeaturesHash(std::string policy)
		{
			if( policy == "Cerebron")	
				features_hash = std::vector<int>( simu_parameters.PHC_features.size() , 0);
			//else if (policy == "SimplePerceptron")
			//	features_hash = std::vector<int>( simu_parameters.simple_perceptron_features.size() , 0);
		}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xd2c9(%rip), %rsi      # 0x35817
movq %rax, %rdi
callq 0x50f0
testl %eax, %eax
je 0x28562
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x1d9e7(%rip), %rax     # 0x45f50
movq 0x1d8(%rax), %rsi
subq 0x1d0(%rax), %rsi
sarq $0x5, %rsi
leaq 0xc(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x10(%rsp), %r14
leaq 0xb(%rsp), %rcx
movq %r14, %rdi
callq 0x152ee
movq 0x20(%rbx), %rdi
movaps (%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x30(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
testq %rdi, %rdi
je 0x2855a
callq 0x52b0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2855a
callq 0x52b0
jmp 0x2855a
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Prefetcher.cc
// Function: SimplePrefetcher::SimplePrefetcher(int, int, bool)
void
SimplePrefetcher::generatePrefetch(uint64_t address, bool isHit, bool isInst)
{
/*	//DPRINTF("SimplePrefetcher::generatePrefetch");
	vector<uint64_t> prefetch_addresses = getNextAddress(address);
	
	for(auto p : prefetch_addresses)
	{
		Access request;
		request.m_address = p;
		request.m_type = isInst ? MemCmd::DATA_PREFETCH : MemCmd::INST_PREFETCH;
		prefetchAddress(request);
	}
*/
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, 0x8(%rdi)
movl %edx, 0x10(%rdi)
movb %cl, 0x14(%rdi)
leaq 0x1bbf0(%rip), %rax     # 0x44b28
movq %rax, (%rdi)
leaq 0x18(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
movslq %edx, %rsi
movq %rbx, %rdi
callq 0x2925e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x28f71
callq 0x52b0
movq %r14, %rdi
callq 0x55a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/ReplacementPolicy.cc
// Function: LRUPolicy::evictPolicy(int)
int
LRUPolicy::evictPolicy(int set)
{
	int smallest_time = m_cache_entries[set][0]->policyInfo , smallest_index = 0;

	for(int i = 0 ; i < m_assoc ; i++){
		if(!m_cache_entries[set][i]->isValid) 
			return i;
	}
	
	for(int i = 0 ; i < m_assoc ; i++){
		if(m_cache_entries[set][i]->policyInfo < smallest_time){
			smallest_time =  m_cache_entries[set][i]->policyInfo;
			smallest_index = i;
		}
	}
	return smallest_index;
}

// Assembly:
movslq 0x24(%rdi), %rcx
testq %rcx, %rcx
jle 0x29538
movslq %esi, %rax
movq 0x8(%rdi), %rdx
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %rdx
movq (%rdx), %rax
movl 0x38(%rax), %esi
xorl %eax, %eax
movq (%rdx,%rax,8), %rdi
cmpb $0x1, (%rdi)
jne 0x29537
incq %rax
cmpq %rax, %rcx
jne 0x29504
testl %ecx, %ecx
jle 0x29538
xorl %edi, %edi
xorl %eax, %eax
movq (%rdx,%rdi,8), %r8
movl 0x38(%r8), %r8d
cmpl %esi, %r8d
cmovll %r8d, %esi
cmovll %edi, %eax
incq %rdi
cmpq %rdi, %rcx
jne 0x2951d
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimpleFeatureTable.cc
// Function: SimpleFeatureTable::SimpleFeatureTable(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
SimpleFeatureTable::SimpleFeatureTable( int size, string name, bool isBP)
{
	m_size = size;
	m_name = name;
	m_counter_size = simu_parameters.perceptron_counter_size;
	
	m_table.resize(size);
	for(int i = 0 ; i < m_size; i++)
		m_table[i] = new SimpleFeatureEntry();

	if(simu_parameters.perceptron_drawFeatureMaps)
	{
		stats_heatmap_counter = vector<vector<int> >(m_size, vector<int>());
		stats_counter_buffer = vector<vector<int> >(m_size, vector<int>());
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %ebp
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x28(%rsp)
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
leaq 0x30(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movq %rax, 0x70(%rdi)
movl %esi, (%rdi)
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x51a0
leaq 0x1c1e3(%rip), %r13     # 0x45f50
movl 0x1b0(%r13), %eax
movl %eax, 0x28(%r14)
movslq %ebp, %rsi
movq %r15, %rdi
callq 0x2a5c6
movslq (%r14), %r12
testq %r12, %r12
jle 0x29db0
xorl %ebp, %ebp
movl $0x8, %edi
callq 0x52f0
movl $0x0, 0x4(%rax)
movb $0x0, (%rax)
movq (%r15), %rcx
movq %rax, (%rcx,%rbp,8)
incq %rbp
cmpq %rbp, %r12
jne 0x29d8d
cmpb $0x0, 0x1cc(%r13)
je 0x29eb6
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movq %r12, %rsi
callq 0xc524
movq 0x58(%r14), %rax
leaq 0x30(%rsp), %r12
movaps (%r12), %xmm0
movq 0x10(%r12), %rcx
movq %rcx, 0x58(%r14)
movups 0x48(%r14), %xmm1
movups %xmm0, 0x48(%r14)
leaq 0x50(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
callq 0xc5b4
movq %r12, %rdi
callq 0xc5b4
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x29e3d
callq 0x52b0
movslq (%r14), %rsi
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0xc524
movq 0x70(%r14), %rax
leaq 0x30(%rsp), %rbx
movaps (%rbx), %xmm0
movq 0x10(%rbx), %rcx
movq %rcx, 0x70(%r14)
movups 0x60(%r14), %xmm1
movups %xmm0, 0x60(%r14)
leaq 0x50(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
callq 0xc5b4
movq %rbx, %rdi
callq 0xc5b4
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x29eb6
callq 0x52b0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29ec7
movq %rax, %r12
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x29ee0
callq 0x52b0
jmp 0x29ee0
jmp 0x29edd
movq %rax, %r12
leaq 0x48(%r14), %rbp
addq $0x60, %r14
movq %r14, %rdi
callq 0xc5b4
movq %rbp, %rdi
callq 0xc5b4
movq (%r15), %rdi
testq %rdi, %rdi
je 0x29f05
callq 0x52b0
movq (%rbx), %rdi
cmpq 0x28(%rsp), %rdi
je 0x29f14
callq 0x52b0
movq %r12, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimpleFeatureTable.cc
// Function: SimpleFeatureTable::openNewTimeFrame()
void 
SimpleFeatureTable::openNewTimeFrame()
{
	if(!simu_parameters.perceptron_drawFeatureMaps)
		return;
		
	int avg = 0;
	for(unsigned i = 0; i < stats_counter_buffer.size() ; i++)
	{
		int sum = 0;
		if(stats_counter_buffer[i].size() != 0)
		{
			for(unsigned j = 0 ; j < stats_counter_buffer[i].size() ; j++)
				sum += stats_counter_buffer[i][j];


			avg = sum / (int)stats_counter_buffer[i].size();		
		}
		else 
			avg = stats_heatmap_counter[i].empty() ? 0 : stats_heatmap_counter[i].back() ;

		stats_heatmap_counter[i].push_back(avg);
		stats_counter_buffer[i].clear();
	}

}

// Assembly:
leaq 0x1bea1(%rip), %rax     # 0x45f50
cmpb $0x1, 0x1cc(%rax)
jne 0x2a1a4
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
movq 0x60(%rdi), %rcx
cmpq %rcx, 0x68(%rdi)
je 0x2a197
xorl %r15d, %r15d
leaq 0xc(%rsp), %r14
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
leaq (%r15,%r15,2), %r13
movq (%rcx,%r13,8), %r8
movq 0x8(%rcx,%r13,8), %rsi
subq %r8, %rsi
je 0x2a12a
sarq $0x2, %rsi
xorl %edx, %edx
xorl %eax, %eax
addl (%r8,%rdx,4), %eax
incq %rdx
movl %edx, %edi
cmpq %rdi, %rsi
ja 0x2a10e
cltd
idivl %esi
movq 0x48(%rbx), %rdx
movq 0x8(%rdx,%r13,8), %rsi
jmp 0x2a140
movq 0x48(%rbx), %rdx
movq 0x8(%rdx,%r13,8), %rsi
cmpq %rsi, (%rdx,%r13,8)
je 0x2a13e
movl -0x4(%rsi), %eax
jmp 0x2a140
xorl %eax, %eax
movl %eax, 0xc(%rsp)
leaq (%rdx,%r13,8), %rdi
cmpq 0x10(%rdi), %rsi
je 0x2a15a
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2a16a
movq %r14, %rdx
callq 0xd652
movq 0x60(%rbx), %rcx
movq (%rcx,%r13,8), %r8
cmpq %r8, 0x8(%rcx,%r13,8)
je 0x2a17c
leaq (%rcx,%r13,8), %rax
addq $0x8, %rax
movq %r8, (%rax)
incl %r15d
movq 0x68(%rbx), %rax
subq %rcx, %rax
sarq $0x3, %rax
imulq %r12, %rax
cmpq %r15, %rax
ja 0x2a0f4
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::allocateInNVM(unsigned long, Access)
allocDecision
SimplePerceptronPredictor::allocateInNVM(uint64_t set, Access element)
{	
	Predictor::update_globalPChistory(element.m_pc);
	
	if(isHitInBPtags(element.block_addr , set))
		element.m_pc = getMissPCfromBPtags(element.block_addr , set);
	
	/*
	if( hitInSRAMMissingTags( element.block_addr, set) )
		element.m_pc = missingTagMissPC( element.block_addr , set);
	*/
	
	// All the set is a learning/sampled set independantly of its way or SRAM/NVM alloc
	//bool isLearning = m_tableSRAM[set][0]->isLearning; 
	allocDecision des =  activationFunction(element);
	return des;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rsp), %rsi
callq 0x27572
movq 0x60(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2760a
testb %al, %al
je 0x2af2f
leaq 0x30(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x27650
movq %rax, 0x10(%r12)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2af42
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::activationFunction(Access)
allocDecision
SimplePerceptronPredictor::activationFunction(Access element)
{

	int yout = 0;
	for(unsigned i = 0 ; i < m_features.size() ; i++)
	{
		int hash = hashing_function1( m_features_hash[i] , element.block_addr , element.m_pc);
		int pred = m_features[i]->getCounter(hash);
		yout += pred;
	}
	return getDecision(yout , element.isWrite());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x80(%rsp), %rcx
movq 0x278(%rdi), %rax
cmpq 0x270(%rdi), %rax
je 0x2b031
movq %rdi, %rbx
leaq 0x30(%rsp), %r12
movq 0x10(%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x30(%rcx), %rcx
movq %rcx, 0x10(%rsp)
xorl %r15d, %r15d
movl $0x1, %r14d
xorl %edi, %edi
movl %edi, 0xc(%rsp)
movq %rbx, %r13
movq 0x288(%rbx), %rbp
leaq (%r15,%r15,4), %rbx
movq %r12, 0x20(%rsp)
movq (%rbp,%rbx,8), %rsi
movq 0x8(%rbp,%rbx,8), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0xcbd6
movq 0x20(%rbp,%rbx,8), %rax
movq %rax, 0x40(%rsp)
leaq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x159f0
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x2afee
callq 0x52b0
movq %r13, %rbx
movq 0x270(%r13), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
callq 0x2a034
movl 0xc(%rsp), %edi
addl %eax, %edi
movq 0x278(%r13), %rax
subq 0x270(%r13), %rax
movl %r14d, %r15d
sarq $0x3, %rax
incl %r14d
cmpq %r15, %rax
leaq 0x30(%rsp), %r12
ja 0x2af91
jmp 0x2b033
xorl %edi, %edi
leaq 0x80(%rsp), %rax
movl 0x1c(%rax), %eax
cmpl $0x3, %eax
setne %cl
cmpl $0x6, %eax
setne %al
andb %cl, %al
movl %edi, %ecx
negl %ecx
cmovsl %edi, %ecx
leaq 0x1aef6(%rip), %rdx     # 0x45f50
xorl %esi, %esi
testl %edi, %edi
setg %sil
cmpl 0x248(%rdx), %ecx
movzbl %al, %eax
cmovlel %eax, %esi
movzbl %sil, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b093
callq 0x52b0
movq %rbx, %rdi
callq 0x55a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::correctBPerror(CacheEntry*, Access, int)
void
SimplePerceptronPredictor::correctBPerror(CacheEntry* entry , Access element , int set)
{
	bool wasInNVM = getAllocSitefromBPtags(element.block_addr, set);

	for(unsigned i = 0 ; i < m_features.size() ; i++)
	{
		int hash = hashing_function1( m_features_hash[i] , entry->address , entry->missPC);		
		
		if( wasInNVM )
		{
			m_features[i]->decreaseCounter(hash);		
			m_features[i]->decreaseCounter(hash);		
		}
		else
		{
			m_features[i]->increaseCounter(hash);		
			m_features[i]->increaseCounter(hash);		
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movq 0xa0(%rsp), %rsi
callq 0x276b6
movb %al, 0x3(%rsp)
movq 0x278(%r14), %rax
cmpq 0x270(%r14), %rax
je 0x2b3bf
movl $0x1, %ecx
leaq 0x20(%rsp), %rbx
xorl %ebp, %ebp
movl %ecx, 0x4(%rsp)
movq %r14, %r13
movq 0x288(%r14), %r12
leaq (,%rbp,4), %r15
addq %rbp, %r15
movq %rbx, 0x10(%rsp)
movq (%r12,%r15,8), %rsi
movq 0x8(%r12,%r15,8), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0xcbd6
movq 0x20(%r12,%r15,8), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq %r14, %rdi
callq 0x159f0
movl %eax, %r12d
movq 0x10(%rsp), %rdi
movq %rbx, %r15
cmpq %rbx, %rdi
je 0x2b34c
callq 0x52b0
movq %r13, %r14
movq 0x270(%r13), %rax
movq (%rax,%rbp,8), %rdi
cmpb $0x0, 0x3(%rsp)
je 0x2b37e
movl %r12d, %esi
callq 0x29fae
movq 0x270(%r14), %rax
movq (%rax,%rbp,8), %rdi
movl %r12d, %esi
callq 0x29fae
jmp 0x2b399
movl %r12d, %esi
callq 0x29ff2
movq 0x270(%r14), %rax
movq (%rax,%rbp,8), %rdi
movl %r12d, %esi
callq 0x29ff2
movl 0x4(%rsp), %ecx
movq 0x278(%r14), %rax
subq 0x270(%r14), %rax
movl %ecx, %ebp
sarq $0x3, %rax
incl %ecx
cmpq %rbp, %rax
movq %r15, %rbx
ja 0x2b2e1
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2b3e0
callq 0x52b0
movq %r14, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::updateCostModel(CacheEntry*, unsigned long, int, bool)
void 
SimplePerceptronPredictor::updateCostModel(CacheEntry* entry , uint64_t block_addr , int set, bool isWrite)
{
	bool hitSRAM = false, hitNVM = false;
	hitNVM = getHitPerDataArray( block_addr , set , true);
	hitSRAM = getHitPerDataArray( block_addr , set , false);
	
	entry->e_sram += m_costParameters.costSRAM[isWrite];
	entry->e_sram +=  !hitSRAM ? m_costParameters.costDRAM[isWrite] : 0;

	entry->e_nvm += m_costParameters.costNVM[isWrite];
	entry->e_nvm += !hitNVM ? m_costParameters.costDRAM[isWrite] : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rsi
movl %ecx, %edx
movl $0x1, %ecx
callq 0x2771a
movb %al, 0x7(%rsp)
xorl %ebp, %ebp
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x2771a
movl %r15d, %ecx
movq 0x2e0(%r14), %rdx
movslq (%rdx,%rcx,4), %rdx
addq 0x138(%rbx), %rdx
testb %al, %al
jne 0x2b44b
movq 0x2f8(%r14), %rax
movslq (%rax,%rcx,4), %rbp
addq %rdx, %rbp
movq %rbp, 0x138(%rbx)
movq 0x2c8(%r14), %rax
movslq (%rax,%rcx,4), %rdx
movq 0x140(%rbx), %rax
cmpb $0x0, 0x7(%rsp)
je 0x2b472
xorl %ecx, %ecx
jmp 0x2b47d
movq 0x2f8(%r14), %rsi
movslq (%rsi,%rcx,4), %rcx
addq %rdx, %rax
addq %rcx, %rax
movq %rax, 0x140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::doLearning(CacheEntry*)
void 
SimplePerceptronPredictor::doLearning(CacheEntry* entry)
{
	allocDecision correct_des =  entry->e_sram > entry->e_nvm ? ALLOCATE_IN_NVM : ALLOCATE_IN_SRAM;

	if(simu_parameters.simple_perceptron_independantLearning)
	{
	
		for(unsigned i = 0 ; i < m_features.size() ; i++)
		{
			int hash = entry->simple_perceptron_hash[i];
			//if(entry->simple_perceptron_pred[i] != correct_des)
			//{
				if( correct_des == ALLOCATE_IN_NVM)
					m_features[i]->increaseCounter(hash);
				else
					m_features[i]->decreaseCounter(hash);
			//}
			/*
			else
				m_features[i]->increaseCounter(hash);
			*/
		}		
	}
	else
	{
		//allocDecision des = entry->simple_perceptron_pred[0];
		//if( des != correct_des)
		//{
			if( correct_des == ALLOCATE_IN_NVM)
			{
				for(unsigned i = 0 ; i < m_features.size() ; i++)
				{
					int hash = entry->simple_perceptron_hash[i];
					m_features[i]->increaseCounter(hash);
				}

			}
			else
			{			
				for(unsigned i = 0 ; i < m_features.size() ; i++)
				{
					int hash = entry->simple_perceptron_hash[i];
					m_features[i]->decreaseCounter(hash);
				}
			}
		//}
		/*
		else
		{
			for(unsigned i = 0 ; i < m_features.size() ; i++)
			{
				int hash = entry->simple_perceptron_hash[i];
				m_features[i]->increaseCounter(hash);
			}		
		}*/
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x138(%rsi), %r15
movq 0x140(%rsi), %r12
leaq 0x1aa93(%rip), %rdx     # 0x45f50
movq 0x270(%rdi), %rax
movq 0x278(%rdi), %rcx
cmpb $0x1, 0x24d(%rdx)
jne 0x2b526
cmpq %rax, %rcx
je 0x2b5a7
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x100(%rbx), %rdx
movl (%rdx,%rcx,4), %esi
movq (%rax,%rcx,8), %rdi
cmpq %r12, %r15
jbe 0x2b4fe
callq 0x29ff2
jmp 0x2b503
callq 0x29fae
movl %ebp, %ecx
movq 0x270(%r14), %rax
movq 0x278(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x2b4e4
jmp 0x2b5a7
cmpq %r12, %r15
jbe 0x2b56a
cmpq %rax, %rcx
je 0x2b5a7
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x100(%rbx), %rdx
movl (%rdx,%rcx,4), %esi
movq (%rax,%rcx,8), %rdi
callq 0x29ff2
movl %ebp, %ecx
movq 0x270(%r14), %rax
movq 0x278(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x2b537
jmp 0x2b5a7
cmpq %rax, %rcx
je 0x2b5a7
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x100(%rbx), %rdx
movl (%rdx,%rcx,4), %esi
movq (%rax,%rcx,8), %rdi
callq 0x29fae
movl %ebp, %ecx
movq 0x270(%r14), %rax
movq 0x278(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x2b576
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::setPrediction(CacheEntry*, Access)
void 
SimplePerceptronPredictor::setPrediction(CacheEntry* entry, Access element)
{
	int sum_pred = 0;
	for(unsigned i = 0 ; i < m_features.size() ; i++)
	{
		int hash = hashing_function1(m_features_hash[i] , element.block_addr , entry->missPC);
		int counter = m_features[i]->getCounter(hash);
		sum_pred += counter;
		entry->simple_perceptron_hash[i] = hash;
		if(simu_parameters.simple_perceptron_independantLearning)
			entry->simple_perceptron_pred[i] = getDecision(counter , element.isWrite());
	}
	
	if(!simu_parameters.simple_perceptron_independantLearning)
		entry->simple_perceptron_pred[0] = getDecision(sum_pred , element.isWrite());

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x10(%rsp)
leaq 0x80(%rsp), %rcx
movq 0x278(%rdi), %rax
cmpq 0x270(%rdi), %rax
je 0x2b705
leaq 0x30(%rsp), %r14
movq 0x30(%rcx), %rax
movq %rax, 0x18(%rsp)
movl 0x1c(%rcx), %eax
cmpl $0x3, %eax
setne %cl
cmpl $0x6, %eax
setne %al
andb %cl, %al
xorl %r12d, %r12d
movl $0x1, %r15d
movzbl %al, %eax
movl %eax, 0x8(%rsp)
xorl %r8d, %r8d
movl %r8d, 0xc(%rsp)
movq %rdi, %r13
movq 0x288(%rdi), %rbp
leaq (%r12,%r12,4), %rbx
movq %r14, 0x20(%rsp)
movq (%rbp,%rbx,8), %rsi
movq 0x8(%rbp,%rbx,8), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0xcbd6
movq 0x20(%rbp,%rbx,8), %rax
movq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rbx
movq 0x20(%rbx), %rdx
leaq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x159f0
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b673
callq 0x52b0
movq 0x270(%r13), %rax
movq (%rax,%r12,8), %rdi
movl %ebp, %esi
callq 0x2a034
movq 0x100(%rbx), %rcx
movl %ebp, (%rcx,%r12,4)
leaq 0x1a8b9(%rip), %rcx     # 0x45f50
movb 0x24d(%rcx), %cl
cmpb $0x1, %cl
jne 0x2b6d2
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
xorl %esi, %esi
testl %eax, %eax
setg %sil
leaq 0x1a898(%rip), %rdi     # 0x45f50
cmpl 0x248(%rdi), %edx
cmovlel 0x8(%rsp), %esi
movzbl %sil, %edx
movq 0xe8(%rbx), %rsi
movl %edx, (%rsi,%r12,4)
movl 0xc(%rsp), %r8d
addl %eax, %r8d
movq %r13, %rdi
movq 0x278(%r13), %rax
subq 0x270(%r13), %rax
movl %r15d, %r12d
sarq $0x3, %rax
incl %r15d
cmpq %r12, %rax
leaq 0x30(%rsp), %r14
ja 0x2b611
jmp 0x2b715
leaq 0x1a844(%rip), %rax     # 0x45f50
movb 0x24d(%rax), %cl
xorl %r8d, %r8d
testb $0x1, %cl
jne 0x2b76a
leaq 0x80(%rsp), %rax
movl 0x1c(%rax), %eax
cmpl $0x3, %eax
setne %cl
cmpl $0x6, %eax
setne %al
andb %cl, %al
movl %r8d, %ecx
negl %ecx
cmovsl %r8d, %ecx
leaq 0x1a80d(%rip), %rdx     # 0x45f50
xorl %esi, %esi
testl %r8d, %r8d
setg %sil
cmpl 0x248(%rdx), %ecx
movzbl %al, %eax
cmovlel %eax, %esi
movzbl %sil, %eax
movq 0x10(%rsp), %rcx
movq 0xe8(%rcx), %rcx
movl %eax, (%rcx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b78b
callq 0x52b0
movq %rbx, %rdi
callq 0x55a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::evictPolicy(int, bool)
int SimplePerceptronPredictor::evictPolicy(int set, bool inNVM)
{
	int assoc_victim = -1;

	if(inNVM)
		assoc_victim = m_replacementPolicyNVM_ptr->evictPolicy(set);
	else
		assoc_victim = m_replacementPolicySRAM_ptr->evictPolicy(set);

	CacheEntry* entry = inNVM ? m_tableNVM[set][assoc_victim] : m_tableSRAM[set][assoc_victim];

	if(entry->isValid)
	{	
		reportEviction(entry, inNVM);
			
		if(entry->isLearning && !simu_parameters.simple_perceptron_fastLearning)
			doLearning(entry);
	
		if( (entry->e_sram > entry->e_nvm && inNVM) || (entry->e_nvm > entry->e_sram && !inNVM) )
			stats_good_alloc++;
		else
			stats_wrong_alloc++;		
	}
	evictRecording(set , assoc_victim , inNVM);	
	return assoc_victim;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movslq %esi, %r12
movl %ebp, %eax
xorb $0x1, %al
movzbl %al, %eax
movl %edx, %r13d
movq 0x60(%rdi,%rax,8), %rdi
movq (%rdi), %rax
movl %r12d, %esi
callq *0x20(%rax)
movl %eax, %r15d
movq 0x8(%r14,%r13,8), %rax
movq (%rax), %rax
leaq (%r12,%r12,2), %rcx
movslq %r15d, %rdx
movq (%rax,%rcx,8), %rax
movq (%rax,%rdx,8), %r13
cmpb $0x1, (%r13)
movzbl %bpl, %r12d
jne 0x2c8b1
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0x2c8d4
cmpb $0x1, 0x148(%r13)
jne 0x2c883
leaq 0x196e1(%rip), %rax     # 0x45f50
cmpb $0x0, 0x24c(%rax)
jne 0x2c883
movq %r14, %rdi
movq %r13, %rsi
callq 0x2b49a
movq 0x138(%r13), %rax
movq 0x140(%r13), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rcx, %rax
setbe %dl
setae %sil
testb %bpl, %bpl
cmovnel %edx, %esi
movzbl %sil, %eax
incq 0x328(%r14,%rax,8)
movq %r14, %rdi
movl %ebx, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x264ec
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::finishSimu()
void 
SimplePerceptronPredictor::finishSimu()
{

	CacheEntry* entry = NULL;
	for(int i = 0 ; i < m_nb_set ; i++)
	{
		for(int j = 0 ; j < m_nbNVMways ; j++)
		{
			entry = m_tableNVM[i][j];	
			if(!entry->isValid)	
				continue;
				
			if( entry->e_sram > entry->e_nvm)
				stats_good_alloc++;
			else
				stats_wrong_alloc++;		

		}
		for(int j = 0 ; j < m_nbSRAMways ; j++)
		{
			entry = m_tableSRAM[i][j];		
			if(!entry->isValid)	
				continue;

			if( entry->e_sram < entry->e_nvm)
				stats_good_alloc++;
			else
				stats_wrong_alloc++;		
		}
	}
	
	for(auto feature : m_features)
		feature->finishSimu();
	Predictor::finishSimu();


}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x18(%rdi), %rax
testq %rax, %rax
jle 0x2e0cc
movl 0x20(%rdi), %ecx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movl 0x24(%rdi), %r8d
movq 0x330(%rdi), %r9
movq 0x328(%rdi), %r10
xorl %r11d, %r11d
leaq (%r11,%r11,2), %rbx
testl %ecx, %ecx
jle 0x2e079
movq (%rsi), %r14
movq (%r14,%rbx,8), %r14
xorl %r15d, %r15d
movq (%r14,%r15,8), %r12
cmpb $0x1, (%r12)
jne 0x2e071
movq 0x138(%r12), %r13
cmpq 0x140(%r12), %r13
jbe 0x2e067
incq %r10
movq %r10, 0x328(%rdi)
jmp 0x2e071
incq %r9
movq %r9, 0x330(%rdi)
incq %r15
cmpq %r15, %rcx
jne 0x2e03e
testl %r8d, %r8d
jle 0x2e0c0
movq (%rdx), %r14
movq (%r14,%rbx,8), %rbx
xorl %r14d, %r14d
movq (%rbx,%r14,8), %r15
cmpb $0x1, (%r15)
jne 0x2e0b8
movq 0x138(%r15), %r12
cmpq 0x140(%r15), %r12
jae 0x2e0ae
incq %r10
movq %r10, 0x328(%rdi)
jmp 0x2e0b8
incq %r9
movq %r9, 0x330(%rdi)
incq %r14
cmpq %r14, %r8
jne 0x2e088
incq %r11
cmpq %rax, %r11
jne 0x2e02c
movq 0x270(%rdi), %rbx
movq 0x278(%rdi), %r14
cmpq %r14, %rbx
je 0x2e0ed
movq (%rbx), %rdi
callq 0x2a1a6
addq $0x8, %rbx
jmp 0x2e0da
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/common.cc
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
vector<string> 
split(string s, char delimiter){
  vector<string> result;
  std::istringstream ss( s );
  while (!ss.eof())
  {
		string field;
		getline( ss, field, delimiter );
		if (field.empty()) continue;
		result.push_back( field );
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movl %edx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x20(%rsp), %rdi
movl $0x8, %edx
callq 0x5540
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x40(%rsp,%rax)
jne 0x2e2d2
leaq 0x10(%rsp), %r12
movsbl %bpl, %ebp
leaq 0x20(%rsp), %r14
movq %rsp, %r15
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x55d0
cmpq $0x0, 0x8(%rsp)
je 0x2e2b4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2f7c4
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2e2c2
callq 0x52b0
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x40(%rsp,%rax)
je 0x2e282
movq 0x16cef(%rip), %rsi     # 0x44fc8
leaq 0x20(%rsp), %rdi
callq 0x5440
leaq 0x98(%rsp), %rdi
callq 0x5120
movq %rbx, %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x2e337
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2e319
callq 0x52b0
movq 0x16ca8(%rip), %rsi     # 0x44fc8
leaq 0x20(%rsp), %rdi
callq 0x5440
leaq 0x98(%rsp), %rdi
callq 0x5120
movq %rbx, %rdi
callq 0xc7c2
movq %r14, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/common.cc
// Function: bitSelect(unsigned long, unsigned int, unsigned int)
uint64_t 
bitSelect(uint64_t address , unsigned small , unsigned big)
{
	std::bitset<64> b(address);
	for(int i = big+1 ; i < 64 ; i++)
		b.reset(i);
	
	b >>= small;
	
	return b.to_ullong();	
}

// Assembly:
incl %edx
cmpl $0x3f, %edx
jg 0x2e364
movslq %edx, %rdx
cmpq $0x40, %rdx
jae 0x2e373
btrq %rdx, %rdi
incq %rdx
cmpq $0x40, %rdx
jne 0x2e351
movl %esi, %ecx
shrq %cl, %rdi
xorl %eax, %eax
cmpl $0x40, %esi
cmovbq %rdi, %rax
retq
pushq %rax
leaq 0x8ea9(%rip), %rdi      # 0x37224
leaq 0x8e94(%rip), %rsi      # 0x37216
movl $0x40, %ecx
xorl %eax, %eax
callq 0x5480
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/common.cc
// Function: bitRemove(unsigned long, unsigned int, unsigned int)
uint64_t
bitRemove(uint64_t address , unsigned int small, unsigned int big){
    uint64_t mask;
    assert(big >= small);

	if (small == 0) {
		mask = (uint64_t)~0 << big;
		return (address & mask);
	} 
	else {
		mask = ~((uint64_t)~0 << small);
		uint64_t lower_bits = address & mask;
		mask = (uint64_t)~0 << (big + 1);
		uint64_t higher_bits = address & mask;

		higher_bits = higher_bits >> (big - small + 1);
		return (higher_bits | lower_bits);
	}
}

// Assembly:
movl %edx, %eax
subl %esi, %eax
jb 0x2e3cc
testl %esi, %esi
je 0x2e3c0
movq $-0x1, %r8
movl %esi, %ecx
shlq %cl, %r8
notq %r8
andq %rdi, %r8
incb %dl
movl %edx, %ecx
shrq %cl, %rdi
shlq %cl, %rdi
incb %al
movl %eax, %ecx
shrq %cl, %rdi
orq %r8, %rdi
jmp 0x2e3c8
movl %edx, %ecx
shrq %cl, %rdi
shlq %cl, %rdi
movq %rdi, %rax
retq
pushq %rax
leaq 0x8da0(%rip), %rdi      # 0x37174
leaq 0x8da6(%rip), %rsi      # 0x37181
leaq 0x8dad(%rip), %rcx      # 0x3718f
movl $0x46, %edx
callq 0x51d0
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/common.cc
// Function: hexToInt1(char const*)
uint64_t
hexToInt1(const char* adresse_hex){
	uint64_t n = strtoul( adresse_hex, &mydummy_var, 16 ); 

	if ( *mydummy_var != 0 ) {  
		cout << "not a number" << endl;
		return 0;
	}    
	else   
		return n;
}

// Assembly:
pushq %rbx
leaq 0x17d48(%rip), %rsi     # 0x461a8
movl $0x10, %edx
callq 0x5110
movq 0x17d37(%rip), %rcx     # 0x461a8
cmpb $0x0, (%rcx)
je 0x2e4ba
movq 0x16b53(%rip), %rbx     # 0x44fd0
leaq 0x8d44(%rip), %rsi      # 0x371c8
movl $0xc, %edx
movq %rbx, %rdi
callq 0x5360
movq (%rbx), %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
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/common.cc
// Function: readInputArgs(int, char**, int&, int&, int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool
readInputArgs(int argc , char* argv[] , int& sizeCache , int& assoc , int& blocksize, std::string& filename, std::string& policy)
{
	
	if(argc == 1){
		sizeCache = 512;
		assoc = 4;
		blocksize = 64;
		filename = "test.txt";		
		policy = "LRU";

	}
	else if(argc == 3){
		sizeCache = 16384;
		assoc = 4;
		blocksize = 64;
		filename = argv[1];	
		policy = argv[2];	
	}
	else if(argc == 6){
		sizeCache = atoi(argv[1]);
		assoc = atoi(argv[2]);
		blocksize = atoi(argv[3]);
		policy = argv[4];
		filename = argv[5];		
	}
	else{
		return false;
	}		
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r15
movq 0x40(%rsp), %rbx
cmpl $0x6, %edi
je 0x2e596
cmpl $0x3, %edi
je 0x2e53f
cmpl $0x1, %edi
jne 0x2e606
movl $0x200, (%rbp)          # imm = 0x200
movl $0x4, (%r13)
movl $0x40, (%r12)
movq 0x8(%r14), %rdx
leaq 0x8cc1(%rip), %rcx      # 0x371d5
movl $0x8, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x54b0
movq 0x8(%rbx), %rdx
leaq 0x6e3f(%rip), %rcx      # 0x3536e
movl $0x3, %r8d
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x2e5fd
movl $0x4000, (%rbp)         # imm = 0x4000
movl $0x4, (%r13)
movl $0x40, (%r12)
movq 0x8(%r15), %r12
movq 0x8(%r14), %r13
movq %r12, %rdi
callq 0x5160
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x54b0
movq 0x10(%r15), %r14
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x5160
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
jmp 0x2e5fa
movq 0x8(%r15), %rdi
callq 0x54c0
movl %eax, (%rbp)
movq 0x10(%r15), %rdi
callq 0x54c0
movl %eax, (%r13)
movq 0x18(%r15), %rdi
callq 0x54c0
movl %eax, (%r12)
movq 0x20(%r15), %r12
movq 0x8(%rbx), %r13
movq %r12, %rdi
callq 0x5160
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x54b0
movq 0x28(%r15), %rbx
movq 0x8(%r14), %r15
movq %rbx, %rdi
callq 0x5160
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x54b0
movb $0x1, %al
jmp 0x2e608
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/common.cc
// Function: resize_image(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&)
vector< vector<int> > 
resize_image(vector< vector<int> >& img)
{

	int width =img[0].size();
	vector<vector<int > > result = vector< vector<int> >(img.size() , vector<int>());
	int factor = ceil ( (double)width / (double) IMG_WIDTH );

	for(unsigned i = 0 ; i < img.size() ; i++)
	{
		for(unsigned j = 0 ; j < img[i].size() ; j+= factor)
		{
			int index = factor + j >= img[i].size() ? img[i].size() : factor+j; 
			int sum = 0;
			for(int k = j ; k < index; k++)
				sum += img[i][k];
				
//			cout << "result[" << i << "].push_back " << sum << " / " << factor << " = " <<  sum / factor << endl;
			result[i].push_back(sum / factor);
		}
	}	
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
movq (%rax), %r12
movq 0x8(%rax), %r15
subq %rax, %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movapd %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
leaq 0xf(%rsp), %rcx
callq 0xc524
subq %r12, %r15
shrq $0x2, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2ee0d
callq 0x52b0
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
divsd 0x81a3(%rip), %xmm0     # 0x36fc0
callq 0x50a0
movq (%r14), %rcx
movq 0x8(%r14), %rax
cmpq %rcx, %rax
je 0x2eef0
cvttsd2si %xmm0, %r13d
xorl %ebp, %ebp
leaq (,%rbp,2), %r12
addq %rbp, %r12
movq (%rcx,%r12,8), %rdx
movq 0x8(%rcx,%r12,8), %rsi
subq %rdx, %rsi
je 0x2eecd
sarq $0x2, %rsi
xorl %edi, %edi
leal (%rdi,%r13), %r15d
cmpq %r15, %rsi
cmoval %r15d, %esi
movl $0x0, %eax
cmpl %esi, %edi
jge 0x2ee7f
movslq %edi, %rdi
movslq %esi, %rsi
xorl %eax, %eax
addl (%rdx,%rdi,4), %eax
incq %rdi
cmpq %rsi, %rdi
jl 0x2ee74
movq (%rbx), %rdx
leaq (%rdx,%r12,8), %rdi
cltd
idivl %r13d
movl %eax, 0x10(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2eea4
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2eeb1
leaq 0x10(%rsp), %rdx
callq 0x124c0
movq (%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq 0x8(%rcx,%r12,8), %rsi
subq %rdx, %rsi
sarq $0x2, %rsi
movl %r15d, %edi
cmpq %r15, %rsi
ja 0x2ee58
movq 0x8(%r14), %rax
incl %ebp
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
cmpq %rbp, %rdx
ja 0x2ee39
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2ef21
callq 0x52b0
jmp 0x2ef21
movq %rax, %r14
movq %rbx, %rdi
callq 0xc5b4
movq %r14, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/common.cc
// Function: convertBool[abi:cxx11](bool)
string
convertBool(bool a)
{
	if(a)
		return "TRUE";
	else
		return "FALSE";
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
testl %esi, %esi
je 0x2ef48
leaq 0x556d(%rip), %rsi      # 0x344ac
leaq 0x556a(%rip), %rdx      # 0x344b0
jmp 0x2ef56
leaq 0x5562(%rip), %rsi      # 0x344b1
leaq 0x5560(%rip), %rdx      # 0x344b6
movq %rbx, %rdi
callq 0xcc6c
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gvaumour[P]cache-simulator/src/Cache.hh
// Function: EnergyParameters::EnergyParameters()
EnergyParameters() {

			costSRAM = std::vector<int>(2 ,0);
			costSRAM[READ_ACCESS] = 271;
			costSRAM[WRITE_ACCESS] = 257;

			costNVM = std::vector<int>(2 ,0);
			costNVM[READ_ACCESS] = 236;
			costNVM[WRITE_ACCESS] = 652;

			costDRAM = std::vector<int>(2 ,0);
			costDRAM[READ_ACCESS] = 4088;
			costDRAM[WRITE_ACCESS] = 4102;

		}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x40(%rdi)
movl $0x8, %edi
callq 0x52f0
movq $0x0, (%rax)
movq %rax, %rcx
addq $0x8, %rcx
movq 0x18(%rbx), %rdi
movq %rax, 0x18(%rbx)
movq %rcx, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
testq %rdi, %rdi
je 0x2f8ad
callq 0x52b0
movq 0x18(%rbx), %rax
movabsq $0x1010000010f, %rcx    # imm = 0x1010000010F
movq %rcx, (%rax)
movl $0x8, %edi
callq 0x52f0
movq $0x0, (%rax)
movq %rax, %rcx
addq $0x8, %rcx
movq (%rbx), %rdi
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
testq %rdi, %rdi
je 0x2f8ed
callq 0x52b0
movq (%rbx), %rax
movabsq $0x28c000000ec, %rcx    # imm = 0x28C000000EC
movq %rcx, (%rax)
movl $0x8, %edi
callq 0x52f0
movq $0x0, (%rax)
movq %rax, %rcx
addq $0x8, %rcx
movq 0x30(%rbx), %rdi
movq %rax, 0x30(%rbx)
movq %rcx, 0x38(%rbx)
movq %rcx, 0x40(%rbx)
testq %rdi, %rdi
je 0x2f930
callq 0x52b0
movq 0x30(%rbx), %rax
movabsq $0x100600000ff8, %rcx   # imm = 0x100600000FF8
movq %rcx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x2f949
jmp 0x2f949
movq %rax, %r14
movq %rbx, %rdi
callq 0xc792
movq %r14, %rdi
callq 0x55a0