// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/VaultController.cpp
// Function: CasHMC::VaultController::Update()
void VaultController::Update()
{
	//Update DRAM state and various countdown
	UpdateCountdown();

	//Convert request packet into DRAM commands
	if(bufPopDelay == 0) {
		for(int i=0; i<downBuffers.size(); i++) {
			//Make sure that buffer[0] is not virtual tail packet.
			if(downBuffers[i] != NULL) {
				if(ConvPacketIntoCMDs(downBuffers[i])) {
					int tempLNG = downBuffers[i]->LNG;
					delete downBuffers[i];
					downBuffers.erase(downBuffers.begin()+i, downBuffers.begin()+i+tempLNG);
				}
			}
		}
	}
	
	//Send response packet to crossbar switch
	if(upBuffers.size() > 0) {
		//Make sure that buffer[0] is not virtual tail packet.
		if(upBuffers[0] == NULL) {
			ERROR(header<<"  == Error - Vault controller up buffer[0] is NULL (It could be one of virtual tail packet occupying packet length  (CurrentClock : "<<currentClockCycle<<")");
			exit(0);
		}
		else{
			if(upBufferDest->ReceiveUp(upBuffers[0])) {
				DEBUG(ALI(18)<<header<<ALI(15)<<*upBuffers[0]<<"Up)   SENDING packet to crossbar switch (CS)");
				upBuffers.erase(upBuffers.begin(), upBuffers.begin()+upBuffers[0]->LNG);
			}
			else {
				//DEBUG(ALI(18)<<header<<ALI(15)<<*upBuffers[0]<<"Up)   Crossbar switch buffer FULL");	
			}
		}
	}
	
	//Pop command from command queue
	if(commandQueue->CmdPop(&poppedCMD)) {
		//Write data command will be issued after countdown
		if(poppedCMD->commandType == WRITE || poppedCMD->commandType == WRITE_P) {
			DRAMCommand *writeData = new DRAMCommand(*poppedCMD);
			writeData->commandType = WRITE_DATA;
			writeDataToSend.push_back(writeData);
			writeDataCountdown.push_back(WL);
		}
		
		if(poppedCMD->lastCMD == true) {
			if(!poppedCMD->posted) {
				if(poppedCMD->commandType == WRITE || poppedCMD->commandType == WRITE_P) {
					if(!poppedCMD->atomic) {
						pendingDataSize += 1;
						//DEBUG(ALI(18)<<header<<ALI(15)<<*poppedCMD<<"Down) pendingDataSize 1 increased   (current pendingDataSize : "<<pendingDataSize<<")");
					}
				}
				else if(poppedCMD->commandType == READ || poppedCMD->commandType == READ_P) {
					if(!poppedCMD->atomic) {
						pendingDataSize += (poppedCMD->dataSize/16)+1;
						//DEBUG(ALI(18)<<header<<ALI(15)<<*poppedCMD<<"Down) pendingDataSize "<<(poppedCMD->dataSize/16)+1<<" increased   (current pendingDataSize : "<<pendingDataSize<<")");
					}
					else {
						if(poppedCMD->packetCMD == _2ADD8 || poppedCMD->packetCMD == ADD16 || poppedCMD->packetCMD == INC8
						|| poppedCMD->packetCMD == EQ8 || poppedCMD->packetCMD == EQ16 || poppedCMD->packetCMD == BWR) {
							pendingDataSize += 1;
						}
						else {
							pendingDataSize += 2;
						}
					}
				}
			}
		}
		
		//Check for collision on bus
		if(cmdBus != NULL) {
			ERROR(header<<"  == Error - Command bus collision  (cmdBus:"<<*cmdBus<<", poppedCMD:"<<*poppedCMD<<")  (CurrentClock : "<<currentClockCycle<<")");
			exit(0);
		}
		cmdBus = poppedCMD;
		cmdCyclesLeft = tCMD;
		poppedCMD = NULL;
	}
	
	//Atomic command operation (assume that all operations consume one clock cycle)
	if(atomicCMD != NULL) {
		if(atomicOperLeft == 0) {
			//The results are written back to DRAM, overwriting the original memory operands
			if(atomicCMD->packetCMD != EQ16 && atomicCMD->packetCMD != EQ8) {
				DRAMCommand *atmRstCMD = new DRAMCommand(*atomicCMD);
				atmRstCMD->commandType = (OPEN_PAGE ? WRITE : WRITE_P);
				atmRstCMD->dataSize = 16;
				atmRstCMD->lastCMD = true;
				if(!atmRstCMD->posted) {
					atmRstCMD->trace = NULL;
				}
				if(QUE_PER_BANK) {
					commandQueue->queue[atomicCMD->bank].insert(commandQueue->queue[atomicCMD->bank].begin(), atmRstCMD);
					classID.str( string() );	classID.clear();
					classID << atomicCMD->bank;
					DE_CR(ALI(18)<<(commandQueue->header+"-"+classID.str()+")")<<ALI(15)<<*atmRstCMD<<"Down) PUSHING atomic result command into command queue");
				}
				else {
					commandQueue->queue[0].insert(commandQueue->queue[0].begin(), atmRstCMD);
					DE_CR(ALI(18)<<(commandQueue->header+")")<<ALI(15)<<*atmRstCMD<<"Down) PUSHING atomic result command into command queue");
				}
			}
			
			if(!atomicCMD->posted) {
				MakeRespondPacket(atomicCMD);
			}
			delete atomicCMD;
			atomicCMD = NULL;
		}
		else {
			DEBUG(ALI(18)<<(commandQueue->header+")")<<ALI(15)<<*atomicCMD<<"Down) Atomic command is now operating ["<<atomicOperLeft<<" clk]");
			atomicOperLeft--;
		}
	}

	//Power-down mode setting
	EnablePowerdown();

	commandQueue->Update();
	Step();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
callq 0x2e724
cmpl $0x0, 0x200(%rbx)
jne 0x2dac6
movq 0x1d0(%rbx), %rax
movq 0x1d8(%rbx), %rdx
cmpq %rax, %rdx
je 0x2dac6
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %rbx, 0x50(%rsp)
movq (%rax,%r12), %rsi
testq %rsi, %rsi
je 0x2daa1
movq %rbx, %rdi
callq 0x2ed0a
testb %al, %al
je 0x2da71
movq 0x1d0(%rbx), %rax
movq (%rax,%r12), %rdi
movslq 0x430(%rdi), %rbp
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x1d8(%rbx), %rdx
testq %rbp, %rbp
je 0x2daa1
movq 0x1d0(%rbx), %rbx
leaq (%rbx,%r12), %r14
leaq (%r12,%rbp,8), %rax
addq %rbx, %rax
cmpq %rdx, %rax
je 0x2da7a
leaq (%r14,%rbp,8), %rsi
subq %rbx, %rdx
leaq (,%rbp,8), %rax
subq %rax, %rdx
addq %r15, %rdx
movq %r14, %rdi
callq 0x4480
movq 0x50(%rsp), %rax
movq 0x1d8(%rax), %rdx
movq %rdx, %rax
jmp 0x2da7d
movq 0x1d8(%rbx), %rdx
jmp 0x2daa1
movq %rax, %rdx
subq %rbx, %rax
shlq $0x3, %rbp
subq %rbp, %rax
addq %r15, %rax
addq %rax, %r14
cmpq %r14, %rdx
movq 0x50(%rsp), %rbx
je 0x2daa1
movq %r14, 0x1d8(%rbx)
movq %r14, %rdx
incq %r13
movq 0x1d0(%rbx), %rax
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
addq $0x8, %r12
addq $-0x8, %r15
cmpq %r13, %rcx
ja 0x2d9ef
movq 0x1e8(%rbx), %rax
cmpq %rax, 0x1f0(%rbx)
je 0x2dc5b
movq (%rax), %rsi
testq %rsi, %rsi
je 0x2e514
movq 0x250(%rbx), %rdi
callq 0x2f8e8
testb %al, %al
je 0x2dc5b
leaq 0xd987(%rip), %rax      # 0x3b488
cmpb $0x1, (%rax)
jne 0x2dc07
leaq 0xd978(%rip), %rax      # 0x3b489
cmpb $0x0, (%rax)
jne 0x2dc07
movq 0xd4af(%rip), %rax      # 0x3afd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x2db58
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0xd461(%rip), %rdi      # 0x3afd0
callq 0x4340
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x2dbaf
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x1e8(%rbx), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x28270
movq %rax, %r14
leaq 0x6257(%rip), %rsi      # 0x33e2a
movl $0x2c, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x1e8(%rbx), %r14
movq (%r14), %rax
movl 0x430(%rax), %eax
testq %rax, %rax
je 0x2dc5b
leaq (%r14,%rax,8), %r15
movq 0x1f0(%rbx), %rdx
subq %r15, %rdx
je 0x2dc43
movq %r14, %rdi
movq %r15, %rsi
callq 0x4480
movq 0x1f0(%rbx), %rax
movq %rax, %rcx
jmp 0x2dc49
movq %r15, %rax
movq %r15, %rcx
subq %r15, %rax
addq %rax, %r14
cmpq %r14, %rcx
je 0x2dc5b
movq %r14, 0x1f0(%rbx)
movq 0x218(%rbx), %rdi
leaq 0x220(%rbx), %r15
movq %r15, %rsi
callq 0x150da
testb %al, %al
je 0x2ddd0
movq (%r15), %r14
movl 0x10(%r14), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x2dd29
movl $0x38, %edi
callq 0x42f0
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x1c2dc
movq %r12, 0x8(%rsp)
movl $0x6, 0x10(%r12)
movq 0x280(%rbx), %rsi
cmpq 0x288(%rbx), %rsi
je 0x2dccf
movq %r12, (%rsi)
addq $0x8, 0x280(%rbx)
jmp 0x2dce0
leaq 0x278(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17874
leaq 0xd8c9(%rip), %rcx      # 0x3b5b0
leaq 0xd8ba(%rip), %rax      # 0x3b5a8
movl (%rax), %eax
addl (%rcx), %eax
movl %eax, 0x30(%rsp)
movq 0x298(%rbx), %rsi
cmpq 0x2a0(%rbx), %rsi
je 0x2dd15
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x298(%rbx)
jmp 0x2dd26
leaq 0x290(%rbx), %rdi
leaq 0x30(%rsp), %rdx
callq 0x13c06
movq (%r15), %r14
cmpb $0x1, 0x29(%r14)
jne 0x2dda1
cmpb $0x0, 0x28(%r14)
jne 0x2dda1
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2dd54
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x2dda1
cmpb $0x0, 0x30(%r14)
je 0x2dd9b
jmp 0x2dda1
cmpb $0x0, 0x30(%r14)
je 0x2dd78
movl 0x2c(%r14), %eax
leal -0x50(%rax), %ecx
cmpl $0x19, %ecx
jbe 0x2dd91
addl $-0x11, %eax
cmpl $0x3, %eax
jb 0x2dd9b
addl $0x2, 0x234(%rbx)
jmp 0x2dda1
movl 0x24(%r14), %eax
shrl $0x4, %eax
movl 0x234(%rbx), %ecx
addl %ecx, %eax
incl %eax
movl %eax, 0x234(%rbx)
jmp 0x2dda1
movl $0x3000001, %edx        # imm = 0x3000001
btl %ecx, %edx
jae 0x2dd67
incl 0x234(%rbx)
cmpq $0x0, 0x258(%rbx)
jne 0x2e579
movq %r14, 0x258(%rbx)
leaq 0xd82f(%rip), %rax      # 0x3b5ec
movl (%rax), %eax
movl %eax, 0x260(%rbx)
movq $0x0, 0x220(%rbx)
movq 0x228(%rbx), %r14
testq %r14, %r14
je 0x2e4d3
movl 0x230(%rbx), %eax
testl %eax, %eax
je 0x2df83
leaq 0xd693(%rip), %rcx      # 0x3b488
cmpb $0x1, (%rcx)
jne 0x2df76
leaq 0xd684(%rip), %rcx      # 0x3b489
cmpb $0x0, (%rcx)
jne 0x2df76
movq 0xd1bb(%rip), %rax      # 0x3afd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x2de4c
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x218(%rbx), %rax
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x13ebc
leaq 0x565d(%rip), %rsi      # 0x334e1
movq %r14, %rdi
callq 0x4580
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0xd133(%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, %r15
addq %rax, %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x2dedf
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x228(%rbx), %rsi
movq %r14, %rdi
callq 0x1c32a
movq %rax, %r14
leaq 0x5fc8(%rip), %rsi      # 0x33ec8
movl $0x27, %edx
movq %rax, %rdi
callq 0x4340
movl 0x230(%rbx), %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
leaq 0x4111(%rip), %rsi      # 0x32036
movl $0x5, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2df70
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
movl 0x230(%rbx), %eax
decl %eax
movl %eax, 0x230(%rbx)
jmp 0x2e4d3
movl 0x2c(%r14), %eax
andl $-0x2, %eax
cmpl $0x68, %eax
je 0x2e4a1
movl $0x38, %edi
callq 0x42f0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x1c2dc
movq %r15, 0x28(%rsp)
leaq 0xd5da(%rip), %rax      # 0x3b591
movzbl (%rax), %eax
movl $0x4, %ecx
subl %eax, %ecx
movl %ecx, 0x10(%r15)
movl $0x10, 0x24(%r15)
movb $0x1, 0x29(%r15)
cmpb $0x0, 0x28(%r15)
jne 0x2dfe1
movq $0x0, 0x8(%r15)
leaq 0xd5a8(%rip), %rcx      # 0x3b590
movq 0x218(%rbx), %rax
cmpb $0x1, (%rcx)
jne 0x2e181
movq 0x228(%rbx), %rcx
movl 0x18(%rcx), %ecx
movq 0x238(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq (%rdi), %rsi
leaq 0x28(%rsp), %rdx
callq 0x2f9c0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x58(%rbx), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4400
leaq 0x40(%rbx), %r15
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2e060
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x40(%rbx), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x44e0
leaq 0x50(%rbx), %rdi
movq 0x228(%rbx), %rax
movl 0x18(%rax), %esi
callq 0x41e0
leaq 0xd3fc(%rip), %rax      # 0x3b488
cmpb $0x1, (%rax)
jne 0x2e49a
movq 0xcf34(%rip), %rax      # 0x3afd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r15
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x2e0d3
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x218(%rbx), %rax
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x13ebc
leaq 0x288c(%rip), %rsi      # 0x30997
movq %r15, %rdi
callq 0x4580
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x4450
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0x80(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x2e145
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x2e172
leaq 0x88(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x2e169
movq 0x88(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x2e2e1
leaq 0x58(%rsp), %rdi
callq 0x4110
jmp 0x2e2ef
movq 0x238(%rax), %rdi
movq (%rdi), %rsi
leaq 0x28(%rsp), %rdx
callq 0x2f9c0
leaq 0xd2ec(%rip), %rax      # 0x3b488
cmpb $0x1, (%rax)
jne 0x2e49a
movq 0xce24(%rip), %rax      # 0x3afd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x2e1e3
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x218(%rbx), %rax
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x13ebc
leaq 0x52c6(%rip), %rsi      # 0x334e1
movq %r14, %rdi
callq 0x4580
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0xcd9c(%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, %r15
addq %rax, %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x2e276
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x1c32a
movq %rax, %r14
leaq 0x5bfc(%rip), %rsi      # 0x33e91
movl $0x36, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e49a
movq 0x18(%rsp), %rsi
jmp 0x2e492
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4320
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x2e313
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x2e319
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x51a4(%rip), %rsi      # 0x334e1
leaq 0x30(%rsp), %rdi
callq 0x4580
movq %r13, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2e36a
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2e372
movups (%rcx), %xmm0
movups %xmm0, (%r13)
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 0xcc35(%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, %r15
addq %rax, %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x2e3dd
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x1c32a
movq %rax, %r14
leaq 0x5a95(%rip), %rsi      # 0x33e91
movl $0x36, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2e447
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e462
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e483
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e49a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x228(%rbx), %r14
cmpb $0x0, 0x28(%r14)
jne 0x2e4bf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d684
movq 0x228(%rbx), %r14
testq %r14, %r14
je 0x2e4c8
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq $0x0, 0x228(%rbx)
movq %rbx, %rdi
callq 0x2f3a4
movq 0x218(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq 0x8(%rbx)
movl 0x200(%rbx), %eax
leal -0x1(%rax), %ecx
xorl %edx, %edx
testl %eax, %eax
cmovgl %ecx, %edx
movl %edx, 0x200(%rbx)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xcad5(%rip), %rdi      # 0x3aff0
leaq 0x1b00(%rip), %rsi      # 0x30022
callq 0x42e0
leaq 0x56e2(%rip), %rsi      # 0x33c10
movq %rax, %rdi
callq 0x42e0
leaq 0x235a(%rip), %rsi      # 0x30897
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movl $0xbd, %esi
callq 0x4500
leaq 0x1ae8(%rip), %rsi      # 0x30041
movq %rax, %rdi
callq 0x42e0
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x4290
leaq 0x5831(%rip), %rsi      # 0x33da5
jmp 0x2e615
movq 0xca70(%rip), %rdi      # 0x3aff0
leaq 0x1a9b(%rip), %rsi      # 0x30022
callq 0x42e0
leaq 0x567d(%rip), %rsi      # 0x33c10
movq %rax, %rdi
callq 0x42e0
leaq 0x22f5(%rip), %rsi      # 0x30897
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movl $0xf1, %esi
callq 0x4500
leaq 0x1a83(%rip), %rsi      # 0x30041
movq %rax, %rdi
callq 0x42e0
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x4290
leaq 0x587e(%rip), %rsi      # 0x33e57
movq %rax, %rdi
callq 0x42e0
movq 0x258(%rbx), %rsi
movq %rax, %rdi
callq 0x1c32a
leaq 0x588d(%rip), %rsi      # 0x33e84
movq %rax, %rdi
callq 0x42e0
movq 0x220(%rbx), %rsi
movq %rax, %rdi
callq 0x1c32a
leaq 0x56f5(%rip), %rsi      # 0x33d0a
movq %rax, %rdi
callq 0x42e0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x4eb1(%rip), %rsi      # 0x334e1
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4170
xorl %edi, %edi
callq 0x4360
movq %rax, %rbx
jmp 0x2e6a5
movq %rax, %rbx
jmp 0x2e6c0
jmp 0x2e653
movq %rax, %rbx
jmp 0x2e6e1
jmp 0x2e701
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x2e70e
jmp 0x2e71b
jmp 0x2e701
movq %rax, %rbx
movl $0x38, %esi
movq %r15, %rdi
jmp 0x2e716
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2e6a5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e6c0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e6e1
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e71b
movq 0x68(%rsp), %rsi
jmp 0x2e713
jmp 0x2e701
movq %rax, %rbx
movl $0x38, %esi
movq %r12, %rdi
jmp 0x2e716
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e71b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x4540
nop