// File: dramninjasUMD[P]BOBSim/SimpleController.cpp
// Function: BOBSim::SimpleController::Update()
void SimpleController::Update()
{
	//
	//Stats
	//
	unsigned currentCount = 0;
	//count all the ACTIVATES waiting in the queue
	for(unsigned i=0; i<commandQueue.size(); i++)
	{
		if(commandQueue[i]->busPacketType==ACTIVATE)
		{
			currentCount++;
		}
	}
	if(currentCount>commandQueueMax) commandQueueMax = currentCount;

	//cumulative rolling average
	commandQueueAverage += currentCount;

	//count the number of idle banks
	unsigned num=0;
	for(unsigned r=0; r<NUM_RANKS; r++)
	{
		for(unsigned b=0; b<NUM_BANKS; b++)
		{
			if(bankStates[r][b].currentBankState==IDLE)
			{
				num++;
			}
		}
	}
	numIdleBanksAverage += num;

	//count the number of active banks
	unsigned numActive=0;
	for(unsigned r=0; r<NUM_RANKS; r++)
	{
		for(unsigned b=0; b<NUM_BANKS; b++)
		{
			if(bankStates[r][b].currentBankState==ROW_ACTIVE)
			{
				numActive++;
			}
		}
	}
	numActBanksAverage += numActive;

	//count the number of precharging banks
	unsigned numPre=0;
	for(unsigned r=0; r<NUM_RANKS; r++)
	{
		for(unsigned b=0; b<NUM_BANKS; b++)
		{
			if(bankStates[r][b].currentBankState==PRECHARGING)
			{
				numPre++;
			}
		}
	}
	numPreBanksAverage += numPre;

	//count the number of refreshing banks
	unsigned numRef=0;
	for(unsigned r=0; r<NUM_RANKS; r++)
	{
		for(unsigned b=0; b<NUM_BANKS; b++)
		{
			if(bankStates[r][b].currentBankState==REFRESHING)
			{
				numRef++;
			}
		}
	}
	numRefBanksAverage += numRef;

	//
	//Power
	//
	for(unsigned r=0; r<NUM_RANKS; r++)
	{
		bool bankOpen = false;
		for(unsigned b=0; b<NUM_RANKS; b++)
		{
			if(bankStates[r][b].currentBankState == ROW_ACTIVE ||
			        bankStates[r][b].currentBankState == REFRESHING)
			{
				bankOpen = true;
				break;
			}
		}

		if(bankOpen)
		{
			//DRAM_BUS_WIDTH/2 because value accounts for DDR
			backgroundEnergy[r] += IDD3N * ((DRAM_BUS_WIDTH/2 * 8) / DEVICE_WIDTH);
		}
		else
		{
			//DRAM_BUS_WIDTH/2 because value accounts for DDR
			idd2nCount[r]++;
			backgroundEnergy[r] += IDD2N * ((DRAM_BUS_WIDTH/2 * 8) / DEVICE_WIDTH);
		}
	}


	//
	//Update
	//
	//Updates the sliding window for tFAW
	for(unsigned r=0; r<NUM_RANKS; r++)
	{
		for(unsigned i=0; i<tFAWWindow[r].size(); i++)
		{
			tFAWWindow[r][i]--;
			if(tFAWWindow[r][i]==0) tFAWWindow[r].erase(tFAWWindow[r].begin());
		}
	}

	//Updates the bank states for each rank
	for(unsigned r=0; r<NUM_RANKS; r++)
	{
		for(unsigned b=0; b<NUM_BANKS; b++)
		{
			bankStates[r][b].UpdateStateChange();
		}
	}

	//Handle refresh counters
	for(unsigned i=0; i<NUM_RANKS; i++)
	{
		if(refreshCounters[i]>0)
		{
			refreshCounters[i]--;
		}
	}

	//Send write data to data bus
	for(unsigned i=0; i<writeBurstCountdown.size(); i++)
	{
		writeBurstCountdown[i]--;
	}
	if(writeBurstCountdown.size()>0&&writeBurstCountdown[0]==0)
	{
		if(DEBUG_CHANNEL) DEBUG("     == Sending Write Data : "<<*writeBurstQueue[0]);
		(*DataCallback)(writeBurstQueue[0],0);
		writeBurstQueue.erase(writeBurstQueue.begin());
		writeBurstCountdown.erase(writeBurstCountdown.begin());
	}

	bool issuingRefresh = false;
	bool canIssueRefresh = true;

	//Figure out if everyone who needs a refresh can actually receive one
	for(unsigned r=0; r<NUM_RANKS; r++)
	{
		if(refreshCounters[r]==0)
		{
			if(DEBUG_CHANNEL) DEBUG("      !! -- Rank "<<r<<" needs refresh");
			//Check to be sure we can issue a refresh
			for(unsigned b=0; b<NUM_BANKS; b++)
			{
				if(bankStates[r][b].nextActivate > currentClockCycle ||
				        bankStates[r][b].currentBankState != IDLE)
				{
					canIssueRefresh = false;

				}
			}

			//Once all counters have reached 0 and everyone is either idle or ready to accept refresh-CAS
			if(canIssueRefresh)
			{
				if(DEBUG_CHANNEL) DEBUGN("-- !! Refresh is issuable - Sending : ");

				//BusPacketType packtype, unsigned transactionID, unsigned col, unsigned rw, unsigned r, unsigned b, unsigned prt, unsigned bl
				BusPacket *refreshPacket = new BusPacket(REFRESH, -1, 0, 0, r, 0, 0, 0, 0, 0, false);
				refreshPacket->channel = channel->channelID;

				//Send to command bus
				(*CommandCallback)(refreshPacket,0);

				//make sure we don't send anythign else
				issuingRefresh = true;

				refreshEnergy[r] += (IDD5B-IDD3N) * tRFC * ((DRAM_BUS_WIDTH/2 * 8) / DEVICE_WIDTH);

				for(unsigned b=0; b<NUM_BANKS; b++)
				{
					bankStates[r][b].currentBankState = REFRESHING;
					bankStates[r][b].stateChangeCountdown = tRFC;
					bankStates[r][b].nextActivate = currentClockCycle + tRFC;
					bankStates[r][b].lastCommand = REFRESH;
				}

				//reset refresh counters
				for(unsigned i=0; i<NUM_RANKS; i++)
				{
					if(refreshCounters[r]==0)
					{
						refreshCounters[r] = 7800/tCK;
					}
				}

				//only issue one
				break;
			}
		}
	}

	//If no refresh is being issued then do this block
	if(!issuingRefresh)
	{
		for(unsigned i=0; i<commandQueue.size(); i++)
		{
			//Checks to see if this particular request can be issued
			if(IsIssuable(commandQueue[i]))
			{
				//make sure we don't send a command ahead of its own ACTIVATE
				if(i>0 && commandQueue[i]->transactionID == commandQueue[i-1]->transactionID)
					continue;

				//send to channel
				(*CommandCallback)(commandQueue[i],0);

				//update channel controllers bank state bookkeeping
				unsigned rank = commandQueue[i]->rank;
				unsigned bank = commandQueue[i]->bank;
				BusPacket *writeData;

				//
				//Main block for determining what to do with each type of command
				//
				switch(commandQueue[i]->busPacketType)
				{
				case READ_P:
					outstandingReads++;
					waitingACTS--;
					if(waitingACTS<0)
					{
						ERROR("#@)($J@)#(RJ");
						exit(0);
					}

					//keep track of energy
					burstEnergy[rank] += (IDD4R - IDD3N) * BL/2 * ((DRAM_BUS_WIDTH/2 * 8) / DEVICE_WIDTH);

					bankStates[rank][bank].lastCommand = READ_P;
					bankStates[rank][bank].stateChangeCountdown = (4*tCK>7.5)?tRTP:ceil(7.5/tCK); //4 clk or 7.5ns
					bankStates[rank][bank].nextActivate = max(bankStates[rank][bank].nextActivate, currentClockCycle + tRTP + tRP);
					bankStates[rank][bank].nextRefresh = currentClockCycle + tRTP + tRP;

					for(unsigned r=0; r<NUM_RANKS; r++)
					{
						if(r==rank)
						{
							for(unsigned b=0; b<NUM_BANKS; b++)
							{
								bankStates[r][b].nextRead = max(bankStates[r][b].nextRead,
								                                currentClockCycle + max(tCCD, TRANSACTION_SIZE/DRAM_BUS_WIDTH));
								bankStates[r][b].nextWrite = max(bankStates[r][b].nextWrite,
								                                 currentClockCycle + (tCL + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tRTRS - tCWL));
							}
						}
						else
						{
							for(unsigned b=0; b<NUM_BANKS; b++)
							{
								bankStates[r][b].nextRead = max(bankStates[r][b].nextRead,
								                                currentClockCycle + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tRTRS);
								bankStates[r][b].nextWrite = max(bankStates[r][b].nextWrite,
								                                 currentClockCycle + (tCL + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tRTRS - tCWL));
							}
						}
					}

					//prevents read or write being issued while waiting for auto-precharge to close page
					bankStates[rank][bank].nextRead = bankStates[rank][bank].nextActivate;
					bankStates[rank][bank].nextWrite = bankStates[rank][bank].nextActivate;

					break;
				case WRITE_P:
					waitingACTS--;
					if(waitingACTS<0)
					{
						ERROR(")(JWE)(FJEWF");
						exit(0);
					}

					//keep track of energy
					burstEnergy[rank] += (IDD4W - IDD3N) * BL/2 * ((DRAM_BUS_WIDTH/2 * 8) / DEVICE_WIDTH);

					writeData = new BusPacket(*commandQueue[i]);
					writeData->busPacketType = WRITE_DATA;
					writeBurstQueue.push_back(writeData);
					writeBurstCountdown.push_back(tCWL);
					if(DEBUG_CHANNEL) DEBUG("     !!! After Issuing WRITE_P, burstQueue is :"<<writeBurstQueue.size()<<" "<<writeBurstCountdown.size()<<" with head : "<<writeBurstCountdown[0]);

					bankStates[rank][bank].lastCommand = WRITE_P;
					bankStates[rank][bank].stateChangeCountdown = tCWL + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tWR;
					bankStates[rank][bank].nextActivate = currentClockCycle + tCWL + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tWR + tRP;
					bankStates[rank][bank].nextRefresh = currentClockCycle + tCWL + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tWR + tRP;

					for(unsigned r=0; r<NUM_RANKS; r++)
					{
						if(r==rank)
						{
							for(unsigned b=0; b<NUM_BANKS; b++)
							{
								bankStates[r][b].nextRead = max(bankStates[r][b].nextRead, currentClockCycle + tCWL + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tWTR);
								bankStates[r][b].nextWrite = max(bankStates[r][b].nextWrite, currentClockCycle+(uint64_t)max(tCCD, TRANSACTION_SIZE/DRAM_BUS_WIDTH));
							}
						}
						else
						{
							for(unsigned b=0; b<NUM_BANKS; b++)
							{
								bankStates[r][b].nextRead = max(bankStates[r][b].nextRead, currentClockCycle + tCWL + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tRTRS - tCL);
								bankStates[r][b].nextWrite = max(bankStates[r][b].nextWrite, currentClockCycle + TRANSACTION_SIZE/DRAM_BUS_WIDTH + tRTRS);
							}
						}
					}

					//prevents read or write being issued while waiting for auto-precharge to close page
					bankStates[rank][bank].nextRead = bankStates[rank][bank].nextActivate;
					bankStates[rank][bank].nextWrite = bankStates[rank][bank].nextActivate;

					break;
				case ACTIVATE:
					for(unsigned b=0; b<NUM_BANKS; b++)
					{
						if(b!=bank)
						{
							bankStates[rank][b].nextActivate = max(currentClockCycle + tRRD, bankStates[rank][b].nextActivate);
						}
					}

					actpreEnergy[rank] += ((IDD0 * tRC) - ((IDD3N * tRAS) + (IDD2N * (tRC - tRAS)))) * ((DRAM_BUS_WIDTH/2 * 8) / DEVICE_WIDTH);

					bankStates[rank][bank].lastCommand = ACTIVATE;
					bankStates[rank][bank].currentBankState = ROW_ACTIVE;
					bankStates[rank][bank].openRowAddress = commandQueue[i]->row;
					bankStates[rank][bank].nextActivate = currentClockCycle + tRC;
					bankStates[rank][bank].nextRead = max(currentClockCycle + tRCD, bankStates[rank][bank].nextRead);
					bankStates[rank][bank].nextWrite = max(currentClockCycle + tRCD, bankStates[rank][bank].nextWrite);

					//keep track of sliding window
					tFAWWindow[rank].push_back(tFAW);

					break;
				default:
					ERROR("Unexpected packet type" << *commandQueue[i]);
					abort();


				}

				//erase
				commandQueue.erase(commandQueue.begin()+i);

				break;
			}
		}
	}
	
	//
	//Debug output
	//
	if(DEBUG_CHANNEL)
	{
		if(commandQueue.size()>0)
		{
			DEBUG("     == Command queue");
			for(unsigned i=0; i<commandQueue.size(); i++)
			{
				DEBUG("       "<<i<<"] " << *commandQueue[i]);
			}
		}

		DEBUG("     == Bank states");

		for(unsigned i=0; i<NUM_RANKS; i++)
		{
			for(unsigned j=0; j<NUM_BANKS; j++)
			{
				DEBUGN("       ");
				if(bankStates[i][j].currentBankState == ROW_ACTIVE)
				{
					DEBUGN("[" << hex << bankStates[i][j].openRowAddress << dec << "] ");
				}
				else if(bankStates[i][j].currentBankState == IDLE)
				{
					DEBUGN("[idle]");
				}
				else if(bankStates[i][j].currentBankState == PRECHARGING)
				{
					DEBUGN("[pre] ");
				}
				else if(bankStates[i][j].currentBankState == REFRESHING)
				{
					DEBUGN("[ref] ");
				}
				else
				{
					ERROR("== Error - unknown state");
					exit(0);
				}
			}
			DEBUG("");
		}
	}

	//increment clock cycle
	currentClockCycle++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3c0, %rsp            # imm = 0x3C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x218(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x218(%rbp), %rdi
movl -0x10(%rbp), %eax
movq %rax, -0x220(%rbp)
addq $0x28, %rdi
callq 0xbe60
movq %rax, %rcx
movq -0x220(%rbp), %rax
cmpq %rcx, %rax
jae 0x24b75
movq -0x218(%rbp), %rdi
addq $0x28, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq (%rax), %rax
cmpl $0x4, 0x4(%rax)
jne 0x24b68
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x24b6a
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x24b18
movq -0x218(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x10(%rcx), %eax
jbe 0x24b91
movq -0x218(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x218(%rbp), %rax
movl -0xc(%rbp), %ecx
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x138c0(%rip), %eax     # 0x38478
jae 0x24c10
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x138b2(%rip), %eax     # 0x3847c
jae 0x24c03
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x24bf6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x24bf8
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x24bc1
jmp 0x24c05
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x24baf
movq -0x218(%rbp), %rax
movl -0x14(%rbp), %ecx
addl 0x18(%rax), %ecx
movl %ecx, 0x18(%rax)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl 0x13841(%rip), %eax     # 0x38478
jae 0x24c8f
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0x13833(%rip), %eax     # 0x3847c
jae 0x24c82
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x28(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x24c75
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x24c77
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x24c40
jmp 0x24c84
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x24c2e
movq -0x218(%rbp), %rax
movl -0x20(%rbp), %ecx
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl 0x137c2(%rip), %eax     # 0x38478
jae 0x24d0e
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl 0x137b4(%rip), %eax     # 0x3847c
jae 0x24d01
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x24cf4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x24cf6
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x24cbf
jmp 0x24d03
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x24cad
movq -0x218(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl 0x13743(%rip), %eax     # 0x38478
jae 0x24d8d
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl 0x13735(%rip), %eax     # 0x3847c
jae 0x24d80
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x3c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x40(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x3, (%rax)
jne 0x24d73
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x24d75
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x24d3e
jmp 0x24d82
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x24d2c
movq -0x218(%rbp), %rax
movl -0x38(%rbp), %ecx
addl 0x24(%rax), %ecx
movl %ecx, 0x24(%rax)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl 0x136cb(%rip), %eax     # 0x38478
jae 0x24f13
movb $0x0, -0x45(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl 0x136b1(%rip), %eax     # 0x38478
jae 0x24e1e
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x4c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
je 0x24e0b
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x4c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x3, (%rax)
jne 0x24e11
movb $0x1, -0x45(%rbp)
jmp 0x24e1e
jmp 0x24e13
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x24dbe
testb $0x1, -0x45(%rbp)
je 0x24e85
movq -0x218(%rbp), %rdi
movl 0x1366f(%rip), %eax     # 0x384a0
movq %rax, -0x230(%rbp)
movl 0x13666(%rip), %eax     # 0x384a4
shrl %eax
shll $0x3, %eax
movl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x13658(%rip)           # 0x384a8
movq %rax, %rcx
movq -0x230(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x228(%rbp)
addq $0xf8, %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0xc160
movq -0x228(%rbp), %rcx
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x24f03
movq -0x218(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x218(%rbp), %rdi
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl 0x135ff(%rip), %eax     # 0x384b0
movq %rax, -0x240(%rbp)
movl 0x135e6(%rip), %eax     # 0x384a4
shrl %eax
shll $0x3, %eax
movl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x135d8(%rip)           # 0x384a8
movq %rax, %rcx
movq -0x240(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x238(%rbp)
addq $0xf8, %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0xc160
movq -0x238(%rbp), %rcx
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x24f05
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x24da4
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl 0x13555(%rip), %eax     # 0x38478
jae 0x25047
movl $0x0, -0x54(%rbp)
movq -0x218(%rbp), %rdi
movl -0x54(%rbp), %eax
movq %rax, -0x248(%rbp)
addq $0xb0, %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movq %rax, %rcx
movq -0x248(%rbp), %rax
cmpq %rcx, %rax
jae 0x25037
movq -0x218(%rbp), %rdi
addq $0xb0, %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0x54(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x218(%rbp), %rdi
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
addq $0xb0, %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0x54(%rbp), %eax
movl %eax, %esi
callq 0xbec0
cmpl $0x0, (%rax)
jne 0x25027
movq -0x218(%rbp), %rdi
addq $0xb0, %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq -0x218(%rbp), %rdi
movq %rax, -0x250(%rbp)
addq $0xb0, %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x18510
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x23160
movq -0x250(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x230f0
movq %rax, -0x70(%rbp)
jmp 0x25029
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x24f30
jmp 0x25039
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x24f1a
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl 0x13421(%rip), %eax     # 0x38478
jae 0x250a4
movl $0x0, -0x78(%rbp)
movl -0x78(%rbp), %eax
cmpl 0x13413(%rip), %eax     # 0x3847c
jae 0x25097
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x74(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movl -0x78(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x189f0
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x25060
jmp 0x25099
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x2504e
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl 0x133c4(%rip), %eax     # 0x38478
jae 0x250ff
movq -0x218(%rbp), %rdi
addq $0xc8, %rdi
movl -0x7c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
cmpl $0x0, (%rax)
jbe 0x250f2
movq -0x218(%rbp), %rdi
addq $0xc8, %rdi
movl -0x7c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0x250f4
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x250ab
movl $0x0, -0x80(%rbp)
movq -0x218(%rbp), %rdi
movl -0x80(%rbp), %eax
movq %rax, -0x258(%rbp)
addq $0x80, %rdi
callq 0x17100
movq %rax, %rcx
movq -0x258(%rbp), %rax
cmpq %rcx, %rax
jae 0x2515c
movq -0x218(%rbp), %rdi
addq $0x80, %rdi
movl -0x80(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x25106
movq -0x218(%rbp), %rdi
addq $0x80, %rdi
callq 0x17100
cmpq $0x0, %rax
jbe 0x252e4
movq -0x218(%rbp), %rdi
addq $0x80, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xbec0
cmpl $0x0, (%rax)
jne 0x252e4
testb $0x1, 0x136a6(%rip)     # 0x38846
je 0x251ff
leaq 0x131cb(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x251fd
movq 0x12e13(%rip), %rdi     # 0x37fc8
leaq 0x6f28(%rip), %rsi      # 0x2c0e4
callq 0x31c0
movq -0x218(%rbp), %rdi
movq %rax, -0x260(%rbp)
addq $0x98, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x230d0
movq -0x260(%rbp), %rdi
movq (%rax), %rsi
callq 0x18f90
movq %rax, %rdi
movq 0x12db0(%rip), %rsi     # 0x37fa8
callq 0x3200
jmp 0x251ff
movq -0x218(%rbp), %rdi
movq 0x1b0(%rdi), %rax
movq %rax, -0x278(%rbp)
addq $0x98, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x230d0
movq -0x278(%rbp), %rdi
movq (%rax), %rsi
movq (%rdi), %rax
xorl %edx, %edx
callq *0x10(%rax)
movq -0x218(%rbp), %rdi
movq %rdi, %rax
addq $0x98, %rax
movq %rax, -0x270(%rbp)
addq $0x98, %rdi
callq 0x23210
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x23240
movq -0x270(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x231a0
movq -0x218(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0x268(%rbp)
addq $0x80, %rdi
callq 0x18510
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x23160
movq -0x268(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x230f0
movq %rax, -0xb0(%rbp)
movb $0x0, -0xb1(%rbp)
movb $0x1, -0xb2(%rbp)
movl $0x0, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
cmpl 0x13170(%rip), %eax     # 0x38478
jae 0x256fc
movq -0x218(%rbp), %rdi
addq $0xc8, %rdi
movl -0xb8(%rbp), %eax
movl %eax, %esi
callq 0xbec0
cmpl $0x0, (%rax)
jne 0x256e6
testb $0x1, 0x1350d(%rip)     # 0x38846
je 0x25388
leaq 0x13032(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x25386
movq 0x12c7a(%rip), %rdi     # 0x37fc8
leaq 0x6dad(%rip), %rsi      # 0x2c102
callq 0x31c0
movq %rax, %rdi
movl -0xb8(%rbp), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x6da2(%rip), %rsi      # 0x2c114
callq 0x31c0
movq %rax, %rdi
movq 0x12c27(%rip), %rsi     # 0x37fa8
callq 0x3200
jmp 0x25388
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl 0x130de(%rip), %eax     # 0x3847c
jae 0x2540d
movq -0x218(%rbp), %rcx
movq 0x78(%rcx), %rax
movl -0xb8(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0xbc(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
ja 0x253f3
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0xb8(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0xbc(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
je 0x253fa
movb $0x0, -0xb2(%rbp)
jmp 0x253fc
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x25392
testb $0x1, -0xb2(%rbp)
je 0x256e4
testb $0x1, 0x13425(%rip)     # 0x38846
je 0x25444
leaq 0x12f4a(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x25442
movq 0x12b92(%rip), %rdi     # 0x37fc8
leaq 0x6ce6(%rip), %rsi      # 0x2c123
callq 0x31c0
jmp 0x25444
movl $0x38, %edi
callq 0x31d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x280(%rbp)
movl -0xb8(%rbp), %r9d
movq %rsp, %rax
movl $0x0, 0x28(%rax)
movq $0x0, 0x20(%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x10(%rax)
movl $0x0, 0x8(%rax)
movl $0x0, (%rax)
movl $0x5, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x18c50
jmp 0x254a6
movq -0x218(%rbp), %rax
movq -0x280(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x170(%rax), %rcx
movl 0x1e0(%rcx), %edx
movq -0xc8(%rbp), %rcx
movl %edx, 0x28(%rcx)
movq 0x1a8(%rax), %rdi
movq -0xc8(%rbp), %rsi
movq (%rdi), %rax
xorl %edx, %edx
callq *0x10(%rax)
movq -0x218(%rbp), %rdi
movb $0x1, -0xb1(%rbp)
movl 0x12fb8(%rip), %eax     # 0x384b4
subl 0x12f9e(%rip), %eax     # 0x384a0
imull 0x12faf(%rip), %eax     # 0x384b8
movl %eax, %eax
movq %rax, -0x290(%rbp)
movl 0x12f8c(%rip), %eax     # 0x384a4
shrl %eax
shll $0x3, %eax
movl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x12f7e(%rip)           # 0x384a8
movq %rax, %rcx
movq -0x290(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x288(%rbp)
addq $0x140, %rdi            # imm = 0x140
movl -0xb8(%rbp), %eax
movl %eax, %esi
callq 0xc160
movq -0x288(%rbp), %rcx
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x0, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
cmpl 0x12f06(%rip), %eax     # 0x3847c
jae 0x25652
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0xb8(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl -0xd8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rcx
movl $0x3, (%rcx)
movl 0x12f0e(%rip), %edx     # 0x384b8
movq 0x78(%rax), %rcx
movl -0xb8(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xd8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, 0x3c(%rcx)
movq 0x8(%rax), %rdx
movl 0x12ee6(%rip), %ecx     # 0x384b8
addq %rcx, %rdx
movq 0x78(%rax), %rcx
movl -0xb8(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xd8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x8(%rcx)
movq 0x78(%rax), %rax
movl -0xb8(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0xd8(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x5, 0x38(%rax)
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x2556a
movq -0x280(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
movl $0x38, %esi
callq 0x31f0
jmp 0x26e52
movl $0x0, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
cmpl 0x12e10(%rip), %eax     # 0x38478
jae 0x256e2
movq -0x218(%rbp), %rdi
addq $0xc8, %rdi
movl -0xb8(%rbp), %eax
movl %eax, %esi
callq 0xbec0
cmpl $0x0, (%rax)
jne 0x256cc
movq -0x218(%rbp), %rdi
movss 0x12e03(%rip), %xmm1    # 0x3849c
movss 0x69f3(%rip), %xmm0     # 0x2c094
divss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movl %eax, -0x294(%rbp)
addq $0xc8, %rdi
movl -0xb8(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl -0x294(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x256ce
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x2565c
jmp 0x256fc
jmp 0x256e6
jmp 0x256e8
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x252fc
testb $0x1, -0xb1(%rbp)
jne 0x26a3a
movl $0x0, -0xe0(%rbp)
movq -0x218(%rbp), %rdi
movl -0xe0(%rbp), %eax
movq %rax, -0x2a0(%rbp)
addq $0x28, %rdi
callq 0xbe60
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
cmpq %rcx, %rax
jae 0x26a38
movq -0x218(%rbp), %rdi
addq $0x28, %rdi
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq -0x218(%rbp), %rdi
movq (%rax), %rsi
callq 0x26e60
testb $0x1, %al
jne 0x25773
jmp 0x26a22
cmpl $0x0, -0xe0(%rbp)
jbe 0x257d3
movq -0x218(%rbp), %rdi
addq $0x28, %rdi
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq -0x218(%rbp), %rdi
movq (%rax), %rax
movl 0x18(%rax), %eax
movl %eax, -0x2a4(%rbp)
addq $0x28, %rdi
movl -0xe0(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0xbe90
movq %rax, %rcx
movl -0x2a4(%rbp), %eax
movq (%rcx), %rcx
cmpl 0x18(%rcx), %eax
jne 0x257d3
jmp 0x26a24
movq -0x218(%rbp), %rdi
movq 0x1a8(%rdi), %rax
movq %rax, -0x2b8(%rbp)
addq $0x28, %rdi
movq %rdi, -0x2b0(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq -0x2b8(%rbp), %rdi
movq (%rax), %rsi
movq (%rdi), %rax
movq 0x10(%rax), %rax
xorl %edx, %edx
callq *%rax
movq -0x2b0(%rbp), %rdi
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq -0x2b0(%rbp), %rdi
movq (%rax), %rax
movl 0x14(%rax), %eax
movl %eax, -0xe4(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq -0x2b0(%rbp), %rdi
movq (%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0xe8(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq (%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2a8(%rbp)
subl $0x1, %eax
je 0x258a1
jmp 0x2587c
movl -0x2a8(%rbp), %eax
subl $0x3, %eax
je 0x25ec7
jmp 0x2588d
movl -0x2a8(%rbp), %eax
subl $0x4, %eax
je 0x26622
jmp 0x26915
movq -0x218(%rbp), %rax
movl 0xf0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xf0(%rax)
movl 0xf4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xf4(%rax)
cmpl $0x0, 0xf4(%rax)
jge 0x25941
movq 0x1271a(%rip), %rdi     # 0x37ff0
leaq 0x4833(%rip), %rsi      # 0x2a110
callq 0x31c0
movq %rax, %rdi
leaq 0x685e(%rip), %rsi      # 0x2c14a
callq 0x31c0
movq %rax, %rdi
leaq 0x47be(%rip), %rsi      # 0x2a0b9
callq 0x31c0
movq %rax, %rdi
movl $0x167, %esi            # imm = 0x167
callq 0x3380
movq %rax, %rdi
leaq 0x480a(%rip), %rsi      # 0x2a121
callq 0x31c0
movq %rax, %rdi
leaq 0x6839(%rip), %rsi      # 0x2c15f
callq 0x31c0
movq %rax, %rdi
movq 0x12673(%rip), %rsi     # 0x37fa8
callq 0x3200
xorl %edi, %edi
callq 0x3270
movq -0x218(%rbp), %rdi
movl 0x12b6e(%rip), %eax     # 0x384bc
subl 0x12b4c(%rip), %eax     # 0x384a0
imull 0x12b65(%rip), %eax     # 0x384c0
shrl %eax
movl %eax, %eax
movq %rax, -0x2c8(%rbp)
movl 0x12b38(%rip), %eax     # 0x384a4
shrl %eax
shll $0x3, %eax
movl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x12b2a(%rip)           # 0x384a8
movq %rax, %rcx
movq -0x2c8(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x2c0(%rbp)
addq $0x110, %rdi            # imm = 0x110
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xc160
movq -0x2c0(%rbp), %rdx
movq %rax, %rcx
movq -0x218(%rbp), %rax
addq (%rcx), %rdx
movq %rdx, (%rcx)
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0xe8(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x1, 0x38(%rax)
movss 0x66b0(%rip), %xmm0     # 0x2c098
mulss 0x12aac(%rip), %xmm0    # 0x3849c
cvtss2sd %xmm0, %xmm0
movsd 0x66a4(%rip), %xmm1     # 0x2c0a0
ucomisd %xmm1, %xmm0
jbe 0x25a17
movl 0x12abc(%rip), %eax     # 0x384c4
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x2d0(%rbp)
jmp 0x25a3c
movss 0x12a7d(%rip), %xmm0    # 0x3849c
cvtss2sd %xmm0, %xmm1
movsd 0x6675(%rip), %xmm0     # 0x2c0a0
divsd %xmm1, %xmm0
callq 0x3050
movsd %xmm0, -0x2d0(%rbp)
movq -0x218(%rbp), %rax
movsd -0x2d0(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movl %ecx, %edx
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, 0x3c(%rcx)
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %edx
movq (%rcx,%rdx,8), %rdi
movl -0xe8(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
addq $0x8, %rdi
movq 0x8(%rax), %rax
movl 0x12a2b(%rip), %ecx     # 0x384c4
addq %rcx, %rax
movl 0x12a26(%rip), %ecx     # 0x384c8
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
leaq -0xf8(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rdx
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x8(%rcx)
movq 0x8(%rax), %rcx
movl 0x129d6(%rip), %edx     # 0x384c4
addq %rdx, %rcx
movl 0x129d1(%rip), %edx     # 0x384c8
addq %rdx, %rcx
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x30(%rax)
movl $0x0, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
cmpl 0x12949(%rip), %eax     # 0x38478
jae 0x25e3f
movl -0xfc(%rbp), %eax
cmpl -0xe4(%rbp), %eax
jne 0x25cc9
movl $0x0, -0x100(%rbp)
movl -0x100(%rbp), %eax
cmpl 0x1291f(%rip), %eax     # 0x3847c
jae 0x25cc4
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0xfc(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl -0x100(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rcx
addq $0x10, %rcx
movq %rcx, -0x2e8(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x2e0(%rbp)
movl 0x1292f(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x128fb(%rip)           # 0x384a4
movl %eax, -0x10c(%rbp)
leaq 0x12916(%rip), %rdi     # 0x384cc
leaq -0x10c(%rbp), %rsi
callq 0x17120
movq -0x2e8(%rbp), %rdi
movq %rax, %rcx
movq -0x2e0(%rbp), %rax
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x108(%rbp)
leaq -0x108(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rdx
movq 0x78(%rax), %rcx
movl -0xfc(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0x100(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x10(%rcx)
movq 0x78(%rax), %rcx
movl -0xfc(%rbp), %edx
movq (%rcx,%rdx,8), %rdi
movl -0x100(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
addq $0x18, %rdi
movq 0x8(%rax), %rax
movq %rax, -0x2d8(%rbp)
movl 0x1288d(%rip), %ecx     # 0x384d4
movl 0x12883(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x1284f(%rip)           # 0x384a4
movl %eax, %edx
movq -0x2d8(%rbp), %rax
addl %edx, %ecx
addl 0x12872(%rip), %ecx     # 0x384d8
subl 0x12870(%rip), %ecx     # 0x384dc
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
leaq -0x118(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rcx
movq 0x78(%rax), %rax
movl -0xfc(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0x100(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movl -0x100(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x100(%rbp)
jmp 0x25b51
jmp 0x25e29
movl $0x0, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
cmpl 0x1279d(%rip), %eax     # 0x3847c
jae 0x25e27
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0xfc(%rbp), %edx
movq (%rcx,%rdx,8), %rdi
movl -0x11c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
addq $0x10, %rdi
movq 0x8(%rax), %rax
movq %rax, -0x2f8(%rbp)
movl 0x127b4(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x12780(%rip)           # 0x384a4
movl %eax, %ecx
movq -0x2f8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movl 0x127a0(%rip), %ecx     # 0x384d8
addq %rcx, %rax
movq %rax, -0x128(%rbp)
leaq -0x128(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rdx
movq 0x78(%rax), %rcx
movl -0xfc(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0x11c(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x10(%rcx)
movq 0x78(%rax), %rcx
movl -0xfc(%rbp), %edx
movq (%rcx,%rdx,8), %rdi
movl -0x11c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
addq $0x18, %rdi
movq 0x8(%rax), %rax
movq %rax, -0x2f0(%rbp)
movl 0x1272a(%rip), %ecx     # 0x384d4
movl 0x12720(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x126ec(%rip)           # 0x384a4
movl %eax, %edx
movq -0x2f0(%rbp), %rax
addl %edx, %ecx
addl 0x1270f(%rip), %ecx     # 0x384d8
subl 0x1270d(%rip), %ecx     # 0x384dc
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
leaq -0x130(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rcx
movq 0x78(%rax), %rax
movl -0xfc(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0x11c(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x25cd3
jmp 0x25e29
jmp 0x25e2b
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
jmp 0x25b23
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdx
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x10(%rcx)
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
jmp 0x269b3
movq -0x218(%rbp), %rax
movl 0xf4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xf4(%rax)
cmpl $0x0, 0xf4(%rax)
jge 0x25f58
movq 0x12103(%rip), %rdi     # 0x37ff0
leaq 0x421c(%rip), %rsi      # 0x2a110
callq 0x31c0
movq %rax, %rdi
leaq 0x6247(%rip), %rsi      # 0x2c14a
callq 0x31c0
movq %rax, %rdi
leaq 0x41a7(%rip), %rsi      # 0x2a0b9
callq 0x31c0
movq %rax, %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x3380
movq %rax, %rdi
leaq 0x41f3(%rip), %rsi      # 0x2a121
callq 0x31c0
movq %rax, %rdi
leaq 0x622f(%rip), %rsi      # 0x2c16c
callq 0x31c0
movq %rax, %rdi
movq 0x1205c(%rip), %rsi     # 0x37fa8
callq 0x3200
xorl %edi, %edi
callq 0x3270
movq -0x218(%rbp), %rdi
movl 0x1257b(%rip), %eax     # 0x384e0
subl 0x12535(%rip), %eax     # 0x384a0
imull 0x1254e(%rip), %eax     # 0x384c0
shrl %eax
movl %eax, %eax
movq %rax, -0x310(%rbp)
movl 0x12521(%rip), %eax     # 0x384a4
shrl %eax
shll $0x3, %eax
movl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x12513(%rip)           # 0x384a8
movq %rax, %rcx
movq -0x310(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x308(%rbp)
addq $0x110, %rdi            # imm = 0x110
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xc160
movq -0x308(%rbp), %rcx
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x38, %edi
callq 0x31d0
movq -0x218(%rbp), %rdi
movq %rax, -0x300(%rbp)
addq $0x28, %rdi
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq -0x300(%rbp), %rdi
movq (%rax), %rsi
movl $0x38, %edx
callq 0x3190
movq -0x300(%rbp), %rax
movq -0x218(%rbp), %rdi
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movl $0x8, 0x4(%rax)
addq $0x98, %rdi
leaq -0xf0(%rbp), %rsi
callq 0x23280
movq -0x218(%rbp), %rdi
addq $0x80, %rdi
leaq 0x12489(%rip), %rsi     # 0x384dc
callq 0x17090
testb $0x1, 0x127e7(%rip)     # 0x38846
je 0x26135
leaq 0x12308(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26133
movq 0x11f4c(%rip), %rdi     # 0x37fc8
leaq 0x60f6(%rip), %rsi      # 0x2c179
callq 0x31c0
movq -0x218(%rbp), %rdi
movq %rax, -0x328(%rbp)
addq $0x98, %rdi
callq 0x23ee0
movq -0x328(%rbp), %rdi
movq %rax, %rsi
callq 0x3070
movq %rax, %rdi
leaq 0x475b(%rip), %rsi      # 0x2a816
callq 0x31c0
movq -0x218(%rbp), %rdi
movq %rax, -0x320(%rbp)
addq $0x80, %rdi
callq 0x17100
movq -0x320(%rbp), %rdi
movq %rax, %rsi
callq 0x3070
movq %rax, %rdi
leaq 0x60b6(%rip), %rsi      # 0x2c1a9
callq 0x31c0
movq -0x218(%rbp), %rdi
movq %rax, -0x318(%rbp)
addq $0x80, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xbec0
movq -0x318(%rbp), %rdi
movl (%rax), %esi
callq 0x32d0
movq %rax, %rdi
movq 0x11e7a(%rip), %rsi     # 0x37fa8
callq 0x3200
jmp 0x26135
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0xe8(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x3, 0x38(%rax)
movl 0x12378(%rip), %eax     # 0x384dc
movl %eax, -0x334(%rbp)
movl 0x12360(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x1232c(%rip)           # 0x384a4
movl -0x334(%rbp), %edx
movl %eax, %ecx
movq -0x218(%rbp), %rax
addl %ecx, %edx
addl 0x12355(%rip), %edx     # 0x384e4
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, 0x3c(%rcx)
movq 0x8(%rax), %rax
movl 0x12325(%rip), %ecx     # 0x384dc
addq %rcx, %rax
movq %rax, -0x330(%rbp)
movl 0x12309(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x122d5(%rip)           # 0x384a4
movq -0x330(%rbp), %rdx
movl %eax, %ecx
movq -0x218(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rdx
movl 0x122fa(%rip), %ecx     # 0x384e4
addq %rcx, %rdx
movl 0x122d5(%rip), %ecx     # 0x384c8
addq %rcx, %rdx
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x8(%rcx)
movq 0x8(%rax), %rcx
movl 0x122bd(%rip), %eax     # 0x384dc
addq %rax, %rcx
movl 0x122a8(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x12274(%rip)           # 0x384a4
movl %eax, %edx
movq -0x218(%rbp), %rax
movl %edx, %edx
addq %rdx, %rcx
movl 0x122a0(%rip), %edx     # 0x384e4
addq %rdx, %rcx
movl 0x1227b(%rip), %edx     # 0x384c8
addq %rdx, %rcx
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x30(%rax)
movl $0x0, -0x134(%rbp)
movl -0x134(%rbp), %eax
cmpl 0x121f3(%rip), %eax     # 0x38478
jae 0x2659a
movl -0x134(%rbp), %eax
cmpl -0xe4(%rbp), %eax
jne 0x2641d
movl $0x0, -0x138(%rbp)
movl -0x138(%rbp), %eax
cmpl 0x121c9(%rip), %eax     # 0x3847c
jae 0x26418
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0x134(%rbp), %edx
movq (%rcx,%rdx,8), %rdi
movl -0x138(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
addq $0x10, %rdi
movq 0x8(%rax), %rax
movl 0x121f3(%rip), %ecx     # 0x384dc
addq %rcx, %rax
movq %rax, -0x350(%rbp)
movl 0x121d7(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x121a3(%rip)           # 0x384a4
movl %eax, %ecx
movq -0x350(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movl 0x121d3(%rip), %ecx     # 0x384e8
addq %rcx, %rax
movq %rax, -0x140(%rbp)
leaq -0x140(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rdx
movq 0x78(%rax), %rcx
movl -0x134(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0x138(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x10(%rcx)
movq 0x78(%rax), %rcx
movl -0x134(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl -0x138(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rcx
addq $0x18, %rcx
movq %rcx, -0x348(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x340(%rbp)
movl 0x12142(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x1210e(%rip)           # 0x384a4
movl %eax, -0x14c(%rbp)
leaq 0x12129(%rip), %rdi     # 0x384cc
leaq -0x14c(%rbp), %rsi
callq 0x17120
movq -0x348(%rbp), %rdi
movq %rax, %rcx
movq -0x340(%rbp), %rax
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x148(%rbp)
leaq -0x148(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rcx
movq 0x78(%rax), %rax
movl -0x134(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0x138(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movl -0x138(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x138(%rbp)
jmp 0x262a7
jmp 0x26584
movl $0x0, -0x150(%rbp)
movl -0x150(%rbp), %eax
cmpl 0x12049(%rip), %eax     # 0x3847c
jae 0x26582
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0x134(%rbp), %edx
movq (%rcx,%rdx,8), %rdi
movl -0x150(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
addq $0x10, %rdi
movq 0x8(%rax), %rax
movl 0x12073(%rip), %ecx     # 0x384dc
addq %rcx, %rax
movq %rax, -0x360(%rbp)
movl 0x12057(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x12023(%rip)           # 0x384a4
movl %eax, %ecx
movq -0x360(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movl 0x12043(%rip), %ecx     # 0x384d8
addq %rcx, %rax
movl 0x12036(%rip), %ecx     # 0x384d4
subq %rcx, %rax
movq %rax, -0x158(%rbp)
leaq -0x158(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rdx
movq 0x78(%rax), %rcx
movl -0x134(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0x150(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x10(%rcx)
movq 0x78(%rax), %rcx
movl -0x134(%rbp), %edx
movq (%rcx,%rdx,8), %rdi
movl -0x150(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
addq $0x18, %rdi
movq 0x8(%rax), %rax
movq %rax, -0x358(%rbp)
movl 0x11fc0(%rip), %eax     # 0x384d0
xorl %edx, %edx
divl 0x11f8c(%rip)           # 0x384a4
movl %eax, %ecx
movq -0x358(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movl 0x11fac(%rip), %ecx     # 0x384d8
addq %rcx, %rax
movq %rax, -0x160(%rbp)
leaq -0x160(%rbp), %rsi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rcx
movq 0x78(%rax), %rax
movl -0x134(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0x150(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movl -0x150(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x150(%rbp)
jmp 0x26427
jmp 0x26584
jmp 0x26586
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x26279
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdx
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x10(%rcx)
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
jmp 0x269b3
movl $0x0, -0x164(%rbp)
movl -0x164(%rbp), %eax
cmpl 0x11e44(%rip), %eax     # 0x3847c
jae 0x266d4
movl -0x164(%rbp), %eax
cmpl -0xe8(%rbp), %eax
je 0x266be
movq -0x218(%rbp), %rax
movq 0x8(%rax), %rcx
movl 0x11e8f(%rip), %edx     # 0x384ec
addq %rdx, %rcx
movq %rcx, -0x170(%rbp)
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
movl -0x164(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rsi
addq $0x8, %rsi
leaq -0x170(%rbp), %rdi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rcx
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0x164(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x266c0
movl -0x164(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x164(%rbp)
jmp 0x2662c
movq -0x218(%rbp), %rdi
movl 0x11e0f(%rip), %eax     # 0x384f0
imull 0x11e0c(%rip), %eax     # 0x384f4
movl 0x11db2(%rip), %ecx     # 0x384a0
imull 0x11e03(%rip), %ecx     # 0x384f8
movl 0x11db5(%rip), %edx     # 0x384b0
movl 0x11df3(%rip), %esi     # 0x384f4
subl 0x11df1(%rip), %esi     # 0x384f8
imull %esi, %edx
addl %edx, %ecx
subl %ecx, %eax
movl %eax, %eax
movq %rax, -0x370(%rbp)
movl 0x11d87(%rip), %eax     # 0x384a4
shrl %eax
shll $0x3, %eax
movl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x11d79(%rip)           # 0x384a8
movq %rax, %rcx
movq -0x370(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x368(%rbp)
addq $0x128, %rdi            # imm = 0x128
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xc160
movq -0x368(%rbp), %rcx
movq -0x218(%rbp), %rdi
addq (%rax), %rcx
movq %rcx, (%rax)
movq 0x78(%rdi), %rax
movl -0xe4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0xe8(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x4, 0x38(%rax)
movq 0x78(%rdi), %rax
movl -0xe4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0xe8(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
addq $0x28, %rdi
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rcx
movl 0xc(%rcx), %edx
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, 0x4(%rcx)
movq 0x8(%rax), %rdx
movl 0x11cfc(%rip), %ecx     # 0x384f4
addq %rcx, %rdx
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x8(%rcx)
movq 0x8(%rax), %rcx
movl 0x11cd8(%rip), %edx     # 0x384fc
addq %rdx, %rcx
movq %rcx, -0x178(%rbp)
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
movl -0xe8(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rsi
addq $0x10, %rsi
leaq -0x178(%rbp), %rdi
callq 0xd310
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq (%rcx), %rdx
movq 0x78(%rax), %rcx
movl -0xe4(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movl -0xe8(%rbp), %esi
shlq $0x6, %rsi
addq %rsi, %rcx
movq %rdx, 0x10(%rcx)
movq 0x8(%rax), %rcx
movl 0x11c6d(%rip), %edx     # 0x384fc
addq %rdx, %rcx
movq %rcx, -0x180(%rbp)
movq 0x78(%rax), %rax
movl -0xe4(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
movl -0xe8(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rsi
addq $0x18, %rsi
leaq -0x180(%rbp), %rdi
callq 0xd310
movq -0x218(%rbp), %rdi
movq (%rax), %rcx
movq 0x78(%rdi), %rax
movl -0xe4(%rbp), %edx
movq (%rax,%rdx,8), %rax
movl -0xe8(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
addq $0xb0, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
leaq 0x11bf5(%rip), %rsi     # 0x38500
callq 0x17090
jmp 0x269b3
movq 0x116d4(%rip), %rdi     # 0x37ff0
leaq 0x37ed(%rip), %rsi      # 0x2a110
callq 0x31c0
movq %rax, %rdi
leaq 0x5818(%rip), %rsi      # 0x2c14a
callq 0x31c0
movq %rax, %rdi
leaq 0x3778(%rip), %rsi      # 0x2a0b9
callq 0x31c0
movq %rax, %rdi
movl $0x1d6, %esi            # imm = 0x1D6
callq 0x3380
movq %rax, %rdi
leaq 0x37c4(%rip), %rsi      # 0x2a121
callq 0x31c0
movq %rax, %rdi
leaq 0x584b(%rip), %rsi      # 0x2c1b7
callq 0x31c0
movq -0x218(%rbp), %rdi
movq %rax, -0x378(%rbp)
addq $0x28, %rdi
movl -0xe0(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq -0x378(%rbp), %rdi
movq (%rax), %rsi
callq 0x18f90
movq %rax, %rdi
movq 0x115ff(%rip), %rsi     # 0x37fa8
callq 0x3200
callq 0x30f0
movq -0x218(%rbp), %rsi
movq %rsi, %rax
addq $0x28, %rax
movq %rax, -0x380(%rbp)
addq $0x28, %rsi
leaq -0x1e0(%rbp), %rdi
callq 0xbf60
movl -0xe0(%rbp), %eax
movl %eax, %edx
leaq -0x1c0(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0xf6f0
leaq -0x1a0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0xbf90
movq -0x380(%rbp), %rsi
leaq -0x200(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0xbf00
jmp 0x26a38
jmp 0x26a24
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x25713
jmp 0x26a3a
testb $0x1, 0x11e05(%rip)     # 0x38846
je 0x26e36
movq -0x218(%rbp), %rdi
addq $0x28, %rdi
callq 0xbe60
cmpq $0x0, %rax
jbe 0x26b5a
leaq 0x1190c(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26a8f
movq 0x11554(%rip), %rdi     # 0x37fc8
leaq 0x5753(%rip), %rsi      # 0x2c1ce
callq 0x31c0
movq %rax, %rdi
movq 0x1151e(%rip), %rsi     # 0x37fa8
callq 0x3200
movl $0x0, -0x204(%rbp)
movq -0x218(%rbp), %rdi
movl -0x204(%rbp), %eax
movq %rax, -0x388(%rbp)
addq $0x28, %rdi
callq 0xbe60
movq %rax, %rcx
movq -0x388(%rbp), %rax
cmpq %rcx, %rax
jae 0x26b58
leaq 0x118a4(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26b42
movq 0x114ec(%rip), %rdi     # 0x37fc8
leaq 0x3d2d(%rip), %rsi      # 0x2a810
callq 0x31c0
movq %rax, %rdi
movl -0x204(%rbp), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x5703(%rip), %rsi      # 0x2c203
callq 0x31c0
movq -0x218(%rbp), %rdi
movq %rax, -0x390(%rbp)
addq $0x28, %rdi
movl -0x204(%rbp), %eax
movl %eax, %esi
callq 0xbe90
movq -0x390(%rbp), %rdi
movq (%rax), %rsi
callq 0x18f90
movq %rax, %rdi
movq 0x1146b(%rip), %rsi     # 0x37fa8
callq 0x3200
jmp 0x26b44
movl -0x204(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x204(%rbp)
jmp 0x26a99
jmp 0x26b5a
leaq 0x11813(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26b88
movq 0x1145b(%rip), %rdi     # 0x37fc8
leaq 0x5670(%rip), %rsi      # 0x2c1e4
callq 0x31c0
movq %rax, %rdi
movq 0x11425(%rip), %rsi     # 0x37fa8
callq 0x3200
movl $0x0, -0x208(%rbp)
movl -0x208(%rbp), %eax
cmpl 0x118da(%rip), %eax     # 0x38478
jae 0x26e34
movl $0x0, -0x20c(%rbp)
movl -0x20c(%rbp), %eax
cmpl 0x118c2(%rip), %eax     # 0x3847c
jae 0x26df0
leaq 0x117ad(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26bdf
movq 0x113f5(%rip), %rdi     # 0x37fc8
leaq 0x3c36(%rip), %rsi      # 0x2a810
callq 0x31c0
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x208(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x20c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x26c84
leaq 0x11767(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26c7f
movq 0x113af(%rip), %rdi     # 0x37fc8
leaq 0x3adf(%rip), %rsi      # 0x2a6ff
callq 0x31c0
movq %rax, %rdi
leaq -0xd99f(%rip), %rsi     # 0x19290
callq 0x30a0
movq %rax, %rdi
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x208(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x20c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
callq 0x32d0
movq %rax, %rdi
leaq -0xd9ab(%rip), %rsi     # 0x192c0
callq 0x30a0
movq %rax, %rdi
leaq 0x5589(%rip), %rsi      # 0x2c203
callq 0x31c0
jmp 0x26dda
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x208(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x20c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x26ccf
leaq 0x116c2(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26cca
movq 0x1130a(%rip), %rdi     # 0x37fc8
leaq 0x5533(%rip), %rsi      # 0x2c1f8
callq 0x31c0
jmp 0x26dd8
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x208(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x20c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x26d1a
leaq 0x11677(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26d15
movq 0x112bf(%rip), %rdi     # 0x37fc8
leaq 0x54ef(%rip), %rsi      # 0x2c1ff
callq 0x31c0
jmp 0x26dd6
movq -0x218(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x208(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x20c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x3, (%rax)
jne 0x26d62
leaq 0x1162c(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26d60
movq 0x11274(%rip), %rdi     # 0x37fc8
leaq 0x54ab(%rip), %rsi      # 0x2c206
callq 0x31c0
jmp 0x26dd4
movq 0x11287(%rip), %rdi     # 0x37ff0
leaq 0x33a0(%rip), %rsi      # 0x2a110
callq 0x31c0
movq %rax, %rdi
leaq 0x53cb(%rip), %rsi      # 0x2c14a
callq 0x31c0
movq %rax, %rdi
leaq 0x332b(%rip), %rsi      # 0x2a0b9
callq 0x31c0
movq %rax, %rdi
movl $0x20b, %esi            # imm = 0x20B
callq 0x3380
movq %rax, %rdi
leaq 0x3377(%rip), %rsi      # 0x2a121
callq 0x31c0
movq %rax, %rdi
leaq 0x5454(%rip), %rsi      # 0x2c20d
callq 0x31c0
movq %rax, %rdi
movq 0x111e0(%rip), %rsi     # 0x37fa8
callq 0x3200
xorl %edi, %edi
callq 0x3270
jmp 0x26dd6
jmp 0x26dd8
jmp 0x26dda
jmp 0x26ddc
movl -0x20c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20c(%rbp)
jmp 0x26bae
leaq 0x1157d(%rip), %rax     # 0x38374
cmpl $0x0, (%rax)
je 0x26e1e
movq 0x111c5(%rip), %rdi     # 0x37fc8
leaq 0x3b3b(%rip), %rsi      # 0x2a945
callq 0x31c0
movq %rax, %rdi
movq 0x1118f(%rip), %rsi     # 0x37fa8
callq 0x3200
jmp 0x26e20
movl -0x208(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x208(%rbp)
jmp 0x26b92
jmp 0x26e36
movq -0x218(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
addq $0x3c0, %rsp            # imm = 0x3C0
popq %rbp
retq
movq -0xd0(%rbp), %rdi
callq 0x33a0
nop