// File: gvaumour[P]cache-simulator/src/Predictor.cc
// Function: Predictor::Predictor(int, int, int, int, std::vector<std::vector<CacheEntry*, std::allocator<CacheEntry*>>, std::allocator<std::vector<CacheEntry*, std::allocator<CacheEntry*>>>>&, std::vector<std::vector<CacheEntry*, std::allocator<CacheEntry*>>, std::allocator<std::vector<CacheEntry*, std::allocator<CacheEntry*>>>>&, HybridCache*)
Predictor::Predictor(int id, int nbAssoc , int nbSet, int nbNVMways, DataArray& SRAMtable , DataArray& NVMtable, HybridCache* cache) :\
	m_tableSRAM(SRAMtable), m_tableNVM(NVMtable)
{
	
	m_nb_set = nbSet;
	m_assoc = nbAssoc;
	m_nbNVMways = nbNVMways;
	m_nbSRAMways = nbAssoc - nbNVMways;
	m_ID = id;
	m_policy = cache->getPolicy();
	
	m_cpt_bypassTag = 0;
	m_replacementPolicyNVM_ptr = new LRUPolicy(m_nbNVMways , m_nb_set , NVMtable);
	m_replacementPolicySRAM_ptr = new LRUPolicy(m_nbSRAMways , m_nb_set, SRAMtable);	
	
	m_cache = cache;

	stats_NVM_errors = vector<int>(1, 0);
	stats_SRAM_errors = vector<int>(1, 0);
	stats_BP_errors = vector<int>(1,0);
	stats_MigrationErrors = vector<int>(1,0);
	
	m_trackError = (m_ID == -1);
	stats_COREerrors = 0;
	stats_WBerrors = 0;
	
	stats_beginTimeFrame = 0;
	
	m_global_PChistory = deque<uint64_t>();
	m_callee_PChistory = deque<uint64_t>();
	
	if(simu_parameters.printDebug && simu_parameters.enableDatasetSpilling)
	{
		//stats_SRAMpressure = vector< vector<bool> >();
	}
	/********************************************/ 
	if(simu_parameters.simulate_conflicts)
	{
	
		/* Allocation of array of tracking conflict/capacity miss,
		 simulation of a FU cache of the same size */ 
	
		int size_SRAM_FU =  m_nbSRAMways*nbSet;
		int size_NVM_FU =  m_nbNVMways*nbSet;
	
		m_NVM_FU.resize(size_NVM_FU);
		for(int i = 0 ; i < size_NVM_FU; i++)
		{
			m_NVM_FU[i] = new MissingTagEntry();
		}
		m_SRAM_FU.resize(size_SRAM_FU);
		for(int i = 0 ; i < size_SRAM_FU; i++)
		{
			m_SRAM_FU[i] = new MissingTagEntry();
		}
	}	 
//	/********************************************/ 
//	m_trackError = false;
//	if(m_nbNVMways != 0 && simu_parameters.size_MT_SRAMtags != 0)
//		m_trackError = true;
	

	/* Allocation of the BP missing tags array*/
	BP_missing_tags.resize(m_nb_set);
	for(int i = 0 ; i < m_nb_set; i++)
	{
		BP_missing_tags[i].resize(m_assoc);
		for(unsigned j = 0 ; j < BP_missing_tags[i].size(); j++)
		{
			BP_missing_tags[i][j] = new MissingTagEntry();
		}
	}

	m_SRAMassoc_MT_size = simu_parameters.size_MT_SRAMtags;
	m_NVMassoc_MT_size = simu_parameters.size_MT_NVMtags;
	m_nb_MTcouters_sampling = simu_parameters.nb_MTcouters_sampling;

	if(m_ID == -1){
	
		/* Allocation of the SRAM missing tags array*/
		m_SRAM_missing_tags.resize(m_nb_set);
		//m_NVM_missing_tags.resize(m_nb_set);

		for(int i = 0 ; i < m_nb_set; i++)
		{
			m_SRAM_missing_tags[i].resize(m_SRAMassoc_MT_size);
			//m_NVM_missing_tags[i].resize(m_NVMassoc_MT_size);

			for(int j = 0 ; j < m_SRAMassoc_MT_size; j++)
			{
				m_SRAM_missing_tags[i][j] = new MissingTagEntry();
				if(m_policy == "Cerebron" || m_policy == "SimplePerceptron")
					m_SRAM_missing_tags[i][j]->initFeaturesHash(m_policy);
			}
			/*
			for(int j = 0 ; j < m_NVMassoc_MT_size; j++)
			{
				m_NVM_missing_tags[i][j] = new MissingTagEntry();
				if(m_policy == "Cerebron")
					m_NVM_missing_tags[i][j]->initFeaturesHash();
			}*/
		}
		if(simu_parameters.enableDatasetSpilling)
		{
		
			m_SRAM_MT_counters = vector<uint64_t>(m_nb_set , 0);		
			m_isSRAMbusy = vector<bool>(m_nb_set , false);		

			m_NVM_MT_counters = vector<uint64_t>(m_nb_set , 0);		
			m_isNVMbusy = vector<bool>(m_nb_set , false);		
		}
	}
	
}

