// File: /workspace/github_cpp_makefile_star2_O3/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 $0x88, %rsp
movq %rsi, (%rsp)
movq %rdi, %r14
movq 0x250(%rdi), %rdi
movq 0x258(%r14), %rdx
movq %rdx, %rax
subq %rdi, %rax
je 0x1514e
sarq $0x2, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %ecx, %ecx
decl (%rdi,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x15116
cmpq %rdi, %rdx
je 0x1514e
cmpl $0x0, (%rdi)
jne 0x1514e
leaq 0x4(%rdi), %rsi
cmpq %rdx, %rsi
je 0x15143
subq %rsi, %rdx
callq 0x4480
movq 0x258(%r14), %rdx
addq $-0x4, %rdx
movq %rdx, 0x258(%r14)
leaq 0x2643c(%rip), %rcx     # 0x3b591
movb 0x1d0(%r14), %al
cmpb $0x0, (%rcx)
je 0x151f8
testb %al, %al
je 0x15523
leaq 0x2640c(%rip), %rax     # 0x3b580
movslq (%rax), %rdx
testq %rdx, %rdx
jle 0x15501
movq 0x1e0(%r14), %rsi
movq 0x8(%r14), %rax
movq 0x1d8(%r14), %rdi
movl $0x1, %ebx
xorl %r12d, %r12d
xorl %r15d, %r15d
movl $0x1, %r13d
movl %r15d, %ecx
shlq %cl, %r13
movl %r15d, %ebp
shrl $0x6, %ebp
movq (%rsi,%rbp,8), %rcx
btq %r15, %rcx
jb 0x15bb6
movq 0x210(%rdi), %rcx
movq 0x1d8(%rcx), %r8
movq (%r8,%r15,8), %rcx
cmpl $0x1, 0x4(%rcx)
je 0x15c13
cmpq %rax, 0x10(%rcx)
ja 0x15523
incq %r15
addq $0x3, %rbx
addq $-0x18, %r12
cmpq %r15, %rdx
jne 0x1519d
jmp 0x15516
testb %al, %al
je 0x1528b
leaq 0x26379(%rip), %rax     # 0x3b580
movslq (%rax), %rdx
testq %rdx, %rdx
jle 0x15af8
movq 0x1e0(%r14), %rsi
movq 0x8(%r14), %rdi
movq 0x1d8(%r14), %r8
movl $0x4, %ebx
xorl %r12d, %r12d
xorl %r15d, %r15d
movl $0x1, %r13d
movl %r15d, %ecx
shlq %cl, %r13
movl %r15d, %ebp
shrl $0x6, %ebp
movq (%rsi,%rbp,8), %rax
btq %r15, %rax
jb 0x15c75
movq 0x210(%r8), %rax
movq 0x1d8(%rax), %rcx
movq (%rcx,%r15,8), %rax
cmpl $0x1, 0x4(%rax)
je 0x15cd2
cmpq %rdi, 0x10(%rax)
ja 0x15d97
incq %r15
addq $0xc, %rbx
addq $-0x18, %r12
cmpq %r15, %rdx
jne 0x15230
jmp 0x15b0d
movl 0x1cc(%r14), %ecx
xorl %edi, %edi
leaq 0x262f5(%rip), %rbx     # 0x3b590
leaq 0x262de(%rip), %r12     # 0x3b580
xorl %ebp, %ebp
xorl %r13d, %r13d
movb (%rbx), %al
movl %ecx, %ecx
movq 0x220(%r14), %rdx
testb %al, %al
movl $0x0, %esi
cmovneq %rcx, %rsi
cmpl $0x0, (%rdx,%rsi,4)
jne 0x154c7
movq 0x1e0(%r14), %rdx
movl %ecx, %esi
shrl $0x6, %esi
movq (%rdx,%rsi,8), %rdx
btq %rcx, %rdx
jb 0x15b6b
xorl %r15d, %r15d
testb $0x1, %al
je 0x15305
movl 0x1cc(%r14), %eax
movq 0x238(%r14), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
jmp 0x15313
movq 0x238(%r14), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x154fd
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x16702
testb %al, %al
je 0x15381
movb (%rbx), %al
testq %r15, %r15
je 0x1538b
movq 0x238(%r14), %rcx
movl 0x1cc(%r14), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rdx
xorl %esi, %esi
testb $0x1, %al
je 0x1535b
movq (%rdx), %rdi
jmp 0x1535e
movq (%rcx), %rdi
movq (%rdi,%rsi,8), %r8
cmpl $0x0, 0x10(%r8)
jne 0x15377
movl 0x14(%r8), %r8d
movq (%rdi,%r15,8), %rdi
cmpl 0x14(%rdi), %r8d
je 0x15383
incq %rsi
cmpq %rsi, %r15
jne 0x15352
jmp 0x1538b
movb (%rbx), %al
incq %r15
jmp 0x152e4
testb $0x1, %al
je 0x153c4
movl 0x1cc(%r14), %edx
movq 0x238(%r14), %rcx
leaq (%rdx,%rdx,2), %rdx
movq (%rcx,%rdx,8), %rsi
movq (%rsi,%r15,8), %rsi
cmpb $0x0, 0x30(%rsi)
je 0x1543b
movl 0x2c(%rsi), %esi
andl $-0x2, %esi
cmpl $0x68, %esi
je 0x1543b
leaq (%rcx,%rdx,8), %rdx
jmp 0x153eb
movq 0x238(%r14), %rdx
movq (%rdx), %rcx
movq (%rcx,%r15,8), %rcx
cmpb $0x0, 0x30(%rcx)
je 0x15487
movl 0x2c(%rcx), %esi
andl $-0x2, %esi
cmpl $0x68, %esi
je 0x15487
movq (%rdx), %rcx
movq (%rcx,%r15,8), %rcx
movl 0x18(%rcx), %ecx
movq 0x1e0(%r14), %rdx
movl %ecx, %esi
shrl $0x6, %esi
movl $0x1, %edi
shlq %cl, %rdi
orq %rdi, (%rdx,%rsi,8)
testb $0x1, %al
je 0x15462
movl 0x1cc(%r14), %eax
movq 0x238(%r14), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rax
movq (%rax,%r15,8), %rax
movl 0x14(%rax), %edx
movl 0x18(%rax), %eax
movq 0x208(%r14), %rsi
movl %edx, (%rsi,%rax,4)
movl 0x1cc(%r14), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r13
movq (%rcx,%r13), %rax
movq (%rax,%r15,8), %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
addq 0x238(%r14), %r13
jmp 0x15495
movq 0x208(%r14), %rax
movq 0x238(%r14), %rcx
movq (%rcx), %rdx
movq (%rdx,%r15,8), %rdx
movl 0x14(%rdx), %esi
movl 0x18(%rdx), %edx
movl %esi, (%rax,%rdx,4)
movq (%rcx), %rax
movq (%rax,%r15,8), %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq 0x238(%r14), %r13
movq (%r13), %rax
movq 0x8(%r13), %rdx
leaq (%rax,%r15,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x154ba
leaq (%rax,%r15,8), %rdi
subq %rsi, %rdx
callq 0x4480
movq 0x8(%r13), %rdx
xorl %edi, %edi
addq $-0x8, %rdx
movq %rdx, 0x8(%r13)
movb $0x1, %r13b
movl 0x1cc(%r14), %edx
movl (%r12), %eax
leal -0x1(%rax), %esi
leal 0x1(%rdx), %ecx
cmpl %esi, %edx
cmovael %edi, %ecx
movl %ecx, 0x1cc(%r14)
testb $0x1, %r13b
jne 0x15d8d
incl %ebp
cmpl %eax, %ebp
jne 0x152a7
jmp 0x15d8d
xorl %edi, %edi
jmp 0x154c7
movq 0x1d8(%r14), %rax
movq 0x210(%rax), %rax
movq 0x1d8(%rax), %r8
movq (%r8), %rax
cmpl $0x4, 0x4(%rax)
jne 0x15ab8
movl 0x1cc(%r14), %edx
xorl %ebp, %ebp
leaq 0x2605d(%rip), %r13     # 0x3b590
leaq 0x26046(%rip), %r12     # 0x3b580
xorl %ebx, %ebx
movb (%r13), %al
movl %edx, %edx
movq 0x220(%r14), %rsi
xorl %ecx, %ecx
testb %al, %al
movl $0x0, %edi
cmovneq %rdx, %rdi
cmpl $0x0, (%rsi,%rdi,4)
jne 0x15900
movq 0x1e0(%r14), %rcx
movl %edx, %esi
shrl $0x6, %esi
movq (%rcx,%rsi,8), %rcx
btq %rdx, %rcx
jae 0x155c1
movq 0x238(%r14), %rcx
testb %al, %al
je 0x156bb
leaq (%rdx,%rdx,2), %rax
movq (%rcx,%rax,8), %rsi
cmpq %rsi, 0x8(%rcx,%rax,8)
je 0x15716
movq (%rsi), %rsi
cmpb $0x0, 0x30(%rsi)
je 0x15716
movl 0x14(%rsi), %esi
movq 0x208(%r14), %rdi
cmpl (%rdi,%rdx,4), %esi
jne 0x15716
leaq (%rcx,%rax,8), %rcx
jmp 0x156dc
xorl %r12d, %r12d
testb $0x1, %al
je 0x155e5
movl 0x1cc(%r14), %eax
movq 0x238(%r14), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
jmp 0x155f3
movq 0x238(%r14), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x158f7
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x16702
testb %al, %al
je 0x1566f
movb (%r13), %al
testq %r12, %r12
je 0x159e0
movq 0x238(%r14), %rcx
movl 0x1cc(%r14), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rdx
xorl %esi, %esi
testb $0x1, %al
je 0x15641
movq (%rdx), %r8
jmp 0x15644
movq (%rcx), %r8
movq (%r8,%rsi,8), %rdi
cmpl $0x0, 0x10(%rdi)
je 0x15665
movl 0x18(%rdi), %r9d
movq (%r8,%r12,8), %r8
cmpl 0x18(%r8), %r9d
jne 0x15665
movl 0x20(%rdi), %edi
cmpl 0x20(%r8), %edi
je 0x15673
incq %rsi
cmpq %rsi, %r12
jne 0x15638
jmp 0x1567b
movb (%r13), %al
incq %r12
jmp 0x155c4
movl %r12d, %edx
testb $0x1, %al
je 0x1571d
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rsi
leaq (%rcx,%rcx,2), %rcx
movq (%rsi,%rcx,8), %rcx
movq (%rcx,%r12,8), %rcx
cmpb $0x0, 0x30(%rcx)
je 0x15798
movl 0x2c(%rcx), %edi
cmpl $0x68, %edi
jne 0x15741
jmp 0x15798
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x15716
movq (%rax), %rax
cmpb $0x0, 0x30(%rax)
je 0x15716
movl 0x14(%rax), %eax
movq 0x208(%r14), %rsi
cmpl (%rsi,%rdx,4), %eax
jne 0x15716
movq (%rcx), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x16702
testb %al, %al
je 0x15716
movb (%r13), %dl
cmpb $0x1, %dl
jne 0x15934
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rax
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rcx
jmp 0x1593e
xorl %ecx, %ecx
jmp 0x15900
movq 0x238(%r14), %rsi
movq (%rsi), %rcx
movq (%rcx,%r12,8), %rcx
cmpb $0x0, 0x30(%rcx)
je 0x157f4
movl 0x2c(%rcx), %edi
cmpl $0x68, %edi
je 0x157f4
cmpl $0x69, %edi
je 0x15794
movl 0x1cc(%r14), %ecx
movq 0x1e0(%r14), %rsi
movl %ecx, %edi
movl $0x1, %r8d
shlq %cl, %r8
shrl $0x6, %edi
orq %r8, (%rsi,%rdi,8)
movq 0x208(%r14), %rdi
movq 0x238(%r14), %rsi
testb $0x1, %al
movl $0x0, %r8d
cmovneq %rcx, %r8
leaq (%r8,%r8,2), %r8
movq (%rsi,%r8,8), %r8
movq (%r8,%r12,8), %r8
movl 0x14(%r8), %r8d
movl %r8d, (%rdi,%rcx,4)
testb $0x1, %al
je 0x157ed
movl 0x1cc(%r14), %ecx
leaq (%rcx,%rcx,2), %rcx
movq (%rsi,%rcx,8), %rcx
movq (%rcx,%r12,8), %rcx
movq (%rsp), %rsi
movq %rcx, (%rsi)
movq 0x238(%r14), %r15
testl %edx, %edx
je 0x157dc
movl 0x1cc(%r14), %ecx
leaq (%rcx,%rcx,2), %rcx
decl %edx
movq (%r15,%rcx,8), %rcx
movq (%rcx,%rdx,8), %rcx
cmpl $0x0, 0x10(%rcx)
je 0x1584f
testb $0x1, %al
je 0x15815
movl 0x1cc(%r14), %eax
leaq (%rax,%rax,2), %rax
leaq (%r15,%rax,8), %r15
jmp 0x15815
movq (%rsi), %rcx
movq (%rcx,%r12,8), %rcx
movq (%rsp), %rsi
movq %rcx, (%rsi)
movq 0x238(%r14), %r15
testl %edx, %edx
je 0x15815
decl %edx
movq (%r15), %rcx
movq (%rcx,%rdx,8), %rcx
cmpl $0x0, 0x10(%rcx)
je 0x1584f
movq (%r15), %rax
movq 0x8(%r15), %rdx
leaq (%rax,%r12,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x15839
leaq (%rax,%r12,8), %rdi
subq %rsi, %rdx
callq 0x4480
movq 0x8(%r15), %rdx
leaq 0x25d40(%rip), %r12     # 0x3b580
addq $-0x8, %rdx
movq %rdx, 0x8(%r15)
movb $0x1, %cl
jmp 0x15900
movl 0x1cc(%r14), %ecx
movq 0x268(%r14), %rsi
incl (%rsi,%rcx,4)
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rsi
testb $0x1, %al
cmoveq %rbp, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rsi,%rcx,8), %rcx
movq (%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x1588f
movq (%rdi), %rax
callq *0x8(%rax)
movb (%r13), %al
movl 0x1cc(%r14), %ecx
testb $0x1, %al
cmoveq %rbp, %rcx
movq 0x238(%r14), %rax
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rbp
movq (%rbp), %rax
movq 0x8(%rbp), %rdx
leaq (%rax,%r12,8), %r15
addq $-0x8, %r15
leaq (%rax,%r12,8), %r12
addq $0x8, %r12
subq %r12, %rdx
je 0x158dc
movq %r15, %rdi
movq %r12, %rsi
callq 0x4480
movq 0x8(%rbp), %rax
movq %rax, %rdx
jmp 0x158e2
movq %r12, %rax
movq %r12, %rdx
subq %r12, %rax
addq %rax, %r15
movb $0x1, %cl
cmpq %r15, %rdx
je 0x158f3
movq %r15, 0x8(%rbp)
xorl %ebp, %ebp
jmp 0x158f9
xorl %ecx, %ecx
leaq 0x25c80(%rip), %r12     # 0x3b580
movl 0x1cc(%r14), %esi
movl (%r12), %eax
leal -0x1(%rax), %edi
leal 0x1(%rsi), %edx
cmpl %edi, %esi
cmovael %ebp, %edx
movl %edx, 0x1cc(%r14)
testb %cl, %cl
jne 0x159e7
incl %ebx
cmpl %eax, %ebx
jne 0x1553c
jmp 0x159e7
movq 0x238(%r14), %rax
movq (%rax), %rcx
movq (%rcx), %rcx
movl 0x10(%rcx), %ecx
cmpl $0x3, %ecx
je 0x1594e
cmpl $0x4, %ecx
jne 0x1597d
movl 0x1cc(%r14), %ecx
movq 0x1e0(%r14), %rsi
movl %ecx, %edi
movq $-0x2, %r8
rolq %cl, %r8
shrl $0x6, %edi
andq %r8, (%rsi,%rdi,8)
movq 0x208(%r14), %rsi
movl $0x0, (%rsi,%rcx,4)
testb %dl, %dl
je 0x159a7
movl 0x1cc(%r14), %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %r15
movq (%rax,%r15), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
addq 0x238(%r14), %r15
jmp 0x159bb
movq (%rax), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
movq 0x238(%r14), %r15
movq (%r15), %rdi
movq 0x8(%r15), %rdx
leaq 0x8(%rdi), %rsi
cmpq %rdx, %rsi
je 0x15840
subq %rsi, %rdx
callq 0x4480
movq 0x8(%r15), %rdx
jmp 0x15840
xorl %edx, %edx
jmp 0x1567e
testb %cl, %cl
jne 0x1612c
testl %eax, %eax
jle 0x15d97
movq 0x8(%r14), %rcx
movq 0x1d8(%r14), %rdx
movq 0x210(%rdx), %rdx
movq 0x1d8(%rdx), %rdx
movq 0x1e0(%r14), %rdi
movb (%r13), %r8b
movq 0x238(%r14), %r9
movq 0x268(%r14), %rsi
leaq 0x25b64(%rip), %r10     # 0x3b594
movl (%r10), %r10d
xorl %r15d, %r15d
movq (%rdx,%r15,8), %r11
cmpl $0x1, 0x4(%r11)
jne 0x15aab
movl %r15d, %ebx
shrl $0x6, %ebx
movq (%rdi,%rbx,8), %rbx
btq %r15, %rbx
jb 0x15aab
leaq (%r15,%r15,2), %rbx
leaq (%r9,%rbx,8), %rbx
xorl %r12d, %r12d
testb $0x1, %r8b
je 0x15a6b
movq (%rbx), %r13
movq 0x8(%rbx), %rbp
jmp 0x15a72
movq (%r9), %r13
movq 0x8(%r9), %rbp
subq %r13, %rbp
sarq $0x3, %rbp
cmpq %r12, %rbp
jbe 0x15aa1
movq (%r13,%r12,8), %r13
movl 0x18(%r13), %ebp
cmpq %rbp, %r15
jne 0x15a96
movl 0x20(%r13), %ebp
cmpl 0x8(%r11), %ebp
je 0x15a9b
incq %r12
jmp 0x15a5c
cmpl %r10d, (%rsi,%r15,4)
jb 0x15aab
cmpq %rcx, 0x28(%r11)
jbe 0x15e13
incq %r15
cmpq %rax, %r15
jne 0x15a36
jmp 0x15d97
movl $0x38, %edi
callq 0x42f0
movq %rax, %r15
subq $0x8, %rsp
xorl %eax, %eax
movq %r15, %rdi
movl $0x8, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
pushq %rax
pushq $0x1
pushq $0x0
pushq %rax
pushq %rax
callq 0x1c274
addq $0x40, %rsp
movq (%rsp), %rax
movq %r15, (%rax)
jmp 0x15b5e
movq 0x1d8(%r14), %rax
movq 0x210(%rax), %rax
movq 0x1d8(%rax), %rcx
movq (%rcx), %rax
xorl %r15d, %r15d
cmpl $0x4, 0x4(%rax)
je 0x16621
movl $0x38, %edi
callq 0x42f0
movq %rax, %r12
subq $0x8, %rsp
movq %rax, %rdi
movl $0x8, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r15
pushq %r15
pushq %r15
pushq $0x1
pushq $0x0
pushq %r15
pushq %r15
callq 0x1c274
addq $0x40, %rsp
movq (%rsp), %rax
movq %r12, (%rax)
movb $0x0, 0x1d0(%r14)
jmp 0x1612c
movq 0x238(%r14), %rdx
testb %al, %al
je 0x15d34
leaq (%rcx,%rcx,2), %rax
movq (%rdx,%rax,8), %rsi
cmpq %rsi, 0x8(%rdx,%rax,8)
je 0x15d8d
movq (%rsi), %rsi
cmpb $0x0, 0x30(%rsi)
je 0x15d8d
movl 0x14(%rsi), %esi
movq 0x208(%r14), %rdi
cmpl (%rdi,%rcx,4), %esi
jne 0x15d8d
leaq (%rdx,%rax,8), %rdx
jmp 0x15d55
leaq 0x259d3(%rip), %rax     # 0x3b590
cmpb $0x1, (%rax)
jne 0x15d9f
movl 0x1cc(%r14), %eax
movq 0x220(%r14), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x15523
movq 0x238(%r14), %rax
movq -0x8(%rax,%rbx,8), %rcx
cmpq %rcx, (%rax,%rbx,8)
je 0x15523
movq (%rcx), %rcx
movl 0x14(%rcx), %ecx
movq 0x208(%r14), %rdx
cmpl (%rdx,%r15,4), %ecx
jne 0x15523
subq %r12, %rax
jmp 0x15dda
leaq 0x25976(%rip), %r9      # 0x3b590
movb (%r9), %dl
movq 0x238(%r14), %rsi
movq $-0x8, %r13
xorl %ebp, %ebp
testb %dl, %dl
je 0x15c3c
movq -0x8(%rsi,%rbx,8), %rdi
movq (%rsi,%rbx,8), %r8
jmp 0x15c43
movq (%rsi), %rdi
movq 0x8(%rsi), %r8
subq %rdi, %r8
sarq $0x3, %r8
cmpq %rbp, %r8
jbe 0x15e74
movq (%rdi,%rbp,8), %r12
cmpl %r15d, 0x18(%r12)
jne 0x15c6c
movl 0x8(%rcx), %edi
cmpl 0x20(%r12), %edi
je 0x15e51
incq %rbp
addq $-0x8, %r13
jmp 0x15c2d
leaq 0x25914(%rip), %rax     # 0x3b590
cmpb $0x1, (%rax)
jne 0x15ecd
movl 0x1cc(%r14), %eax
movq 0x220(%r14), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x15d97
movq 0x238(%r14), %rax
movq -0x8(%rax,%rbx,2), %rcx
cmpq %rcx, (%rax,%rbx,2)
je 0x15d97
movq (%rcx), %rcx
movl 0x14(%rcx), %ecx
movq 0x208(%r14), %rdx
cmpl (%rdx,%r15,4), %ecx
jne 0x15d97
subq %r12, %rax
jmp 0x15f08
leaq 0x258b7(%rip), %r8      # 0x3b590
movb (%r8), %cl
movq 0x238(%r14), %rdx
movq $-0x8, %r13
xorl %ebp, %ebp
testb %cl, %cl
je 0x15cfb
movq -0x8(%rdx,%rbx,2), %rsi
movq (%rdx,%rbx,2), %rdi
jmp 0x15d02
movq (%rdx), %rsi
movq 0x8(%rdx), %rdi
subq %rsi, %rdi
sarq $0x3, %rdi
cmpq %rbp, %rdi
jbe 0x15d97
movq (%rsi,%rbp,8), %r12
cmpl %r15d, 0x18(%r12)
jne 0x15d2b
movl 0x8(%rax), %esi
cmpl 0x20(%r12), %esi
je 0x15f41
incq %rbp
addq $-0x8, %r13
jmp 0x15cec
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x15d8d
movq (%rax), %rax
cmpb $0x0, 0x30(%rax)
je 0x15d8d
movl 0x14(%rax), %eax
movq 0x208(%r14), %rsi
cmpl (%rsi,%rcx,4), %eax
jne 0x15d8d
movq (%rdx), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x16702
testb %al, %al
je 0x15d8d
movb (%rbx), %dl
cmpb $0x1, %dl
jne 0x15ff0
movl 0x1cc(%r14), %ecx
movq 0x238(%r14), %rax
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rcx
jmp 0x15ffa
testb $0x1, %r13b
jne 0x1612c
xorl %r15d, %r15d
jmp 0x16621
movq 0x220(%r14), %rax
cmpl $0x0, (%rax)
jne 0x15523
movq 0x238(%r14), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x15523
movq (%rcx), %rcx
movl 0x14(%rcx), %ecx
movq 0x208(%r14), %rdx
cmpl (%rdx,%r15,4), %ecx
jne 0x15523
movq (%rax), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x16702
leaq 0x257a1(%rip), %rcx     # 0x3b590
testb %al, %al
je 0x15523
movb (%rcx), %cl
movq 0x238(%r14), %rax
cmpb $0x1, %cl
jne 0x1606a
movq -0x8(%rax,%rbx,8), %rdx
jmp 0x1606d
xorl %ebx, %ebx
movl %ebx, (%rsi,%r15,4)
movl $0x38, %edi
callq 0x42f0
movq %rax, %r12
subq $0x8, %rsp
movq %rax, %rdi
movl $0x7, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq %rbx
pushq %rbx
pushq $0x1
pushq $0x0
pushq %rbx
pushq %rbx
callq 0x1c274
addq $0x40, %rsp
jmp 0x15ec1
cmpl $0x0, 0x10(%r12)
je 0x15e74
movq %r9, %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x16702
testb %al, %al
je 0x15523
jmp 0x15f63
cmpq %rax, 0x28(%rcx)
ja 0x15523
movq 0x268(%r14), %rax
xorl %ebx, %ebx
movl %ebx, (%rax,%r15,4)
movl $0x38, %edi
callq 0x42f0
movq %rax, %r12
subq $0x8, %rsp
movq %rax, %rdi
movl $0x7, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq %rbx
pushq %rbx
pushq $0x1
pushq $0x0
pushq %rbx
pushq %rbx
callq 0x1c274
addq $0x40, %rsp
movq (%rsp), %rax
movq %r12, (%rax)
jmp 0x1612c
movq 0x220(%r14), %rax
cmpl $0x0, (%rax)
jne 0x15d97
movq 0x238(%r14), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x15d97
movq (%rcx), %rcx
movl 0x14(%rcx), %ecx
movq 0x208(%r14), %rdx
cmpl (%rdx,%r15,4), %ecx
jne 0x15d97
movq (%rax), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x16702
testb %al, %al
je 0x15d97
leaq 0x2566b(%rip), %rax     # 0x3b590
movb (%rax), %cl
movq 0x238(%r14), %rax
cmpb $0x1, %cl
jne 0x160a5
movq -0x8(%rax,%rbx,2), %rdx
jmp 0x160a8
cmpl $0x0, 0x10(%r12)
je 0x15d97
movq %r8, %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x16702
testb %al, %al
je 0x15d97
cmpb $0x1, 0x30(%r12)
jne 0x15fa4
movl 0x2c(%r12), %eax
andl $-0x2, %eax
cmpl $0x68, %eax
je 0x15fa4
movl 0x18(%r12), %ecx
movq 0x1e0(%r14), %rax
movl %ecx, %edx
movl $0x1, %esi
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
movl 0x14(%r12), %eax
movq 0x208(%r14), %rdx
movl %eax, (%rdx,%rcx,4)
movq (%rsp), %rax
movq %r12, (%rax)
xorl %eax, %eax
cmpb $0x0, (%rbx)
cmovneq %r15, %rax
movq 0x238(%r14), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rbx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
movq %rax, %rcx
subq %r13, %rcx
cmpq %rdx, %rcx
je 0x16124
leaq (%rax,%rbp,8), %rdi
leaq (%rax,%rbp,8), %rsi
addq $0x8, %rsi
subq %rax, %rdx
addq %r13, %rdx
jmp 0x1611b
movq 0x238(%r14), %rax
movq (%rax), %rcx
movq (%rcx), %rcx
movl 0x10(%rcx), %ecx
cmpl $0x3, %ecx
je 0x1600a
cmpl $0x4, %ecx
jne 0x16039
movl 0x1cc(%r14), %ecx
movq 0x1e0(%r14), %rsi
movl %ecx, %edi
movq $-0x2, %r8
rolq %cl, %r8
shrl $0x6, %edi
andq %r8, (%rsi,%rdi,8)
movq 0x208(%r14), %rsi
movl $0x0, (%rsi,%rcx,4)
testb %dl, %dl
je 0x160f4
movl 0x1cc(%r14), %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rbx
movq (%rax,%rbx), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
addq 0x238(%r14), %rbx
jmp 0x16108
movq (%rax), %rdx
movq (%rdx), %rdx
movl 0x10(%rdx), %edx
cmpl $0x3, %edx
je 0x1607d
cmpl $0x4, %edx
jne 0x1609a
movq 0x1e0(%r14), %rdx
notq %r13
andq %r13, (%rdx,%rbp,8)
movq 0x208(%r14), %rdx
movl $0x0, (%rdx,%r15,4)
testb %cl, %cl
je 0x160f4
movq -0x8(%rax,%rbx,8), %rax
jmp 0x160de
movq (%rax), %rdx
movq (%rdx), %rdx
movl 0x10(%rdx), %edx
cmpl $0x3, %edx
je 0x160b8
cmpl $0x4, %edx
jne 0x160d5
movq 0x1e0(%r14), %rdx
notq %r13
andq %r13, (%rdx,%rbp,8)
movq 0x208(%r14), %rdx
movl $0x0, (%rdx,%r15,4)
testb %cl, %cl
je 0x160f4
movq -0x8(%rax,%rbx,2), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
movq 0x238(%r14), %rbx
subq %r12, %rbx
jmp 0x16108
movq (%rax), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
movq 0x238(%r14), %rbx
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
leaq 0x8(%rdi), %rsi
cmpq %rdx, %rsi
je 0x16124
subq %rsi, %rdx
callq 0x4480
movq 0x8(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x8(%rbx)
movq (%rsp), %rax
movq (%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0x16174
movq 0x258(%r14), %rsi
cmpq 0x260(%r14), %rsi
je 0x16161
leaq 0x25490(%rip), %rax     # 0x3b5e0
movl (%rax), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x258(%r14)
jmp 0x16174
leaq 0x250(%r14), %rdi
leaq 0x25471(%rip), %rdx     # 0x3b5e0
callq 0x13de0
leaq 0x25415(%rip), %rax     # 0x3b590
cmpb $0x1, (%rax)
jne 0x162e8
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
leaq 0x58(%r14), %r12
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x4400
leaq 0x40(%r14), %r15
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x161c5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x40(%r14), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x44e0
leaq 0x50(%r14), %rdi
movq (%rsp), %rax
movq (%rax), %rax
movl 0x18(%rax), %esi
callq 0x41e0
leaq 0x25297(%rip), %rax     # 0x3b488
movb $0x1, %r15b
cmpb $0x1, (%rax)
jne 0x16621
leaq 0x25285(%rip), %rax     # 0x3b489
cmpb $0x0, (%rax)
jne 0x16621
movq 0x24dbc(%rip), %rax     # 0x3afd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r13
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x1624b
movq %r13, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r13)
movb $0x20, 0xe0(%r13)
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x13ebc
leaq 0x1a71c(%rip), %rsi     # 0x30997
movq %r14, %rdi
callq 0x4580
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x4450
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x70(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x162b2
movq 0x58(%rsp), %rdi
movq 0x68(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x162d9
leaq 0x78(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x162d0
movq 0x78(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1646b
leaq 0x48(%rsp), %rdi
callq 0x4110
jmp 0x16479
leaq 0x25199(%rip), %rax     # 0x3b488
movb $0x1, %r15b
cmpb $0x1, (%rax)
jne 0x16621
leaq 0x25187(%rip), %rax     # 0x3b489
cmpb $0x0, (%rax)
jne 0x16621
movq 0x24cbe(%rip), %rax     # 0x3afd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r12
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x1634a
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x13ebc
leaq 0x1d166(%rip), %rsi     # 0x334e1
movq %r14, %rdi
callq 0x4580
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x24c3c(%rip), %rdi     # 0x3afd0
callq 0x4340
movq (%rsp), %rcx
movq (%rcx), %rcx
movl 0x18(%rcx), %esi
movq %rax, %rdi
callq 0x41e0
movq %rax, %r14
leaq 0x1d12c(%rip), %rsi     # 0x334e1
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
movq %r14, %r12
addq %rax, %r12
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x163fd
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq (%rsp), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1c32a
movq %rax, %rbx
leaq 0x1b634(%rip), %rsi     # 0x31a53
movl $0x24, %edx
movq %rax, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x16621
movq 0x18(%rsp), %rsi
jmp 0x16619
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4320
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1649d
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x164a3
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1d01a(%rip), %rsi     # 0x334e1
leaq 0x28(%rsp), %rdi
callq 0x4580
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x164f4
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x164fb
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x24aac(%rip), %rdi     # 0x3afd0
callq 0x4340
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
movq %r14, %r12
addq %rax, %r12
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x16567
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq (%rsp), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1c32a
movq %rax, %rbx
leaq 0x1b4ca(%rip), %rsi     # 0x31a53
movl $0x24, %edx
movq %rax, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x165d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x165ef
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1660a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x16621
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4300
movl %r15d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1663a
jmp 0x1663a
movq %rax, %rbx
movl $0x38, %esi
movq %r12, %rdi
jmp 0x166f5
movq %rax, %rbx
jmp 0x16699
movq %rax, %rbx
jmp 0x166b4
jmp 0x16656
movq %rax, %rbx
jmp 0x166cf
jmp 0x166e0
movq %rax, %rbx
movl $0x38, %esi
movq %r15, %rdi
jmp 0x166f5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x166ed
jmp 0x166fa
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x16699
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x166b4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x166cf
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x166fa
movq 0x58(%rsp), %rsi
jmp 0x166f2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x166fa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x4540