// File: estwings57[P]CasHMC/sources/LinkSlave.cpp
// Function: CasHMC::LinkSlave::Update()
void LinkSlave::Update()
{
	//Extracting flow control and checking CRC, SEQ from linkRxTx packet 
	if(linkRxTx.size() > 0) {
		//Make sure that linkRxTx[0] is not virtual tail packet.
		if(linkRxTx[0] == NULL) {
			ERROR(header<<"  == Error - linkRxTx[0] is NULL (It could be one of virtual tail packet  (CurrentClock : "<<currentClockCycle<<")");
			exit(0);
		}
		else {
			for(int i=0; i<linkRxTx.size(); i++) {
				if(linkRxTx[i]->bufPopDelay == 0) {
					//Link retraining sequence
					if(linkRxTx[i]->CMD == NULL_) {
						//[Responder descrambler initializing]
						//The responder descrambler sync should occur within tRESP1 of the PLL locking
						if(downstream && localLinkMaster->currentState == SLEEP) {
							localLinkMaster->firstNull = true;
							localLinkMaster->currentState = RETRAIN1;
							uint64_t tran = ceil((double)(tRESP1)/tCK);
							localLinkMaster->retrainTransit = currentClockCycle + tran;
						}
						//[Requester descrambler synchronization]
						else if(!downstream && localLinkMaster->currentState == RETRAIN1) {
							localLinkMaster->firstNull = true;
							localLinkMaster->currentState = RETRAIN2;
						}
						//[Responder FLIT synchrony]
						//Responder link lock should occur within tRESP2
						else if(downstream && localLinkMaster->currentState == RETRAIN1) {
							localLinkMaster->firstNull = true;
							localLinkMaster->currentState = RETRAIN2;
							uint64_t tran = ceil((double)(tRESP2)/tCK);
							localLinkMaster->retrainTransit = currentClockCycle + tran;
						}
						//[Requester FLIT synchrony and sending a minimum of 32 NULL FLITs before entering ACTIVE]
						else if(!downstream && localLinkMaster->currentState == RETRAIN2) {
							currentState = ACTIVE;
							localLinkMaster->FinishRetrain();
						}
						//[sending a minimum of 32 NULL FLITs before entering ACTIVE]
						else if(downstream && localLinkMaster->currentState == RETRAIN2) {
							currentState = ACTIVE;
							localLinkMaster->FinishRetrain();
						}
						delete linkRxTx[i];
						linkRxTx.erase(linkRxTx.begin()+i);
						continue;
					}
					
					//Retry control
					if(linkRxTx[i]->CMD == IRTRY) {
						if(linkRxTx[i]->bufPopDelay == 0) {
							linkRxTx[i]->chkRRP = true;
							localLinkMaster->UpdateRetryPointer(linkRxTx[i]);
							if(linkRxTx[i]->FRP == 1) {
								if(localLinkMaster->currentState != LINK_RETRY) {
									localLinkMaster->LinkRetry(linkRxTx[i]);
								}
							}
							else if(linkRxTx[i]->FRP == 2) {
								if(localLinkMaster->currentState == START_RETRY
								|| localLinkMaster->currentState == LINK_RETRY) {
									localLinkMaster->FinishRetry();
									currentState = ACTIVE;
									slaveSEQ = 0;
								}
							}
							delete linkRxTx[i];
							linkRxTx.erase(linkRxTx.begin()+i);
							break;
						}
					}
					else if(currentState == START_RETRY) {
						delete linkRxTx[i];
						linkRxTx.erase(linkRxTx.begin()+i);
						break;
					}
				
					//Flow control
					if(linkRxTx[i]->chkRRP == false) {
						linkRxTx[i]->chkRRP = true;
						localLinkMaster->UpdateRetryPointer(linkRxTx[i]);

						//PRET packet is not saved in the retry buffer (No need to check CRC)
						if(linkRxTx[i]->CMD == PRET) {
							delete linkRxTx[i];
							linkRxTx.erase(linkRxTx.begin()+i);
							break;
						}
					}
					
					//Link low power mode control
					if(linkRxTx[i]->CMD == QUIET) {
						//(upstream) all-way links are checked to enter sleep mode
						if(localLinkMaster->currentState == WAIT) {
							localLinkMaster->currentState = CONFIRM;
							DEBUG(ALI(18)<<header<<ALI(15)<<*linkRxTx[i]<<(downstream ? "Down) " : "Up)   ")
								<<"link is ready to enter LOW POWER mode");
						}
						//(downstream) link is checking the link state to enter sleep mode
						else {
							currentState = WAIT;
							DEBUG(ALI(18)<<header<<ALI(15)<<*linkRxTx[i]<<(downstream ? "Down) " : "Up)   ")
								<<"link is checking the link state to enter sleep mode");
						}
						delete linkRxTx[i];
						linkRxTx.erase(linkRxTx.begin()+i);
						break;
					}
					
					//Count CRC calculation time
					if(linkRxTx[i]->chkRRP == true && linkRxTx[i]->chkCRC == false) {
						if(CRC_CHECK && !startCRC) {
							startCRC = true;
							countdownCRC = ceil((double)CRC_CAL_CYCLE * linkRxTx[i]->LNG);
						}
							
						if(CRC_CHECK && countdownCRC > 0) {
							DEBUG(ALI(18)<<header<<ALI(15)<<*linkRxTx[i]<<(downstream ? "Down) " : "Up)   ")
									<<"WAITING CRC calculation ("<<countdownCRC<<"/"<<ceil((double)CRC_CAL_CYCLE*linkRxTx[i]->LNG)<<")");
						}
						else {
							//Error check
							linkRxTx[i]->chkCRC = true;
							if(CheckNoError(linkRxTx[i])) {
								localLinkMaster->ReturnRetryPointer(linkRxTx[i]);
								localLinkMaster->UpdateToken(linkRxTx[i]);
								if(linkRxTx[i]->CMD != TRET) {
									Receive(linkRxTx[i]);
								}
								else {
									delete linkRxTx[i];
								}
								linkRxTx.erase(linkRxTx.begin()+i);
								break;
							}
							//Error abort mode
							else {
								if(localLinkMaster->retryStartPacket == NULL) {
									localLinkMaster->retryStartPacket = new Packet(*linkRxTx[i]);
								}
								else {
									ERROR(header<<"  == Error - localLinkMaster->retryStartPacket is NOT NULL  (CurrentClock : "<<currentClockCycle<<")");
									exit(0);
								}
								localLinkMaster->StartRetry(linkRxTx[i]);
								localLinkMaster->linkP->statis->errorPerLink[linkSlaveID]++;
								for(int j=0; j<linkRxTx.size(); j++) {
									if(linkRxTx[j] != NULL) {
										delete linkRxTx[j];
									}
									linkRxTx.erase(linkRxTx.begin()+j);
									j--;
								}
								linkRxTx.clear();
								currentState = START_RETRY;
							}
							startCRC = false;
						}
						countdownCRC = (countdownCRC>0) ? countdownCRC-1 : 0;
					}
				}
			}
		}
	}
	
	//Checking the link state to enter sleep mode
	if(currentState == WAIT) {
		//Link is ready for low power mode
		if(localLinkMaster->Buffers.size() == 0
		&& localLinkMaster->retBufReadP == localLinkMaster->retBufWriteP
		&& localLinkMaster->tokenCount == MAX_LINK_BUF) {
			currentState = SLEEP;
			localLinkMaster->currentState = SLEEP;
			localLinkMaster->QuitePacket();
		}
	}

	//Sending packet
	if(Buffers.size() > 0) {
		bool chkRcv = (downstream ? downBufferDest->ReceiveDown(Buffers[0]) : upBufferDest->ReceiveUp(Buffers[0]));
		if(chkRcv) {
			localLinkMaster->ReturnTocken(Buffers[0]);
			DEBUG(ALI(18)<<header<<ALI(15)<<*Buffers[0]<<(downstream ? "Down) " : "Up)   ")
						<<"SENDING packet to "<<(downstream ? "crossbar switch (CS)" : "HMC controller (HC)"));
			Buffers.erase(Buffers.begin(), Buffers.begin()+Buffers[0]->LNG);
		}
		else {
			//DEBUG(ALI(18)<<header<<ALI(15)<<*Buffers[0]<<"(downstream ? "Down) Crossbar switch" : "Up)   HMC controller")<<" buffer FULL");	
		}
	}

	Step();
	for(int i=0; i<linkRxTx.size(); i++) {
		if(linkRxTx[i] != NULL) {
			linkRxTx[i]->bufPopDelay = (linkRxTx[i]->bufPopDelay>0) ? linkRxTx[i]->bufPopDelay-1 : 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x370, %rsp            # imm = 0x370
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x198(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
cmpq $0x0, %rax
jbe 0x425aa
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
xorl %eax, %eax
movl %eax, %esi
callq 0x29940
cmpq $0x0, (%rax)
jne 0x41208
movq 0x24e88(%rip), %rdi     # 0x65ff0
leaq 0xfecb(%rip), %rsi      # 0x5103a
callq 0x4380
movq %rax, %rdi
leaq 0x12a5d(%rip), %rsi     # 0x53bdb
callq 0x4380
movq %rax, %rdi
leaq 0x106a8(%rip), %rsi     # 0x51835
callq 0x4380
movq %rax, %rdi
movl $0x49, %esi
callq 0x4610
movq %rax, %rdi
leaq 0xfeb0(%rip), %rsi      # 0x51059
callq 0x4380
movq -0x198(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, %rdi
leaq 0x12aad(%rip), %rsi     # 0x53c78
callq 0x4380
movq %rax, %rdi
movq -0x198(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x40f0
movq %rax, %rdi
leaq 0x1318c(%rip), %rsi     # 0x54379
callq 0x4380
movq %rax, %rdi
movq 0x24db4(%rip), %rsi     # 0x65fb0
callq 0x43c0
xorl %edi, %edi
callq 0x4460
movl $0x0, -0xc(%rbp)
movq -0x198(%rbp), %rdi
movslq -0xc(%rbp), %rax
movq %rax, -0x1a0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
movq %rax, %rcx
movq -0x1a0(%rbp), %rax
cmpq %rcx, %rax
jae 0x425a6
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x0, 0x14(%rax)
jne 0x42596
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x0, 0x434(%rax)
jne 0x4157f
movq -0x198(%rbp), %rax
testb $0x1, 0x1cc(%rax)
je 0x4134a
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0x1, 0x200(%rax)
jne 0x4134a
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rcx
movb $0x1, 0x268(%rcx)
movq 0x218(%rax), %rax
movl $0x3, 0x200(%rax)
leaq 0x25319(%rip), %rax     # 0x66600
movsd (%rax), %xmm0
leaq 0x2534e(%rip), %rax     # 0x66640
movsd (%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x40a0
movq -0x198(%rbp), %rax
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movq %rcx, %rsi
sarq $0x3f, %rsi
movsd 0x11edb(%rip), %xmm1    # 0x531f8
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rdx
andq %rsi, %rdx
orq %rdx, %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rcx
addq -0x18(%rbp), %rcx
movq 0x218(%rax), %rax
movl %ecx, 0x264(%rax)
jmp 0x414ed
movq -0x198(%rbp), %rax
testb $0x1, 0x1cc(%rax)
jne 0x4139c
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0x3, 0x200(%rax)
jne 0x4139c
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rcx
movb $0x1, 0x268(%rcx)
movq 0x218(%rax), %rax
movl $0x4, 0x200(%rax)
jmp 0x414eb
movq -0x198(%rbp), %rax
testb $0x1, 0x1cc(%rax)
je 0x4145b
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0x3, 0x200(%rax)
jne 0x4145b
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rcx
movb $0x1, 0x268(%rcx)
movq 0x218(%rax), %rax
movl $0x4, 0x200(%rax)
leaq 0x25210(%rip), %rax     # 0x66608
movsd (%rax), %xmm0
leaq 0x2523d(%rip), %rax     # 0x66640
movsd (%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x40a0
movq -0x198(%rbp), %rax
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movq %rcx, %rsi
sarq $0x3f, %rsi
movsd 0x11dca(%rip), %xmm1    # 0x531f8
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rdx
andq %rsi, %rdx
orq %rdx, %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rcx
addq -0x20(%rbp), %rcx
movq 0x218(%rax), %rax
movl %ecx, 0x264(%rax)
jmp 0x414e9
movq -0x198(%rbp), %rax
testb $0x1, 0x1cc(%rax)
jne 0x414a1
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0x4, 0x200(%rax)
jne 0x414a1
movq -0x198(%rbp), %rax
movl $0x0, 0x200(%rax)
movq 0x218(%rax), %rdi
callq 0x3f850
jmp 0x414e7
movq -0x198(%rbp), %rax
testb $0x1, 0x1cc(%rax)
je 0x414e5
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0x4, 0x200(%rax)
jne 0x414e5
movq -0x198(%rbp), %rax
movl $0x0, 0x200(%rax)
movq 0x218(%rax), %rdi
callq 0x3f850
jmp 0x414e7
jmp 0x414e9
jmp 0x414eb
jmp 0x414ed
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movq %rax, -0x1a8(%rbp)
cmpq $0x0, %rax
je 0x41521
movq -0x1a8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x198(%rbp), %rdi
movq %rdi, %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, -0x1b0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x299f0
movq %rax, -0x38(%rbp)
movslq -0xc(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x29a20
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x29a60
movq -0x1b0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x29e80
movq %rax, -0x40(%rbp)
jmp 0x42598
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x3, 0x434(%rax)
jne 0x417ac
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x0, 0x14(%rax)
jne 0x417a7
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x198(%rbp), %rdi
movq (%rax), %rax
movb $0x1, 0x421(%rax)
movq 0x218(%rdi), %rax
movq %rax, -0x1b8(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x1b8(%rbp), %rdi
movq (%rax), %rsi
callq 0x3c650
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x1, 0x448(%rax)
jne 0x41692
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0xb, 0x200(%rax)
je 0x4168d
movq -0x198(%rbp), %rdi
movq 0x218(%rdi), %rax
movq %rax, -0x1c0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x1c0(%rbp), %rdi
movq (%rax), %rsi
callq 0x3db20
jmp 0x41715
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x2, 0x448(%rax)
jne 0x41713
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0xa, 0x200(%rax)
je 0x416e3
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0xb, 0x200(%rax)
jne 0x41711
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rdi
callq 0x3e170
movq -0x198(%rbp), %rax
movl $0x0, 0x200(%rax)
movl $0x0, 0x220(%rax)
jmp 0x41713
jmp 0x41715
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movq %rax, -0x1c8(%rbp)
cmpq $0x0, %rax
je 0x41749
movq -0x1c8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x198(%rbp), %rdi
movq %rdi, %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, -0x1d0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x299f0
movq %rax, -0x58(%rbp)
movslq -0xc(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x29a20
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x29a60
movq -0x1d0(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x29e80
movq %rax, -0x60(%rbp)
jmp 0x425a6
jmp 0x41854
movq -0x198(%rbp), %rax
cmpl $0xa, 0x200(%rax)
jne 0x41852
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movq %rax, -0x1d8(%rbp)
cmpq $0x0, %rax
je 0x417f4
movq -0x1d8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x198(%rbp), %rdi
movq %rdi, %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, -0x1e0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x299f0
movq %rax, -0x78(%rbp)
movslq -0xc(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x29a20
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x29a60
movq -0x1e0(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x29e80
movq %rax, -0x80(%rbp)
jmp 0x425a6
jmp 0x41854
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movb 0x421(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x419a7
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x198(%rbp), %rdi
movq (%rax), %rax
movb $0x1, 0x421(%rax)
movq 0x218(%rdi), %rax
movq %rax, -0x1e8(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x1e8(%rbp), %rdi
movq (%rax), %rsi
callq 0x3c650
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x1, 0x434(%rax)
jne 0x419a5
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movq %rax, -0x1f0(%rbp)
cmpq $0x0, %rax
je 0x41932
movq -0x1f0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x198(%rbp), %rdi
movq %rdi, %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, -0x1f8(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x299f0
movq %rax, -0x98(%rbp)
movslq -0xc(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x29a20
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x29a60
movq -0x1f8(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x29e80
movq %rax, -0xa0(%rbp)
jmp 0x425a6
jmp 0x419a7
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x4, 0x434(%rax)
jne 0x41d94
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpl $0x5, 0x200(%rax)
jne 0x41b70
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
movl $0x6, 0x200(%rax)
leaq 0x24b20(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x41b6b
leaq 0x24b11(%rip), %rax     # 0x66529
testb $0x1, (%rax)
jne 0x41b6b
movl $0x12, %edi
callq 0x177b0
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %esi
movq 0x24592(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x220(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x220(%rbp), %rdi
movb %al, -0xa5(%rbp)
movzbl -0xa5(%rbp), %esi
callq 0x4550
movq -0x198(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, -0x218(%rbp)
movl $0xf, %edi
callq 0x177b0
movq -0x218(%rbp), %rdi
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %esi
callq 0x4440
movq %rax, -0x210(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x210(%rbp), %rdi
movb %al, -0xad(%rbp)
movzbl -0xad(%rbp), %esi
callq 0x4550
movq -0x198(%rbp), %rdi
movq %rax, -0x208(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x208(%rbp), %rdi
movq (%rax), %rsi
callq 0x44960
movq %rax, %rcx
movq -0x198(%rbp), %rax
movq %rcx, -0x200(%rbp)
testb $0x1, 0x1cc(%rax)
je 0x41b2a
leaq 0x11b27(%rip), %rax     # 0x53648
movq %rax, -0x228(%rbp)
jmp 0x41b3a
leaq 0x11b1e(%rip), %rax     # 0x5364f
movq %rax, -0x228(%rbp)
jmp 0x41b3a
movq -0x200(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0x4380
movq %rax, %rdi
leaq 0x1217c(%rip), %rsi     # 0x53cd3
callq 0x4380
movq %rax, %rdi
movq 0x2444a(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x41ced
movq -0x198(%rbp), %rax
movl $0x5, 0x200(%rax)
leaq 0x249a0(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x41ceb
leaq 0x24991(%rip), %rax     # 0x66529
testb $0x1, (%rax)
jne 0x41ceb
movl $0x12, %edi
callq 0x177b0
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %esi
movq 0x24412(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x250(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x250(%rbp), %rdi
movb %al, -0xb5(%rbp)
movzbl -0xb5(%rbp), %esi
callq 0x4550
movq -0x198(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, -0x248(%rbp)
movl $0xf, %edi
callq 0x177b0
movq -0x248(%rbp), %rdi
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %esi
callq 0x4440
movq %rax, -0x240(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x240(%rbp), %rdi
movb %al, -0xbd(%rbp)
movzbl -0xbd(%rbp), %esi
callq 0x4550
movq -0x198(%rbp), %rdi
movq %rax, -0x238(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x238(%rbp), %rdi
movq (%rax), %rsi
callq 0x44960
movq %rax, %rcx
movq -0x198(%rbp), %rax
movq %rcx, -0x230(%rbp)
testb $0x1, 0x1cc(%rax)
je 0x41caa
leaq 0x119a7(%rip), %rax     # 0x53648
movq %rax, -0x258(%rbp)
jmp 0x41cba
leaq 0x1199e(%rip), %rax     # 0x5364f
movq %rax, -0x258(%rbp)
jmp 0x41cba
movq -0x230(%rbp), %rdi
movq -0x258(%rbp), %rsi
callq 0x4380
movq %rax, %rdi
leaq 0x12022(%rip), %rsi     # 0x53cf9
callq 0x4380
movq %rax, %rdi
movq 0x242ca(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x41ced
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movq %rax, -0x260(%rbp)
cmpq $0x0, %rax
je 0x41d21
movq -0x260(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x198(%rbp), %rdi
movq %rdi, %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, -0x268(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x299f0
movq %rax, -0xd8(%rbp)
movslq -0xc(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x29a20
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x29a60
movq -0x268(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x29e80
movq %rax, -0xe0(%rbp)
jmp 0x425a6
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movb 0x421(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x42594
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movb 0x420(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x42594
leaq 0x24775(%rip), %rax     # 0x6656c
testb $0x1, (%rax)
je 0x41e6d
movq -0x198(%rbp), %rax
testb $0x1, 0x228(%rax)
jne 0x41e6d
movq -0x198(%rbp), %rdi
movb $0x1, 0x228(%rdi)
leaq 0x2474f(%rip), %rax     # 0x66570
movsd (%rax), %xmm0
movsd %xmm0, -0x270(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movsd -0x270(%rbp), %xmm0
movq (%rax), %rax
movl 0x430(%rax), %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
callq 0x40a0
movq -0x198(%rbp), %rax
cvttsd2si %xmm0, %ecx
movl %ecx, 0x224(%rax)
leaq 0x246f8(%rip), %rax     # 0x6656c
testb $0x1, (%rax)
je 0x4208f
movq -0x198(%rbp), %rax
cmpl $0x0, 0x224(%rax)
jle 0x4208f
leaq 0x24690(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x4208a
leaq 0x24681(%rip), %rax     # 0x66529
testb $0x1, (%rax)
jne 0x4208a
movl $0x12, %edi
callq 0x177b0
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %esi
movq 0x24102(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x298(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x298(%rbp), %rdi
movb %al, -0xe5(%rbp)
movzbl -0xe5(%rbp), %esi
callq 0x4550
movq -0x198(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, -0x290(%rbp)
movl $0xf, %edi
callq 0x177b0
movq -0x290(%rbp), %rdi
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %esi
callq 0x4440
movq %rax, -0x288(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x288(%rbp), %rdi
movb %al, -0xed(%rbp)
movzbl -0xed(%rbp), %esi
callq 0x4550
movq -0x198(%rbp), %rdi
movq %rax, -0x280(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x280(%rbp), %rdi
movq (%rax), %rsi
callq 0x44960
movq %rax, %rcx
movq -0x198(%rbp), %rax
movq %rcx, -0x278(%rbp)
testb $0x1, 0x1cc(%rax)
je 0x41fba
leaq 0x11697(%rip), %rax     # 0x53648
movq %rax, -0x2a0(%rbp)
jmp 0x41fca
leaq 0x1168e(%rip), %rax     # 0x5364f
movq %rax, -0x2a0(%rbp)
jmp 0x41fca
movq -0x278(%rbp), %rdi
movq -0x2a0(%rbp), %rsi
callq 0x4380
movq %rax, %rdi
leaq 0x11aba(%rip), %rsi     # 0x53aa1
callq 0x4380
movq %rax, %rdi
movq -0x198(%rbp), %rax
movl 0x224(%rax), %esi
callq 0x4610
movq %rax, %rdi
leaq 0xf28d(%rip), %rsi      # 0x51298
callq 0x4380
movq -0x198(%rbp), %rdi
movq %rax, -0x2a8(%rbp)
leaq 0x2454b(%rip), %rax     # 0x66570
movsd (%rax), %xmm0
movsd %xmm0, -0x2b0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movsd -0x2b0(%rbp), %xmm0
movq (%rax), %rax
movl 0x430(%rax), %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
callq 0x40a0
movq -0x2a8(%rbp), %rdi
callq 0x4690
movq %rax, %rdi
leaq 0x12303(%rip), %rsi     # 0x54379
callq 0x4380
movq %rax, %rdi
movq 0x23f2b(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x4254f
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x198(%rbp), %rdi
movq (%rax), %rax
movb $0x1, 0x420(%rax)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x198(%rbp), %rdi
movq (%rax), %rsi
callq 0x42ac0
testb $0x1, %al
jne 0x420df
jmp 0x4223b
movq -0x198(%rbp), %rdi
movq 0x218(%rdi), %rax
movq %rax, -0x2c0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x2c0(%rbp), %rdi
movq (%rax), %rsi
callq 0x3c8a0
movq -0x198(%rbp), %rdi
movq 0x218(%rdi), %rax
movq %rax, -0x2b8(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x2b8(%rbp), %rdi
movq (%rax), %rsi
callq 0x3cc80
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x2, 0x434(%rax)
je 0x42192
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x198(%rbp), %rdi
movq (%rax), %rsi
callq 0x29f60
jmp 0x421c8
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movq %rax, -0x2c8(%rbp)
cmpq $0x0, %rax
je 0x421c6
movq -0x2c8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x421c8
movq -0x198(%rbp), %rdi
movq %rdi, %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, -0x2d0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x299f0
movq %rax, -0x108(%rbp)
movslq -0xc(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x29a20
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x29a60
movq -0x2d0(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x29e80
movq %rax, -0x110(%rbp)
jmp 0x425a6
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
cmpq $0x0, 0x248(%rax)
jne 0x422e0
movl $0x468, %edi            # imm = 0x468
callq 0x4390
movq -0x198(%rbp), %rdi
movq %rax, -0x2d8(%rbp)
movq %rax, -0x2e0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x2d8(%rbp), %rdi
movq (%rax), %rsi
callq 0x43ff0
jmp 0x42297
movq -0x2e0(%rbp), %rcx
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
movq %rcx, 0x248(%rax)
jmp 0x42387
movq -0x2e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
movl $0x468, %esi            # imm = 0x468
callq 0x43a0
jmp 0x42ab3
movq 0x23d09(%rip), %rdi     # 0x65ff0
leaq 0xed4c(%rip), %rsi      # 0x5103a
callq 0x4380
movq %rax, %rdi
leaq 0x118de(%rip), %rsi     # 0x53bdb
callq 0x4380
movq %rax, %rdi
leaq 0xf529(%rip), %rsi      # 0x51835
callq 0x4380
movq %rax, %rdi
movl $0xd2, %esi
callq 0x4610
movq %rax, %rdi
leaq 0xed31(%rip), %rsi      # 0x51059
callq 0x4380
movq -0x198(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, %rdi
leaq 0x119e3(%rip), %rsi     # 0x53d2d
callq 0x4380
movq %rax, %rdi
movq -0x198(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x40f0
movq %rax, %rdi
leaq 0x1200d(%rip), %rsi     # 0x54379
callq 0x4380
movq %rax, %rdi
movq 0x23c35(%rip), %rsi     # 0x65fb0
callq 0x43c0
xorl %edi, %edi
callq 0x4460
movq -0x198(%rbp), %rdi
movq 0x218(%rdi), %rax
movq %rax, -0x2e8(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq -0x2e8(%rbp), %rdi
movq (%rax), %rsi
callq 0x3d6e0
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rcx
movq 0x210(%rcx), %rcx
movq 0x1e0(%rcx), %rdi
addq $0xf8, %rdi
movl 0x204(%rax), %eax
movl %eax, %esi
callq 0x17e90
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl $0x0, -0x120(%rbp)
movq -0x198(%rbp), %rdi
movslq -0x120(%rbp), %rax
movq %rax, -0x2f0(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
movq %rax, %rcx
movq -0x2f0(%rbp), %rax
cmpq %rcx, %rax
jae 0x4251d
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x120(%rbp), %rsi
callq 0x29940
cmpq $0x0, (%rax)
je 0x42489
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x120(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movq %rax, -0x2f8(%rbp)
cmpq $0x0, %rax
je 0x42487
movq -0x2f8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x42489
movq -0x198(%rbp), %rdi
movq %rdi, %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, -0x300(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x299f0
movq %rax, -0x138(%rbp)
movslq -0x120(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0x29a20
movq %rax, -0x130(%rbp)
leaq -0x128(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x29a60
movq -0x300(%rbp), %rdi
movq -0x128(%rbp), %rsi
callq 0x29e80
movq %rax, -0x140(%rbp)
movl -0x120(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x120(%rbp)
movl -0x120(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x120(%rbp)
jmp 0x423fc
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x29920
movq -0x198(%rbp), %rax
movl $0xa, 0x200(%rax)
movq -0x198(%rbp), %rax
movb $0x0, 0x228(%rax)
movq -0x198(%rbp), %rax
cmpl $0x0, 0x224(%rax)
jle 0x42577
movq -0x198(%rbp), %rax
movl 0x224(%rax), %eax
subl $0x1, %eax
movl %eax, -0x304(%rbp)
jmp 0x42581
xorl %eax, %eax
movl %eax, -0x304(%rbp)
jmp 0x42581
movq -0x198(%rbp), %rax
movl -0x304(%rbp), %ecx
movl %ecx, 0x224(%rax)
jmp 0x42596
jmp 0x42598
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4120f
jmp 0x425a8
jmp 0x425aa
movq -0x198(%rbp), %rax
cmpl $0x5, 0x200(%rax)
jne 0x42650
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x22d60
cmpq $0x0, %rax
jne 0x4264e
movq -0x198(%rbp), %rcx
movq 0x218(%rcx), %rax
movl 0x25c(%rax), %eax
movq 0x218(%rcx), %rcx
cmpl 0x260(%rcx), %eax
jne 0x4264e
movq -0x198(%rbp), %rax
movq 0x218(%rax), %rax
movl 0x208(%rax), %eax
leaq 0x23f3c(%rip), %rcx     # 0x66558
cmpl (%rcx), %eax
jne 0x4264e
movq -0x198(%rbp), %rax
movl $0x1, 0x200(%rax)
movq 0x218(%rax), %rcx
movl $0x1, 0x200(%rcx)
movq 0x218(%rax), %rdi
callq 0x3f690
jmp 0x42650
movq -0x198(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x22d60
cmpq $0x0, %rax
jbe 0x4299c
movq -0x198(%rbp), %rax
testb $0x1, 0x1cc(%rax)
je 0x426b9
movq -0x198(%rbp), %rdi
movq 0x208(%rdi), %rax
movq %rax, -0x310(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
xorl %eax, %eax
movl %eax, %esi
callq 0x29940
movq -0x310(%rbp), %rdi
movq (%rax), %rsi
callq 0x29d60
movb %al, -0x305(%rbp)
jmp 0x426f3
movq -0x198(%rbp), %rdi
movq 0x210(%rdi), %rax
movq %rax, -0x318(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
xorl %eax, %eax
movl %eax, %esi
callq 0x29940
movq -0x318(%rbp), %rdi
movq (%rax), %rsi
callq 0x438a0
movb %al, -0x305(%rbp)
movb -0x305(%rbp), %al
andb $0x1, %al
movb %al, -0x141(%rbp)
testb $0x1, -0x141(%rbp)
je 0x42998
movq -0x198(%rbp), %rdi
movq 0x218(%rdi), %rax
movq %rax, -0x320(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
xorl %eax, %eax
movl %eax, %esi
callq 0x29940
movq -0x320(%rbp), %rdi
movq (%rax), %rsi
callq 0x3ced0
leaq 0x23ddf(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x428d6
leaq 0x23dd0(%rip), %rax     # 0x66529
testb $0x1, (%rax)
jne 0x428d6
movl $0x12, %edi
callq 0x177b0
movl %eax, -0x148(%rbp)
movl -0x148(%rbp), %esi
movq 0x23851(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x348(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x348(%rbp), %rdi
movb %al, -0x149(%rbp)
movzbl -0x149(%rbp), %esi
callq 0x4550
movq -0x198(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, -0x340(%rbp)
movl $0xf, %edi
callq 0x177b0
movq -0x340(%rbp), %rdi
movl %eax, -0x150(%rbp)
movl -0x150(%rbp), %esi
callq 0x4440
movq %rax, -0x338(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x338(%rbp), %rdi
movb %al, -0x151(%rbp)
movzbl -0x151(%rbp), %esi
callq 0x4550
movq -0x198(%rbp), %rdi
movq %rax, -0x330(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
xorl %eax, %eax
movl %eax, %esi
callq 0x29940
movq -0x330(%rbp), %rdi
movq (%rax), %rsi
callq 0x44960
movq %rax, %rcx
movq -0x198(%rbp), %rax
movq %rcx, -0x328(%rbp)
testb $0x1, 0x1cc(%rax)
je 0x4286b
leaq 0x10de6(%rip), %rax     # 0x53648
movq %rax, -0x350(%rbp)
jmp 0x4287b
leaq 0x10ddd(%rip), %rax     # 0x5364f
movq %rax, -0x350(%rbp)
jmp 0x4287b
movq -0x328(%rbp), %rdi
movq -0x350(%rbp), %rsi
callq 0x4380
movq %rax, %rdi
leaq 0x114e2(%rip), %rsi     # 0x53d7a
callq 0x4380
movq %rax, %rdi
movq -0x198(%rbp), %rax
movb 0x1cc(%rax), %cl
leaq 0xf006(%rip), %rsi      # 0x518ba
leaq 0x12427(%rip), %rax     # 0x54ce2
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x4380
movq %rax, %rdi
movq 0x236df(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq -0x198(%rbp), %rdi
movq %rdi, %rax
addq $0x1d0, %rax            # imm = 0x1D0
movq %rax, -0x358(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x299f0
movq %rax, -0x168(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x29a60
movq -0x198(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x299f0
movq -0x198(%rbp), %rdi
movq %rax, -0x180(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
xorl %eax, %eax
movl %eax, %esi
callq 0x29940
movq (%rax), %rax
movl 0x430(%rax), %eax
movl %eax, %esi
leaq -0x180(%rbp), %rdi
callq 0x29a20
movq %rax, -0x178(%rbp)
leaq -0x170(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x29a60
movq -0x358(%rbp), %rdi
movq -0x160(%rbp), %rsi
movq -0x170(%rbp), %rdx
callq 0x29960
movq %rax, -0x188(%rbp)
jmp 0x4299a
jmp 0x4299a
jmp 0x4299c
movq -0x198(%rbp), %rdi
callq 0x405f0
movl $0x0, -0x18c(%rbp)
movq -0x198(%rbp), %rdi
movslq -0x18c(%rbp), %rax
movq %rax, -0x360(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
movq %rax, %rcx
movq -0x360(%rbp), %rax
cmpq %rcx, %rax
jae 0x42aaa
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x18c(%rbp), %rsi
callq 0x29940
cmpq $0x0, (%rax)
je 0x42a94
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x18c(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
cmpl $0x0, 0x14(%rax)
jle 0x42a58
movq -0x198(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x18c(%rbp), %rsi
callq 0x29940
movq (%rax), %rax
movl 0x14(%rax), %eax
subl $0x1, %eax
movl %eax, -0x364(%rbp)
jmp 0x42a62
xorl %eax, %eax
movl %eax, -0x364(%rbp)
jmp 0x42a62
movq -0x198(%rbp), %rdi
movl -0x364(%rbp), %eax
movl %eax, -0x368(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x18c(%rbp), %rsi
callq 0x29940
movl -0x368(%rbp), %ecx
movq (%rax), %rax
movl %ecx, 0x14(%rax)
jmp 0x42a96
movl -0x18c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18c(%rbp)
jmp 0x429b2
addq $0x370, %rsp            # imm = 0x370
popq %rbp
retq
movq -0x118(%rbp), %rdi
callq 0x4630
nop