// Assembly:
subq $0x438, %rsp            # imm = 0x438
movq 0x448(%rsp), %rax
movq 0x440(%rsp), %rax
movq %rdi, 0x430(%rsp)
movl %esi, 0x42c(%rsp)
movl %edx, 0x428(%rsp)
movl %ecx, 0x424(%rsp)
movl %r8d, 0x420(%rsp)
movq %r9, 0x418(%rsp)
movq 0x430(%rsp), %rdi
movq %rdi, 0x188(%rsp)
leaq 0x3f145(%rip), %rax     # 0x92980
movq %rax, (%rdi)
movq 0x418(%rsp), %rax
movq %rax, 0x8(%rdi)
movq 0x440(%rsp), %rax
movq %rax, 0x10(%rdi)
addq $0x40, %rdi
movq %rdi, 0x108(%rsp)
callq 0x5540
movq 0x188(%rsp), %rdi
addq $0x88, %rdi
movq %rdi, 0x110(%rsp)
callq 0x58650
movq 0x188(%rsp), %rdi
addq $0xa0, %rdi
movq %rdi, 0x118(%rsp)
callq 0x58650
movq 0x188(%rsp), %rdi
addq $0xb8, %rdi
movq %rdi, 0x120(%rsp)
callq 0xe8c0
movq 0x188(%rsp), %rdi
addq $0xd0, %rdi
movq %rdi, 0x128(%rsp)
callq 0xe8c0
movq 0x188(%rsp), %rdi
addq $0xe8, %rdi
movq %rdi, 0x130(%rsp)
callq 0x21100
movq 0x188(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq %rdi, 0x138(%rsp)
callq 0x21100
movq 0x188(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
movq %rdi, 0x140(%rsp)
callq 0x58650
movq 0x188(%rsp), %rdi
addq $0x158, %rdi            # imm = 0x158
movq %rdi, 0x148(%rsp)
callq 0x58660
movq 0x188(%rsp), %rdi
addq $0x170, %rdi            # imm = 0x170
movq %rdi, 0x150(%rsp)
callq 0x58660
movq 0x188(%rsp), %rdi
addq $0x188, %rdi            # imm = 0x188
movq %rdi, 0x158(%rsp)
callq 0x3cff0
movq 0x188(%rsp), %rdi
addq $0x1e0, %rdi            # imm = 0x1E0
movq %rdi, 0x160(%rsp)
callq 0xe8d0
movq 0x188(%rsp), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
movq %rdi, 0x168(%rsp)
callq 0xe8d0
movq 0x188(%rsp), %rdi
addq $0x210, %rdi            # imm = 0x210
movq %rdi, 0x170(%rsp)
callq 0xe8d0
movq 0x188(%rsp), %rdi
addq $0x228, %rdi            # imm = 0x228
movq %rdi, 0x178(%rsp)
callq 0xe8d0
movq 0x188(%rsp), %rdi
addq $0x240, %rdi            # imm = 0x240
movq %rdi, 0x180(%rsp)
callq 0x58670
movq 0x188(%rsp), %rax
movl 0x424(%rsp), %ecx
movl %ecx, 0x18(%rax)
movl 0x428(%rsp), %ecx
movl %ecx, 0x1c(%rax)
movl 0x420(%rsp), %ecx
movl %ecx, 0x20(%rax)
movl 0x428(%rsp), %ecx
movl 0x420(%rsp), %edx
subl %edx, %ecx
movl %ecx, 0x24(%rax)
movl 0x42c(%rsp), %ecx
movl %ecx, 0x30(%rax)
movq 0x448(%rsp), %rsi
leaq 0x3f8(%rsp), %rdi
callq 0x3d7b0
jmp 0x53a65
movq 0x188(%rsp), %rdi
addq $0x40, %rdi
leaq 0x3f8(%rsp), %rsi
movq %rsi, 0xf8(%rsp)
callq 0x54a0
movq 0xf8(%rsp), %rdi
callq 0x5768
movq 0x188(%rsp), %rax
movq $0x0, 0x38(%rax)
movl $0x30, %edi
callq 0x53a0
movq %rax, 0x100(%rsp)
jmp 0x53ab7
movq 0x188(%rsp), %rax
movb $0x1, 0x3cf(%rsp)
movl 0x18(%rax), %ecx
movl %ecx, 0xf0(%rsp)
movl 0x20(%rax), %eax
movl %eax, 0xf4(%rsp)
movq 0x440(%rsp), %rsi
leaq 0x3d0(%rsp), %rdi
callq 0x58680
jmp 0x53af2
movl 0xf0(%rsp), %edx
movl 0xf4(%rsp), %esi
movq 0x100(%rsp), %rdi
leaq 0x3d0(%rsp), %rcx
callq 0x5d050
jmp 0x53b17
movq 0x188(%rsp), %rax
movq 0x100(%rsp), %rcx
movb $0x0, 0x3cf(%rsp)
movq %rcx, 0x60(%rax)
leaq 0x3d0(%rsp), %rdi
callq 0x3d360
movl $0x30, %edi
callq 0x53a0
movq %rax, 0xe8(%rsp)
jmp 0x53b54
movq 0x188(%rsp), %rax
movb $0x1, 0x3af(%rsp)
movl 0x18(%rax), %ecx
movl %ecx, 0xe0(%rsp)
movl 0x24(%rax), %eax
movl %eax, 0xe4(%rsp)
movq 0x418(%rsp), %rsi
leaq 0x3b0(%rsp), %rdi
callq 0x58680
jmp 0x53b8f
movl 0xe0(%rsp), %edx
movl 0xe4(%rsp), %esi
movq 0xe8(%rsp), %rdi
leaq 0x3b0(%rsp), %rcx
callq 0x5d050
jmp 0x53bb4
movq 0x188(%rsp), %rax
movq 0xe8(%rsp), %rcx
movb $0x0, 0x3af(%rsp)
movq %rcx, 0x68(%rax)
leaq 0x3b0(%rsp), %rdi
callq 0x3d360
movq 0x188(%rsp), %rax
movq 0x448(%rsp), %rcx
movq %rcx, 0x70(%rax)
movl $0x0, 0x38c(%rsp)
leaq 0x38b(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0xed30
movq 0xd8(%rsp), %rcx
leaq 0x390(%rsp), %rdi
movl $0x1, %esi
leaq 0x38c(%rsp), %rdx
callq 0xed40
jmp 0x53c35
movq 0x188(%rsp), %rdi
addq $0x1e0, %rdi            # imm = 0x1E0
leaq 0x390(%rsp), %rsi
movq %rsi, 0xc8(%rsp)
callq 0xf150
movq 0xc8(%rsp), %rdi
callq 0xef00
leaq 0x38b(%rsp), %rdi
callq 0xef60
movl $0x0, 0x36c(%rsp)
leaq 0x36b(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0xed30
movq 0xd0(%rsp), %rcx
leaq 0x370(%rsp), %rdi
movl $0x1, %esi
leaq 0x36c(%rsp), %rdx
callq 0xed40
jmp 0x53cb7
movq 0x188(%rsp), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
leaq 0x370(%rsp), %rsi
movq %rsi, 0xb8(%rsp)
callq 0xf150
movq 0xb8(%rsp), %rdi
callq 0xef00
leaq 0x36b(%rsp), %rdi
callq 0xef60
movl $0x0, 0x34c(%rsp)
leaq 0x34b(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0xed30
movq 0xc0(%rsp), %rcx
leaq 0x350(%rsp), %rdi
movl $0x1, %esi
leaq 0x34c(%rsp), %rdx
callq 0xed40
jmp 0x53d39
movq 0x188(%rsp), %rdi
addq $0x210, %rdi            # imm = 0x210
leaq 0x350(%rsp), %rsi
movq %rsi, 0xa8(%rsp)
callq 0xf150
movq 0xa8(%rsp), %rdi
callq 0xef00
leaq 0x34b(%rsp), %rdi
callq 0xef60
movl $0x0, 0x32c(%rsp)
leaq 0x32b(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
callq 0xed30
movq 0xb0(%rsp), %rcx
leaq 0x330(%rsp), %rdi
movl $0x1, %esi
leaq 0x32c(%rsp), %rdx
callq 0xed40
jmp 0x53dbb
movq 0x188(%rsp), %rdi
addq $0x228, %rdi            # imm = 0x228
leaq 0x330(%rsp), %rsi
movq %rsi, 0xa0(%rsp)
callq 0xf150
movq 0xa0(%rsp), %rdi
callq 0xef00
leaq 0x32b(%rsp), %rdi
callq 0xef60
movq 0x188(%rsp), %rax
movl 0x30(%rax), %ecx
subl $-0x1, %ecx
sete 0x80(%rax)
movq $0x0, 0x260(%rax)
movq $0x0, 0x258(%rax)
movq $0x0, 0x268(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x310(%rsp)
movaps %xmm0, 0x300(%rsp)
movaps %xmm0, 0x2f0(%rsp)
movaps %xmm0, 0x2e0(%rsp)
movaps %xmm0, 0x2d0(%rsp)
leaq 0x2d0(%rsp), %rdi
callq 0x4d570
jmp 0x53e69
leaq 0x3fe90(%rip), %rdi     # 0x93d00
leaq 0x2d0(%rsp), %rsi
movq %rsi, 0x98(%rsp)
callq 0x4d600
movq 0x98(%rsp), %rdi
callq 0x4d580
xorps %xmm0, %xmm0
movaps %xmm0, 0x2c0(%rsp)
movaps %xmm0, 0x2b0(%rsp)
movaps %xmm0, 0x2a0(%rsp)
movaps %xmm0, 0x290(%rsp)
movaps %xmm0, 0x280(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x4d570
jmp 0x53ecc
leaq 0x3fe7d(%rip), %rdi     # 0x93d50
leaq 0x280(%rsp), %rsi
callq 0x4d600
leaq 0x280(%rsp), %rdi
callq 0x4d580
leaq 0x400fc(%rip), %rax     # 0x93ff0
testb $0x1, (%rax)
je 0x54071
leaq 0x400ec(%rip), %rax     # 0x93ff0
testb $0x1, 0x158(%rax)
je 0x54071
jmp 0x54071
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
jmp 0x53f66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x3d0(%rsp), %rdi
callq 0x3d360
testb $0x1, 0x3cf(%rsp)
jne 0x53f72
jmp 0x53f7f
movq 0x100(%rsp), %rdi
callq 0x5340
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
jmp 0x53fbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x3b0(%rsp), %rdi
callq 0x3d360
testb $0x1, 0x3af(%rsp)
jne 0x53fc7
jmp 0x53fd4
movq 0xe8(%rsp), %rdi
callq 0x5340
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x38b(%rsp), %rdi
callq 0xef60
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x36b(%rsp), %rdi
callq 0xef60
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x34b(%rsp), %rdi
callq 0xef60
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x32b(%rsp), %rdi
callq 0xef60
jmp 0x548c4
leaq 0x3ff78(%rip), %rax     # 0x93ff0
testb $0x1, 0x88(%rax)
je 0x5422f
movq 0x188(%rsp), %rdi
movl 0x24(%rdi), %eax
movl 0x424(%rsp), %ecx
imull %ecx, %eax
movl %eax, 0x27c(%rsp)
movl 0x20(%rdi), %eax
movl 0x424(%rsp), %ecx
imull %ecx, %eax
movl %eax, 0x278(%rsp)
addq $0x158, %rdi            # imm = 0x158
movslq 0x278(%rsp), %rsi
callq 0x58780
jmp 0x540cb
movl $0x0, 0x274(%rsp)
movl 0x274(%rsp), %eax
cmpl 0x278(%rsp), %eax
jge 0x5416d
movl $0x38, %edi
callq 0x53a0
movq %rax, 0x90(%rsp)
jmp 0x540fe
movq 0x90(%rsp), %rdi
callq 0x58820
jmp 0x5410d
movq 0x188(%rsp), %rdi
addq $0x158, %rdi            # imm = 0x158
movslq 0x274(%rsp), %rsi
callq 0x58860
movq 0x90(%rsp), %rcx
movq %rcx, (%rax)
movl 0x274(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x274(%rsp)
jmp 0x540d6
movq 0x90(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
callq 0x5340
jmp 0x548c4
movq 0x188(%rsp), %rdi
addq $0x170, %rdi            # imm = 0x170
movslq 0x27c(%rsp), %rsi
callq 0x58780
jmp 0x5418b
movl $0x0, 0x270(%rsp)
movl 0x270(%rsp), %eax
cmpl 0x27c(%rsp), %eax
jge 0x5422d
movl $0x38, %edi
callq 0x53a0
movq %rax, 0x88(%rsp)
jmp 0x541be
movq 0x88(%rsp), %rdi
callq 0x58820
jmp 0x541cd
movq 0x188(%rsp), %rdi
addq $0x170, %rdi            # imm = 0x170
movslq 0x270(%rsp), %rsi
callq 0x58860
movq 0x88(%rsp), %rcx
movq %rcx, (%rax)
movl 0x270(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x270(%rsp)
jmp 0x54196
movq 0x88(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
callq 0x5340
jmp 0x548c4
jmp 0x5422f
movq 0x188(%rsp), %rax
movq %rax, %rdi
addq $0x140, %rdi            # imm = 0x140
movslq 0x18(%rax), %rsi
callq 0x58880
jmp 0x5424c
movl $0x0, 0x26c(%rsp)
movq 0x188(%rsp), %rcx
movl 0x26c(%rsp), %eax
cmpl 0x18(%rcx), %eax
jge 0x54396
movq 0x188(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq 0x26c(%rsp), %rsi
callq 0x58920
movq %rax, %rdi
movq 0x188(%rsp), %rax
movslq 0x1c(%rax), %rsi
callq 0x58780
jmp 0x542a1
movl $0x0, 0x268(%rsp)
movq 0x188(%rsp), %rdi
movl 0x268(%rsp), %eax
movq %rax, 0x80(%rsp)
addq $0x140, %rdi            # imm = 0x140
movslq 0x26c(%rsp), %rsi
callq 0x58920
movq %rax, %rdi
callq 0x58940
movq %rax, %rcx
movq 0x80(%rsp), %rax
cmpq %rcx, %rax
jae 0x5437e
movl $0x38, %edi
callq 0x53a0
movq %rax, 0x78(%rsp)
jmp 0x54304
movq 0x78(%rsp), %rdi
callq 0x58820
jmp 0x54310
movq 0x188(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq 0x26c(%rsp), %rsi
callq 0x58920
movq %rax, %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0x58860
movq 0x78(%rsp), %rcx
movq %rcx, (%rax)
movl 0x268(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x268(%rsp)
jmp 0x542ac
movq 0x78(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
callq 0x5340
jmp 0x548c4
jmp 0x54380
movl 0x26c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x26c(%rsp)
jmp 0x54257
movq 0x188(%rsp), %rax
leaq 0x3fc4b(%rip), %rcx     # 0x93ff0
movl 0xc0(%rcx), %ecx
movl %ecx, 0x28(%rax)
leaq 0x3fc3b(%rip), %rcx     # 0x93ff0
movl 0xc4(%rcx), %ecx
movl %ecx, 0x2c(%rax)
leaq 0x3fc2b(%rip), %rcx     # 0x93ff0
movl 0xd8(%rcx), %ecx
movl %ecx, 0x138(%rax)
cmpl $-0x1, 0x30(%rax)
jne 0x548bc
movq 0x188(%rsp), %rax
movq %rax, %rdi
addq $0x88, %rdi
movslq 0x18(%rax), %rsi
callq 0x58880
jmp 0x543f8
movl $0x0, 0x264(%rsp)
movq 0x188(%rsp), %rcx
movl 0x264(%rsp), %eax
cmpl 0x18(%rcx), %eax
jge 0x545ff
movq 0x188(%rsp), %rdi
addq $0x88, %rdi
movslq 0x264(%rsp), %rsi
callq 0x58920
movq %rax, %rdi
movq 0x188(%rsp), %rax
movslq 0x28(%rax), %rsi
callq 0x58780
jmp 0x5444d
movl $0x0, 0x260(%rsp)
movq 0x188(%rsp), %rcx
movl 0x260(%rsp), %eax
cmpl 0x28(%rcx), %eax
jge 0x545e7
movl $0x38, %edi
callq 0x53a0
movq %rax, 0x70(%rsp)
jmp 0x54481
movq 0x70(%rsp), %rdi
callq 0x58820
jmp 0x5448d
movq 0x188(%rsp), %rdi
addq $0x88, %rdi
movslq 0x264(%rsp), %rsi
callq 0x58920
movq %rax, %rdi
movslq 0x260(%rsp), %rsi
callq 0x58860
movq 0x70(%rsp), %rcx
movq 0x188(%rsp), %rdi
movq %rcx, (%rax)
addq $0x40, %rdi
leaq 0x1e314(%rip), %rsi     # 0x727e8
callq 0xfa60
movb %al, 0x6f(%rsp)
jmp 0x544df
movb 0x6f(%rsp), %al
testb $0x1, %al
jne 0x54514
jmp 0x544e9
movq 0x188(%rsp), %rdi
addq $0x40, %rdi
leaq 0x1e2f5(%rip), %rsi     # 0x727f1
callq 0xfa60
movb %al, 0x6e(%rsp)
jmp 0x54507
movb 0x6e(%rsp), %al
testb $0x1, %al
jne 0x54514
jmp 0x545cf
movq 0x188(%rsp), %rdi
addq $0x88, %rdi
movslq 0x264(%rsp), %rsi
callq 0x58920
movq %rax, %rdi
movslq 0x260(%rsp), %rsi
callq 0x58860
movq 0x188(%rsp), %rsi
movq (%rax), %rax
movq %rax, 0x60(%rsp)
addq $0x40, %rsi
leaq 0x240(%rsp), %rdi
callq 0x51b0
jmp 0x54563
movq 0x60(%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0x58960
jmp 0x54577
leaq 0x240(%rsp), %rdi
callq 0x5768
jmp 0x545cf
movq 0x70(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
callq 0x5340
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x240(%rsp), %rdi
callq 0x5768
jmp 0x548c4
jmp 0x545d1
movl 0x260(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x260(%rsp)
jmp 0x54458
jmp 0x545e9
movl 0x264(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x264(%rsp)
jmp 0x54403
leaq 0x3f9ea(%rip), %rax     # 0x93ff0
testb $0x1, 0x158(%rax)
je 0x548ba
movq 0x188(%rsp), %rax
movslq 0x18(%rax), %rax
movq %rax, 0x50(%rsp)
movq $0x0, 0x220(%rsp)
leaq 0x21f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xf010
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rcx
leaq 0x228(%rsp), %rdi
leaq 0x220(%rsp), %rdx
callq 0xf020
jmp 0x54663
movq 0x188(%rsp), %rdi
addq $0xb8, %rdi
leaq 0x228(%rsp), %rsi
movq %rsi, 0x38(%rsp)
callq 0xf0a0
movq 0x38(%rsp), %rdi
callq 0xf0e0
leaq 0x21f(%rsp), %rdi
callq 0xf140
movq 0x188(%rsp), %rax
movslq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
movb $0x0, 0x1ef(%rsp)
leaq 0x1ee(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x3d3c0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
leaq 0x1f0(%rsp), %rdi
leaq 0x1ef(%rsp), %rdx
callq 0x3d3d0
jmp 0x546e7
movq 0x188(%rsp), %rdi
addq $0xe8, %rdi
leaq 0x1f0(%rsp), %rsi
movq %rsi, 0x20(%rsp)
callq 0x3d450
movq 0x20(%rsp), %rdi
callq 0x211c0
leaq 0x1ee(%rsp), %rdi
callq 0x3d4c0
movq 0x188(%rsp), %rax
movslq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
movq $0x0, 0x1c8(%rsp)
leaq 0x1c7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xf010
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rcx
leaq 0x1d0(%rsp), %rdi
leaq 0x1c8(%rsp), %rdx
callq 0xf020
jmp 0x5476f
movq 0x188(%rsp), %rdi
addq $0xd0, %rdi
leaq 0x1d0(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0xf0a0
movq 0x8(%rsp), %rdi
callq 0xf0e0
leaq 0x1c7(%rsp), %rdi
callq 0xf140
movq 0x188(%rsp), %rax
movslq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
movb $0x0, 0x197(%rsp)
leaq 0x196(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3d3c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
leaq 0x198(%rsp), %rdi
leaq 0x197(%rsp), %rdx
callq 0x3d3d0
jmp 0x547f3
movq 0x188(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
leaq 0x198(%rsp), %rsi
callq 0x3d450
leaq 0x198(%rsp), %rdi
callq 0x211c0
leaq 0x196(%rsp), %rdi
callq 0x3d4c0
jmp 0x548ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x21f(%rsp), %rdi
callq 0xf140
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x1ee(%rsp), %rdi
callq 0x3d4c0
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x1c7(%rsp), %rdi
callq 0xf140
jmp 0x548c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f0(%rsp)
movl %eax, 0x3ec(%rsp)
leaq 0x196(%rsp), %rdi
callq 0x3d4c0
jmp 0x548c4
jmp 0x548bc
addq $0x438, %rsp            # imm = 0x438
retq
movq 0x180(%rsp), %rdi
callq 0x58a40
movq 0x178(%rsp), %rdi
callq 0xef00
movq 0x170(%rsp), %rdi
callq 0xef00
movq 0x168(%rsp), %rdi
callq 0xef00
movq 0x160(%rsp), %rdi
callq 0xef00
movq 0x158(%rsp), %rdi
callq 0x3d340
movq 0x150(%rsp), %rdi
callq 0x58aa0
movq 0x148(%rsp), %rdi
callq 0x58aa0
movq 0x140(%rsp), %rdi
callq 0x58b00
movq 0x138(%rsp), %rdi
callq 0x211c0
movq 0x130(%rsp), %rdi
callq 0x211c0
movq 0x128(%rsp), %rdi
callq 0xf0e0
movq 0x120(%rsp), %rdi
callq 0xf0e0
movq 0x118(%rsp), %rdi
callq 0x58b00
movq 0x110(%rsp), %rdi
callq 0x58b00
movq 0x108(%rsp), %rdi
callq 0x5768
movq 0x3f0(%rsp), %rdi
callq 0x5690
nopw %cs:(%rax,%rax)