LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1bb4b(%rip), %rax     # 0x45f50
cmpb $0x1, 0x1cc(%rax)
jne 0x2a4f9
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
movq 0x60(%rdi), %rax
cmpq %rax, 0x68(%rdi)
je 0x2a4ec
xorl %r15d, %r15d
leaq 0xc(%rsp), %r14
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
leaq (%r15,%r15,2), %r13
movq (%rax,%r13,8), %rdx
movq 0x8(%rax,%r13,8), %rcx
subq %rdx, %rcx
je 0x2a476
sarq $0x2, %rcx
xorl %esi, %esi
xorl %eax, %eax
addl (%rdx,%rsi,4), %eax
incq %rsi
movl %esi, %edi
cmpq %rdi, %rcx
ja 0x2a464
cltd
idivl %ecx
jmp 0x2a48c
movq 0x48(%rbx), %rcx
movq 0x8(%rcx,%r13,8), %rax
cmpq %rax, (%rcx,%r13,8)
je 0x2a48a
movl -0x4(%rax), %eax
jmp 0x2a48c
xorl %eax, %eax
movl %eax, 0xc(%rsp)
movq 0x48(%rbx), %rcx
leaq (%rcx,%r13,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2a4ae
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2a4b6
movq %r14, %rdx
callq 0xd68c
movq 0x60(%rbx), %rcx
movq (%rcx,%r13,8), %rax
cmpq %rax, 0x8(%rcx,%r13,8)
je 0x2a4cd
leaq (%rcx,%r13,8), %rcx
movq %rax, 0x8(%rcx)
incl %r15d
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r12, %rcx
cmpq %r15, %rcx
ja 0x2a44a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x27862
movq 0x60(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x278f6
testb %al, %al
je 0x2b2c9
leaq 0x30(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x27942
movq %rax, 0x10(%r12)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2b2dc
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2b3cb
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 0xcc1c
movq 0x20(%rbp,%rbx,8), %rax
movq %rax, 0x40(%rsp)
leaq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x15bec
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b388
callq 0x52a0
movq %r13, %rbx
movq 0x270(%r13), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
callq 0x2a38a
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 0x2b32b
jmp 0x2b3cd
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 0x1ab5c(%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 0x2b42d
callq 0x52a0
movq %rbx, %rdi
callq 0x55a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x279be
movb %al, 0x3(%rsp)
movq 0x278(%r14), %rax
cmpq 0x270(%r14), %rax
je 0x2b759
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 0xcc1c
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 0x15bec
movl %eax, %r12d
movq 0x10(%rsp), %rdi
movq %rbx, %r15
cmpq %rbx, %rdi
je 0x2b6e6
callq 0x52a0
movq %r13, %r14
movq 0x270(%r13), %rax
movq (%rax,%rbp,8), %rdi
cmpb $0x0, 0x3(%rsp)
je 0x2b718
movl %r12d, %esi
callq 0x2a300
movq 0x270(%r14), %rax
movq (%rax,%rbp,8), %rdi
movl %r12d, %esi
callq 0x2a300
jmp 0x2b733
movl %r12d, %esi
callq 0x2a346
movq 0x270(%r14), %rax
movq (%rax,%rbp,8), %rdi
movl %r12d, %esi
callq 0x2a346
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 0x2b67b
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 0x2b77a
callq 0x52a0
movq %r14, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x27a3a
movb %al, 0x7(%rsp)
xorl %ebp, %ebp
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x27a3a
movl %r15d, %ecx
movq 0x2e0(%r14), %rdx
movslq (%rdx,%rcx,4), %rdx
addq 0x138(%rbx), %rdx
movq %rdx, 0x138(%rbx)
testb %al, %al
jne 0x2b7ec
movq 0x2f8(%r14), %rax
movslq (%rax,%rcx,4), %rbp
addq %rdx, %rbp
movq %rbp, 0x138(%rbx)
movq 0x2c8(%r14), %rax
movslq (%rax,%rcx,4), %rax
addq 0x140(%rbx), %rax
movq %rax, 0x140(%rbx)
cmpb $0x0, 0x7(%rsp)
je 0x2b81a
xorl %ecx, %ecx
jmp 0x2b825
movq 0x2f8(%r14), %rdx
movslq (%rdx,%rcx,4), %rcx
addq %rax, %rcx
movq %rcx, 0x140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a6ef(%rip), %rdx     # 0x45f50
movq 0x270(%rdi), %rax
movq 0x278(%rdi), %rcx
cmpb $0x1, 0x24d(%rdx)
jne 0x2b8ca
cmpq %rax, %rcx
je 0x2b94b
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x100(%rbx), %rdx
movl (%rdx,%rcx,4), %esi
movq (%rax,%rcx,8), %rdi
cmpq %r12, %r15
jbe 0x2b8a2
callq 0x2a346
jmp 0x2b8a7
callq 0x2a300
movl %ebp, %ecx
movq 0x270(%r14), %rax
movq 0x278(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x2b888
jmp 0x2b94b
cmpq %r12, %r15
jbe 0x2b90e
cmpq %rax, %rcx
je 0x2b94b
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x100(%rbx), %rdx
movl (%rdx,%rcx,4), %esi
movq (%rax,%rcx,8), %rdi
callq 0x2a346
movl %ebp, %ecx
movq 0x270(%r14), %rax
movq 0x278(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x2b8db
jmp 0x2b94b
cmpq %rax, %rcx
je 0x2b94b
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x100(%rbx), %rdx
movl (%rdx,%rcx,4), %esi
movq (%rax,%rcx,8), %rdi
callq 0x2a300
movl %ebp, %ecx
movq 0x270(%r14), %rax
movq 0x278(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x2b91a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2baa5
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 0xcc1c
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 0x15bec
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x2ba17
callq 0x52a0
movq 0x270(%r13), %rax
movq (%rax,%r12,8), %rdi
movl %ebp, %esi
callq 0x2a38a
movq 0x100(%rbx), %rcx
movl %ebp, (%rcx,%r12,4)
leaq 0x1a515(%rip), %rcx     # 0x45f50
cmpb $0x1, 0x24d(%rcx)
jne 0x2ba72
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
xorl %edx, %edx
testl %eax, %eax
setg %dl
leaq 0x1a4f7(%rip), %rsi     # 0x45f50
cmpl 0x248(%rsi), %ecx
cmovlel 0x8(%rsp), %edx
movzbl %dl, %ecx
movq 0xe8(%rbx), %rdx
movl %ecx, (%rdx,%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 0x2b9b5
jmp 0x2baa8
xorl %r8d, %r8d
leaq 0x1a4a1(%rip), %rax     # 0x45f50
cmpb $0x0, 0x24d(%rax)
jne 0x2bb01
leaq 0x80(%rsp), %rcx
movl 0x1c(%rcx), %ecx
cmpl $0x3, %ecx
setne %dl
cmpl $0x6, %ecx
setne %cl
andb %dl, %cl
movl %r8d, %edx
negl %edx
cmovsl %r8d, %edx
xorl %esi, %esi
testl %r8d, %r8d
setg %sil
cmpl 0x248(%rax), %edx
movzbl %cl, %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 0x2bb22
callq 0x52a0
movq %rbx, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movl %esi, %ebx
movq %rdi, %r14
movl %r15d, %eax
xorb $0x1, %al
movzbl %al, %eax
movq 0x60(%rdi,%rax,8), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebp
movl %r15d, %eax
movq 0x8(%r14,%rax,8), %rax
movslq %ebx, %rcx
movq (%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movslq %ebp, %rdx
movq (%rax,%rcx,8), %rax
movq (%rax,%rdx,8), %r13
cmpb $0x1, (%r13)
movzbl %r15b, %r12d
jne 0x2cc45
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0x2cc66
cmpb $0x1, 0x148(%r13)
jne 0x2cc17
leaq 0x1934d(%rip), %rax     # 0x45f50
cmpb $0x0, 0x24c(%rax)
jne 0x2cc17
movq %r14, %rdi
movq %r13, %rsi
callq 0x2b83e
movq 0x138(%r13), %rax
movq 0x140(%r13), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rcx, %rax
setbe %dl
setae %sil
testb %r15b, %r15b
cmovnel %edx, %esi
movzbl %sil, %eax
incq 0x328(%r14,%rax,8)
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x2671a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e448
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 0x2e3f5
movq (%rsi), %r14
movq (%r14,%rbx,8), %r14
xorl %r15d, %r15d
movq (%r14,%r15,8), %r12
cmpb $0x1, (%r12)
jne 0x2e3ed
movq 0x138(%r12), %r13
cmpq 0x140(%r12), %r13
jbe 0x2e3e3
incq %r10
movq %r10, 0x328(%rdi)
jmp 0x2e3ed
incq %r9
movq %r9, 0x330(%rdi)
incq %r15
cmpq %r15, %rcx
jne 0x2e3ba
testl %r8d, %r8d
jle 0x2e43c
movq (%rdx), %r14
movq (%r14,%rbx,8), %rbx
xorl %r14d, %r14d
movq (%rbx,%r14,8), %r15
cmpb $0x1, (%r15)
jne 0x2e434
movq 0x138(%r15), %r12
cmpq 0x140(%r15), %r12
jae 0x2e42a
incq %r10
movq %r10, 0x328(%rdi)
jmp 0x2e434
incq %r9
movq %r9, 0x330(%rdi)
incq %r14
cmpq %r14, %r8
jne 0x2e404
incq %r11
cmpq %rax, %r11
jne 0x2e3a8
movq 0x270(%rdi), %rbx
movq 0x278(%rdi), %r14
cmpq %r14, %rbx
je 0x2e469
movq (%rbx), %rdi
callq 0x2a4fa
addq $0x8, %rbx
jmp 0x2e456
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e64e
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 0x2e630
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2fbda
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2e63e
callq 0x52a0
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x40(%rsp,%rax)
je 0x2e5fe
movq 0x16973(%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 0x2e6b3
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2e695
callq 0x52a0
movq 0x1692c(%rip), %rsi     # 0x44fc8
leaq 0x20(%rsp), %rdi
callq 0x5440
leaq 0x98(%rsp), %rdi
callq 0x5120
movq %rbx, %rdi
callq 0xc830
movq %r14, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e6e0
movslq %edx, %rdx
cmpq $0x40, %rdx
jae 0x2e6ef
btrq %rdx, %rdi
incq %rdx
cmpq $0x40, %rdx
jne 0x2e6cd
movl %esi, %ecx
shrq %cl, %rdi
xorl %eax, %eax
cmpl $0x40, %esi
cmovbq %rdi, %rax
retq
pushq %rax
leaq 0x8b2d(%rip), %rdi      # 0x37224
leaq 0x8b18(%rip), %rsi      # 0x37216
movl $0x40, %ecx
xorl %eax, %eax
callq 0x5480
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e748
testl %esi, %esi
je 0x2e73c
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 0x2e744
movl %edx, %ecx
shrq %cl, %rdi
shlq %cl, %rdi
movq %rdi, %rax
retq
pushq %rax
leaq 0x8a24(%rip), %rdi      # 0x37174
leaq 0x8a2a(%rip), %rsi      # 0x37181
leaq 0x8a31(%rip), %rcx      # 0x3718f
movl $0x46, %edx
callq 0x51d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x179cc(%rip), %rsi     # 0x461a8
movl $0x10, %edx
callq 0x5110
movq 0x179bb(%rip), %rcx     # 0x461a8
cmpb $0x0, (%rcx)
je 0x2e836
movq 0x167d7(%rip), %rbx     # 0x44fd0
leaq 0x89c8(%rip), %rsi      # 0x371c8
movl $0xc, %edx
movq %rbx, %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
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e912
cmpl $0x3, %edi
je 0x2e8bb
cmpl $0x1, %edi
jne 0x2e982
movl $0x200, (%rbp)          # imm = 0x200
movl $0x4, (%r13)
movl $0x40, (%r12)
movq 0x8(%r14), %rdx
leaq 0x8945(%rip), %rcx      # 0x371d5
movl $0x8, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x54b0
movq 0x8(%rbx), %rdx
leaq 0x6af3(%rip), %rcx      # 0x3539e
movl $0x3, %r8d
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x2e979
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 0x2e976
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 0x2e984
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_O1/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 0xc5b2
subq %r12, %r15
shrq $0x2, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2f196
callq 0x52a0
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
divsd 0x7e22(%rip), %xmm0     # 0x36fc8
callq 0x50a0
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x2f279
cvttsd2si %xmm0, %r13d
xorl %ebp, %ebp
movq (%r14), %rax
leaq (,%rbp,2), %r12
addq %rbp, %r12
movq (%rax,%r12,8), %rcx
movq 0x8(%rax,%r12,8), %rdx
subq %rcx, %rdx
je 0x2f255
sarq $0x2, %rdx
xorl %esi, %esi
leal (%rsi,%r13), %r15d
cmpq %r15, %rdx
cmoval %r15d, %edx
movl $0x0, %eax
cmpl %edx, %esi
jge 0x2f208
movslq %esi, %rsi
movslq %edx, %rdx
xorl %eax, %eax
addl (%rcx,%rsi,4), %eax
incq %rsi
cmpq %rdx, %rsi
jl 0x2f1fd
movq (%rbx), %rcx
leaq (%rcx,%r12,8), %rdi
cltd
idivl %r13d
movl %eax, 0x10(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2f22d
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2f237
leaq 0x10(%rsp), %rdx
callq 0x12568
movl %r15d, %eax
movq (%r14), %rdx
movq (%rdx,%r12,8), %rcx
movq 0x8(%rdx,%r12,8), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
movl %r15d, %esi
cmpq %rax, %rdx
ja 0x2f1e1
movq 0x8(%r14), %rax
subq (%r14), %rax
incl %ebp
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rbp, %rax
ja 0x2f1bf
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 0x2f2aa
callq 0x52a0
jmp 0x2f2aa
movq %rax, %r14
movq %rbx, %rdi
callq 0xc642
movq %r14, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2f2d1
leaq 0x5210(%rip), %rsi      # 0x344d8
leaq 0x520d(%rip), %rdx      # 0x344dc
jmp 0x2f2df
leaq 0x5205(%rip), %rsi      # 0x344dd
leaq 0x5203(%rip), %rdx      # 0x344e2
movq %rbx, %rdi
callq 0xccac
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x52e0
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 0x2fcbf
callq 0x52a0
movq 0x18(%rbx), %rax
movabsq $0x1010000010f, %rcx    # imm = 0x1010000010F
movq %rcx, (%rax)
movl $0x8, %edi
callq 0x52e0
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 0x2fd00
callq 0x52a0
movq (%rbx), %rax
movabsq $0x28c000000ec, %rcx    # imm = 0x28C000000EC
movq %rcx, (%rax)
movl $0x8, %edi
callq 0x52e0
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 0x2fd42
callq 0x52a0
movq 0x30(%rbx), %rax
movabsq $0x100600000ff8, %rcx   # imm = 0x100600000FF8
movq %rcx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x2fd5f
jmp 0x2fd5f
movq %rax, %r14
movq %rbx, %rdi
callq 0xc800
movq %r14, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O1/gvaumour[P]cache-simulator/src/Cache.hh
// Function: PerfParameters::PerfParameters()
PerfParameters() {

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

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

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

// 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 0x52e0
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 0x33987
callq 0x52a0
movq 0x18(%rbx), %rax
movabsq $0xa0000000a, %rcx      # imm = 0xA0000000A
movq %rcx, (%rax)
movl $0x8, %edi
callq 0x52e0
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 0x339c8
callq 0x52a0
movq (%rbx), %rax
movabsq $0x250000000a, %rcx     # imm = 0x250000000A
movq %rcx, (%rax)
movl $0x8, %edi
callq 0x52e0
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 0x33a0a
callq 0x52a0
movq 0x30(%rbx), %rax
movabsq $0x6400000064, %rcx     # imm = 0x6400000064
movq %rcx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x33a27
jmp 0x33a27
movq %rax, %r14
movq %rbx, %rdi
callq 0xc800
movq %r14, %rdi
callq 0x55a0
// File: /workspace/github_cpp_makefile_star2_O1/asdfz1346[P]MyServer/MyServer.cpp
// Function: MyServer::link_startou(char const*, short)
void MyServer::link_startou(const char *ip,short port){
	if(!server_listen(ip,port)){
		printf("	server_listen error\n");	
	}
	struct ARG arg;
	arg.p = this;
	std::cout << "main threadid = "<<pthread_self()<<std::endl;
	pthread_create(&accept_thread,NULL,accept_thread_proc,&arg);
	
	for(int i=0;i<THREAD_NUM;i++){
		pthread_create(&worker_thread[i],NULL,worker_thread_proc,&arg);
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x26f0
testb %al, %al
jne 0x265c
leaq 0x2b68(%rip), %rdi      # 0x51bf
callq 0x2330
leaq -0x20(%rbp), %r14
movq %rbx, (%r14)
movq 0x496e(%rip), %r15      # 0x6fd8
leaq 0x29af(%rip), %rsi      # 0x5020
movl $0x10, %edx
movq %r15, %rdi
callq 0x22a0
callq 0x2200
movq %r15, %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x21a0
leaq 0x175(%rip), %rdx       # 0x2834
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x23b0
addq $0x10, %rbx
leaq 0x3a7(%rip), %rdx       # 0x2a7e
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x23b0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/asdfz1346[P]MyServer/MyServer.cpp
// Function: MyServer::server_listen(char const*, short)
bool MyServer::server_listen(const char *ip,short port){
	//socket
	listenfd = socket(AF_INET,SOCK_STREAM|SOCK_NONBLOCK,0);
	if(listenfd==-1){
		printf("soket error\n");
		return false;
	}
	int on =1;
	setsockopt(listenfd,SOL_SOCKET,SO_REUSEADDR,&on,sizeof on);
	setsockopt(listenfd,SOL_SOCKET,SO_REUSEPORT,&on,sizeof on);

	//bind
	struct sockaddr_in serveraddr;
	memset(&serveraddr,0,sizeof serveraddr);
	serveraddr.sin_family= AF_INET;
	serveraddr.sin_addr.s_addr = inet_addr(ip);//点分十进制ip转换成一个长整数
	serveraddr.sin_port = htons(port);//转换为网络字节序
	if(bind(listenfd,(struct sockaddr*)&serveraddr,sizeof(serveraddr))==-1){
		printf("bind error\n");
		return false;
	}
	//listen
	if(listen(listenfd,LISTEN_NUM)==-1){//待测试
		printf("listen() error\n");
		return false;
	}
	//epoll
	epollfd = epoll_create(1);

	struct epoll_event e;
	memset(&e,0,sizeof e);
	e.events = EPOLLIN;
	e.data.fd = listenfd;
	if(epoll_ctl(epollfd, EPOLL_CTL_ADD, listenfd,&e)==-1){
		printf("epoll_ctl error;\n");
		return false;
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl $0x2, %edi
movl $0x801, %esi            # imm = 0x801
xorl %edx, %edx
callq 0x2090
movl %eax, 0x18(%rbx)
cmpl $-0x1, %eax
je 0x2805
leaq -0x24(%rbp), %r12
movl $0x1, (%r12)
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movq %r12, %rcx
movl $0x4, %r8d
callq 0x2390
movl 0x18(%rbx), %edi
movl $0x1, %esi
movl $0xf, %edx
movq %r12, %rcx
movl $0x4, %r8d
callq 0x2390
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %r12
movaps %xmm0, (%r12)
movw $0x2, (%r12)
movq %r15, %rdi
callq 0x2230
movl %eax, 0x4(%r12)
rolw $0x8, %r14w
movw %r14w, 0x2(%r12)
movl 0x18(%rbx), %edi
movq %r12, %rsi
movl $0x10, %edx
callq 0x2070
cmpl $-0x1, %eax
je 0x280e
movl 0x18(%rbx), %edi
movl $0x5, %esi
callq 0x2290
cmpl $-0x1, %eax
je 0x2817
movl $0x1, %edi
callq 0x23c0
movl %eax, 0x1c(%rbx)
leaq -0x30(%rbp), %rcx
movq $0x0, (%rcx)
movl $0x0, 0x8(%rcx)
movl $0x1, (%rcx)
movl 0x18(%rbx), %edx
movl %edx, 0x4(%rcx)
movl %eax, %edi
movl $0x1, %esi
callq 0x22f0
cmpl $-0x1, %eax
setne %bl
jne 0x2825
leaq 0x29d6(%rip), %rdi      # 0x51d4
callq 0x2330
jmp 0x2825
leaq 0x29f3(%rip), %rdi      # 0x51ff
jmp 0x281e
leaq 0x29df(%rip), %rdi      # 0x51f4
jmp 0x281e
leaq 0x29c7(%rip), %rdi      # 0x51e5
callq 0x2330
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/asdfz1346[P]MyServer/MyServer.cpp
// Function: MyServer::main_loop()
void MyServer::main_loop(){	
	while(nstop){
		struct 	epoll_event ev[1024];
		int n = epoll_wait(epollfd,ev,1024,10);
		if(n<=0)
			continue;	
		int m = std::min(n,1024);
		for(int i=0;i<m;i++){
			if(ev[i].data.fd == listenfd)
				pthread_cond_signal(&accept_cond);
			else if(ev[i].events&(EPOLLIN | EPOLLERR)){
				pthread_mutex_lock(&clientset_mutex);
				if(clientset.find(ev[i].data.fd) != clientset.end()){
					pthread_mutex_unlock(&clientset_mutex);
					pthread_mutex_lock(&clientlist_mutex);
					clientlist.push_back(ev[i].data.fd);
					pthread_mutex_unlock(&clientlist_mutex);
				}else
					pthread_mutex_unlock(&clientset_mutex);	
			}
		}
	}
}

// Assembly:
cmpb $0x1, 0x118(%rdi)
jne 0x4a4e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3028, %rsp           # imm = 0x3028
movq %rdi, %rbx
leaq 0x98(%rdi), %rax
movq %rax, -0x38(%rbp)
leaq 0x48(%rdi), %r12
leaq 0xc0(%rdi), %rax
movq %rax, -0x48(%rbp)
leaq 0x28(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0xe8(%rdi), %rax
movq %rax, -0x50(%rbp)
movl 0x1c(%rbx), %edi
leaq -0x3050(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
movl $0xa, %ecx
callq 0x2110
testl %eax, %eax
jle 0x4a30
movl %eax, %r15d
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %r15d
cmovgel %eax, %r15d
xorl %r13d, %r13d
movq %r15, -0x30(%rbp)
leaq (,%r13,2), %rax
addq %r13, %rax
movl -0x304c(%rbp,%rax,4), %ecx
cmpl 0x18(%rbx), %ecx
jne 0x497b
movq -0x50(%rbp), %rdi
callq 0x2030
jmp 0x4a24
leaq -0x3050(,%rax,4), %r14
addq %rbp, %r14
testb $0x9, (%r14)
je 0x4a24
movq -0x38(%rbp), %rdi
callq 0x2300
movq 0x50(%rbx), %rcx
movq %r12, %rax
testq %rcx, %rcx
je 0x49c3
movl 0x4(%r14), %edx
movq %r12, %rax
xorl %esi, %esi
cmpl %edx, 0x20(%rcx)
setl %sil
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x49ac
movq %r12, %r15
cmpq %r12, %rax
je 0x49d9
movl 0x4(%r14), %ecx
cmpl 0x20(%rax), %ecx
cmovlq %r12, %rax
movq %rax, %r15
movq -0x38(%rbp), %rdi
callq 0x21d0
cmpq %r12, %r15
movq -0x30(%rbp), %r15
je 0x4a24
movq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x2300
movl $0x18, %edi
callq 0x2220
movl 0x4(%r14), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x2060
incq 0x38(%rbx)
movq %r15, %rdi
movq -0x30(%rbp), %r15
callq 0x21d0
incq %r13
cmpq %r15, %r13
jne 0x4956
cmpb $0x0, 0x118(%rbx)
jne 0x491f
addq $0x3028, %rsp           # imm = 0x3028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tporo.cpp
// Function: TPoro::TPoro(int, int, double)
TPoro::TPoro(int x, int y, double vol) {
	this->x = x;
	this->y = y;
	volumen = vol;
	color = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movsd %xmm0, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tporo.cpp
// Function: TPoro::TPoro(int, int, double, char*)
TPoro::TPoro(int x, int y, double vol, char* c) {
	VerifyLowerCase(c);
	this->x = x;
	this->y = y;
	volumen = vol;
	if(c == NULL)
		color = NULL;
	else{
		color = new char[strlen(c) + 1];
		strcpy(color, c);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, -0x28(%rbp)
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq -0x30(%rbp), %r12
movq %rcx, (%r12)
movq %r12, %rsi
callq 0x42c4
movl %r15d, (%rbx)
movl %r14d, 0x4(%rbx)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x8(%rbx)
movq (%r12), %r14
testq %r14, %r14
je 0x42af
movq %r14, %rdi
callq 0x1080
leaq 0x1(%rax), %rdi
callq 0x1030
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10d0
movq $0x0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tporo.cpp
// Function: TPoro::VerifyLowerCase(char*&)
void TPoro::VerifyLowerCase(char *&c){
	char* aux;
	if(c==NULL)
		aux = NULL;
	else
	{
		aux = new char[strlen(c) + 1];
		for(int i=0; i<strlen(c); i++)
			aux[i] = tolower(c[i]);
		c = new char[strlen(aux) +1];
		strcpy(c, aux);
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r14
testq %r14, %r14
je 0x433f
movq %rsi, %rbx
movq %r14, %rdi
callq 0x1080
movq %rax, %r12
leaq 0x1(%rax), %rdi
callq 0x1030
movq %rax, %r15
testq %r12, %r12
je 0x4312
xorl %r13d, %r13d
movsbl (%r14,%r13), %edi
callq 0x1130
movb %al, (%r15,%r13)
incq %r13
cmpq %r13, %r12
jne 0x42fc
movq %r15, %rdi
callq 0x1080
leaq 0x1(%rax), %rdi
callq 0x1030
movq %rax, (%rbx)
movq %rax, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tporo.cpp
// Function: TPoro::Copy(TPoro const&)
void TPoro::Copy(const TPoro& p) {
	x = p.x;
	y = p.y;
	volumen = p.volumen;
	if(p.color == NULL)
		color = NULL;
	else
	{
		color = new char[strlen(p.color) + 1];
		strcpy(color, p.color);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl (%rsi), %eax
movl %eax, (%rdi)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rdi)
movsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x8(%rdi)
movq 0x10(%rsi), %rdi
testq %rdi, %rdi
je 0x43a4
movq %rsi, %rbx
callq 0x1080
leaq 0x1(%rax), %rdi
callq 0x1030
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rsi
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x10d0
movq $0x0, 0x10(%r14)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tporo.cpp
// Function: TPoro::~TPoro()
TPoro::~TPoro() {
	x = y = volumen = 0;
	if(color != NULL){
		delete color;	//Se libera la memoria
		color = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x43dc
movl $0x1, %esi
callq 0x1100
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tporo.cpp
// Function: TPoro::operator=(TPoro const&)
TPoro& TPoro::operator =(const TPoro &p) {
	if(this != &p)
	{
		(*this).~TPoro();
		Copy(p);
	}
	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x4422
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4417
movl $0x1, %esi
callq 0x1100
movq $0x0, 0x10(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4358
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tporo.cpp
// Function: TPoro::Color(char*)
void TPoro::Color(char *newColor) {
	VerifyLowerCase(newColor);
	if(newColor == NULL)
		color = NULL;
	else
	{
		color = new char[strlen(newColor) + 1];
		strcpy(color, newColor);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x18(%rbp), %r14
movq %rsi, (%r14)
movq %r14, %rsi
callq 0x42c4
movq (%r14), %r14
testq %r14, %r14
je 0x45f1
movq %r14, %rdi
callq 0x1080
leaq 0x1(%rax), %rdi
callq 0x1030
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x10d0
movq $0x0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tporo.cpp
// Function: operator<<(std::ostream&, TPoro const&)
ostream& operator<<(ostream &os, const TPoro &p){
	if(!p.EsVacio()){
		os.setf(ios::fixed);
		os.precision(2);
		os << "(" << p.x << ", " << p.y << ") " << p.volumen << " ";
		if(p.color != NULL)
			os << p.color;
		else
			os << "-";
	}
	else
		os << "()";

	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, (%rsi)
jne 0x4670
cmpl $0x0, 0x4(%r14)
jne 0x4670
movsd 0x8(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4670
jp 0x4670
cmpq $0x0, 0x10(%r14)
jne 0x4670
leaq 0x3bd4(%rip), %rsi      # 0x823a
movl $0x2, %edx
jmp 0x472c
movq (%rbx), %rax
movq -0x18(%rax), %rcx
orl $0x4, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%rbx,%rax)
leaq 0x3b6f(%rip), %rsi      # 0x81ff
movl $0x1, %edx
movq %rbx, %rdi
callq 0x1110
movl (%r14), %esi
movq %rbx, %rdi
callq 0x11a0
movq %rax, %r15
leaq 0x3b4f(%rip), %rsi      # 0x8201
movl $0x2, %edx
movq %rax, %rdi
callq 0x1110
movl 0x4(%r14), %esi
movq %r15, %rdi
callq 0x11a0
movq %rax, %r15
leaq 0x3b2f(%rip), %rsi      # 0x8204
movl $0x2, %edx
movq %rax, %rdi
callq 0x1110
movsd 0x8(%r14), %xmm0
movq %r15, %rdi
callq 0x1160
leaq 0x3b0e(%rip), %rsi      # 0x8205
movl $0x1, %edx
movq %rax, %rdi
callq 0x1110
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x4720
movq %r14, %rdi
callq 0x1080
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
jmp 0x472f
leaq 0x3ae0(%rip), %rsi      # 0x8207
movl $0x1, %edx
movq %rbx, %rdi
callq 0x1110
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tvectorporo.cpp
// Function: TVectorPoro::TVectorPoro(int)
TVectorPoro::TVectorPoro(int creaDim) {
	if(creaDim <= 0)
	{
		dimension = 0;
		datos = NULL;
	}
	else
	{
		dimension = creaDim;
		datos = new TPoro[dimension];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %r15
leaq 0x10(%rdi), %rbx
movq %rbx, %rdi
callq 0x4210
testl %r14d, %r14d
jle 0x47e6
movq %rbx, -0x40(%rbp)
movl %r14d, (%r15)
movl %r14d, %r14d
leaq (%r14,%r14,2), %rax
leaq 0x8(,%rax,8), %rdi
movq %rdi, -0x38(%rbp)
callq 0x1030
movq %r14, (%rax)
movq %rax, -0x30(%rbp)
leaq 0x8(%rax), %rbx
shlq $0x3, %r14
leaq (%r14,%r14,2), %r12
negq %r12
xorl %r14d, %r14d
movq %rbx, %r13
movq %r13, %rdi
callq 0x4210
addq $-0x18, %r14
addq $0x18, %r13
cmpq %r14, %r12
jne 0x47cf
jmp 0x47ef
movl $0x0, (%r15)
xorl %ebx, %ebx
movq %rbx, 0x8(%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x4836
movq %rax, %r15
testq %r14, %r14
je 0x4829
negq %r14
movq -0x30(%rbp), %rbx
addq $-0x10, %rbx
leaq (%rbx,%r14), %rdi
callq 0x43b2
addq $-0x18, %r14
jne 0x481a
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x11c0
movq -0x40(%rbp), %rdi
callq 0x43b2
movq %r15, %rdi
callq 0x11b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/jespinosa94[P]PED16/lib/tvectorporo.cpp
// Function: TVectorPoro::TVectorPoro(TVectorPoro const&)
TVectorPoro::TVectorPoro(const TVectorPoro &tvp) {
	dimension = tvp.dimension;
	datos = new TPoro[dimension];
	if(datos == NULL)
		dimension = 0;
	else
		for(int i=0; i<dimension; i++)
			datos[i] = tvp.datos[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
addq $0x10, %rdi
movq %rdi, -0x48(%rbp)
callq 0x4210
movslq (%r14), %rbx
movl $0x18, %ecx
movq %rbx, %rax
mulq %rcx
movq %rax, %rdi
seto %al
addq $0x8, %rdi
movq $-0x1, %rcx
cmovbq %rcx, %rdi
movl %ebx, (%r15)
testb %al, %al
cmovneq %rcx, %rdi
movq %rdi, -0x40(%rbp)
callq 0x1030
movq %rbx, (%rax)
movq %rax, -0x30(%rbp)
addq $0x8, %rax
movq %rax, -0x38(%rbp)
testl %ebx, %ebx
je 0x48db
shlq $0x3, %rbx
leaq (%rbx,%rbx,2), %r12
negq %r12
xorl %r13d, %r13d
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x4210
addq $-0x18, %r13
addq $0x18, %rbx
cmpq %r13, %r12
jne 0x48c6
movq -0x38(%rbp), %rax
movq %rax, 0x8(%r15)
cmpl $0x0, (%r15)
jle 0x4910
xorl %ebx, %ebx
xorl %r12d, %r12d
movq 0x8(%r14), %rsi
addq %rbx, %rsi
movq 0x8(%r15), %rdi
addq %rbx, %rdi
callq 0x43e4
incq %r12
movslq (%r15), %rax
addq $0x18, %rbx
cmpq %rax, %r12
jl 0x48ee
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4921
movq %rax, %r14
jmp 0x4955
movq %rax, %r14
testq %r13, %r13
je 0x4948
negq %r13
movq -0x30(%rbp), %rbx
addq $-0x10, %rbx
leaq (%rbx,%r13), %rdi
callq 0x43b2
addq $-0x18, %r13
jne 0x4939
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x11c0
movq -0x48(%rbp), %rdi
callq 0x43b2
movq %r14, %rdi
callq 0x11b0