LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1bca3(%rip), %rax     # 0x3df50
cmpb $0x1, 0x1cc(%rax)
jne 0x22373
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
andl $0x0, (%r14)
movq 0x60(%rdi), %rcx
xorl %r15d, %r15d
pushq $0x18
popq %r12
movl %r15d, %r15d
movq 0x68(%rbx), %rax
subq %rcx, %rax
cqto
idivq %r12
cmpq %r15, %rax
jbe 0x22366
imulq $0x18, %r15, %r13
movq (%rcx,%r13), %rdx
movq 0x8(%rcx,%r13), %rcx
subq %rdx, %rcx
je 0x22323
sarq $0x2, %rcx
xorl %eax, %eax
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x2231a
addl (%rdx,%rsi,4), %eax
incl %esi
jmp 0x2230c
cltd
idivl %ecx
movq 0x48(%rbx), %rdi
jmp 0x22339
movq 0x48(%rbx), %rdi
movq 0x8(%rdi,%r13), %rax
cmpq %rax, (%rdi,%r13)
je 0x22337
movl -0x4(%rax), %eax
jmp 0x22339
xorl %eax, %eax
movl %eax, 0xc(%rsp)
addq %r13, %rdi
movq %r14, %rsi
callq 0x9f84
movq 0x60(%rbx), %rcx
movq (%rcx,%r13), %rax
cmpq %rax, 0x8(%rcx,%r13)
je 0x2235e
addq %rcx, %r13
movq %rax, 0x8(%r13)
incl %r15d
jmp 0x222de
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::initFeatures()
void
SimplePerceptronPredictor::initFeatures()
{
	vector<string>* criterias_name = &m_feature_names;
	vector<params_hash>* features_hash = &m_features_hash;
	vector<SimpleFeatureTable*>* features = &m_features;		

	for(auto feature : *criterias_name)
	{
		features->push_back( new SimpleFeatureTable(m_tableSize, feature, false));
		features_hash->push_back( parseFeatureName(feature) );
	}	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq 0x288(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x270(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x2a0(%rdi), %rsi
movq %rdi, 0x18(%rsp)
movq 0x2a8(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0x98(%rsp), %r14
leaq 0x78(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0x58(%rsp), %r13
cmpq 0x20(%rsp), %rsi
je 0x22c89
movq %r14, %rdi
movq %rsi, 0x28(%rsp)
callq 0x5410
pushq $0x78
popq %rdi
callq 0x52e0
movq %rax, %rbx
movq %r14, %rsi
movq 0x18(%rsp), %rax
movl 0x2b8(%rax), %ebp
movq %r15, %rdi
callq 0x5410
movq %r15, %rdx
movb $0x1, %r15b
movq %rbx, %rdi
movl %ebp, %esi
movq %rdx, %rbp
xorl %ecx, %ecx
callq 0x21fe8
movq %rbx, 0x30(%rsp)
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x24cf6
movq %rbp, %r15
movq %rbp, %rdi
callq 0x5618
movq %r13, %rdi
movq %r14, %rsi
callq 0x5410
movq %r12, %rdi
movq %r13, %rdx
callq 0x22daa
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xaf84
movq %r12, %rdi
callq 0x5618
movq %r13, %rdi
callq 0x5618
movq %r14, %rdi
callq 0x5618
movq 0x28(%rsp), %rsi
addq $0x20, %rsi
jmp 0x22bd2
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x22cbb
movq %rax, %r14
jmp 0x22caf
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x5618
leaq 0x58(%rsp), %rdi
callq 0x5618
jmp 0x22cdf
movq %rax, %r14
jmp 0x22cdf
movq %rax, %r14
jmp 0x22cd7
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x5618
testb %r15b, %r15b
je 0x22cdf
movq %rbx, %rdi
callq 0x52a0
leaq 0x98(%rsp), %rdi
callq 0x5618
movq %r14, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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 0x20054
movq 0x60(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x20094
testb %al, %al
je 0x22eb1
leaq 0x30(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x200d6
movq %rax, 0x10(%r12)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22ec4
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rdi, %rbx
leaq 0x70(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x30(%rax), %r15
xorl %eax, %eax
leaq 0x10(%rsp), %r12
xorl %r13d, %r13d
movl %eax, %r14d
movq 0x278(%rbx), %rax
subq 0x270(%rbx), %rax
sarq $0x3, %rax
cmpq %r14, %rax
jbe 0x22f53
imulq $0x28, %r14, %rsi
addq 0x288(%rbx), %rsi
movq %r12, %rdi
callq 0x9f3a
movq %r12, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
callq 0x11de8
movl %eax, %ebp
movq %r12, %rdi
callq 0x5618
movq 0x270(%rbx), %rax
movq (%rax,%r14,8), %rdi
movl %ebp, %esi
callq 0x22264
addl %eax, %r13d
leal 0x1(%r14), %eax
jmp 0x22ef1
leaq 0x70(%rsp), %rax
movl 0x1c(%rax), %eax
cmpl $0x3, %eax
setne %cl
cmpl $0x6, %eax
setne %al
andb %cl, %al
movl %r13d, %ecx
negl %ecx
cmovsl %r13d, %ecx
leaq 0x1afd7(%rip), %rdx     # 0x3df50
xorl %esi, %esi
testl %r13d, %r13d
setg %sil
cmpl 0x248(%rdx), %ecx
movzbl %al, %eax
cmovlel %eax, %esi
movzbl %sil, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5618
movq %rbx, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x90(%rsp), %rsi
callq 0x20136
movl %eax, %ebp
xorl %r13d, %r13d
movq %rsp, %r15
movl %r13d, %r13d
movq 0x278(%r14), %rax
subq 0x270(%r14), %rax
sarq $0x3, %rax
cmpq %r13, %rax
jbe 0x23252
imulq $0x28, %r13, %rsi
addq 0x288(%r14), %rsi
movq %r15, %rdi
callq 0x9f3a
movq 0x8(%rbx), %rsi
movq 0x20(%rbx), %rdx
movq %r15, %rdi
callq 0x11de8
movl %eax, %r12d
movq %r15, %rdi
callq 0x5618
movq 0x270(%r14), %rax
movq (%rax,%r13,8), %rdi
movl %r12d, %esi
testb %bpl, %bpl
je 0x23232
callq 0x2222a
movq 0x270(%r14), %rax
movq (%rax,%r13,8), %rdi
movl %r12d, %esi
callq 0x2222a
jmp 0x2324a
callq 0x22248
movq 0x270(%r14), %rax
movq (%rax,%r13,8), %rdi
movl %r12d, %esi
callq 0x22248
incl %r13d
jmp 0x231bd
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5618
movq %rbx, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rcx
movq %rdx, %rsi
movl %r12d, %edx
callq 0x20196
movb %al, 0x7(%rsp)
xorl %ebp, %ebp
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x20196
movl %r15d, %ecx
movq 0x2e0(%r14), %rdx
movslq (%rdx,%rcx,4), %rdx
addq 0x138(%rbx), %rdx
testb %al, %al
jne 0x232d6
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 0x232fd
xorl %ecx, %ecx
jmp 0x23308
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
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x138(%rsi), %r15
movq 0x140(%rsi), %r12
leaq 0x1ac08(%rip), %rax     # 0x3df50
cmpb $0x1, 0x24d(%rax)
jne 0x2339a
xorl %r13d, %r13d
movl %r13d, %r13d
movq 0x270(%r14), %rax
movq 0x278(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
jbe 0x2340f
movq 0x100(%rbx), %rcx
movl (%rcx,%r13,4), %esi
movq (%rax,%r13,8), %rdi
cmpq %r12, %r15
jbe 0x23390
callq 0x22248
jmp 0x23395
callq 0x2222a
incl %r13d
jmp 0x23354
xorl %eax, %eax
cmpq %r12, %r15
jbe 0x233d8
movl %eax, %r15d
movq 0x270(%r14), %rax
movq 0x278(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x2340f
movq 0x100(%rbx), %rcx
movl (%rcx,%r15,4), %esi
movq (%rax,%r15,8), %rdi
callq 0x22248
leal 0x1(%r15), %eax
jmp 0x233a1
movl %eax, %r15d
movq 0x270(%r14), %rax
movq 0x278(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x2340f
movq 0x100(%rbx), %rcx
movl (%rcx,%r15,4), %esi
movq (%rax,%r15,8), %rdi
callq 0x2222a
leal 0x1(%r15), %eax
jmp 0x233d8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rsi, %r13
movq %rdi, %r14
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x8c(%rsp), %eax
cmpl $0x3, %eax
setne %cl
cmpl $0x6, %eax
setne %al
andb %cl, %al
xorl %r15d, %r15d
leaq 0x10(%rsp), %rbp
leaq 0x1aaf1(%rip), %r12     # 0x3df50
movzbl %al, %eax
movl %eax, 0x4(%rsp)
xorl %ebx, %ebx
movl %r15d, %r15d
movq 0x278(%r14), %rax
subq 0x270(%r14), %rax
sarq $0x3, %rax
cmpq %r15, %rax
jbe 0x23514
imulq $0x28, %r15, %rsi
addq 0x288(%r14), %rsi
movq %rbp, %rdi
callq 0x9f3a
movq 0x20(%r13), %rdx
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x11de8
movq %rbp, %rdi
movl %eax, %ebp
callq 0x5618
movq 0x270(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
callq 0x22264
movq 0x100(%r13), %rcx
movl %ebp, (%rcx,%r15,4)
cmpb $0x1, 0x24d(%r12)
jne 0x23505
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
xorl %edx, %edx
testl %eax, %eax
setg %dl
cmpl 0x248(%r12), %ecx
cmovlel 0x4(%rsp), %edx
movzbl %dl, %ecx
movq 0xe8(%r13), %rdx
movl %ecx, (%rdx,%r15,4)
addl %eax, %ebx
incl %r15d
leaq 0x10(%rsp), %rbp
jmp 0x23468
cmpb $0x0, 0x24d(%r12)
jne 0x23548
movl %ebx, %eax
negl %eax
cmovsl %ebx, %eax
xorl %ecx, %ecx
testl %ebx, %ebx
setg %cl
cmpl 0x248(%r12), %eax
movl 0x4(%rsp), %eax
cmovgl %ecx, %eax
movzbl %al, %eax
movq 0xe8(%r13), %rcx
movl %eax, (%rcx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5618
movq %rbx, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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
imulq $0x18, %r12, %rcx
movslq %r15d, %rdx
movq (%rax,%rcx), %rax
movq (%rax,%rdx,8), %r13
cmpb $0x1, (%r13)
movzbl %bpl, %r12d
jne 0x23fd1
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0x23ff4
cmpb $0x1, 0x148(%r13)
jne 0x23fa3
leaq 0x19fc1(%rip), %rax     # 0x3df50
cmpb $0x0, 0x24c(%rax)
jne 0x23fa3
movq %r14, %rdi
movq %r13, %rsi
callq 0x23324
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 0x1f248
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_O2/gvaumour[P]cache-simulator/src/SimplePerceptron.cc
// Function: SimplePerceptronPredictor::printStats(std::ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void 
SimplePerceptronPredictor::printStats(std::ostream& out, std::string entete) 
{ 
	out << entete << ":SimplePerceptronPredictor:SRAMerror\t" << stats_cptSRAMerror << endl;
	if(simu_parameters.simple_perceptron_enableMigration)
	{
		out << entete << ":SimplePerceptronPredictor:TotalMigration\t" << stats_nbMigrations[true] + stats_nbMigrations[false] << endl;
		out << entete << ":SimplePerceptronPredictor:MigrationsFromSRAM\t" << stats_nbMigrations[true] << endl;
		out << entete << ":SimplePerceptronPredictor:MigrationsFromNVM\t" << stats_nbMigrations[false] << endl;	
	}
	out << entete << ":SimplePerceptronPredictor:WrongAlloc\t" << stats_wrong_alloc << endl;
	out << entete << ":SimplePerceptronPredictor:CorrectAlloc\t" << stats_good_alloc << endl;
	
	Predictor::printStats(out, entete);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x5290
leaq 0x7543(%rip), %rsi      # 0x2bd05
movq %rax, %rdi
callq 0x52c0
movq 0x320(%r14), %rsi
movq %rax, %rdi
callq 0x5200
movq %rax, %rdi
callq 0x5190
leaq 0x19768(%rip), %rax     # 0x3df50
cmpb $0x1, 0x24e(%rax)
jne 0x24892
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5290
leaq 0x7524(%rip), %rsi      # 0x2bd2b
movq %rax, %rdi
callq 0x52c0
movq 0x350(%r14), %rcx
movl (%rcx), %esi
addl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0x5560
movq %rax, %rdi
callq 0x5190
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5290
leaq 0x7519(%rip), %rsi      # 0x2bd56
movq %rax, %rdi
callq 0x52c0
movq 0x350(%r14), %rcx
movl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0x5560
movq %rax, %rdi
callq 0x5190
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5290
leaq 0x7514(%rip), %rsi      # 0x2bd85
movq %rax, %rdi
callq 0x52c0
movq 0x350(%r14), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x5560
movq %rax, %rdi
callq 0x5190
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5290
leaq 0x750f(%rip), %rsi      # 0x2bdb3
movq %rax, %rdi
callq 0x52c0
movq 0x330(%r14), %rsi
movq %rax, %rdi
callq 0x5200
movq %rax, %rdi
callq 0x5190
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5290
leaq 0x7505(%rip), %rsi      # 0x2bdda
movq %rax, %rdi
callq 0x52c0
movq 0x328(%r14), %rsi
movq %rax, %rdi
callq 0x5200
movq %rax, %rdi
callq 0x5190
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5410
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x20390
leaq 0x8(%rsp), %rdi
callq 0x5618
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5618
movq %rbx, %rdi
callq 0x5570
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movl 0x18(%rdi), %eax
movl 0x20(%rdi), %ecx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movl 0x24(%rdi), %r8d
xorl %r9d, %r9d
testl %ecx, %ecx
cmovlel %r9d, %ecx
movq 0x330(%rdi), %r10
testl %r8d, %r8d
cmovlel %r9d, %r8d
movq 0x328(%rdi), %r11
testl %eax, %eax
cmovlel %r9d, %eax
cmpq %rax, %r9
je 0x24cba
xorl %ebx, %ebx
cmpq %rbx, %rcx
je 0x24c6a
movq (%rsi), %r14
imulq $0x18, %r9, %r15
movq (%r14,%r15), %r14
movq (%r14,%rbx,8), %r14
cmpb $0x1, (%r14)
jne 0x24c65
movq 0x138(%r14), %r15
cmpq 0x140(%r14), %r15
jbe 0x24c5b
incq %r11
movq %r11, 0x328(%rdi)
jmp 0x24c65
incq %r10
movq %r10, 0x330(%rdi)
incq %rbx
jmp 0x24c25
imulq $0x18, %r9, %rbx
xorl %r14d, %r14d
cmpq %r14, %r8
je 0x24cb2
movq (%rdx), %r15
movq (%r15,%rbx), %r15
movq (%r15,%r14,8), %r15
cmpb $0x1, (%r15)
jne 0x24cad
movq 0x138(%r15), %r12
cmpq 0x140(%r15), %r12
jae 0x24ca3
incq %r11
movq %r11, 0x328(%rdi)
jmp 0x24cad
incq %r10
movq %r10, 0x330(%rdi)
incq %r14
jmp 0x24c71
incq %r9
jmp 0x24c1a
movq 0x270(%rdi), %rbx
movq 0x278(%rdi), %r14
cmpq %r14, %rbx
je 0x24cdb
movq (%rbx), %rdi
callq 0x22374
addq $0x8, %rbx
jmp 0x24cc8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $0x0, 0x10(%rdi)
leaq 0x20(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x5530
leaq 0x10(%rsp), %r12
movsbl %bpl, %ebp
leaq 0x20(%rsp), %r14
movq %rsp, %r15
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x40(%rsp,%rax)
jne 0x24ede
movq %r12, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x5590
cmpq $0x0, 0x8(%rsp)
je 0x24ed4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x25ef6
movq %r15, %rdi
callq 0x5618
jmp 0x24e95
leaq 0x20(%rsp), %rdi
callq 0x5170
movq %rbx, %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x24f15
movq %rax, %r14
movq %rsp, %rdi
callq 0x5618
leaq 0x20(%rsp), %rdi
callq 0x5170
movq %rbx, %rdi
callq 0x9ef6
movq %r14, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0x8(%rsp), %r14
movq %rdi, (%r14)
incl %edx
movslq %edx, %r15
cmpl $0x40, %r15d
jge 0x24f53
movq %r14, %rdi
movq %r15, %rsi
callq 0x25f22
incq %r15
jmp 0x24f3d
movq 0x8(%rsp), %rdx
movl %ebx, %ecx
shrq %cl, %rdx
xorl %eax, %eax
cmpl $0x40, %ebx
cmovbq %rdx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x24fab
testl %esi, %esi
je 0x24f9f
pushq $-0x1
popq %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 0x24fa7
movl %edx, %ecx
shrq %cl, %rdi
shlq %cl, %rdi
movq %rdi, %rax
retq
pushq %rax
leaq 0x7171(%rip), %rdi      # 0x2c124
leaq 0x7177(%rip), %rsi      # 0x2c131
leaq 0x717e(%rip), %rcx      # 0x2c13f
pushq $0x46
popq %rdx
callq 0x51e0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rax
leaq 0x19194(%rip), %rsi     # 0x3e1a8
pushq $0x10
popq %rdx
callq 0x5120
movq 0x19185(%rip), %rcx     # 0x3e1a8
cmpb $0x0, (%rcx)
je 0x25045
movq 0x17fa1(%rip), %rdi     # 0x3cfd0
leaq 0x7142(%rip), %rsi      # 0x2c178
callq 0x52c0
movq %rax, %rdi
callq 0x5190
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r15
movq 0x40(%rsp), %r14
cmpl $0x6, %edi
je 0x250d4
cmpl $0x3, %edi
je 0x250a8
cmpl $0x1, %edi
jne 0x25116
movl $0x200, (%rbp)          # imm = 0x200
movl $0x4, (%r13)
movl $0x40, (%r12)
leaq 0x70ee(%rip), %rsi      # 0x2c185
movq %rbx, %rdi
callq 0x55c0
leaq 0x5274(%rip), %rsi      # 0x2a31a
jmp 0x250cf
movl $0x4000, (%rbp)         # imm = 0x4000
movl $0x4, (%r13)
movl $0x40, (%r12)
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x55c0
movq 0x10(%r15), %rsi
movq %r14, %rdi
jmp 0x2510d
movq 0x8(%r15), %rdi
callq 0x5490
movl %eax, (%rbp)
movq 0x10(%r15), %rdi
callq 0x5490
movl %eax, (%r13)
movq 0x18(%r15), %rdi
callq 0x5490
movl %eax, (%r12)
movq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x55c0
movq 0x28(%r15), %rsi
movq %rbx, %rdi
callq 0x55c0
movb $0x1, %al
jmp 0x25118
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_O2/gvaumour[P]cache-simulator/src/common.cc
// Function: splitAddr_Bytes[abi:cxx11](unsigned long)
vector<string> splitAddr_Bytes(uint64_t a)
{
	stringstream ss;
	ss << std::hex << a;
   	string addr = ss.str();
	while(addr.size() < 16)
		addr = string(1,'0') + addr;

	vector<string> result;
	for(unsigned i = 0 ; i < addr.size(); i+=2)
	{
		stringstream ss1;
		ss1 << addr.at(i);
		ss1 << addr.at(i+1);
		result.push_back(ss1.str());
	}
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp            # imm = 0x358
movq %rsi, %r14
movq %rdi, (%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5220
leaq 0x58(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x70(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x70(%rsp,%rax)
movq %r14, %rsi
callq 0x5200
leaq 0x60(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x54d0
leaq 0x38(%rsp), %rbx
leaq 0x28(%rsp), %r14
pushq $0x1
popq %r15
pushq $0x30
popq %rbp
leaq 0x1d0(%rsp), %r12
leaq 0x8(%rsp), %r13
movq 0x10(%rsp), %rax
cmpq $0xf, %rax
ja 0x25217
movq %rbx, 0x28(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x5350
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x176f2
movq %r13, %rdi
movq %r12, %rsi
callq 0x53c0
movq %r12, %rdi
callq 0x5618
movq %r14, %rdi
callq 0x5618
jmp 0x251cf
movq (%rsp), %rcx
andq $0x0, 0x10(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
leaq 0x1e0(%rsp), %r14
pushq $0x1
popq %rbx
leaq 0x1d0(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0x28(%rsp), %rbp
leal -0x1(%rbx), %r15d
cmpq %r15, %rax
jbe 0x252b5
movq %r12, %rdi
callq 0x5220
movq %r13, %rdi
movq %r15, %rsi
callq 0x55d0
movsbl (%rax), %esi
movq %r14, %rdi
callq 0x5360
movl %ebx, %esi
movq %r13, %rdi
callq 0x55d0
movsbl (%rax), %esi
movq %r14, %rdi
callq 0x5360
movq %rbp, %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x54d0
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x265fc
movq %rbp, %rdi
callq 0x5618
movq %r12, %rdi
callq 0x5240
movq 0x10(%rsp), %rax
addl $0x2, %ebx
jmp 0x25243
leaq 0x8(%rsp), %rdi
callq 0x5618
leaq 0x48(%rsp), %rdi
callq 0x5240
movq (%rsp), %rax
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x252e1
movq %rax, %r14
jmp 0x25333
movq %rax, %r14
jmp 0x25320
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x5618
jmp 0x25313
jmp 0x25310
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x5618
jmp 0x25329
movq %rax, %r14
jmp 0x25329
movq %rax, %r14
leaq 0x1d0(%rsp), %rdi
callq 0x5240
movq (%rsp), %rdi
callq 0x9ef6
leaq 0x8(%rsp), %rdi
callq 0x5618
leaq 0x48(%rsp), %rdi
callq 0x5240
movq %r14, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/common.cc
// Function: buildHash[abi:cxx11](unsigned long, unsigned long)
string buildHash(uint64_t a, uint64_t p)
{
	stringstream ss;
	ss << std::hex << a;
   	string addr = ss.str();

	while(addr.size() < 8)
		addr = string(1,'0') + addr;
			
	stringstream ss1;
	ss1 << std::hex << p;
   	string pc = ss1.str();	

	while(pc.size() < 8)
		pc = string(1,'0') + pc;

	return addr + pc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x220(%rsp), %rdi
callq 0x5220
leaq 0x230(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x248(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x248(%rsp,%rax)
movq %rbx, %rsi
callq 0x5200
movq %r15, 0x30(%rsp)
movq %r14, 0x28(%rsp)
leaq 0x238(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x54d0
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
pushq $0x1
popq %r12
pushq $0x30
popq %rbp
leaq 0x98(%rsp), %r13
leaq 0x38(%rsp), %rbx
cmpq $0x7, 0x40(%rsp)
ja 0x25416
movq %r14, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x5350
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x176f2
movq %rbx, %rdi
movq %r13, %rsi
callq 0x53c0
movq %r13, %rdi
callq 0x5618
movq %r15, %rdi
callq 0x5618
jmp 0x253d1
leaq 0x98(%rsp), %rdi
callq 0x5220
leaq 0xa8(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0xc0(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0xc0(%rsp,%rax)
movq 0x30(%rsp), %rsi
callq 0x5200
leaq 0xb0(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x54d0
leaq 0x68(%rsp), %rbx
leaq 0x58(%rsp), %r14
pushq $0x1
popq %r15
pushq $0x30
popq %rbp
leaq 0x78(%rsp), %r12
leaq 0x8(%rsp), %r13
cmpq $0x7, 0x10(%rsp)
ja 0x254c2
movq %rbx, 0x58(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x5350
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x176f2
movq %r13, %rdi
movq %r12, %rsi
callq 0x53c0
movq %r12, %rdi
callq 0x5618
movq %r14, %rdi
callq 0x5618
jmp 0x2547d
leaq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x25f4e
leaq 0x8(%rsp), %rdi
callq 0x5618
leaq 0x98(%rsp), %rdi
callq 0x5240
leaq 0x38(%rsp), %rdi
callq 0x5618
leaq 0x220(%rsp), %rdi
callq 0x5240
movq %rbx, %rax
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2553d
jmp 0x25520
movq %rax, %rbx
jmp 0x2554a
jmp 0x25568
jmp 0x25529
movq %rax, %rbx
jmp 0x25575
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x5618
jmp 0x25540
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5618
leaq 0x98(%rsp), %rdi
callq 0x5240
jmp 0x2556b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5618
jmp 0x2556b
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x5618
leaq 0x220(%rsp), %rdi
callq 0x5240
movq %rbx, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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), %rcx
movq 0x8(%rsi), %rax
movq (%rcx), %r15
movq 0x8(%rcx), %r12
subq %rcx, %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movapd %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq 0x7(%rsp), %rcx
movq %rax, %rsi
callq 0x9ce0
subq %r15, %r12
shrq $0x2, %r12
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xa49a
cvtsi2sd %r12d, %xmm0
divsd 0x68e8(%rip), %xmm0     # 0x2bf70
callq 0x5090
cvttsd2si %xmm0, %ebp
movq (%r14), %rcx
xorl %edi, %edi
movl %edi, %edi
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %rdi, %rax
jbe 0x25712
xorl %r12d, %r12d
movq %rdi, 0x8(%rsp)
imulq $0x18, %rdi, %r13
movl %r12d, %esi
movq (%rcx,%r13), %rdx
movq 0x8(%rcx,%r13), %rax
subq %rdx, %rax
sarq $0x2, %rax
cmpq %rsi, %rax
jbe 0x25709
movslq %r12d, %rcx
addl %ebp, %r12d
cmpq %r12, %rax
cmoval %r12d, %eax
movslq %eax, %rsi
xorl %eax, %eax
cmpq %rsi, %rcx
jge 0x256ef
addl (%rdx,%rcx,4), %eax
incq %rcx
jmp 0x256e2
movq (%rbx), %rdi
addq %r13, %rdi
cltd
idivl %ebp
movl %eax, 0x10(%rsp)
movq %r15, %rsi
callq 0xeef4
movq (%r14), %rcx
jmp 0x256b8
movq 0x8(%rsp), %rdi
incl %edi
jmp 0x25696
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xa49a
jmp 0x2573e
movq %rax, %r14
movq %rbx, %rdi
callq 0x9d36
movq %r14, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x10, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x25760
leaq 0x3d6f(%rip), %rsi      # 0x294c8
leaq 0xf(%rsp), %rdx
jmp 0x2576c
leaq 0x3d66(%rip), %rsi      # 0x294cd
leaq 0xe(%rsp), %rdx
movq %rbx, %rdi
callq 0x5140
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
andq $0x0, 0x40(%rdi)
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0xb(%rsp), %rcx
callq 0x9c8a
leaq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xa52e
movq %r14, %rdi
callq 0xa49a
movq 0x18(%rbx), %rax
movabsq $0x1010000010f, %rcx    # imm = 0x1010000010F
movq %rcx, (%rax)
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0xb(%rsp), %rcx
callq 0x9c8a
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa52e
movq %r14, %rdi
callq 0xa49a
movq (%rbx), %rax
movabsq $0x28c000000ec, %rcx    # imm = 0x28C000000EC
movq %rcx, (%rax)
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0xb(%rsp), %rcx
callq 0x9c8a
leaq 0x30(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xa52e
movq %r14, %rdi
callq 0xa49a
movq 0x30(%rbx), %rax
movabsq $0x100600000ff8, %rcx   # imm = 0x100600000FF8
movq %rcx, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x2607d
jmp 0x2607d
movq %rax, %r14
movq %rbx, %rdi
callq 0x9ed6
movq %r14, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
andq $0x0, 0x40(%rdi)
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0xb(%rsp), %rcx
callq 0x9c8a
leaq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xa52e
movq %r14, %rdi
callq 0xa49a
movq 0x18(%rbx), %rax
movabsq $0xa0000000a, %rcx      # imm = 0xA0000000A
movq %rcx, (%rax)
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0xb(%rsp), %rcx
callq 0x9c8a
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa52e
movq %r14, %rdi
callq 0xa49a
movq (%rbx), %rax
movabsq $0x250000000a, %rcx     # imm = 0x250000000A
movq %rcx, (%rax)
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0xb(%rsp), %rcx
callq 0x9c8a
leaq 0x30(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xa52e
movq %r14, %rdi
callq 0xa49a
movq 0x30(%rbx), %rax
movabsq $0x6400000064, %rcx     # imm = 0x6400000064
movq %rcx, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x28cdf
jmp 0x28cdf
movq %rax, %r14
movq %rbx, %rdi
callq 0x9ed6
movq %r14, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/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 0x26d0
testb %al, %al
jne 0x2664
leaq 0x2b60(%rip), %rdi      # 0x51bf
callq 0x2350
leaq -0x20(%rbp), %r14
movq %rbx, (%r14)
movq 0x5966(%rip), %rdi      # 0x7fd8
leaq 0x29a7(%rip), %rsi      # 0x5020
callq 0x2230
movq %rax, %r15
callq 0x2220
movq %r15, %rdi
movq %rax, %rsi
callq 0x21b0
movq %rax, %rdi
callq 0x2130
leaq 0x15e(%rip), %rdx       # 0x27fe
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x23b0
addq $0x10, %rbx
leaq 0x30c(%rip), %rdx       # 0x29c4
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x23b0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x2
popq %rdi
movl $0x801, %esi            # imm = 0x801
xorl %edx, %edx
callq 0x2080
movl %eax, 0x18(%rbx)
cmpl $-0x1, %eax
je 0x27cd
leaq -0x2c(%rbp), %r12
movl $0x1, (%r12)
pushq $0x1
popq %r13
pushq $0x2
popq %rdx
pushq $0x4
popq %r8
movl %eax, %edi
movl %r13d, %esi
movq %r12, %rcx
callq 0x2390
movl 0x18(%rbx), %edi
pushq $0xf
popq %rdx
movl %r13d, %esi
movq %r12, %rcx
pushq $0x4
popq %r8
callq 0x2390
leaq -0x48(%rbp), %r12
andq $0x0, 0x8(%r12)
movw $0x2, (%r12)
movq %r15, %rdi
callq 0x2250
movl %eax, 0x4(%r12)
rolw $0x8, %r14w
movw %r14w, 0x2(%r12)
movl 0x18(%rbx), %edi
pushq $0x10
popq %rdx
movq %r12, %rsi
callq 0x2060
cmpl $-0x1, %eax
je 0x27d6
movl 0x18(%rbx), %edi
pushq $0x5
popq %rsi
callq 0x22a0
cmpl $-0x1, %eax
je 0x27df
pushq $0x1
popq %r14
movl %r14d, %edi
callq 0x23c0
movl %eax, 0x1c(%rbx)
leaq -0x38(%rbp), %rcx
andl $0x0, 0x8(%rcx)
movl $0x1, (%rcx)
movl 0x18(%rbx), %edx
movl %edx, 0x4(%rcx)
movl %eax, %edi
movl %r14d, %esi
callq 0x2310
cmpl $-0x1, %eax
setne %bl
jne 0x27ed
leaq 0x2a0e(%rip), %rdi      # 0x51d4
callq 0x2350
jmp 0x27ed
leaq 0x2a2b(%rip), %rdi      # 0x51ff
jmp 0x27e6
leaq 0x2a17(%rip), %rdi      # 0x51f4
jmp 0x27e6
leaq 0x29ff(%rip), %rdi      # 0x51e5
callq 0x2350
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
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), %r14
leaq 0x40(%rdi), %rax
movq %rax, -0x48(%rbp)
leaq 0x48(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0xc0(%rdi), %rax
movq %rax, -0x38(%rbp)
leaq 0x28(%rdi), %rax
movq %rax, -0x30(%rbp)
leaq 0xe8(%rdi), %rax
movq %rax, -0x50(%rbp)
cmpb $0x1, 0x118(%rbx)
jne 0x3a61
movl 0x1c(%rbx), %edi
leaq -0x3050(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
pushq $0xa
popq %rcx
callq 0x2120
testl %eax, %eax
jle 0x39b6
movl %eax, %r15d
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %r15d
cmovael %eax, %r15d
leaq -0x304c(%rbp), %r12
subq $0x1, %r15
jb 0x39b6
movl (%r12), %eax
cmpl 0x18(%rbx), %eax
jne 0x3a0e
movq -0x50(%rbp), %rdi
callq 0x2030
jmp 0x3a5b
testb $0x9, -0x4(%r12)
je 0x3a5b
movq %r14, %rdi
callq 0x2320
movq -0x48(%rbp), %rdi
movq %r12, %rsi
callq 0x3eba
movq %rax, %r13
movq %r14, %rdi
callq 0x21e0
cmpq -0x40(%rbp), %r13
je 0x3a5b
movq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x2320
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x3a74
movq %r13, %rdi
callq 0x21e0
addq $0xc, %r12
jmp 0x39f4
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_O2/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)
andq $0x0, 0x10(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x362e
movl %r15d, (%rbx)
movl %r14d, 0x4(%rbx)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x8(%rbx)
movq (%r12), %r14
testq %r14, %r14
je 0x361b
movq %r14, %rdi
callq 0x1070
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 0x10c0
andq $0x0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x36a6
movq %rsi, %rbx
movq %r14, %rdi
callq 0x1070
movq %rax, %r12
leaq 0x1(%rax), %rdi
callq 0x1030
movq %rax, %r15
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x3679
movsbl (%r14,%r13), %edi
callq 0x1110
movb %al, (%r15,%r13)
incq %r13
jmp 0x3661
movq %r15, %rdi
callq 0x1070
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 0x10c0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x370c
movq %rsi, %rbx
callq 0x1070
leaq 0x1(%rax), %rdi
callq 0x1030
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rsi
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x10c0
andq $0x0, 0x10(%r14)
popq %rbx
popq %r14
popq %rbp
retq