// File: /workspace/github_cpp_makefile_star2_O2/estwings57[P]CasHMC/sources/CommandQueue.cpp
// Function: CasHMC::CommandQueue::CmdPop(CasHMC::DRAMCommand**)
bool CommandQueue::CmdPop(DRAMCommand **popedCMD)
{
	//Decrement all the counters we have going
	for(int i=0; i<tFAWCountdown.size(); i++) {
		tFAWCountdown[i]--;
	}
	//The head will always be the smallest counter, so check if it has reached 0
	if(tFAWCountdown.size()>0 && tFAWCountdown[0]==0) {
		tFAWCountdown.erase(tFAWCountdown.begin());
	}

	//HMC command scheduling policy
	//Close page
	if(OPEN_PAGE == false) {
		bool foundIssuable = false;
		if(refreshWaiting) {
			//Look into all bank
			bool refreshPossible = true;
			for(int b=0; b<NUM_BANKS; b++) {
				//Issuing writing-back atomic command
				if(atomicLock[b]) {
					if(POPCYCLE(issuedBank) == 0 && ACCESSQUE(b).size()>0 && ACCESSQUE(b)[0]->packetTAG == atomicLockTag[b]) {
						if(isIssuable(ACCESSQUE(b)[0])) {
							if(ACCESSQUE(b)[0]->commandType == WRITE || ACCESSQUE(b)[0]->commandType == WRITE_P) {
								atomicLock[b] = false;
								atomicLockTag[b] = 0;
							}
							*popedCMD = ACCESSQUE(b)[0];
							ACCESSQUE(b).erase(ACCESSQUE(b).begin());
							foundIssuable = true;
						}
					}
					refreshPossible = false;
					break;
				}
				else {
					//Need to check whether bank is open or not
					if(BANKSTATE(b)->currentBankState == ROW_ACTIVE) {
						refreshPossible = false;
						
						for(int i=0; i<ACCESSQUE(b).size(); i++) {
							DRAMCommand *tempCMD = ACCESSQUE(b)[i];
							//If a command in the queue is going to the same bank and row
							if(b==tempCMD->bank && BANKSTATE(b)->openRowAddress==tempCMD->row) {
								//and is not an activate
								if(tempCMD->commandType != ACTIVATE) {
									//and can be issued
									if(isIssuable(tempCMD)) {
										if(tempCMD->atomic
										&& (tempCMD->packetCMD != EQ16 && tempCMD->packetCMD != EQ8)) {
											atomicLock[tempCMD->bank] = true;
											atomicLockTag[tempCMD->bank] = tempCMD->packetTAG;
										}
										*popedCMD = tempCMD;
										ACCESSQUE(b).erase(ACCESSQUE(b).begin()+i);
										foundIssuable = true;
									}
									break;
								}
								else {
									break;
								}
							}
						}
						break;
					}
					//The next ACT and next REF can be issued at the same. nextActivate is considered as nextRefresh
					else if(BANKSTATE(b)->nextActivate > currentClockCycle) {
						refreshPossible = false;
						break;
					}
				}
			}
			if(refreshPossible && BANKSTATE(0)->currentBankState!=POWERDOWN) {
				*popedCMD = new DRAMCommand(REFRESH, 0, 0, 0, 0, 0, false, NULL, true, NULL_, false, false);
				foundIssuable = true;
				refreshWaiting = false;
			}
			if(!foundIssuable)	return false;
		}
		//Normal command scheduling
		else {
			int bankQueChk = 0;
			
			while(1) {
				if(POPCYCLE(issuedBank) == 0) {
					//Issuing writing-back atomic command
					if(atomicLock[issuedBank]) {
						if(ACCESSQUE(issuedBank).size() > 0 && ACCESSQUE(issuedBank)[0]->atomic) {
							if(ACCESSQUE(issuedBank)[0]->packetTAG == atomicLockTag[issuedBank]) {
								if(isIssuable(ACCESSQUE(issuedBank)[0])) {
									if(ACCESSQUE(issuedBank)[0]->commandType == WRITE || ACCESSQUE(issuedBank)[0]->commandType == WRITE_P) {
										atomicLock[issuedBank] = false;
										atomicLockTag[issuedBank] = 0;
									}
									*popedCMD = ACCESSQUE(issuedBank)[0];
									ACCESSQUE(issuedBank).erase(ACCESSQUE(issuedBank).begin());
									foundIssuable = true;
								}
							}
						}
						break;
					}
					else {
						//Search from beginning to find first issuable command
						for(int i=0; i<ACCESSQUE(issuedBank).size(); i++) {
							if(isIssuable(ACCESSQUE(issuedBank)[i])) {
								//Check to make sure not removing a read/write that is paired with an activate
								int j;
								bool dependencyFound = false;
									for(j=0; j<i; j++) {
										DRAMCommand *prevCMD = ACCESSQUE(issuedBank)[j];
										if(prevCMD->commandType==ACTIVATE
										&& prevCMD->packetTAG==ACCESSQUE(issuedBank)[i]->packetTAG) {
											dependencyFound = true;
											break;
										}
									}
								if(dependencyFound) continue;
								
								if(ACCESSQUE(issuedBank)[i]->atomic
								&& (ACCESSQUE(issuedBank)[i]->packetCMD != EQ16
								&& ACCESSQUE(issuedBank)[i]->packetCMD != EQ8)) {
									atomicLock[ACCESSQUE(issuedBank)[i]->bank] = true;
									atomicLockTag[ACCESSQUE(issuedBank)[i]->bank] = ACCESSQUE(issuedBank)[i]->packetTAG;
								}
								*popedCMD = ACCESSQUE(issuedBank)[i];
								ACCESSQUE(issuedBank).erase(ACCESSQUE(issuedBank).begin()+i);
								foundIssuable = true;
								break;
							}
						}
					}
				}
				bankQueChk++;
				issuedBank = (issuedBank<NUM_BANKS-1) ? issuedBank+1 : 0;

				if(foundIssuable)	break;
				else if(bankQueChk == NUM_BANKS)	break;
			}
			if(!foundIssuable)	return false;
		}
	}
	//Open page
	else {
		bool sendingREForPRE = false;
		if(refreshWaiting) {
			//Look into all bank
			bool refreshPossible = true;
			for(int b=0; b<NUM_BANKS; b++) {
				//Issuing writing-back atomic command
				if(atomicLock[b]) {
					if(POPCYCLE(issuedBank) == 0 && ACCESSQUE(b).size()>0 && ACCESSQUE(b)[0]->packetTAG == atomicLockTag[b]) {
						if(isIssuable(ACCESSQUE(b)[0])) {
							if(ACCESSQUE(b)[0]->commandType == WRITE || ACCESSQUE(b)[0]->commandType == WRITE_P) {
								atomicLock[b] = false;
								atomicLockTag[b] = 0;
							}
							*popedCMD = ACCESSQUE(b)[0];
							ACCESSQUE(b).erase(ACCESSQUE(b).begin());
							sendingREForPRE = true;
						}
					}
					refreshPossible = false;
					break;
				}
				else {
					//Need to check whether bank is open or not
					if(BANKSTATE(b)->currentBankState == ROW_ACTIVE) {
						refreshPossible = false;
						bool closeRow = true;

						for(int i=0; i<ACCESSQUE(b).size(); i++) {
							DRAMCommand *tempCMD = ACCESSQUE(b)[i];
							//If a command in the queue is going to the same bank and row
							if(b==tempCMD->bank && BANKSTATE(b)->openRowAddress==tempCMD->row) {
								//and is not an activate
								if(tempCMD->commandType != ACTIVATE) {
									closeRow = false;
									//and can be issued
									if(isIssuable(tempCMD)) {
										if(tempCMD->atomic
										&& (tempCMD->packetCMD != EQ16 && tempCMD->packetCMD != EQ8)) {
											atomicLock[tempCMD->bank] = true;
											atomicLockTag[tempCMD->bank] = tempCMD->packetTAG;
										}
										*popedCMD = tempCMD;
										ACCESSQUE(b).erase(ACCESSQUE(b).begin()+i);
										sendingREForPRE = true;
									}
									break;
								}
								else {
									break;
								}
							}
						}
						if(closeRow && BANKSTATE(b)->nextPrecharge<=currentClockCycle) {
							rowAccessCounter[b]=0;
							*popedCMD = new DRAMCommand(PRECHARGE, 0, b, 0, 0, 0, false, NULL, true, NULL_, false, false);
							sendingREForPRE = true;
						}
						break;
					}
					//The next ACT and next REF can be issued at the same. nextActivate is considered as nextRefresh
					else if(BANKSTATE(b)->nextActivate > currentClockCycle) {
						refreshPossible = false;
						break;
					}
				}
			}
			
			if(refreshPossible && BANKSTATE(0)->currentBankState!=POWERDOWN) {
				*popedCMD = new DRAMCommand(REFRESH, 0, 0, 0, 0, 0, false, NULL, true, NULL_, false, false);
				sendingREForPRE = true;
				refreshWaiting = false;
			}
		}
		//Normal command scheduling
		if(!sendingREForPRE) {
			bool foundIssuable = false;
			int bankQueChk = 0;
		
			while(1) {
				if(POPCYCLE(issuedBank) == 0) {
					//Issuing writing-back atomic command
					if(atomicLock[issuedBank]) {
						if(ACCESSQUE(issuedBank).size() > 0 && ACCESSQUE(issuedBank)[0]->atomic) {
							if(ACCESSQUE(issuedBank)[0]->packetTAG == atomicLockTag[issuedBank]) {
								if(isIssuable(ACCESSQUE(issuedBank)[0])) {
									if(ACCESSQUE(issuedBank)[0]->commandType == WRITE || ACCESSQUE(issuedBank)[0]->commandType == WRITE_P) {
										atomicLock[issuedBank] = false;
										atomicLockTag[issuedBank] = 0;
									}
									*popedCMD = ACCESSQUE(issuedBank)[0];
									ACCESSQUE(issuedBank).erase(ACCESSQUE(issuedBank).begin());
									foundIssuable = true;
								}
							}
						}
					}
					else {
						//Search from beginning to find first issuable command
						for(int i=0; i<ACCESSQUE(issuedBank).size(); i++) {
							if(isIssuable(ACCESSQUE(issuedBank)[i])) {
								//Check for dependencies
								int j;
								bool dependencyFound = false;
								for(j=0; j<i; j++) {
									DRAMCommand *prevCMD = ACCESSQUE(issuedBank)[j];
									if(prevCMD->commandType != ACTIVATE
									&& prevCMD->bank == ACCESSQUE(issuedBank)[i]->bank
									&& prevCMD->row == ACCESSQUE(issuedBank)[i]->row) {
										dependencyFound = true;
										break;
									}
								}
								if(dependencyFound) continue;
								if(ACCESSQUE(issuedBank)[i]->atomic
								&& (ACCESSQUE(issuedBank)[i]->packetCMD != EQ16 && ACCESSQUE(issuedBank)[i]->packetCMD != EQ8)) {
									atomicLock[issuedBank] = true;
									atomicLockTag[issuedBank] = ACCESSQUE(issuedBank)[i]->packetTAG;
								}
								*popedCMD = ACCESSQUE(issuedBank)[i];
								//If the previous bus packet is an activate, that activate have to be removed
								//(check i>0 because if i==0 then theres nothing before it)
								if(i>0 && ACCESSQUE(issuedBank)[i-1]->commandType==ACTIVATE) {
									rowAccessCounter[issuedBank]++;
									delete ACCESSQUE(issuedBank)[i-1];
									ACCESSQUE(issuedBank).erase(ACCESSQUE(issuedBank).begin()+i-1, ACCESSQUE(issuedBank).begin()+i+1);
								}
								else{
									ACCESSQUE(issuedBank).erase(ACCESSQUE(issuedBank).begin()+i);
								}
								foundIssuable = true;
								break;
							}
						}
					}
				}
				bankQueChk++;
				issuedBank = (issuedBank<NUM_BANKS-1) ? issuedBank+1 : 0;
				
				if(foundIssuable)	break;
				else if(bankQueChk == NUM_BANKS)	break;
			}
		
			//If nothing was issuable to open bank, issue PRE command
			if(!foundIssuable) {
				bool sendingPRE = false;
				
				for(int b=0; b<NUM_BANKS; b++) {
					bool found = false;
					if(BANKSTATE(b)->currentBankState == ROW_ACTIVE) {
						if(!atomicLock[b]) {
							for(int i=0; i<ACCESSQUE(b).size(); i++) {
								//If there is something going to opened bank and row, don't send PRE command
								if(ACCESSQUE(b)[i]->bank==b && ACCESSQUE(b)[i]->row == BANKSTATE(b)->openRowAddress) {
									found = true;
									break;
								}
							}
							//Too many accesses have happend, close it
							if(!found || rowAccessCounter[b]>=MAX_ROW_ACCESSES) {
								if(BANKSTATE(b)->nextPrecharge <= currentClockCycle) {
									rowAccessCounter[b]=0;
									*popedCMD = new DRAMCommand(PRECHARGE, 0, b, 0, 0, 0, false, NULL, true, NULL_, false, false);
									sendingPRE = true;
									break;
								}
							}
						}
					}
				}

				if(!sendingPRE)	return false;
			}
		}
	}
	
	if((*popedCMD)->commandType == ACTIVATE) {
		tFAWCountdown.push_back(tFAW);
	}

	if(QUE_PER_BANK) {
		classID.str( string() );	classID.clear();
		classID << (*popedCMD)->bank;
		DEBUG(ALI(18)<<(header+"-"+classID.str()+")")<<ALI(15)<<**popedCMD<<"Down) POP command from command queue");
	}
	else {
		DEBUG(ALI(18)<<(header+")")<<(*popedCMD)->bank<<")"<<ALI(15)<<**popedCMD<<"Down) POP command from command queue");
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, 0x40(%rsp)
movq %rdi, %r14
leaq 0x250(%rdi), %rbx
movq 0x250(%rdi), %rsi
movq 0x258(%rdi), %rax
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x2, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xf551
decl (%rsi,%rdx,4)
incq %rdx
jmp 0xf544
cmpq %rsi, %rax
je 0xf563
cmpl $0x0, (%rsi)
jne 0xf563
movq %rbx, %rdi
callq 0x111a8
leaq 0x22027(%rip), %rcx     # 0x31591
movb 0x1d0(%r14), %al
cmpb $0x0, (%rcx)
movq %rbx, 0x70(%rsp)
je 0xf5f8
testb %al, %al
je 0xfc0d
leaq 0x1e0(%r14), %r13
xorl %r15d, %r15d
leaq 0x21fec(%rip), %rbp     # 0x31580
xorl %ebx, %ebx
xorl %r12d, %r12d
movslq (%rbp), %rax
cmpq %rax, %r12
jge 0xf884
movq %r13, %rdi
movq %r12, %rsi
callq 0x11106
testq %rdx, (%rax)
jne 0xf8f1
movq 0x1d8(%r14), %rax
movq 0x210(%rax), %rax
movq 0x1d8(%rax), %rax
movq (%rax,%r12,8), %rax
cmpl $0x1, 0x4(%rax)
je 0xf92d
movq 0x10(%rax), %rax
cmpq 0x8(%r14), %rax
ja 0xfc0d
incq %r12
addq $-0x18, %rbx
addq $0x6, %r15
jmp 0xf599
testb %al, %al
je 0xf671
leaq 0x1e0(%r14), %rbp
xorl %r15d, %r15d
leaq 0x21f73(%rip), %r12     # 0x31580
xorl %ebx, %ebx
xorl %r13d, %r13d
movslq (%r12), %rax
cmpq %rax, %r13
jge 0xf9d8
movq %rbp, %rdi
movq %r13, %rsi
callq 0x11106
testq %rdx, (%rax)
jne 0xfa55
movq 0x1d8(%r14), %rax
movq 0x210(%rax), %rax
movq 0x1d8(%rax), %rax
movq (%rax,%r13,8), %rax
cmpl $0x1, 0x4(%rax)
je 0xfa90
movq 0x10(%rax), %rax
cmpq 0x8(%r14), %rax
ja 0x10377
incq %r13
addq $-0x18, %rbx
addq $0x6, %r15
jmp 0xf612
leaq 0x1e0(%r14), %rax
movq %rax, 0x48(%rsp)
leaq 0x21f0c(%rip), %rbx     # 0x31590
movb (%rbx), %al
movl 0x1cc(%r14), %ecx
xorl %r8d, %r8d
leaq 0x21ee9(%rip), %r15     # 0x31580
xorl %r12d, %r12d
xorl %ebp, %ebp
movl %ecx, %esi
movq 0x220(%r14), %rdx
testb $0x1, %al
movl $0x0, %edi
cmovneq %rsi, %rdi
cmpl $0x0, (%rdx,%rdi,4)
jne 0xf853
movq 0x48(%rsp), %rdi
callq 0x11106
testq %rdx, (%rax)
jne 0xf988
xorl %r13d, %r13d
movb (%rbx), %al
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rsi
testb %al, %al
movl $0x0, %edx
cmovneq %rcx, %rdx
imulq $0x18, %rdx, %rdi
movq (%rsi,%rdi), %rdx
movq 0x8(%rsi,%rdi), %rsi
subq %rdx, %rsi
sarq $0x3, %rsi
cmpq %r13, %rsi
jbe 0xf850
movq (%rdx,%r13,8), %rsi
movq %r14, %rdi
callq 0x10726
testb %al, %al
je 0xf762
movb (%rbx), %al
movl 0x1cc(%r14), %edx
testb $0x1, %al
movl $0x0, %ecx
cmovneq %rdx, %rcx
movq 0x238(%r14), %rsi
imulq $0x18, %rcx, %rcx
addq %rsi, %rcx
xorl %edi, %edi
cmpq %rdi, %r13
je 0xf76a
movq (%rcx), %r8
movq (%r8,%rdi,8), %r9
cmpl $0x0, 0x10(%r9)
jne 0xf75d
movl 0x14(%r9), %r9d
movq (%r8,%r13,8), %r8
cmpl 0x14(%r8), %r9d
je 0xf762
incq %rdi
jmp 0xf73c
incq %r13
jmp 0xf6d0
testb $0x1, %al
je 0xf782
imulq $0x18, %rdx, %rdx
movq (%rsi,%rdx), %rdx
movq (%rdx,%r13,8), %rdx
cmpb $0x0, 0x30(%rdx)
jne 0xf78f
jmp 0xf7e9
movq (%rsi), %rdx
movq (%rdx,%r13,8), %rdx
cmpb $0x1, 0x30(%rdx)
jne 0xf7e9
cmpl $0x68, 0x2c(%rdx)
je 0xf7e9
movq (%rcx), %rcx
movq (%rcx,%r13,8), %rcx
cmpl $0x69, 0x2c(%rcx)
je 0xf7e9
movl 0x18(%rcx), %esi
movq 0x48(%rsp), %rdi
callq 0x11106
orq %rdx, (%rax)
movb (%rbx), %al
movl 0x1cc(%r14), %ecx
testb %al, %al
movl $0x0, %edx
cmoveq %rdx, %rcx
movq 0x238(%r14), %rdx
imulq $0x18, %rcx, %rcx
movq (%rdx,%rcx), %rcx
movq (%rcx,%r13,8), %rcx
movl 0x14(%rcx), %edx
movl 0x18(%rcx), %ecx
movq 0x208(%r14), %rsi
movl %edx, (%rsi,%rcx,4)
testb $0x1, %al
je 0xf818
movl 0x1cc(%r14), %eax
movq 0x238(%r14), %rcx
imulq $0x18, %rax, %rdi
movq (%rcx,%rdi), %rax
movq (%rax,%r13,8), %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
addq 0x238(%r14), %rdi
jmp 0xf835
movq 0x238(%r14), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq 0x238(%r14), %rdi
shlq $0x3, %r13
addq (%rdi), %r13
movq %r13, %rsi
callq 0x111e2
movb (%rbx), %al
movl 0x1cc(%r14), %ecx
movb $0x1, %bpl
xorl %r8d, %r8d
movl (%r15), %edx
leal -0x1(%rdx), %esi
cmpl %esi, %ecx
leal 0x1(%rcx), %ecx
cmovael %r8d, %ecx
movl %ecx, 0x1cc(%r14)
testb $0x1, %bpl
jne 0x1036d
incl %r12d
cmpl %edx, %r12d
jne 0xf69c
jmp 0x1036d
movq 0x1d8(%r14), %rax
movq 0x210(%rax), %rax
movq 0x1d8(%rax), %rax
movq (%rax), %rax
cmpl $0x4, 0x4(%rax)
je 0xfc0d
pushq $0x38
popq %rdi
callq 0x4310
movq %rax, %r12
andl $0x0, 0x30(%rsp)
andl $0x0, 0x28(%rsp)
andl $0x0, 0x20(%rsp)
andq $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movl $0x1, 0x18(%rsp)
pushq $0x8
popq %rsi
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x151c0
jmp 0xfa40
leaq 0x21c98(%rip), %rbp     # 0x31590
movb (%rbp), %al
cmpb $0x1, %al
jne 0xfaee
movl 0x1cc(%r14), %ecx
movq 0x220(%r14), %rdx
cmpl $0x0, (%rdx,%rcx,4)
jne 0xfc0d
movq 0x238(%r14), %rcx
movq %rcx, %rdx
subq %rbx, %rdx
jmp 0xfb08
leaq 0x21c5c(%rip), %r15     # 0x31590
movq 0x238(%r14), %rdx
xorl %ebx, %ebx
cmpb $0x0, (%r15)
movl $0x0, %ecx
cmovneq %r12, %rcx
imulq $0x18, %rcx, %rsi
movq (%rdx,%rsi), %rcx
movq 0x8(%rdx,%rsi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0xfbff
movq (%rcx,%rsi,8), %rbp
cmpl %r12d, 0x18(%rbp)
jne 0xf97f
movl 0x8(%rax), %edi
cmpl 0x20(%rbp), %edi
je 0xfb9d
incq %rsi
addq $-0x8, %rbx
jmp 0xf960
movb (%rbx), %sil
movl 0x1cc(%r14), %eax
movq 0x238(%r14), %rdx
xorl %ecx, %ecx
testb %sil, %sil
cmovneq %rax, %rcx
imulq $0x18, %rcx, %rdi
movq (%rdx,%rdi), %rcx
cmpq %rcx, 0x8(%rdx,%rdi)
je 0x1036d
testb %sil, %sil
je 0x102b0
imulq $0x18, %rax, %rsi
movq (%rdx,%rsi), %rdx
movq (%rdx), %rdx
cmpb $0x0, 0x30(%rdx)
je 0x1036d
jmp 0x102c0
movq 0x1d8(%r14), %rax
movq 0x210(%rax), %rax
movq 0x1d8(%rax), %rax
movq (%rax), %rax
cmpl $0x4, 0x4(%rax)
je 0x10377
pushq $0x38
popq %rdi
callq 0x4310
movq %rax, %r12
andl $0x0, 0x30(%rsp)
andl $0x0, 0x28(%rsp)
andl $0x0, 0x20(%rsp)
andq $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movl $0x1, 0x18(%rsp)
pushq $0x8
popq %rsi
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x151c0
movq 0x40(%rsp), %rax
movq %r12, (%rax)
movb $0x0, 0x1d0(%r14)
jmp 0x10422
leaq 0x21b34(%rip), %rdi     # 0x31590
movb (%rdi), %al
cmpb $0x1, %al
jne 0x101d2
movl 0x1cc(%r14), %ecx
movq 0x220(%r14), %rdx
cmpl $0x0, (%rdx,%rcx,4)
jne 0x10377
movq 0x238(%r14), %rcx
movq %rcx, %rdx
subq %rbx, %rdx
jmp 0x101ec
leaq 0x21af9(%rip), %r15     # 0x31590
movq 0x238(%r14), %rdx
xorl %ebx, %ebx
cmpb $0x0, (%r15)
movl $0x0, %ecx
cmovneq %r13, %rcx
imulq $0x18, %rcx, %rsi
movq (%rdx,%rsi), %rcx
movq 0x8(%rdx,%rsi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x10377
movq (%rcx,%rsi,8), %r12
cmpl %r13d, 0x18(%r12)
jne 0xfae5
movl 0x8(%rax), %edi
cmpl 0x20(%r12), %edi
je 0x1037f
incq %rsi
addq $-0x8, %rbx
jmp 0xfac3
movq 0x220(%r14), %rcx
cmpl $0x0, (%rcx)
jne 0xfc0d
movq 0x238(%r14), %rcx
movq %rcx, %rdx
movq 0x8(%rdx), %rsi
cmpq (%rdx), %rsi
je 0xfc0d
xorl %edx, %edx
testb %al, %al
cmovneq %r12, %rdx
imulq $0x18, %rdx, %rax
movq (%rcx,%rax), %rax
movq (%rax), %rsi
movl 0x14(%rsi), %eax
movq 0x208(%r14), %rcx
cmpl (%rcx,%r12,4), %eax
jne 0xfc0d
movq %r14, %rdi
callq 0x10726
testb %al, %al
je 0xfc0d
movb (%rbp), %al
movq 0x238(%r14), %rcx
xorl %edx, %edx
testb %al, %al
cmovneq %r12, %rdx
imulq $0x18, %rdx, %rdx
movq (%rcx,%rdx), %rcx
movq (%rcx), %rcx
movl 0x10(%rcx), %ecx
addl $-0x3, %ecx
cmpl $0x1, %ecx
ja 0x10283
movq %r13, %rdi
movq %r12, %rsi
callq 0x11106
notq %rdx
andq %rdx, (%rax)
movq 0x208(%r14), %rax
andl $0x0, (%rax,%r12,4)
movb (%rbp), %al
jmp 0x10283
cmpl $0x0, 0x10(%rbp)
je 0xfbff
movq %r14, %rdi
movq %rbp, %rsi
callq 0x10726
testb %al, %al
je 0xfc0d
cmpb $0x1, 0x30(%rbp)
jne 0xfbe1
movl 0x2c(%rbp), %eax
andl $-0x2, %eax
cmpl $0x68, %eax
je 0xfbe1
movl 0x18(%rbp), %esi
movq %r13, %rdi
callq 0x11106
orq %rdx, (%rax)
movl 0x14(%rbp), %eax
movl 0x18(%rbp), %ecx
movq 0x208(%r14), %rdx
movl %eax, (%rdx,%rcx,4)
movq 0x40(%rsp), %rax
movq %rbp, (%rax)
movq 0x238(%r14), %rax
xorl %ecx, %ecx
cmpb $0x0, (%r15)
cmovneq %r12, %rcx
jmp 0x103e8
movq 0x28(%rax), %rax
cmpq 0x8(%r14), %rax
jbe 0x10172
leaq 0x1e0(%r14), %r12
movl 0x1cc(%r14), %edx
xorl %ebx, %ebx
leaq 0x2196c(%rip), %rbp     # 0x31590
leaq 0x21955(%rip), %r13     # 0x31580
xorl %r15d, %r15d
movl %edx, %esi
movq 0x220(%r14), %rcx
xorl %eax, %eax
cmpb $0x0, (%rbp)
movl $0x0, %edx
cmovneq %rsi, %rdx
cmpl $0x0, (%rcx,%rdx,4)
je 0xfc7e
movl 0x1cc(%r14), %esi
movl (%r13), %ecx
leal -0x1(%rcx), %edi
leal 0x1(%rsi), %edx
cmpl %edi, %esi
cmovael %ebx, %edx
movl %edx, 0x1cc(%r14)
testb %al, %al
jne 0x1001a
incl %r15d
cmpl %ecx, %r15d
jne 0xfc2e
jmp 0x1001a
movq %r12, %rdi
callq 0x11106
testq %rdx, (%rax)
je 0xfcdd
movb (%rbp), %dil
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rsi
xorl %eax, %eax
testb %dil, %dil
movl $0x0, %edx
cmovneq %rcx, %rdx
imulq $0x18, %rdx, %r8
movq (%rsi,%r8), %rdx
cmpq %rdx, 0x8(%rsi,%r8)
je 0xfc4c
testb %dil, %dil
je 0xfdac
imulq $0x18, %rcx, %rax
movq (%rsi,%rax), %rax
movq (%rax), %rax
cmpb $0x0, 0x30(%rax)
jne 0xfdbc
jmp 0xfe6c
xorl %r13d, %r13d
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rdx
xorl %eax, %eax
cmpb $0x0, (%rbp)
cmoveq %rax, %rcx
imulq $0x18, %rcx, %rsi
movq (%rdx,%rsi), %rcx
movq 0x8(%rdx,%rsi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r13, %rdx
jbe 0xffe3
movq (%rcx,%r13,8), %rsi
movq %r14, %rdi
callq 0x10726
testb %al, %al
je 0xfd7a
movb (%rbp), %al
movl 0x1cc(%r14), %esi
testb $0x1, %al
movl $0x0, %ecx
cmovneq %rsi, %rcx
movq 0x238(%r14), %rdx
imulq $0x18, %rcx, %r8
addq %rdx, %r8
xorl %edi, %edi
cmpq %rdi, %r13
je 0xfd82
movq (%r8), %r10
movq (%r10,%rdi,8), %r9
cmpl $0x0, 0x10(%r9)
je 0xfd75
movl 0x18(%r9), %r11d
movq (%r10,%r13,8), %r10
cmpl 0x18(%r10), %r11d
jne 0xfd75
movl 0x20(%r9), %r9d
cmpl 0x20(%r10), %r9d
je 0xfd7a
incq %rdi
jmp 0xfd4a
incq %r13
jmp 0xfce0
testb $0x1, %al
je 0xfe73
imulq $0x18, %rsi, %rdi
movq (%rdx,%rdi), %rdi
movq (%rdi,%r13,8), %r9
movb $0x1, %dil
cmpb $0x0, 0x30(%r9)
jne 0xfe81
movq %rsi, %rcx
jmp 0xfef8
movq (%rsi), %rax
movq (%rax), %rax
cmpb $0x1, 0x30(%rax)
jne 0xfe6c
movl 0x14(%rax), %eax
movq 0x208(%r14), %rsi
cmpl (%rsi,%rcx,4), %eax
jne 0xfe6c
movq (%rdx), %rsi
movq %r14, %rdi
callq 0x10726
testb %al, %al
je 0xfe6c
movb (%rbp), %al
movl 0x1cc(%r14), %esi
movq 0x238(%r14), %rcx
testb %al, %al
movl $0x0, %edx
cmovneq %rsi, %rdx
imulq $0x18, %rdx, %rdx
movq (%rcx,%rdx), %rcx
movq (%rcx), %rcx
movl 0x10(%rcx), %ecx
addl $-0x3, %ecx
cmpl $0x1, %ecx
ja 0xfe37
movq %r12, %rdi
callq 0x11106
notq %rdx
andq %rdx, (%rax)
movl 0x1cc(%r14), %eax
movq 0x208(%r14), %rcx
andl $0x0, (%rcx,%rax,4)
movb (%rbp), %al
testb $0x1, %al
je 0xffef
movl 0x1cc(%r14), %eax
movq 0x238(%r14), %rcx
imulq $0x18, %rax, %rdi
movq (%rcx,%rdi), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
addq 0x238(%r14), %rdi
jmp 0x1000b
xorl %eax, %eax
jmp 0xfc4c
movq (%rdx), %rdi
movq (%rdi,%r13,8), %r9
cmpb $0x1, 0x30(%r9)
jne 0xfe99
cmpl $0x68, 0x2c(%r9)
je 0xfe95
movq (%r8), %rdi
movq (%rdi,%r13,8), %rdi
cmpl $0x69, 0x2c(%rdi)
jne 0xfe9f
movl %eax, %edi
jmp 0xfef8
xorl %ecx, %ecx
xorl %edi, %edi
jmp 0xfef8
movq %r12, %rdi
callq 0x11106
orq %rdx, (%rax)
movb (%rbp), %dil
movl 0x1cc(%r14), %eax
testb %dil, %dil
movl $0x0, %ecx
cmovneq %rax, %rcx
imulq $0x18, %rcx, %rcx
testb %dil, %dil
movq 0x238(%r14), %rdx
movq (%rdx,%rcx), %rcx
movq (%rcx,%r13,8), %rcx
movl 0x14(%rcx), %ecx
movq 0x208(%r14), %rdx
movl %ecx, (%rdx,%rax,4)
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rdx
cmoveq %rbx, %rcx
movl %edi, %eax
imulq $0x18, %rcx, %rcx
movq (%rdx,%rcx), %rcx
movq (%rcx,%r13,8), %rcx
movq 0x40(%rsp), %rdx
movq %rcx, (%rdx)
testq %r13, %r13
je 0xff42
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rsi
testb $0x1, %dil
movl $0x0, %edx
cmovneq %rcx, %rdx
imulq $0x18, %rdx, %r8
leal -0x1(%r13), %edx
movq (%rsi,%r8), %rsi
movq (%rsi,%rdx,8), %rsi
cmpl $0x0, 0x10(%rsi)
je 0xff72
movl 0x1cc(%r14), %eax
movq 0x238(%r14), %rcx
testb $0x1, %dil
cmoveq %rbx, %rax
imulq $0x18, %rax, %rax
leaq (%rcx,%rax), %rdi
shlq $0x3, %r13
addq (%rcx,%rax), %r13
movq %r13, %rsi
callq 0x111e2
jmp 0xffe1
movq 0x268(%r14), %rsi
incl (%rsi,%rcx,4)
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rsi
testb $0x1, %dil
cmoveq %rbx, %rcx
imulq $0x18, %rcx, %rcx
movq (%rsi,%rcx), %rcx
movq (%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0xffac
movq (%rdi), %rax
callq *0x8(%rax)
movb (%rbp), %al
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rdx
testb $0x1, %al
cmoveq %rbx, %rcx
imulq $0x18, %rcx, %rax
leaq (%rdx,%rax), %rdi
movq (%rdx,%rax), %rax
leaq (%rax,%r13,8), %rsi
addq $-0x8, %rsi
leaq (%rax,%r13,8), %rdx
addq $0x8, %rdx
callq 0x1121c
movb $0x1, %al
leaq 0x21596(%rip), %r13     # 0x31580
jmp 0xfc4c
movq 0x238(%r14), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq 0x238(%r14), %rdi
movq (%rdi), %rsi
callq 0x111e2
movb $0x1, %al
jmp 0xfc4c
testb %al, %al
jne 0x10422
movq %r13, %r15
xorl %r13d, %r13d
leaq 0x21565(%rip), %rbx     # 0x31594
movslq %ecx, %rax
cmpq %rax, %r13
jge 0x10377
movq 0x1d8(%r14), %rax
movq 0x210(%rax), %rax
movq 0x1d8(%rax), %rax
movq (%rax,%r13,8), %rax
cmpl $0x1, 0x4(%rax)
jne 0x100f9
movq %r12, %rdi
movq %r13, %rsi
callq 0x11106
movl (%r15), %ecx
testq %rdx, (%rax)
jne 0x100f9
movq 0x1d8(%r14), %rax
movq 0x238(%r14), %rsi
cmpb $0x0, (%rbp)
movl $0x0, %edx
cmovneq %r13, %rdx
imulq $0x18, %rdx, %rdi
movq (%rsi,%rdi), %rdx
movq 0x8(%rsi,%rdi), %rsi
subq %rdx, %rsi
sarq $0x3, %rsi
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x100dd
movq (%rdx,%rdi,8), %r8
movl 0x18(%r8), %r8d
cmpq %r8, %r13
jne 0x100d8
movq (%rdx,%rdi,8), %r8
movl 0x20(%r8), %r9d
movq 0x210(%rax), %r8
movq 0x1d8(%r8), %r8
movq (%r8,%r13,8), %r8
cmpl 0x8(%r8), %r9d
je 0x10101
incq %rdi
jmp 0x100a6
movq 0x210(%rax), %rax
movq 0x1d8(%rax), %rax
movq (%rax,%r13,8), %r8
movq 0x28(%r8), %rax
cmpq 0x8(%r14), %rax
jbe 0x10112
incq %r13
jmp 0x1002f
movq 0x268(%r14), %rax
movl (%rax,%r13,4), %eax
cmpl (%rbx), %eax
jae 0x100ef
jmp 0x100f9
movq 0x268(%r14), %rax
andl $0x0, (%rax,%r13,4)
pushq $0x38
popq %rdi
callq 0x4310
movq %rax, %r12
andl $0x0, 0x30(%rsp)
andl $0x0, 0x28(%rsp)
andl $0x0, 0x20(%rsp)
andq $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movl $0x1, 0x18(%rsp)
pushq $0x7
popq %rsi
movq %rax, %rdi
xorl %edx, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x151c0
movq 0x40(%rsp), %rax
movq %r12, (%rax)
jmp 0x10422
movq 0x268(%r14), %rax
andl $0x0, (%rax,%r12,4)
pushq $0x38
popq %rdi
callq 0x4310
movq %rax, %r13
andl $0x0, 0x30(%rsp)
andl $0x0, 0x28(%rsp)
andl $0x0, 0x20(%rsp)
andq $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movl $0x1, 0x18(%rsp)
pushq $0x7
popq %rsi
movq %rax, %rdi
xorl %edx, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x151c0
movq 0x40(%rsp), %rax
movq %r13, (%rax)
jmp 0x10422
movq 0x220(%r14), %rcx
cmpl $0x0, (%rcx)
jne 0x10377
movq 0x238(%r14), %rcx
movq %rcx, %rdx
movq 0x8(%rdx), %rsi
cmpq (%rdx), %rsi
je 0x10377
xorl %r12d, %r12d
testb %al, %al
movl $0x0, %eax
cmovneq %r13, %rax
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %rax
movq (%rax), %rsi
movl 0x14(%rsi), %eax
movq 0x208(%r14), %rcx
cmpl (%rcx,%r13,4), %eax
jne 0x1069d
movq %rdi, %r12
movq %r14, %rdi
callq 0x10726
testb %al, %al
je 0x10377
movb (%r12), %al
movq 0x238(%r14), %rcx
xorl %edx, %edx
testb %al, %al
cmovneq %r13, %rdx
imulq $0x18, %rdx, %rdx
movq (%rcx,%rdx), %rcx
movq (%rcx), %rcx
movl 0x10(%rcx), %ecx
addl $-0x3, %ecx
cmpl $0x1, %ecx
ja 0x10283
movq %rbp, %rdi
movq %r13, %rsi
callq 0x11106
notq %rdx
andq %rdx, (%rax)
movq 0x208(%r14), %rax
andl $0x0, (%rax,%r13,4)
movb (%r12), %al
movq 0x238(%r14), %rcx
testb $0x1, %al
je 0x103f9
movq (%rcx,%r15,4), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq 0x238(%r14), %rdi
subq %rbx, %rdi
jmp 0x1041a
movq (%rdx), %rdx
movq (%rdx), %rdx
cmpb $0x1, 0x30(%rdx)
jne 0x1036d
movl 0x14(%rdx), %edx
movq 0x208(%r14), %rsi
cmpl (%rsi,%rax,4), %edx
jne 0x1036d
movq (%rcx), %rsi
movq %r14, %rdi
callq 0x10726
testb %al, %al
je 0x1036d
movb (%rbx), %al
movl 0x1cc(%r14), %esi
movq 0x238(%r14), %rcx
xorl %edx, %edx
testb %al, %al
cmovneq %rsi, %rdx
imulq $0x18, %rdx, %rdx
movq (%rcx,%rdx), %rcx
movq (%rcx), %rcx
movl 0x10(%rcx), %ecx
addl $-0x3, %ecx
cmpl $0x1, %ecx
ja 0x10338
movq 0x48(%rsp), %rdi
callq 0x11106
notq %rdx
andq %rdx, (%rax)
movl 0x1cc(%r14), %eax
movq 0x208(%r14), %rcx
andl $0x0, (%rcx,%rax,4)
movb (%rbx), %al
testb $0x1, %al
je 0x103fe
movl 0x1cc(%r14), %eax
movq 0x238(%r14), %rcx
imulq $0x18, %rax, %rdi
movq (%rcx,%rdi), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
addq 0x238(%r14), %rdi
jmp 0x1041a
testb $0x1, %bpl
jne 0x10422
xorl %r12d, %r12d
jmp 0x1069d
cmpl $0x0, 0x10(%r12)
je 0x10377
movq %r14, %rdi
movq %r12, %rsi
callq 0x10726
testb %al, %al
je 0x10377
cmpb $0x1, 0x30(%r12)
jne 0x103cf
movl 0x2c(%r12), %eax
andl $-0x2, %eax
cmpl $0x68, %eax
je 0x103cf
movl 0x18(%r12), %esi
movq %rbp, %rdi
callq 0x11106
orq %rdx, (%rax)
movl 0x14(%r12), %eax
movl 0x18(%r12), %ecx
movq 0x208(%r14), %rdx
movl %eax, (%rdx,%rcx,4)
movq 0x40(%rsp), %rax
movq %r12, (%rax)
movq 0x238(%r14), %rax
xorl %ecx, %ecx
cmpb $0x0, (%r15)
cmovneq %r13, %rcx
imulq $0x18, %rcx, %rcx
leaq (%rax,%rcx), %rdi
movq (%rax,%rcx), %rsi
subq %rbx, %rsi
jmp 0x1041d
movq (%rcx), %rax
jmp 0x10408
movq 0x238(%r14), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq 0x238(%r14), %rdi
movq (%rdi), %rsi
callq 0x111e2
movq 0x40(%rsp), %rax
movq (%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0x10441
leaq 0x211a9(%rip), %rsi     # 0x315e0
movq 0x70(%rsp), %rdi
callq 0xe58e
leaq 0x21148(%rip), %rax     # 0x31590
cmpb $0x1, (%rax)
jne 0x105c4
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x58(%r14), %r15
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x4420
leaq 0x40(%r14), %r12
leaq 0x50(%rsp), %rdi
callq 0x4598
movq 0x40(%r14), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x44d0
leaq 0x50(%r14), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rax
movl 0x18(%rax), %esi
callq 0x4210
leaq 0x20fda(%rip), %rax     # 0x31488
movb $0x1, %r12b
cmpb $0x1, (%rax)
jne 0x1069d
leaq 0x20fc8(%rip), %rax     # 0x31489
cmpb $0x0, (%rax)
jne 0x1069d
movq 0x20aff(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
movq %rax, %r13
addq $0x20, %r14
leaq 0x14480(%rip), %rdx     # 0x24977
leaq 0x98(%rsp), %rdi
movq %r14, %rsi
callq 0xdeb2
leaq 0x78(%rsp), %rdi
movq %r15, %rsi
callq 0x4450
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x11123
leaq 0x16f9c(%rip), %rdx     # 0x274d1
leaq 0x50(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xdeea
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x42b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x4440
movq 0x40(%rsp), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x15274
leaq 0x15435(%rip), %rsi     # 0x259bb
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
leaq 0x50(%rsp), %rdi
callq 0x4598
leaq 0xb8(%rsp), %rdi
callq 0x4598
leaq 0x78(%rsp), %rdi
callq 0x4598
leaq 0x98(%rsp), %rdi
jmp 0x10698
leaq 0x20ebd(%rip), %rax     # 0x31488
movb $0x1, %r12b
cmpb $0x1, (%rax)
jne 0x1069d
leaq 0x20eab(%rip), %rax     # 0x31489
cmpb $0x0, (%rax)
jne 0x1069d
movq 0x209e2(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
movq %rax, %r15
addq $0x20, %r14
leaq 0x16ebd(%rip), %rdx     # 0x274d1
leaq 0x50(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0xdeb2
movq %r15, %rdi
movq %r13, %rsi
callq 0x42b0
movq 0x40(%rsp), %rcx
movq (%rcx), %rcx
movl 0x18(%rcx), %esi
movq %rax, %rdi
callq 0x4210
leaq 0x16e88(%rip), %rsi     # 0x274d1
movq %rax, %rdi
callq 0x4300
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x4440
movq 0x40(%rsp), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x15274
leaq 0x15338(%rip), %rsi     # 0x259bb
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
leaq 0x50(%rsp), %rdi
callq 0x4598
movl %r12d, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x106c1
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r13, %rdi
jmp 0x106ca
jmp 0x106c1
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r12, %rdi
callq 0x4320
jmp 0x1071d
movq %rax, %rbx
jmp 0x106ef
movq %rax, %rbx
jmp 0x106fc
movq %rax, %rbx
jmp 0x10706
jmp 0x10710
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x4598
leaq 0xb8(%rsp), %rdi
callq 0x4598
leaq 0x78(%rsp), %rdi
callq 0x4598
leaq 0x98(%rsp), %rdi
jmp 0x10718
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x4598
movq %rbx, %rdi
callq 0x4520
nop