// File: /workspace/github_cpp_makefile_star2_O3/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 $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %r14
movq 0x1f0(%rsp), %r12
movl 0x20c(%rsp), %ecx
cmpq $0x6, %rcx
sete %al
cmpq $0x3, %rcx
sete %dil
movl 0x1f8(%rsp), %edx
cmpb $0x0, 0x91(%r14)
jne 0x1a026
movq 0x188(%r14), %rsi
incq (%rsi,%rcx,8)
testl %edx, %edx
jle 0x1ae70
leaq 0x1f0(%rsp), %r15
orb %al, %dil
movb %dil, 0x4f(%rsp)
movl 0x94(%r14), %edx
incl %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2e38e
movq %rax, %rbx
movq %rax, 0x30(%r15)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1b08e
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x19f62
testq %rax, %rax
movl %ebp, 0x40(%rsp)
movq %rbx, 0x98(%rsp)
je 0x1a226
movq %rax, %r13
movq 0x48(%r14), %rcx
leaq 0x40(%r14), %rax
testq %rcx, %rcx
je 0x1a0c1
movq 0x8(%r13), %rdx
movq %rax, %rsi
xorl %edi, %edi
cmpq %rdx, 0x20(%rcx)
setb %dil
cmovaeq %rcx, %rsi
movq 0x10(%rcx,%rdi,8), %rcx
testq %rcx, %rcx
jne 0x1a09c
cmpq %rax, %rsi
je 0x1a0c1
cmpq 0x20(%rsi), %rdx
cmovaeq %rsi, %rax
movslq 0x28(%rax), %rbx
movzbl 0x40(%r13), %edx
leaq 0x1b905(%rip), %rax     # 0x359d6
leaq 0x1b905(%rip), %rsi     # 0x359dd
testq %rdx, %rdx
cmovneq %rax, %rsi
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
xorq $0x7, %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0xcc6c
movq %r14, %rdi
callq 0x19e2a
movq %rbx, 0x80(%rsp)
movq %r15, %r12
leaq 0x110(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1b77e(%rip), %rsi     # 0x3589d
leaq 0x1b781(%rip), %rdx     # 0x358a7
leaq 0x100(%rsp), %rdi
callq 0xcc6c
leaq 0x2be16(%rip), %rbp     # 0x45f50
leaq 0x8(%rbp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x1800c
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a160
callq 0x52b0
leaq 0x10(%rbp), %rax
cmpq %rax, %rbx
movq %r12, %r15
movl 0x40(%rsp), %ebx
movq 0x80(%rsp), %r12
je 0x1a1a7
movq 0x50(%rsp), %rdx
movl 0x1c(%r15), %eax
leaq 0x2b1a8(%rip), %rcx     # 0x45330
movq (%rcx,%rax,8), %r9
leaq 0x1b852(%rip), %rdi     # 0x359e5
movq 0x98(%rsp), %rsi
movl %ebx, %ecx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x5050
movq 0x68(%r14), %rdi
movslq %ebx, %rsi
movzbl 0x40(%r13), %ecx
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq 0x30(%r15), %rdx
movq %rdx, 0x30(%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r12, %rdx
xorl %r8d, %r8d
callq *%rax
movb $0x0, 0x14c(%r13)
movl 0x1c(%r15), %eax
cmpl $0x6, %eax
je 0x1a20a
cmpl $0x5, %eax
je 0x1a411
cmpl $0x3, %eax
jne 0x1a40a
movb $0x1, 0x1(%r13)
incl 0x11c(%r13)
movl $0x0, 0x168(%r13)
jmp 0x1a411
movq 0x68(%r14), %rdi
movslq %ebp, %rsi
movq (%rdi), %rax
movq 0x30(%r15), %rcx
movq %rcx, 0x30(%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rsi, 0x80(%rsp)
callq *0x10(%rax)
movl %eax, %r13d
movq 0x68(%r14), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x26f6a
movb %al, 0x28(%r15)
cmpl $0x2, %r13d
jne 0x1a31e
movq %r15, %r13
movq %r14, %rdi
callq 0x19e2a
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1b603(%rip), %rsi     # 0x3589d
leaq 0x1b606(%rip), %rdx     # 0x358a7
leaq 0x50(%rsp), %rdi
callq 0xcc6c
leaq 0x2bc9e(%rip), %r12     # 0x45f50
leaq 0x8(%r12), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1800c
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a2d3
callq 0x52b0
addq $0x10, %r12
cmpq %r12, %rbx
movq %r13, %r15
je 0x1a2eb
leaq 0x1bae3(%rip), %rdi     # 0x35dc9
callq 0x54a0
cmpb $0x0, 0x91(%r14)
jne 0x1a2fc
incq 0x108(%r14)
movl 0x1c(%r15), %eax
cmpl $0x3, %eax
ja 0x1a4d7
cmpl $0x1, %eax
je 0x1a4d7
incq 0x160(%r14)
jmp 0x1a4de
movl 0x1c(%r15), %eax
movl $0x150, %ecx            # imm = 0x150
cmpq $0x3, %rax
ja 0x1a338
leaq 0x1bab4(%rip), %rcx     # 0x35de8
movq (%rcx,%rax,8), %rcx
incq (%r14,%rcx)
movq 0x68(%r14), %rdi
movq (%rdi), %rax
leaq 0x20(%r14), %rbx
leaq 0x8(%r14), %rcx
xorl %edx, %edx
cmpl $0x1, %r13d
cmoveq %rcx, %rbx
sete %dl
movl %ebp, %esi
callq *0x28(%rax)
movq (%rbx), %rsi
movq 0x80(%rsp), %rcx
leaq (%rcx,%rcx,2), %rdx
movl %eax, 0x74(%rsp)
movslq %eax, %rcx
movq %rdx, 0x90(%rsp)
movq (%rsi,%rdx,8), %rax
movq %rcx, 0x78(%rsp)
movq (%rax,%rcx,8), %rbp
cmpb $0x1, (%rbp)
jne 0x1a678
leaq 0x2bbb7(%rip), %rax     # 0x45f50
cmpb $0x1, 0x89(%rax)
jne 0x1a548
cmpl $-0x1, (%r14)
jne 0x1a548
movl 0x8(%rbp), %esi
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
callq 0x2ecef
leaq 0x1b52c(%rip), %rcx     # 0x358f6
movl $0x6, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5340
leaq 0x60(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1a4ef
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x1a4f5
incl 0x120(%r13)
cmpb $0x1, 0x95(%rbp)
jne 0x1a45a
cmpb $0x1, 0x90(%r14)
jne 0x1a45a
leaq 0x10(%r15), %rdx
movq 0x158(%r13), %rsi
cmpq 0x160(%r13), %rsi
je 0x1a44b
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x158(%r13)
jmp 0x1a45a
movq %r13, %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x1d796
cmpb $0x0, 0x91(%r14)
jne 0x1a487
leaq 0xd8(%r14), %rax
cmpb $0x0, 0x40(%r13)
leaq 0x128(%r14), %rcx
cmovneq %rcx, %rax
movq (%rax), %rax
movzbl 0x4f(%rsp), %ecx
incq (%rax,%rcx,8)
movl 0x24(%r15), %eax
movl %eax, 0x3c(%r13)
movl $0x2, %r12d
cmpb $0x1, 0x89(%rbp)
jne 0x1a4bb
cmpl $-0x1, (%r14)
jne 0x1a4bb
movq %r14, %rdi
movl 0x40(%rsp), %esi
movq 0x80(%rsp), %rdx
callq 0x1b39c
movl %eax, %r12d
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1a4cf
callq 0x52b0
xorl %r13d, %r13d
jmp 0x1a962
incq 0x168(%r14)
movl $0x2, %r12d
movl $0x2, %r13d
jmp 0x1a962
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a523
callq 0x52b0
movq 0x2b55e(%rip), %rdi     # 0x45a88
movq 0x50(%rsp), %rsi
movl $0x32, %edx
callq 0x5450
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a548
callq 0x52b0
movq %r14, %rdi
callq 0x19e2a
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1b33d(%rip), %rsi     # 0x3589d
leaq 0x1b340(%rip), %rdx     # 0x358a7
leaq 0x50(%rsp), %rdi
callq 0xcc6c
leaq 0x2b9d8(%rip), %rax     # 0x45f50
leaq 0x8(%rax), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1800c
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a598
callq 0x52b0
leaq 0x2b9b1(%rip), %rax     # 0x45f50
addq $0x10, %rax
cmpq %rax, %rbx
leaq 0x1f0(%rsp), %r15
je 0x1a5c6
movq 0x8(%rbp), %rsi
leaq 0x1b342(%rip), %rdi     # 0x358fd
movl 0x74(%rsp), %edx
xorl %eax, %eax
callq 0x5050
leaq 0x2b983(%rip), %rax     # 0x45f50
cmpb $0x1, 0x8a(%rax)
jne 0x1a5e6
movq 0xb8(%r14), %rdi
movq 0x8(%rbp), %rsi
callq 0x1eb78
movq 0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movzbl 0x1(%rbp), %edx
addl $0x5, %edx
movq %rax, 0x160(%rsp)
movl $0x4, 0x168(%rsp)
movq %rcx, 0x170(%rsp)
movl %edx, 0x17c(%rsp)
movl $0x0, 0x180(%rsp)
movb $0x0, 0x188(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x160(%rsp), %xmm0
movups 0x170(%rsp), %xmm1
movups 0x180(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x1b0ec
cmpb $0x0, 0x91(%r14)
jne 0x1a678
incq 0x100(%r14)
xorl %ebx, %ebx
cmpl $0x1, %r13d
sete %bl
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1b1ea
leaq 0x10(%r15), %rax
movq %rax, 0x88(%rsp)
movq 0x10(%r15), %r9
movl 0x1c(%r15), %eax
cmpl $0x4, %eax
sete %cl
cmpl $0x1, %eax
sete %al
orb %cl, %al
movzbl %al, %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
movl 0x40(%rsp), %edx
movl 0x74(%rsp), %ecx
movl %ebx, %r8d
callq 0x1b2a0
movq 0x68(%r14), %rdi
movq (%rdi), %rax
movq 0x30(%r15), %rcx
movq %rcx, 0x30(%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movl %ebx, %ecx
callq *0x20(%rax)
movq %r14, %rdi
callq 0x19e2a
cmpl $0x1, %r13d
jne 0x1a7e4
leaq 0x60(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b173(%rip), %rsi     # 0x3589d
leaq 0x1b176(%rip), %rdx     # 0x358a7
leaq 0x50(%rsp), %rdi
callq 0xcc6c
leaq 0x2b80e(%rip), %rbp     # 0x45f50
leaq 0x8(%rbp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1800c
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a762
callq 0x52b0
leaq 0x10(%rbp), %rax
cmpq %rax, %rbx
movq 0x98(%rsp), %rsi
movb 0x4f(%rsp), %bl
movl 0x40(%rsp), %edx
je 0x1a78d
leaq 0x1b1b0(%rip), %rdi     # 0x35932
movl 0x74(%rsp), %ecx
xorl %eax, %eax
callq 0x5050
cmpb $0x0, 0x91(%r14)
jne 0x1a7b0
movq 0x110(%r14), %rax
movzbl %bl, %ecx
incq (%rax,%rcx,8)
movq 0x128(%r14), %rax
incq 0x8(%rax)
movl 0x1c(%r15), %eax
cmpl $0x3, %eax
je 0x1a7c2
cmpl $0x6, %eax
jne 0x1a8a8
movq 0x8(%r14), %rax
movq 0x90(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movb $0x1, 0x1(%rdi)
jmp 0x1a8c1
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1b0a8(%rip), %rsi     # 0x3589d
leaq 0x1b0ab(%rip), %rdx     # 0x358a7
leaq 0x50(%rsp), %rdi
callq 0xcc6c
leaq 0x2b743(%rip), %rbp     # 0x45f50
leaq 0x8(%rbp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1800c
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a82d
callq 0x52b0
leaq 0x10(%rbp), %rax
cmpq %rax, %rbx
movq 0x98(%rsp), %rsi
movb 0x4f(%rsp), %bl
movl 0x40(%rsp), %edx
je 0x1a858
leaq 0x1b137(%rip), %rdi     # 0x35984
movl 0x74(%rsp), %ecx
xorl %eax, %eax
callq 0x5050
cmpb $0x0, 0x91(%r14)
jne 0x1a87b
movq 0xc0(%r14), %rax
movzbl %bl, %ecx
incq (%rax,%rcx,8)
movq 0xd8(%r14), %rax
incq 0x8(%rax)
movl 0x1c(%r15), %eax
cmpl $0x3, %eax
je 0x1a889
cmpl $0x6, %eax
jne 0x1a8e0
movq 0x20(%r14), %rax
movq 0x90(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movb $0x1, 0x1(%rdi)
jmp 0x1a8f9
movq 0x8(%r14), %rax
movq 0x90(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x1, 0x168(%rdi)
movl 0x24(%r15), %eax
movl %eax, 0x3c(%rdi)
movl $0x2, %r12d
movl $0x1, %r13d
jmp 0x1a910
movq 0x20(%r14), %rax
movq 0x90(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x1, 0x168(%rdi)
movl 0x24(%r15), %eax
movl %eax, 0x3c(%rdi)
movl $0x2, %r12d
cmpb $0x1, 0x95(%rbp)
jne 0x1a962
cmpb $0x1, 0x90(%r14)
jne 0x1a962
movq 0x158(%rdi), %rsi
cmpq 0x160(%rdi), %rsi
je 0x1a94e
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x158(%rdi)
jmp 0x1a962
addq $0x150, %rdi            # imm = 0x150
movq 0x88(%rsp), %rdx
callq 0x1d796
leaq 0x2b5e7(%rip), %rax     # 0x45f50
cmpb $0x1, 0x89(%rax)
jne 0x1ae5b
cmpl $0x2, %r13d
je 0x1ae5b
cmpl $-0x1, (%r14)
jne 0x1ae5b
movl 0x1c(%r15), %eax
cmpl $0x3, %eax
sete %cl
cmpl $0x6, %eax
sete %al
orb %cl, %al
leaq 0x1c674(%rip), %rcx     # 0x37017
leaq 0x1c663(%rip), %rsi     # 0x3700d
cmovneq %rcx, %rsi
leaq 0x60(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movzbl %al, %eax
leaq (%rsi,%rax), %rdx
addq $0x4, %rdx
leaq 0x50(%rsp), %rdi
callq 0xcc6c
movq %r15, %r14
cmpl $0x2, 0x1c(%r15)
leaq 0x1b045(%rip), %rax     # 0x35a20
leaq 0x1b043(%rip), %rsi     # 0x35a25
cmovbq %rax, %rsi
leaq 0x110(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1b02b(%rip), %rax     # 0x35a24
leaq 0x1b029(%rip), %rdx     # 0x35a29
cmovbq %rax, %rdx
leaq 0x100(%rsp), %rdi
callq 0xcc6c
leaq 0xd0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0xcbd6
leaq 0x19d4e(%rip), %rsi     # 0x34792
leaq 0xc0(%rsp), %rdi
callq 0x55f0
movl %r13d, %r15d
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0xc0(%rsp), %rdi
callq 0x5100
leaq 0xf0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1aa9b
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x1aaa2
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0xe0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19cca(%rip), %rsi     # 0x34792
callq 0x55f0
leaq 0xb0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1aafd
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x1ab03
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0xa0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2a907(%rip), %rax     # 0x45430
movq (%rax,%r12,8), %rsi
callq 0x55f0
leaq 0x150(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0xd0(%rsp), %r12
je 0x1ab6a
movq %rdx, 0x140(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x150(%rsp)
jmp 0x1ab72
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x148(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1ab9f
callq 0x52b0
movq 0xe0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1abb1
callq 0x52b0
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1abc3
callq 0x52b0
leaq 0x198(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x2ecef
leaq 0x1952c(%rip), %rcx     # 0x3410b
leaq 0x198(%rsp), %rdi
movl $0x3, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x5340
movq %r12, 0xc0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1ac22
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x1ac2a
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xc0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x194bb(%rip), %rsi     # 0x3410b
callq 0x55f0
movq %rbp, 0xe0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1ac81
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x1ac88
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0xe8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x10(%r14), %esi
leaq 0x120(%rsp), %rdi
callq 0x2ecef
movq 0xe0(%rsp), %rcx
movq 0xe8(%rsp), %r8
movq 0x128(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %rbp, %rcx
je 0x1ace2
movq 0xf0(%rsp), %rdi
movq 0x120(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1ad0e
leaq 0x130(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x1ad09
movq 0x130(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1ad1d
leaq 0xe0(%rsp), %rdi
callq 0x5100
jmp 0x1ad2e
leaq 0x120(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5340
movq %rbx, 0xa0(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x1ad57
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x1ad5d
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0xa8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
leaq 0x140(%rsp), %rdi
callq 0x5100
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1adac
callq 0x52b0
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1adc2
callq 0x52b0
movq %r13, %r14
movq 0xe0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1add7
callq 0x52b0
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
movl %r15d, %r13d
je 0x1adec
callq 0x52b0
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ae02
callq 0x52b0
movq 0x2ac7f(%rip), %rdi     # 0x45a88
movq 0x140(%rsp), %rsi
movl $0x32, %edx
callq 0x5450
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ae2d
callq 0x52b0
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x1ae47
callq 0x52b0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1ae5b
callq 0x52b0
movl %r13d, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1aa46(%rip), %rdi     # 0x358bd
leaq 0x1a903(%rip), %rsi     # 0x35781
leaq 0x1aa41(%rip), %rcx     # 0x358c6
movl $0x11b, %edx            # imm = 0x11B
callq 0x51d0
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
jne 0x1b07e
jmp 0x1b083
movq %rax, 0x40(%rsp)
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x1b079
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
jne 0x1b07e
jmp 0x1b083
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
jne 0x1b07e
jmp 0x1b083
jmp 0x1aefe
jmp 0x1b063
jmp 0x1b063
jmp 0x1b063
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
jne 0x1b07e
jmp 0x1b083
jmp 0x1b063
jmp 0x1afbf
movq %r13, %r14
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1af44
callq 0x52b0
jmp 0x1af44
movq %r13, %r14
movq %rax, 0x40(%rsp)
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1af64
callq 0x52b0
jmp 0x1af64
movq %r13, %r14
movq %rax, 0x40(%rsp)
movq 0xe0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1af80
callq 0x52b0
jmp 0x1af80
movq %r13, %r14
movq %rax, 0x40(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x1afa4
callq 0x52b0
jmp 0x1afa4
movq %r13, %r14
movq %rax, 0x40(%rsp)
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1afc4
callq 0x52b0
jmp 0x1afc4
movq %r13, %r14
movq %rax, 0x40(%rsp)
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
jne 0x1b021
jmp 0x1b026
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1aff1
callq 0x52b0
jmp 0x1aff1
movq %rax, 0x40(%rsp)
movq 0xe0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1b00c
callq 0x52b0
jmp 0x1b00c
jmp 0x1b007
movq %rax, 0x40(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x1b026
callq 0x52b0
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x1b06f
callq 0x52b0
jmp 0x1b06f
movq %rax, 0x40(%rsp)
jmp 0x1b026
jmp 0x1b06a
jmp 0x1b063
movq %rax, 0x40(%rsp)
movq 0x100(%rsp), %rdi
cmpq %r15, %rdi
jne 0x1b03b
jmp 0x1b06f
jmp 0x1b06a
movq %rax, 0x40(%rsp)
jmp 0x1b083
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1b083
callq 0x52b0
movq 0x40(%rsp), %rdi
callq 0x55a0
nop