// File: /workspace/github_cpp_makefile_star2_O1/gvaumour[P]cache-simulator/src/HybridCache.cc
// Function: HybridCache::handleAccess(Access)
allocDecision
HybridCache::handleAccess(Access element)
{
	uint64_t address = element.m_address;
	bool isWrite = element.isWrite();
 	int size = element.m_size;
	RD_TYPE rd_type = RD_NOT_ACCURATE;
	
	if(!m_isWarmup)
		stats_operations[element.m_type]++;
	
	assert(size > 0);
	
	uint64_t block_addr = bitRemove(address , 0 , m_start_index+1);
	element.block_addr = block_addr;
	
	int id_set = addressToCacheSet(address);

	int stats_index = isWrite ? 1 : 0;

	CacheEntry* current = getEntry(block_addr);
	allocDecision des = ALLOCATE_IN_SRAM;
	
	if(current == NULL){ // The cache line is not in the hybrid cache, Miss !
				
		CacheEntry* destination_entry = NULL;
		
		des = m_predictor->allocateInNVM(id_set, element);
		element.isSRAMerror = m_predictor->reportMiss(block_addr , id_set);

//		m_predictor->recordAllocationDecision(id_set, element, des);
		
		if(des == BYPASS_CACHE )
		{
			entete_debug();
			DPRINTF(DebugCache , "Bypassing the cache for this \n");
			if(!m_isWarmup)
				stats_bypass++;
			if( element.isDemandAccess())
				stats_demand_BP++;
			else
				stats_WB_BP++;
		}
		else
		{
		
			//Verify if the cache line is in missing tags 
			bool inNVM = (des == ALLOCATE_IN_NVM) ? true : false; 
			int id_assoc = -1;
			
			if( element.isDemandAccess())
				stats_allocateDemand++;
			else
				stats_allocateWB++;
					
			id_assoc = m_predictor->evictPolicy(id_set, inNVM);	
			
			if(inNVM){//New line allocated in NVM
				destination_entry = m_tableNVM[id_set][id_assoc];
			}
			else{//Allocated in SRAM 
				destination_entry = m_tableSRAM[id_set][id_assoc];
			}
				
			//Deallocate the cache line in the lower levels (inclusive system)
			if(destination_entry->isValid){


				if(simu_parameters.traceLLC && m_ID == -1)
				{
					string line =  "EVICT " + convert_hex(destination_entry->address);
					//cout << "Writing to LLC_trace.out: " <<  line << endl;
					gzwrite(LLC_trace, line.c_str() , LLC_TRACE_BUFFER_SIZE);	
				}


				entete_debug();
				DPRINTF(DebugCache , "Invalidation of the cache line : %#lx , id_assoc %d\n" , destination_entry->address,id_assoc);
				//Prevent the cache line from being migrated du to WBs 
				//Inform the higher level of the deallocation
				if(simu_parameters.strongInclusivity)	
					m_system->signalDeallocate(destination_entry->address); 
				
				//WB this cache line to the lower cache 			
				Access wb_request;
				wb_request.m_address = destination_entry->address;
				wb_request.m_size = 4;
				wb_request.m_pc = destination_entry->m_pc;
				if(destination_entry->isDirty)
					wb_request.m_type = MemCmd::DIRTY_WRITEBACK;
				else
					wb_request.m_type = MemCmd::CLEAN_WRITEBACK;

				signalWB(wb_request, false);	
				
				if(!m_isWarmup)
					stats_evict++;
		
			}


			
			deallocate(destination_entry);
			allocate(address , id_set , id_assoc, inNVM, element.m_pc, element.isPrefetch());			
			m_predictor->insertionPolicy(id_set , id_assoc , inNVM, element);
			


			if(inNVM){
				entete_debug();
				DPRINTF(DebugCache , "It is a Miss ! Block[%#lx] is allocated \
						 in the NVM cache : Set=%d, Way=%d\n", block_addr , id_set, id_assoc);
				if(!m_isWarmup)
				{
					stats_missNVM[stats_index]++;
					stats_hitsNVM[1]++; // The insertion write 
				}

				if(element.isWrite())
					m_tableNVM[id_set][id_assoc]->isDirty = true;			
							
				m_tableNVM[id_set][id_assoc]->coherence_state = COHERENCE_EXCLUSIVE;					
				m_tableNVM[id_set][id_assoc]->m_compilerHints = element.m_compilerHints;
			
				if(simu_parameters.enablePCHistoryTracking && m_printStats)
					m_tableNVM[id_set][id_assoc]->pc_history.push_back(element.m_pc);
			}
			else{
				entete_debug();
				DPRINTF(DebugCache , "It is a Miss ! Block[%#lx] is allocated \
						in the SRAM cache : Set=%d, Way=%d\n",block_addr, id_set, id_assoc);
				if(!m_isWarmup){				
					stats_missSRAM[stats_index]++;			
					stats_hitsSRAM[1]++; // The insertion write 
				}
			
				if(element.isWrite())
					m_tableSRAM[id_set][id_assoc]->isDirty = true;

				m_tableSRAM[id_set][id_assoc]->coherence_state = COHERENCE_EXCLUSIVE;
				m_tableSRAM[id_set][id_assoc]->m_compilerHints = element.m_compilerHints;

				if(simu_parameters.enablePCHistoryTracking&& m_printStats)
					m_tableSRAM[id_set][id_assoc]->pc_history.push_back(element.m_pc);
			}
		}
	}
	else{
		// It is a hit in the cache 		
		int id_assoc = -1;
		map<uint64_t,HybridLocation>::iterator p = m_tag_index.find(current->address);
		id_assoc = p->second.m_way;
		string a = current->isNVM ? "in NVM" : "in SRAM";

		entete_debug();
		DPRINTF(DebugCache , "It is a hit ! Block[%#lx] Found %s Set=%d, Way=%d, Req=%s\n" \
				 , block_addr, a.c_str(), id_set, id_assoc , memCmd_str[element.m_type]);
		
		m_predictor->updatePolicy(id_set , id_assoc, current->isNVM, element , false);
		
		current->justMigrate = false;
		if(element.isWrite()){
			current->isDirty = true;
			current->nbWrite++;
			current->coherence_state = COHERENCE_MODIFIED;
		}
		else{
			//current->coherence_state stays in the same state in any case 
			if(element.m_type != CLEAN_WRITEBACK)
				current->nbRead++;		
		}

		if(simu_parameters.enablePCHistoryTracking && m_printStats)
			current->pc_history.push_back(element.m_pc);
	
		if(!m_isWarmup)
		{
			if(current->isNVM)	
				stats_hitsNVM[stats_index]++;
			else
				stats_hitsSRAM[stats_index]++;
		
		}
		
		
		current->m_compilerHints = element.m_compilerHints;
	
		if(simu_parameters.traceLLC && m_ID == -1)
			rd_type = classifyRD(id_set , id_assoc);	
	}
	
	if(simu_parameters.traceLLC && m_ID == -1 && des != BYPASS_CACHE)
	{
		string access = element.isWrite() ? "WRITE" : "READ";
		string data_type = element.isInstFetch() ? "INST" : "DATA";
		string line = data_type + " " + access + " " + str_RD_status[rd_type];
		line += " 0x" + convert_hex(block_addr) + " 0x" + convert_hex(element.m_pc);  
		//cout << "Writing to LLC_trace.out: " <<  line << endl;
		gzwrite(LLC_trace, line.c_str() , LLC_TRACE_BUFFER_SIZE);	
	}
	return des;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %r15
movq 0x1e0(%rsp), %r13
movl 0x1fc(%rsp), %ecx
cmpq $0x6, %rcx
sete %al
cmpq $0x3, %rcx
sete %dil
movl 0x1e8(%rsp), %edx
cmpb $0x0, 0x91(%r15)
jne 0x1a362
movq 0x188(%r15), %rsi
incq (%rsi,%rcx,8)
testl %edx, %edx
jle 0x1b11c
leaq 0x1e0(%rsp), %rbp
orb %al, %dil
movb %dil, 0x43(%rsp)
movl 0x94(%r15), %edx
incl %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x2e70a
movq %rax, %r14
movq %rax, 0x30(%rbp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x1b2e6
movl %eax, %r12d
movq %r15, %rdi
movq %r14, %rsi
callq 0x1a290
testq %rax, %rax
movq %r14, 0x38(%rsp)
je 0x1a54c
movq %rax, %rbx
movq 0x48(%r15), %rdx
leaq 0x40(%r15), %rax
movq %rax, %rcx
testq %rdx, %rdx
je 0x1a3ed
movq 0x8(%rbx), %rsi
movq %rax, %rcx
xorl %edi, %edi
cmpq %rsi, 0x20(%rdx)
setb %dil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rdi,8), %rdx
testq %rdx, %rdx
jne 0x1a3d5
cmpq %rax, %rcx
je 0x1a3fe
movq 0x8(%rbx), %rdx
cmpq 0x20(%rcx), %rdx
cmovaeq %rcx, %rax
movslq 0x28(%rax), %r14
movzbl 0x40(%rbx), %edx
leaq 0x1b5d1(%rip), %rax     # 0x359de
leaq 0x1b5d1(%rip), %rsi     # 0x359e5
testq %rdx, %rdx
cmovneq %rax, %rsi
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
xorq $0x7, %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0xccac
movq %r15, %rdi
callq 0x1a158
leaq 0xc8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1b455(%rip), %rsi     # 0x358a5
leaq 0x1b458(%rip), %rdx     # 0x358af
leaq 0xb8(%rsp), %rdi
callq 0xccac
leaq 0x2bae5(%rip), %rax     # 0x45f50
leaq 0x8(%rax), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x182c0
movq %rax, %r13
movq 0xb8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1a491
callq 0x52a0
leaq 0x2bab8(%rip), %rax     # 0x45f50
addq $0x10, %rax
cmpq %rax, %r13
leaq 0x1e0(%rsp), %rbp
je 0x1a4d5
movq 0x48(%rsp), %rdx
movl 0x1c(%rbp), %eax
leaq 0x2ae78(%rip), %rcx     # 0x45330
movq (%rcx,%rax,8), %r9
leaq 0x1b52a(%rip), %rdi     # 0x359ed
movq 0x38(%rsp), %rsi
movl %r12d, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x5050
movq 0x68(%r15), %rdi
movslq %r12d, %rsi
movzbl 0x40(%rbx), %ecx
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq 0x30(%rbp), %rdx
movq %rdx, 0x30(%rsp)
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movups 0x20(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdx
xorl %r8d, %r8d
callq *%rax
movb $0x0, 0x14c(%rbx)
movl 0x1c(%rbp), %eax
cmpl $0x6, %eax
je 0x1a533
cmpl $0x5, %eax
je 0x1a73d
cmpl $0x3, %eax
jne 0x1a737
movb $0x1, 0x1(%rbx)
incl 0x11c(%rbx)
movl $0x0, 0x168(%rbx)
jmp 0x1a73d
movq 0x68(%r15), %rdi
movslq %r12d, %rsi
movq (%rdi), %rax
movq 0x30(%rbp), %rcx
movq %rcx, 0x30(%rsp)
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movups 0x20(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rsi, 0x100(%rsp)
callq *0x10(%rax)
movl %eax, %ebx
movq 0x68(%r15), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x271ee
movb %al, 0x28(%rbp)
cmpl $0x2, %ebx
jne 0x1a63f
movl %ebx, %r13d
movq %r15, %rdi
callq 0x1a158
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1b2e9(%rip), %rsi     # 0x358a5
leaq 0x1b2ec(%rip), %rdx     # 0x358af
leaq 0x48(%rsp), %rdi
callq 0xccac
leaq 0x2b97c(%rip), %r12     # 0x45f50
leaq 0x8(%r12), %rdi
leaq 0x48(%rsp), %rsi
callq 0x182c0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x1a5f5
callq 0x52a0
addq $0x10, %r12
cmpq %r12, %rbx
je 0x1a60a
leaq 0x1b7cc(%rip), %rdi     # 0x35dd1
callq 0x54a0
cmpb $0x0, 0x91(%r15)
jne 0x1a61b
incq 0x108(%r15)
movl 0x1c(%rbp), %ecx
cmpl $0x3, %ecx
movl %r13d, %eax
ja 0x1a807
cmpl $0x1, %ecx
je 0x1a807
incq 0x160(%r15)
jmp 0x1a80e
movl %ebx, 0x44(%rsp)
movl 0x1c(%rbp), %eax
movl $0x150, %ecx            # imm = 0x150
cmpq $0x3, %rax
ja 0x1a65c
leaq 0x1b798(%rip), %rcx     # 0x35df0
movq (%rcx,%rax,8), %rcx
incq (%r15,%rcx)
movq 0x68(%r15), %rdi
movq (%rdi), %rax
leaq 0x20(%r15), %rbx
leaq 0x8(%r15), %rcx
xorl %edx, %edx
cmpl $0x1, 0x44(%rsp)
cmoveq %rcx, %rbx
sete %dl
movl %r12d, 0x6c(%rsp)
movl %r12d, %esi
callq *0x28(%rax)
movq (%rbx), %rsi
movq 0x100(%rsp), %rcx
leaq (%rcx,%rcx,2), %rdx
movl %eax, 0x68(%rsp)
movslq %eax, %rcx
movq %rdx, 0xf8(%rsp)
movq (%rsi,%rdx,8), %rax
movq %rcx, 0x108(%rsp)
movq (%rax,%rcx,8), %rbx
cmpb $0x1, (%rbx)
jne 0x1a99b
leaq 0x2b88a(%rip), %rax     # 0x45f50
cmpb $0x1, 0x89(%rax)
jne 0x1a873
cmpl $-0x1, (%r15)
jne 0x1a873
movl 0x8(%rbx), %esi
leaq 0xb8(%rsp), %r12
movq %r12, %rdi
callq 0x2f078
leaq 0x1b207(%rip), %rcx     # 0x358fe
movl $0x6, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5330
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1a819
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x1a820
incl 0x120(%rbx)
leaq 0x2b80c(%rip), %rax     # 0x45f50
cmpb $0x1, 0x95(%rax)
jne 0x1a78d
cmpb $0x1, 0x90(%r15)
jne 0x1a78d
leaq 0x10(%rbp), %rdx
movq 0x158(%rbx), %rsi
cmpq 0x160(%rbx), %rsi
je 0x1a77e
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x158(%rbx)
jmp 0x1a78d
movq %rbx, %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x1d8c4
cmpb $0x0, 0x91(%r15)
jne 0x1a7b9
leaq 0xd8(%r15), %rax
cmpb $0x0, 0x40(%rbx)
leaq 0x128(%r15), %rcx
cmovneq %rcx, %rax
movq (%rax), %rax
movzbl 0x43(%rsp), %ecx
incq (%rax,%rcx,8)
movl 0x24(%rbp), %eax
movl %eax, 0x3c(%rbx)
movl $0x2, %r13d
leaq 0x2b784(%rip), %rax     # 0x45f50
cmpb $0x1, 0x89(%rax)
jne 0x1a7ec
cmpl $-0x1, (%r15)
jne 0x1a7ec
movq %r15, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x1b5fe
movl %eax, %r13d
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1a800
callq 0x52a0
xorl %eax, %eax
jmp 0x1ac2a
incq 0x168(%r15)
movl $0x2, %r13d
jmp 0x1ac2a
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a84e
callq 0x52a0
movq 0x2b233(%rip), %rdi     # 0x45a88
movq 0x48(%rsp), %rsi
movl $0x32, %edx
callq 0x5450
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x1a873
callq 0x52a0
movq %r15, %rdi
callq 0x1a158
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1b01a(%rip), %rsi     # 0x358a5
leaq 0x1b01d(%rip), %rdx     # 0x358af
leaq 0x48(%rsp), %rdi
callq 0xccac
leaq 0x2b6ad(%rip), %rax     # 0x45f50
leaq 0x8(%rax), %rdi
leaq 0x48(%rsp), %rsi
callq 0x182c0
movq %rax, %r12
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x1a8c3
callq 0x52a0
leaq 0x2b686(%rip), %rax     # 0x45f50
addq $0x10, %rax
cmpq %rax, %r12
je 0x1a8e9
movq 0x8(%rbx), %rsi
leaq 0x1b027(%rip), %rdi     # 0x35905
movl 0x68(%rsp), %edx
xorl %eax, %eax
callq 0x5050
leaq 0x2b660(%rip), %rax     # 0x45f50
cmpb $0x1, 0x8a(%rax)
jne 0x1a909
movq 0xb8(%r15), %rdi
movq 0x8(%rbx), %rsi
callq 0x1ecae
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movzbl 0x1(%rbx), %edx
addl $0x5, %edx
movq %rax, 0x150(%rsp)
movl $0x4, 0x158(%rsp)
movq %rcx, 0x160(%rsp)
movl %edx, 0x16c(%rsp)
movl $0x0, 0x170(%rsp)
movb $0x0, 0x178(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x150(%rsp), %xmm0
movups 0x160(%rsp), %xmm1
movups 0x170(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x1b344
cmpb $0x0, 0x91(%r15)
jne 0x1a99b
incq 0x100(%r15)
xorl %r12d, %r12d
movl 0x44(%rsp), %r14d
cmpl $0x1, %r14d
sete %r12b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1b442
leaq 0x10(%rbp), %rax
movq %rax, 0x70(%rsp)
movq 0x10(%rbp), %r9
movl 0x1c(%rbp), %eax
cmpl $0x4, %eax
sete %cl
cmpl $0x1, %eax
sete %al
orb %cl, %al
movzbl %al, %eax
movl %eax, (%rsp)
movq %r15, %rdi
movq %r13, %rsi
movl 0x6c(%rsp), %edx
movl 0x68(%rsp), %ecx
movl %r12d, %r8d
callq 0x1b502
movq 0x68(%r15), %rdi
movq (%rdi), %rax
movq 0x30(%rbp), %rcx
movq %rcx, 0x30(%rsp)
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movups 0x20(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %r13
movq %r13, %rdx
movl %r12d, %ecx
callq *0x20(%rax)
movq %r15, %rdi
callq 0x1a158
leaq 0x58(%rsp), %r12
cmpl $0x1, %r14d
jne 0x1ab05
movq %r12, -0x10(%r12)
leaq 0x1ae4f(%rip), %rsi     # 0x358a5
leaq 0x1ae52(%rip), %rdx     # 0x358af
leaq 0x48(%rsp), %rdi
callq 0xccac
leaq 0x2b4e2(%rip), %r14     # 0x45f50
leaq 0x8(%r14), %rdi
leaq 0x48(%rsp), %rsi
callq 0x182c0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x1aa8e
callq 0x52a0
leaq 0x10(%r14), %rax
cmpq %rax, %rbx
movl 0x6c(%rsp), %edx
je 0x1aab2
leaq 0x1ae98(%rip), %rdi     # 0x3593a
movq 0x38(%rsp), %rsi
movl 0x68(%rsp), %ecx
xorl %eax, %eax
callq 0x5050
cmpb $0x0, 0x91(%r15)
jne 0x1aad7
movq 0x110(%r15), %rax
movzbl 0x43(%rsp), %ecx
incq (%rax,%rcx,8)
movq 0x128(%r15), %rax
incq 0x8(%rax)
movl 0x1c(%rbp), %eax
cmpl $0x6, %eax
movq 0xf8(%rsp), %rcx
je 0x1aaec
cmpl $0x3, %eax
jne 0x1aafc
movq 0x8(%r15), %rax
movq (%rax,%rcx,8), %rax
movq (%rax,%r13,8), %rax
movb $0x1, 0x1(%rax)
movq 0x8(%r15), %rax
jmp 0x1abbb
movq %r12, -0x10(%r12)
leaq 0x1ad94(%rip), %rsi     # 0x358a5
leaq 0x1ad97(%rip), %rdx     # 0x358af
leaq 0x48(%rsp), %rdi
callq 0xccac
leaq 0x2b427(%rip), %r14     # 0x45f50
leaq 0x8(%r14), %rdi
leaq 0x48(%rsp), %rsi
callq 0x182c0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ab49
callq 0x52a0
leaq 0x10(%r14), %rax
cmpq %rax, %rbx
movl 0x6c(%rsp), %edx
je 0x1ab6d
leaq 0x1ae2f(%rip), %rdi     # 0x3598c
movq 0x38(%rsp), %rsi
movl 0x68(%rsp), %ecx
xorl %eax, %eax
callq 0x5050
cmpb $0x0, 0x91(%r15)
jne 0x1ab92
movq 0xc0(%r15), %rax
movzbl 0x43(%rsp), %ecx
incq (%rax,%rcx,8)
movq 0xd8(%r15), %rax
incq 0x8(%rax)
movl 0x1c(%rbp), %eax
cmpl $0x6, %eax
movq 0xf8(%rsp), %rcx
je 0x1aba7
cmpl $0x3, %eax
jne 0x1abb7
movq 0x20(%r15), %rax
movq (%rax,%rcx,8), %rax
movq (%rax,%r13,8), %rax
movb $0x1, 0x1(%rax)
movq 0x20(%r15), %rax
movq (%rax,%rcx,8), %rax
movq (%rax,%r13,8), %rdi
movl $0x1, 0x168(%rdi)
movl 0x24(%rbp), %eax
movl %eax, 0x3c(%rdi)
movl $0x2, %r13d
cmpb $0x1, 0x95(%r14)
jne 0x1ac26
cmpb $0x1, 0x90(%r15)
jne 0x1ac26
movq 0x158(%rdi), %rsi
cmpq 0x160(%rdi), %rsi
je 0x1ac15
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x158(%rdi)
jmp 0x1ac26
addq $0x150, %rdi            # imm = 0x150
movq 0x70(%rsp), %rdx
callq 0x1d8c4
movl 0x44(%rsp), %eax
leaq 0x2b31f(%rip), %rcx     # 0x45f50
cmpb $0x1, 0x89(%rcx)
jne 0x1b10a
cmpl $0x2, %eax
je 0x1b10a
cmpl $-0x1, (%r15)
jne 0x1b10a
movl %eax, %r14d
movl 0x1c(%rbp), %eax
cmpl $0x3, %eax
sete %cl
cmpl $0x6, %eax
sete %al
orb %cl, %al
leaq 0x1c3ab(%rip), %rcx     # 0x37017
leaq 0x1c39a(%rip), %rsi     # 0x3700d
cmovneq %rcx, %rsi
leaq 0x58(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movzbl %al, %eax
leaq (%rsi,%rax), %rdx
addq $0x4, %rdx
leaq 0x48(%rsp), %rdi
callq 0xccac
cmpl $0x2, 0x1c(%rbp)
leaq 0x1ad88(%rip), %rax     # 0x35a28
leaq 0x1ad86(%rip), %rsi     # 0x35a2d
cmovbq %rax, %rsi
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1ad6e(%rip), %rax     # 0x35a2c
leaq 0x1ad6c(%rip), %rdx     # 0x35a31
cmovbq %rax, %rdx
leaq 0xb8(%rsp), %rdi
callq 0xccac
leaq 0xe8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %rdi
callq 0xcc1c
leaq 0x19ab4(%rip), %rsi     # 0x347be
leaq 0xd8(%rsp), %rdi
callq 0x55f0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0xd8(%rsp), %rdi
callq 0x5100
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1ad5e
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x1ad65
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19a33(%rip), %rsi     # 0x347be
callq 0x55f0
leaq 0x88(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1adbd
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x1adc3
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x78(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2a64a(%rip), %rax     # 0x45430
movq (%rax,%r13,8), %rsi
callq 0x55f0
leaq 0x140(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq 0x38(%rsp), %rsi
je 0x1ae24
movq %rdx, 0x130(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x140(%rsp)
jmp 0x1ae2c
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x138(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1ae5b
callq 0x52a0
movq 0x38(%rsp), %rsi
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ae72
callq 0x52a0
movq 0x38(%rsp), %rsi
movq 0xd8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ae89
callq 0x52a0
movq 0x38(%rsp), %rsi
leaq 0x188(%rsp), %rdi
callq 0x2f078
leaq 0x1929a(%rip), %rcx     # 0x34137
leaq 0x188(%rsp), %rdi
movl $0x3, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x5330
movq %r12, 0xd8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1aee0
movq %rdx, 0xd8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe8(%rsp)
jmp 0x1aee8
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xd8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19229(%rip), %rsi     # 0x34137
callq 0x55f0
movq %r15, 0x98(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1af3f
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x1af46
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0xa0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x10(%rbp), %esi
leaq 0x110(%rsp), %rdi
callq 0x2f078
movq 0x98(%rsp), %rcx
movq 0xa0(%rsp), %r8
movq 0x118(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x1af9f
movq 0xa8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1afc4
leaq 0x120(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x1afbf
movq 0x120(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1afdb
movq 0x110(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x5100
jmp 0x1afec
leaq 0x110(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5330
movq %rbx, 0x78(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x1b00f
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x1b015
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x80(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x130(%rsp), %rdi
callq 0x5100
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b05e
callq 0x52a0
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b074
callq 0x52a0
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b086
callq 0x52a0
movq 0xd8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b098
callq 0x52a0
leaq 0x198(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b0ae
callq 0x52a0
movq 0x2a9d3(%rip), %rdi     # 0x45a88
movq 0x130(%rsp), %rsi
movl $0x32, %edx
callq 0x5450
movq 0x130(%rsp), %rdi
cmpq %r13, %rdi
je 0x1b0d9
callq 0x52a0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x1b0f3
callq 0x52a0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1b107
callq 0x52a0
movl %r14d, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1a7a2(%rip), %rdi     # 0x358c5
leaq 0x1a65f(%rip), %rsi     # 0x35789
leaq 0x1a79d(%rip), %rcx     # 0x358ce
movl $0x11b, %edx            # imm = 0x11B
callq 0x51d0
jmp 0x1b17e
movq %rax, 0x38(%rsp)
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x1b2d1
jmp 0x1b155
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
jne 0x1b2d6
jmp 0x1b2db
jmp 0x1b17e
jmp 0x1b2bb
jmp 0x1b2bb
jmp 0x1b2bb
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
jne 0x1b2d6
jmp 0x1b2db
jmp 0x1b2bb
jmp 0x1b222
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b1bb
callq 0x52a0
jmp 0x1b1bb
movq %rax, 0x38(%rsp)
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b1d8
callq 0x52a0
jmp 0x1b1d8
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b1f1
callq 0x52a0
jmp 0x1b1f1
movq %rax, 0x38(%rsp)
movq 0xd8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b20a
callq 0x52a0
jmp 0x1b20a
movq %rax, 0x38(%rsp)
leaq 0x198(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b227
callq 0x52a0
jmp 0x1b227
movq %rax, 0x38(%rsp)
movq 0x130(%rsp), %rdi
cmpq %r13, %rdi
jne 0x1b279
jmp 0x1b27e
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b251
callq 0x52a0
jmp 0x1b251
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b26c
callq 0x52a0
jmp 0x1b26c
jmp 0x1b267
movq %rax, 0x38(%rsp)
movq 0xd8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b27e
callq 0x52a0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x1b2c7
callq 0x52a0
jmp 0x1b2c7
movq %rax, 0x38(%rsp)
jmp 0x1b27e
jmp 0x1b2c2
jmp 0x1b2bb
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x1b293
jmp 0x1b2c7
jmp 0x1b2c2
movq %rax, 0x38(%rsp)
jmp 0x1b2db
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1b2db
callq 0x52a0
movq 0x38(%rsp), %rdi
callq 0x55a0
nop