// File: /workspace/github_cpp_makefile_star2_O1/muzuka[P]Cards-Against-Humanity-Online/Server.cpp
// Function: main
int main(int argc, char *argv[]) {
	
	blackDeck.clear();
	whiteDeck.clear();
	discard.clear();
	players.clear();
	
	if (argc != 4) {
		printf("Usage: %s <Listening Port> <Black Deck File> <White Deck File>\n", argv[0]);
		exit(1);
	}
	
	initServer(serverSock, atoi(argv[1]));
	
	string line;
	ifstream blackCardReader, whiteCardReader;
	blackCardReader.open(argv[2]);
	whiteCardReader.open(argv[3]);
	
	
	if (!blackCardReader.is_open() || !whiteCardReader.is_open()) {
		printf("File open failed\n");
		blackCardReader.close();
		whiteCardReader.close();
		exit(1);
	}
	
	while(getline(blackCardReader, line)) {
		char* lineDiv[2];
		if (line[0] == 'q') {
			splitString(lineDiv, (char*)line.c_str(), "\"");
			string temp(lineDiv[1]);
			Card nBlack(temp, 'b', 1);
			blackDeck.push_back(nBlack);
		}
		else if (line[0] == 's') {
			splitString(lineDiv, (char*)line.c_str(), "\"");
			string temp(lineDiv[1]);
			int answers = countChars(lineDiv[1], '_');
			Card nBlack(temp, 'b', answers);
			blackDeck.push_back(nBlack);
		}
	}
	
	while (getline(whiteCardReader, line)) {
		Card nWhite(line, 'w', 0);
		whiteDeck.push_back(nWhite);
	}
	
	blackDeck = shuffle(blackDeck, atoi(argv[1]));
	whiteDeck = shuffle(whiteDeck, atoi(argv[1]));
	FD_ZERO(&recvSockSet);
	
	FD_SET(serverSock, &recvSockSet);
	maxDesc = max(maxDesc, serverSock);
	
	while (!terminated) {
		
		memcpy(&tempRecvSockSet, &recvSockSet, sizeof(recvSockSet));
		
		selectTime = timeout;
		int ready = select(maxDesc + 1, &tempRecvSockSet, NULL, NULL, &selectTime);
		if (ready < 0) {
			printf("select() failed\n");
			break;
		}
		
		if (FD_ISSET(serverSock, &tempRecvSockSet)) {
			unsigned int size = sizeof(clientAddr);
			
			if ((clientSock = accept(serverSock, (struct sockaddr *) &clientAddr, &size)) < 0) {
				break;
			}
			printf("A new player has connected.\n");
			
			bool nameOK = false;
			bool foundName = false;
			
			while (!nameOK) {
				
				memset(&inBuffer, 0, sizeof(inBuffer));
				bytesRecv = 0;
				while (bytesRecv <= 0) {
					bytesRecv = recv(clientSock, (char*)&inBuffer, 20, 0);
				}
				printf("%s\n", inBuffer);
				
				if (players.size() < 1) {
					printf("Players is Empty.\n");
					outBuffer[0] = 'y';
					printf("Name hasn't been taken.\n");
					bytesSent = send(clientSock, (char*)&outBuffer, 1, 0);
					if (bytesSent <= 0) {
						printf("Couldn't send confirmation.\n");
						exit(1);
					}
					nameOK = !nameOK;
				}
				else {
					printf("Players isn't empty.\n");
					foundName = false;
					for (int i = 0; i < players.size(); i++) {
						if (players[i].getName().compare(inBuffer) == 0) {
							outBuffer[0] = 'n';
							bytesSent = 0;
							printf("Name is already taken.\n");
							bytesSent = send(clientSock, (char*)&outBuffer, 1, 0);
							if (bytesSent <= 0) {
								printf("Couldn't send denial.\n");
								exit(1);
							}
							foundName = true;
							break;
						}
					}
					if (!foundName) {
						outBuffer[0] = 'y';
						printf("Name hasn't been taken.\n");
						bytesSent = send(clientSock, (char*)&outBuffer, 1, 0);
						if (bytesSent <= 0) {
							printf("Couldn't send confirmation.\n");
							exit(1);
						}
						nameOK = !nameOK;
					}
				}
			}
			printf("Name checks out.\n");
			string n(inBuffer);
			Player newPlayer(n, clientSock);
			players.push_back(newPlayer);
			
			printf("About to send Cards.\n");
			for (int i = 0; i < 10; i++) {
				
				bytesSent = 0;
				if (whiteDeck.size() == 0) {
					refill();
				}
				string out = composeSENDMessage('d', whiteDeck[whiteDeck.size()-1]);
				players[players.size()-1].addCard(whiteDeck[whiteDeck.size()-1]);
				whiteDeck.pop_back();
				bytesSent = send(clientSock, (char*)out.c_str(), 100, 0);
				if (bytesSent <= 0) {
					printf("No Card was sent.\n");
					exit(1);
				}
			}
			
			FD_SET(clientSock, &recvSockSet);
			maxDesc = max(maxDesc, clientSock);
		}
		else {
			if(players.size() > 3) {
				string message;
				switch (step % 3) {
						// Choose judge and NOTIFY the others
					case 0:
						printf("Choosing a judge.\n");
						players = shuffle(players, atoi(argv[1])-step);
						judge = players[0];
						
						message = composeNOTIFYMessage('j', judge.getName());
						for (int i = 0; i < players.size(); i++) {
							bytesSent = send(players[i].getSocket(), (char*)message.c_str(), 100, 0);
							if (bytesSent <= 0) {
								printf("Judge message couldn't be sent.\n");
								exit(1);
							}
						}
						
						step++;
						break;
						// choose black card and POST it
					case 1:
						if (blackDeck.size() == 0) {
							shutdown();
						}
						printf("Choosing a black card.\n");
						blackCard = blackDeck[blackDeck.size() - 1];
						blackDeck.pop_back();
						
						message = composeSENDMessage('p', blackCard);
						for (int i = 0; i < players.size(); i++) {
							bytesSent = send(players[i].getSocket(), (char*)message.c_str(), 300, 0);
							if(bytesSent <= 0) {
								printf("Couldn't post black card.\n");
								exit(1);
							}
						}
						step++;
						break;
						// Handles answers and requests
					case 2:
						answers.clear();
						// Receive answers from others
						for (int i = 1; i < players.size(); i++) {
							for (int j = 0; j < blackCard.numOfAnswers; j++) {
								memset(&inBuffer, 0, sizeof(inBuffer));
								bytesRecv = 0;
								while(bytesRecv <= 0) {
									bytesRecv = recv(players[i].getSocket(), (char*)&inBuffer, 100, 0);
								}
								printf("player %d sent:\n%s.\n", i, (char*)string(inBuffer).c_str());
								parseAnswer(string(inBuffer), answers);
							}
						}
						printf("Received all answers.\n");
						// send expected # of answers to judge
						message = composeNOTIFYMessage('n', string("Server"));
						printf("About to send:\n%s\n", message.c_str());
						bytesSent = send(judge.getSocket(), (char*)message.c_str(), 100, 0);
						if(bytesSent <= 0) {
							printf("Failed to send NOTIFY to judge.\n");
							exit(1);
						}
						printf("Sent answers size.\n");
						// Send answers to judge
						for (int i = 0; i < answers.size(); i++) {
							message = composeSENDMessage('n', answers[i]);
							printf("About to send ANSWER to judge:\n%s\n", message.c_str());
							bytesSent = send(judge.getSocket(), (char*)message.c_str(), 100, 0);
							if(bytesSent <= 0) {
								printf("Failed to send ANSWER to judge.\n");
								i--;
							}
						}
						printf("Sent Answers to judge.\n");
						// Receive requests
						for (int i = 1; i < players.size(); i++) {
							for (int j = 0; j < blackCard.numOfAnswers; j++) {
								memset(&inBuffer, 0, sizeof(inBuffer));
								bytesRecv = 0;
								while (bytesRecv <= 0) {
									bytesRecv = recv(players[i].getSocket(), (char*)&inBuffer, 100, 0);
								}
								parseMessage(string(inBuffer));
							}
						}
						printf("Received all of the requests from clients.\n");

						// receives winner
						bytesRecv = 0;
						memset(&inBuffer, 0, sizeof(inBuffer));
						while (bytesRecv <= 0) {
							bytesRecv = recv(judge.getSocket(), (char*)&inBuffer, 100, 0);
						}
						parseMessage(string(inBuffer));

						// Tell everybody else
						for (int i = 1; i < players.size(); i++) {
							string winningMesssage = composeNOTIFYMessage('w', winner.getName());
							bytesSent = send(players[i].getSocket(), (char*)winningMesssage.c_str(), 100, 0);
							if(bytesSent <= 0) {
								printf("Failed to winner message.\n");
								exit(1);
							}
						}
						step++;
						break;
					default:
						break;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7b8, %rsp            # imm = 0x7B8
movq %rsi, %r15
movl %edi, %ebx
movq 0x7fe0(%rip), %rsi      # 0xb608
leaq 0x7fd9(%rip), %rdi      # 0xb608
callq 0x6c92
movq 0x7fe5(%rip), %rsi      # 0xb620
leaq 0x7fde(%rip), %rdi      # 0xb620
callq 0x6c92
movq 0x7fa2(%rip), %rsi      # 0xb5f0
leaq 0x7f9b(%rip), %rdi      # 0xb5f0
callq 0x6c92
movq 0x7fd7(%rip), %rsi      # 0xb638
leaq 0x7fd0(%rip), %rdi      # 0xb638
callq 0x6cc2
cmpl $0x4, %ebx
jne 0x4dcd
movq 0x8(%r15), %rdi
callq 0x22d0
leaq 0x7db2(%rip), %rdi      # 0xb438
movl %eax, %esi
callq 0x521b
leaq -0xf0(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x7d8(%rbp), %rdi
callq 0x2260
leaq -0x5d0(%rbp), %rdi
callq 0x2260
movq 0x10(%r15), %rsi
leaq -0x7d8(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x2180
movq 0x18(%r15), %rsi
leaq -0x5d0(%rbp), %rdi
movl $0x8, %edx
callq 0x2180
movq %r15, -0xe0(%rbp)
leaq -0x760(%rbp), %rdi
callq 0x2080
testb %al, %al
je 0x4da7
leaq -0x558(%rbp), %rdi
callq 0x2080
testb %al, %al
je 0x4da7
leaq -0xb0(%rbp), %r13
leaq -0x180(%rbp), %rbx
movq -0x7d8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %edx
movq %r14, %rdi
leaq -0x100(%rbp), %rsi
callq 0x2350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x396f
movq -0x100(%rbp), %rsi
movzbl (%rsi), %eax
cmpl $0x73, %eax
je 0x3812
cmpl $0x71, %eax
jne 0x3725
leaq -0xd0(%rbp), %rdi
leaq 0x4919(%rip), %rdx      # 0x80a0
callq 0x52e5
movq -0xc8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq %r13, %rdx
callq 0x68de
leaq -0x190(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1a0(%rbp), %r15
movq %r15, %rdi
callq 0x315c
movq %r13, %rdi
movq %r15, %rsi
movl $0x62, %edx
movl $0x1, %ecx
callq 0x27c0
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x37fe
movq -0x190(%rbp), %rsi
incq %rsi
callq 0x2230
leaq 0x7e03(%rip), %rdi      # 0xb608
movq %r13, %rsi
callq 0x2fd4
jmp 0x390f
movq %rbx, %r15
leaq -0xd0(%rbp), %rdi
leaq 0x487d(%rip), %rdx      # 0x80a0
callq 0x52e5
movq -0xc8(%rbp), %r12
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x68de
leaq -0x380(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x68de
movq -0x378(%rbp), %rax
testq %rax, %rax
je 0x387f
xorl %ecx, %ecx
movq -0x380(%rbp), %rdx
xorl %r12d, %r12d
xorl %esi, %esi
cmpb $0x5f, (%rdx,%rcx)
sete %sil
addl %esi, %r12d
incq %rcx
cmpq %rcx, %rax
jne 0x3868
jmp 0x3882
xorl %r12d, %r12d
movq -0x380(%rbp), %rdi
leaq -0x370(%rbp), %rax
cmpq %rax, %rdi
je 0x38a4
movq -0x370(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x170(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rbx
movq %r15, %rdi
callq 0x315c
movq %r13, %rdi
movq %rbx, %rsi
movl $0x62, %edx
movl %r12d, %ecx
callq 0x27c0
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x38fd
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x2230
leaq 0x7d04(%rip), %rdi      # 0xb608
movq %r13, %rsi
callq 0x2fd4
movq %r15, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x392b
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x394d
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3725
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x3725
leaq -0x330(%rbp), %rbx
leaq -0x340(%rbp), %r15
leaq -0xb0(%rbp), %r12
leaq 0x7c95(%rip), %r13      # 0xb620
movq -0x5d0(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x5d0(%rbp), %r14
addq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %edx
movq %r14, %rdi
leaq -0x100(%rbp), %rsi
callq 0x2350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3a6d
movq %rbx, -0x340(%rbp)
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x315c
movq %r12, %rdi
movq %r15, %rsi
movl $0x77, %edx
xorl %ecx, %ecx
callq 0x27c0
movq -0x340(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3a1b
movq -0x330(%rbp), %rsi
incq %rsi
callq 0x2230
movq %r13, %rdi
movq %r12, %rsi
callq 0x2fd4
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x3a42
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x398b
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x398b
leaq 0x7b94(%rip), %rsi      # 0xb608
leaq -0x3b0(%rbp), %rdi
callq 0x300c
movq -0xe0(%rbp), %rbx
movq 0x8(%rbx), %rdi
callq 0x22d0
leaq -0x50(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
movl %eax, %edx
callq 0x5349
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %rdi
movaps %xmm0, (%rdi)
movups 0x7b52(%rip), %xmm0     # 0xb608
movq 0x7b5b(%rip), %rax      # 0xb618
leaq -0x50(%rbp), %r14
movups (%r14), %xmm1
movups %xmm1, 0x7b3c(%rip)     # 0xb608
movq 0x10(%r14), %rcx
movq %rcx, 0x7b41(%rip)      # 0xb618
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups %xmm1, (%r14)
movq $0x0, 0x10(%r14)
callq 0x2f96
movq %r14, %rdi
callq 0x2f96
leaq -0x3b0(%rbp), %rdi
callq 0x2f96
leaq 0x7b13(%rip), %rsi      # 0xb620
leaq -0x398(%rbp), %rdi
callq 0x300c
movq 0x8(%rbx), %rdi
callq 0x22d0
leaq -0x50(%rbp), %rdi
leaq -0x398(%rbp), %rsi
movl %eax, %edx
callq 0x5349
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %rdi
movaps %xmm0, (%rdi)
movups 0x7ad8(%rip), %xmm0     # 0xb620
movq 0x7ae1(%rip), %rax      # 0xb630
leaq -0x50(%rbp), %r12
movups (%r12), %xmm1
movups %xmm1, 0x7ac1(%rip)     # 0xb620
movq 0x10(%r12), %rcx
movq %rcx, 0x7ac5(%rip)      # 0xb630
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups %xmm1, (%r12)
movq $0x0, 0x10(%r12)
callq 0x2f96
movq %r12, %rdi
callq 0x2f96
leaq -0x398(%rbp), %rdi
callq 0x2f96
xorps %xmm0, %xmm0
movups %xmm0, 0x7662(%rip)     # 0xb208
movups %xmm0, 0x766b(%rip)     # 0xb218
movups %xmm0, 0x7674(%rip)     # 0xb228
movups %xmm0, 0x767d(%rip)     # 0xb238
movups %xmm0, 0x7686(%rip)     # 0xb248
movups %xmm0, 0x768f(%rip)     # 0xb258
movups %xmm0, 0x7698(%rip)     # 0xb268
movups %xmm0, 0x76a1(%rip)     # 0xb278
leaq 0x762a(%rip), %rdi      # 0xb208
movl 0x7854(%rip), %eax      # 0xb438
leal 0x3f(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movl %edx, %esi
andl $-0x40, %esi
movl %eax, %ecx
subl %esi, %ecx
movl $0x1, %esi
shlq %cl, %rsi
sarl $0x6, %edx
movslq %edx, %rcx
orq %rsi, (%rdi,%rcx,8)
movl 0x75f3(%rip), %ecx      # 0xb200
cmpl %eax, %ecx
cmovll %eax, %ecx
movl %ecx, 0x75e8(%rip)      # 0xb200
leaq 0x7681(%rip), %r13      # 0xb2a0
cmpb $0x0, 0x7662(%rip)      # 0xb288
jne 0x4d16
movl $0x10, %ecx
leaq 0x7828(%rip), %rax      # 0xb460
movq %rax, %rdi
leaq 0x75c6(%rip), %rsi      # 0xb208
rep  movsq (%rsi), %es:(%rdi)
movups 0x758c(%rip), %xmm0     # 0xb1d8
movups %xmm0, 0x77fd(%rip)     # 0xb450
movl 0x75a7(%rip), %edi      # 0xb200
incl %edi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x77e7(%rip), %r8       # 0xb450
callq 0x2200
testl %eax, %eax
js 0x3e9f
movl 0x77bc(%rip), %edi      # 0xb438
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
sarl $0x6, %eax
cltq
leaq 0x77d0(%rip), %rcx      # 0xb460
movq (%rcx,%rax,8), %rax
btq %rdi, %rax
jae 0x4213
movl $0x10, -0xd8(%rbp)
leaq 0x7791(%rip), %rsi      # 0xb440
leaq -0xd8(%rbp), %rdx
callq 0x20e0
movl %eax, 0x777b(%rip)      # 0xb43c
testl %eax, %eax
js 0x447c
movl %eax, -0xd4(%rbp)
leaq 0x45f2(%rip), %rdi      # 0x82c8
callq 0x22b0
xorl %ebx, %ebx
movl $0xc8, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x2170
movl $0x0, 0x7596(%rip)      # 0xb28c
movl 0x7740(%rip), %edi      # 0xb43c
movl $0x14, %edx
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x20f0
movl %eax, 0x757b(%rip)      # 0xb28c
testl %eax, %eax
jle 0x3cf6
movq %r13, %rdi
callq 0x22b0
movq 0x791c(%rip), %rax      # 0xb640
cmpq 0x790d(%rip), %rax      # 0xb638
je 0x3e03
leaq 0x45e4(%rip), %rdi      # 0x831c
callq 0x22b0
movq 0x78f4(%rip), %rsi      # 0xb638
cmpq %rsi, 0x78f5(%rip)      # 0xb640
je 0x3dd1
xorl %r12d, %r12d
xorl %r14d, %r14d
addq %r12, %rsi
leaq -0xb0(%rbp), %r15
movq %r15, %rdi
callq 0x2a8e
movq %r15, %rdi
movq %r13, %rsi
callq 0x20c0
movl %eax, %r15d
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x3d99
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2230
testl %r15d, %r15d
je 0x3e56
incq %r14
movq 0x7894(%rip), %rax      # 0xb640
movq 0x7885(%rip), %rsi      # 0xb638
subq %rsi, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
addq $0x58, %r12
cmpq %r14, %rax
ja 0x3d57
movb $0x79, 0x7598(%rip)     # 0xb370
leaq 0x4591(%rip), %rdi      # 0x8370
callq 0x22b0
movl 0x7652(%rip), %edi      # 0xb43c
movl $0x1, %edx
leaq 0x757a(%rip), %rsi      # 0xb370
xorl %ecx, %ecx
callq 0x2140
leaq -0x50(%rbp), %r12
jmp 0x3e3b
leaq 0x4554(%rip), %rdi      # 0x835e
callq 0x22b0
movb $0x79, 0x755a(%rip)     # 0xb370
leaq 0x4553(%rip), %rdi      # 0x8370
callq 0x22b0
movl 0x7614(%rip), %edi      # 0xb43c
movl $0x1, %edx
leaq 0x753c(%rip), %rsi      # 0xb370
xorl %ecx, %ecx
callq 0x2140
movl %eax, 0x744f(%rip)      # 0xb290
movb $0x1, %bl
testl %eax, %eax
jle 0x4d6d
testb $0x1, %bl
je 0x3cdd
jmp 0x3eb5
movb $0x6e, 0x7513(%rip)     # 0xb370
movl $0x0, 0x7429(%rip)      # 0xb290
leaq 0x44c3(%rip), %rdi      # 0x8331
callq 0x22b0
movl 0x75c3(%rip), %edi      # 0xb43c
movl $0x1, %edx
leaq 0x74eb(%rip), %rsi      # 0xb370
xorl %ecx, %ecx
callq 0x2140
movl %eax, 0x73fe(%rip)      # 0xb290
testl %eax, %eax
leaq -0x50(%rbp), %r12
jg 0x3e4b
jmp 0x4d83
leaq 0x44fe(%rip), %rdi      # 0x83a4
callq 0x22b0
movl $0xc, %ecx
jmp 0x4d0e
leaq 0x4428(%rip), %rdi      # 0x82e4
callq 0x22b0
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r13, %rdi
callq 0x2130
leaq (%rax,%r13), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x6cf2
leaq -0x310(%rbp), %rbx
movq %rbx, -0x320(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x320(%rbp), %r14
movq %r14, %rdi
callq 0x315c
movl 0x752e(%rip), %edx      # 0xb43c
leaq -0xb0(%rbp), %rdi
movq %r14, %rsi
callq 0x2a0e
movq -0x320(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3f38
movq -0x310(%rbp), %rsi
incq %rsi
callq 0x2230
leaq 0x76f9(%rip), %rdi      # 0xb638
leaq -0xb0(%rbp), %rsi
callq 0x691c
leaq 0x43a3(%rip), %rdi      # 0x82f5
callq 0x22b0
movl $0xa, %ebx
movl $0x0, 0x732a(%rip)      # 0xb290
movq 0x76bb(%rip), %rax      # 0xb628
cmpq 0x76ac(%rip), %rax      # 0xb620
jne 0x3f7b
callq 0x54b8
movq 0x76a6(%rip), %r14      # 0xb628
movq 0x7697(%rip), %r15      # 0xb620
leaq -0x2b0(%rbp), %r12
movq %r12, -0x2c0(%rbp)
movq -0x48(%r14), %rsi
movq -0x40(%r14), %rdx
addq %rsi, %rdx
leaq -0x2c0(%rbp), %rdi
callq 0x315c
subq %r15, %r14
movq -0x28(%r15,%r14), %rax
movq %rax, -0x2a0(%rbp)
leaq -0x288(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x20(%r15,%r14), %rsi
movq -0x18(%r15,%r14), %rdx
addq %rsi, %rdx
leaq -0x298(%rbp), %rdi
callq 0x315c
leaq -0xd0(%rbp), %rdi
leaq 0x4134(%rip), %rsi      # 0x8126
leaq -0x2c0(%rbp), %rdx
callq 0x69f6
movq -0x298(%rbp), %rdi
leaq -0x288(%rbp), %rax
cmpq %rax, %rdi
je 0x4020
movq -0x288(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x2c0(%rbp), %rdi
cmpq %r12, %rdi
je 0x403b
movq -0x2b0(%rbp), %rsi
incq %rsi
callq 0x2230
movq 0x75fe(%rip), %r15      # 0xb640
movq 0x75df(%rip), %r14      # 0xb628
movq 0x75d0(%rip), %r12      # 0xb620
leaq -0x220(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x48(%r14), %rsi
movq -0x40(%r14), %rdx
addq %rsi, %rdx
leaq -0x230(%rbp), %rdi
callq 0x315c
subq %r12, %r14
movq -0x28(%r12,%r14), %rax
movq %rax, -0x210(%rbp)
leaq -0x1f8(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x20(%r12,%r14), %rsi
movq -0x18(%r12,%r14), %rdx
addq %rsi, %rdx
leaq -0x208(%rbp), %rdi
callq 0x315c
addq $-0x58, %r15
movq %r15, %rdi
leaq -0x230(%rbp), %rsi
callq 0x2afa
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x40e0
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x230(%rbp), %rdi
leaq -0x220(%rbp), %rax
cmpq %rax, %rdi
je 0x4102
movq -0x220(%rbp), %rsi
incq %rsi
callq 0x2230
movq 0x751f(%rip), %rsi      # 0xb628
addq $-0x48, %rsi
movq %rsi, 0x7514(%rip)      # 0xb628
leaq 0x7505(%rip), %rdi      # 0xb620
callq 0x34f0
movl 0x7316(%rip), %edi      # 0xb43c
movq -0xd0(%rbp), %rsi
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x2140
movl %eax, 0x7151(%rip)      # 0xb290
testl %eax, %eax
jle 0x4d64
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
leaq -0x50(%rbp), %r12
je 0x416d
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2230
decl %ebx
jne 0x3f5c
movl 0x72c1(%rip), %eax      # 0xb43c
leal 0x3f(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movl %edx, %esi
andl $-0x40, %esi
movl %eax, %ecx
subl %esi, %ecx
movl $0x1, %esi
shlq %cl, %rsi
sarl $0x6, %edx
movslq %edx, %rcx
leaq 0x7067(%rip), %rdx      # 0xb208
orq %rsi, (%rdx,%rcx,8)
movl 0x7055(%rip), %ecx      # 0xb200
cmpl %eax, %ecx
cmovll %eax, %ecx
movl %ecx, 0x704a(%rip)      # 0xb200
leaq -0x70(%rbp), %rdi
callq 0x2f96
leaq -0x88(%rbp), %rdi
callq 0x2f96
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x41ed
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4206
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
xorl %ecx, %ecx
movl -0xd4(%rbp), %eax
jmp 0x4481
movq 0x7426(%rip), %rax      # 0xb640
subq 0x7417(%rip), %rax      # 0xb638
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
cmpq $0x4, %rax
jb 0x4d0c
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x0, -0xa8(%rbp)
movb $0x0, -0xa0(%rbp)
movslq 0x73ec(%rip), %rax      # 0xb650
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
cmpl $0x2, %eax
je 0x465f
cmpl $0x1, %eax
je 0x448e
testl %eax, %eax
jne 0x4ce6
leaq 0x3ff8(%rip), %rdi      # 0x8296
callq 0x22b0
leaq -0x3c8(%rbp), %r14
movq %r14, %rdi
leaq 0x7384(%rip), %rsi      # 0xb638
callq 0x6954
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x22d0
subl 0x7381(%rip), %eax      # 0xb650
leaq -0xd0(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x5729
leaq -0x50(%rbp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movups 0x7343(%rip), %xmm0     # 0xb638
movq 0x734c(%rip), %rax      # 0xb648
movups -0xd0(%rbp), %xmm1
movups %xmm1, 0x732e(%rip)     # 0xb638
movq -0xc0(%rbp), %rcx
movq %rcx, 0x7330(%rip)      # 0xb648
movaps -0x50(%rbp), %xmm1
movaps %xmm0, -0x50(%rbp)
movq %rax, -0x40(%rbp)
movups %xmm1, -0xd0(%rbp)
movq $0x0, -0xc0(%rbp)
movq %rbx, %rdi
callq 0x68a0
movq %r15, %rdi
callq 0x68a0
movq %r14, %rdi
callq 0x68a0
movq 0x72e3(%rip), %r15      # 0xb638
leaq 0x7184(%rip), %rdi      # 0xb4e0
movq %r15, %rsi
callq 0x2160
movq 0x20(%r15), %rax
movq %rax, 0x7191(%rip)      # 0xb500
leaq 0x28(%r15), %rsi
leaq 0x718e(%rip), %rdi      # 0xb508
callq 0x6b68
addq $0x40, %r15
leaq 0x7196(%rip), %rdi      # 0xb520
movq %r15, %rsi
callq 0x6b68
leaq -0x300(%rbp), %r14
movq %r14, %rdi
leaq 0x713d(%rip), %rsi      # 0xb4e0
callq 0x2a8e
movq %rbx, %rdi
leaq 0x3d80(%rip), %rsi      # 0x8132
movq %r14, %rdx
callq 0x69f6
leaq -0xb0(%rbp), %rdi
movq %rbx, %rsi
callq 0x2280
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x43e2
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x300(%rbp), %rdi
leaq -0x2f0(%rbp), %rax
cmpq %rax, %rdi
je 0x4404
movq -0x2f0(%rbp), %rsi
incq %rsi
callq 0x2230
movq 0x722d(%rip), %rdi      # 0xb638
cmpq %rdi, 0x722e(%rip)      # 0xb640
je 0x4ce0
xorl %ebx, %ebx
xorl %r14d, %r14d
addq %rbx, %rdi
callq 0x2ac4
movq -0xb0(%rbp), %rsi
movl $0x64, %edx
movl %eax, %edi
xorl %ecx, %ecx
callq 0x2140
movl %eax, 0x6e50(%rip)      # 0xb290
testl %eax, %eax
jle 0x4d8c
incq %r14
movq 0x71ee(%rip), %rax      # 0xb640
movq 0x71df(%rip), %rdi      # 0xb638
subq %rdi, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
addq $0x58, %rbx
cmpq %r14, %rax
ja 0x441d
jmp 0x4ce0
movl $0xc, %ecx
testl %eax, %eax
jns 0x4d0c
jmp 0x4d0e
movq 0x717b(%rip), %rax      # 0xb610
cmpq 0x716c(%rip), %rax      # 0xb608
je 0x4de0
leaq 0x3dbc(%rip), %rdi      # 0x8265
callq 0x22b0
movq 0x715b(%rip), %r15      # 0xb610
leaq -0x48(%r15), %rsi
leaq 0x70d0(%rip), %rdi      # 0xb590
callq 0x2160
movq -0x28(%r15), %rax
movq %rax, 0x70e0(%rip)      # 0xb5b0
addq $-0x20, %r15
leaq 0x70dd(%rip), %rdi      # 0xb5b8
movq %r15, %rsi
callq 0x2160
movq 0x7126(%rip), %rsi      # 0xb610
addq $-0x48, %rsi
movq %rsi, 0x711b(%rip)      # 0xb610
leaq 0x710c(%rip), %rdi      # 0xb608
callq 0x34f0
leaq -0x1d8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq 0x707a(%rip), %rsi      # 0xb590
movq 0x707b(%rip), %rdx      # 0xb598
addq %rsi, %rdx
leaq -0x1e8(%rbp), %rdi
callq 0x315c
movq 0x707d(%rip), %rax      # 0xb5b0
movq %rax, -0x1c8(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq 0x7069(%rip), %rsi      # 0xb5b8
movq 0x706a(%rip), %rdx      # 0xb5c0
addq %rsi, %rdx
leaq -0x1c0(%rbp), %rdi
callq 0x315c
movq %r12, %rdi
leaq 0x3ba2(%rip), %rsi      # 0x8111
leaq -0x1e8(%rbp), %rdx
callq 0x69f6
leaq -0xb0(%rbp), %rdi
movq %r12, %rsi
callq 0x2280
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x45a3
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x1c0(%rbp), %rdi
leaq -0x1b0(%rbp), %rax
cmpq %rax, %rdi
je 0x45c5
movq -0x1b0(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x45e7
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x2230
movq 0x704a(%rip), %rdi      # 0xb638
cmpq %rdi, 0x704b(%rip)      # 0xb640
je 0x4ce0
xorl %ebx, %ebx
xorl %r14d, %r14d
addq %rbx, %rdi
callq 0x2ac4
movq -0xb0(%rbp), %rsi
movl $0x12c, %edx            # imm = 0x12C
movl %eax, %edi
xorl %ecx, %ecx
callq 0x2140
movl %eax, 0x6c6d(%rip)      # 0xb290
testl %eax, %eax
jle 0x4d95
incq %r14
movq 0x700b(%rip), %rax      # 0xb640
movq 0x6ffc(%rip), %rdi      # 0xb638
subq %rdi, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
addq $0x58, %rbx
cmpq %r14, %rax
ja 0x4600
jmp 0x4ce0
movq 0x6f72(%rip), %rsi      # 0xb5d8
leaq 0x6f6b(%rip), %rdi      # 0xb5d8
callq 0x6c92
movq 0x6fc7(%rip), %rax      # 0xb640
subq 0x6fb8(%rip), %rax      # 0xb638
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
cmpq $0x2, %rax
jb 0x47d9
movl $0x1, %r15d
cmpl $0x0, 0x6f0b(%rip)      # 0xb5b4
jle 0x47ad
xorl %ebx, %ebx
movl $0xc8, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x2170
movl $0x0, 0x6bc2(%rip)      # 0xb28c
imulq $0x58, %r15, %rdi
addq 0x6f63(%rip), %rdi      # 0xb638
callq 0x2ac4
movl $0x64, %edx
movl %eax, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x20f0
movl %eax, 0x6b9b(%rip)      # 0xb28c
testl %eax, %eax
jle 0x46ca
leaq -0x40(%rbp), %r14
movq %r14, -0x50(%rbp)
movq %r13, %rdi
callq 0x2130
leaq (%rax,%r13), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x6cf2
movq -0x50(%rbp), %rdx
leaq 0x3983(%rip), %rdi      # 0x80a2
movl %r15d, %esi
xorl %eax, %eax
callq 0x2040
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x473e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x150(%rbp), %rax
movq %rax, -0x160(%rbp)
movq %r13, %rdi
callq 0x2130
leaq (%rax,%r13), %rdx
leaq -0x160(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x6cf2
leaq -0x50(%rbp), %r12
movq %r14, %rdi
leaq 0x6e60(%rip), %rsi      # 0xb5d8
callq 0x5bb2
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x479f
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x2230
incl %ebx
cmpl 0x6e0d(%rip), %ebx      # 0xb5b4
jl 0x46b1
movq 0x6e8c(%rip), %rax      # 0xb640
subq 0x6e7d(%rip), %rax      # 0xb638
incq %r15
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
cmpq %r15, %rax
ja 0x46a2
leaq 0x39c0(%rip), %rdi      # 0x81a0
callq 0x22b0
leaq -0x130(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x140(%rbp), %rbx
movq %rbx, %rdi
leaq 0x3984(%rip), %rsi      # 0x8188
leaq 0x3983(%rip), %rdx      # 0x818e
callq 0x6cf2
movq %r12, %rdi
movl $0x6e, %esi
movq %rbx, %rdx
callq 0x5898
leaq -0xb0(%rbp), %rdi
movq %r12, %rsi
callq 0x2280
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4848
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x486a
movq -0x130(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0xb0(%rbp), %rsi
leaq 0x383f(%rip), %rdi      # 0x80b7
xorl %eax, %eax
callq 0x2040
leaq 0x6c5a(%rip), %rdi      # 0xb4e0
callq 0x2ac4
movq -0xb0(%rbp), %rsi
movl $0x64, %edx
movl %eax, %edi
xorl %ecx, %ecx
callq 0x2140
movl %eax, 0x69ea(%rip)      # 0xb290
testl %eax, %eax
jle 0x4de5
leaq 0x3901(%rip), %rdi      # 0x81b6
callq 0x22b0
movq 0x6d17(%rip), %r14      # 0xb5d8
cmpq %r14, 0x6d18(%rip)      # 0xb5e0
leaq -0x268(%rbp), %r12
je 0x4a2c
xorl %eax, %eax
xorl %ebx, %ebx
leaq (%rax,%rax,8), %r15
movq %r12, -0x278(%rbp)
movq (%r14,%r15,8), %rsi
movq 0x8(%r14,%r15,8), %rdx
addq %rsi, %rdx
leaq -0x278(%rbp), %rdi
callq 0x315c
leaq (%r14,%r15,8), %rax
movq 0x20(%rax), %rcx
movq %rcx, -0x258(%rbp)
leaq -0x240(%rbp), %rcx
movq %rcx, -0x250(%rbp)
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
addq %rsi, %rdx
leaq -0x250(%rbp), %rdi
callq 0x315c
leaq -0x50(%rbp), %r14
movq %r14, %rdi
movl $0x6e, %esi
leaq -0x278(%rbp), %rdx
callq 0x5598
leaq -0xb0(%rbp), %rdi
movq %r14, %rsi
callq 0x2280
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4970
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x4992
movq -0x240(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x278(%rbp), %rdi
cmpq %r12, %rdi
je 0x49ad
movq -0x268(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0xb0(%rbp), %rsi
leaq 0x370f(%rip), %rdi      # 0x80ca
xorl %eax, %eax
callq 0x2040
leaq 0x6b17(%rip), %rdi      # 0xb4e0
callq 0x2ac4
movq -0xb0(%rbp), %rsi
movl $0x64, %edx
movl %eax, %edi
xorl %ecx, %ecx
callq 0x2140
movl %eax, 0x68a7(%rip)      # 0xb290
testl %eax, %eax
jg 0x49fb
leaq 0x3831(%rip), %rdi      # 0x8225
callq 0x22b0
decl %ebx
incl %ebx
movslq %ebx, %rax
movq 0x6bd9(%rip), %rcx      # 0xb5e0
movq 0x6bca(%rip), %r14      # 0xb5d8
subq %r14, %rcx
sarq $0x3, %rcx
movabsq $-0x71c71c71c71c71c7, %rdx # imm = 0x8E38E38E38E38E39
imulq %rdx, %rcx
cmpq %rax, %rcx
ja 0x48d9
leaq 0x3796(%rip), %rdi      # 0x81c9
callq 0x22b0
movq 0x6c01(%rip), %rax      # 0xb640
subq 0x6bf2(%rip), %rax      # 0xb638
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
cmpq $0x2, %rax
leaq -0x2d0(%rbp), %r12
jb 0x4b46
movl $0x1, %ebx
cmpl $0x0, 0x6b3f(%rip)      # 0xb5b4
jle 0x4b1a
xorl %r15d, %r15d
movl $0xc8, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x2170
movl $0x0, 0x67f5(%rip)      # 0xb28c
imulq $0x58, %rbx, %rdi
addq 0x6b96(%rip), %rdi      # 0xb638
callq 0x2ac4
movl $0x64, %edx
movl %eax, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x20f0
movl %eax, 0x67ce(%rip)      # 0xb28c
testl %eax, %eax
jle 0x4a97
movq %r12, -0x2e0(%rbp)
movq %r13, %rdi
callq 0x2130
leaq (%rax,%r13), %rdx
leaq -0x2e0(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x6cf2
movq %r14, %rdi
callq 0x5e72
movq -0x2e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x4b0a
movq -0x2d0(%rbp), %rsi
incq %rsi
callq 0x2230
incl %r15d
cmpl 0x6aa0(%rip), %r15d     # 0xb5b4
jl 0x4a7e
movq 0x6b1f(%rip), %rax      # 0xb640
subq 0x6b10(%rip), %rax      # 0xb638
incq %rbx
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
cmpq %rbx, %rax
ja 0x4a6e
leaq 0x3693(%rip), %rdi      # 0x81e0
callq 0x22b0
movl $0x0, 0x6730(%rip)      # 0xb28c
movl $0xc8, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x2170
leaq -0x350(%rbp), %r12
leaq 0x6967(%rip), %rdi      # 0xb4e0
callq 0x2ac4
movl $0x64, %edx
movl %eax, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x20f0
movl %eax, 0x66f7(%rip)      # 0xb28c
testl %eax, %eax
jle 0x4b72
leaq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
movq %r13, %rdi
callq 0x2130
leaq (%rax,%r13), %rdx
leaq -0x120(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6cf2
movq %rbx, %rdi
callq 0x5e72
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x4bef
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x2230
movq 0x6a4a(%rip), %rax      # 0xb640
subq 0x6a3b(%rip), %rax      # 0xb638
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
cmpq $0x2, %rax
jb 0x4ce0
movl $0x1, %ebx
movl $0x58, %r15d
leaq -0x360(%rbp), %r14
movq %r14, %rdi
leaq 0x6903(%rip), %rsi      # 0xb538
callq 0x2a8e
leaq -0x50(%rbp), %rdi
leaq 0x3500(%rip), %rsi      # 0x8145
movq %r14, %rdx
callq 0x69f6
movq -0x360(%rbp), %rdi
cmpq %r12, %rdi
je 0x4c68
movq -0x350(%rbp), %rsi
incq %rsi
callq 0x2230
movq 0x69c9(%rip), %rdi      # 0xb638
addq %r15, %rdi
callq 0x2ac4
movq -0x50(%rbp), %rsi
movl $0x64, %edx
movl %eax, %edi
xorl %ecx, %ecx
callq 0x2140
movl %eax, 0x6601(%rip)      # 0xb290
testl %eax, %eax
jle 0x4d9e
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4cb0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
incq %rbx
movq 0x6986(%rip), %rax      # 0xb640
subq 0x6977(%rip), %rax      # 0xb638
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
addq $0x58, %r15
cmpq %rbx, %rax
ja 0x4c24
incl 0x696a(%rip)            # 0xb650
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x4d08
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x50(%rbp), %r12
xorl %ecx, %ecx
testl %ecx, %ecx
je 0x3c1f
leaq -0x5d0(%rbp), %rdi
callq 0x20a0
leaq -0x7d8(%rbp), %rdi
callq 0x20a0
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x4d50
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x2230
xorl %eax, %eax
addq $0x7b8, %rsp            # imm = 0x7B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x359f(%rip), %rdi      # 0x830a
jmp 0x4d74
leaq 0x3614(%rip), %rdi      # 0x8388
callq 0x22b0
movl $0x1, %edi
callq 0x2270
leaq 0x35be(%rip), %rdi      # 0x8348
jmp 0x4d74
leaq 0x3515(%rip), %rdi      # 0x82a8
jmp 0x4d74
leaq 0x34e0(%rip), %rdi      # 0x827c
jmp 0x4d74
leaq 0x3466(%rip), %rdi      # 0x820b
jmp 0x4d74
leaq 0x33e1(%rip), %rdi      # 0x818f
callq 0x22b0
leaq -0x7d8(%rbp), %rdi
callq 0x2070
leaq -0x5d0(%rbp), %rdi
callq 0x2070
jmp 0x4d79
movq (%r15), %rsi
leaq 0x3289(%rip), %rdi      # 0x8060
xorl %eax, %eax
callq 0x2040
jmp 0x4d79
callq 0x5a4b
leaq 0x3459(%rip), %rdi      # 0x8245
jmp 0x4d74
movq %rax, %r14
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x51b7
movq -0x110(%rbp), %rsi
jmp 0x5159
jmp 0x51b4
movq %rax, %r14
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x51b7
movq -0x130(%rbp), %rsi
jmp 0x5159
jmp 0x51b4
jmp 0x51b4
movq %rax, %r14
leaq -0x1e8(%rbp), %rdi
jmp 0x4f98
movq %rax, %r14
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x51b7
movq -0x1d8(%rbp), %rsi
jmp 0x5159
jmp 0x51b4
movq %rax, %r14
movq -0x300(%rbp), %rdi
leaq -0x2f0(%rbp), %rax
cmpq %rax, %rdi
je 0x51b7
movq -0x2f0(%rbp), %rsi
jmp 0x5159
jmp 0x51b4
movq %rax, %r14
leaq -0x3c8(%rbp), %rdi
callq 0x68a0
jmp 0x51b7
jmp 0x51b4
movq %rax, %r14
leaq -0x398(%rbp), %rdi
jmp 0x4ee2
jmp 0x51ad
movq %rax, %r14
leaq -0x3b0(%rbp), %rdi
callq 0x2f96
jmp 0x51d9
jmp 0x51ad
movq %rax, %r14
jmp 0x51e5
movq %rax, %r14
jmp 0x51f1
jmp 0x51b4
jmp 0x51ad
jmp 0x5112
movq %rax, %r14
movq -0x320(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4f33
movq -0x310(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x4f33
movq %rax, %r14
leaq -0x40(%rbp), %rbx
jmp 0x519c
jmp 0x51ad
jmp 0x51ad
movq %rax, %r14
movq -0x360(%rbp), %rdi
cmpq %r12, %rdi
je 0x51b7
movq -0x350(%rbp), %rsi
jmp 0x5159
jmp 0x51b4
movq %rax, %r14
movq -0x278(%rbp), %rdi
cmpq %r12, %rdi
je 0x51b7
movq -0x268(%rbp), %rsi
jmp 0x5159
jmp 0x51b4
movq %rax, %r14
leaq -0x278(%rbp), %rdi
callq 0x30b0
jmp 0x51b7
jmp 0x4fcc
movq %rax, %r14
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x5007
movq -0x170(%rbp), %rsi
jmp 0x4ffa
jmp 0x5004
jmp 0x5004
jmp 0x51ad
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
callq 0x30b0
jmp 0x5007
movq %rax, %r14
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x5007
movq -0x190(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x5007
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
jne 0x51a5
jmp 0x51d9
jmp 0x51ad
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x51b7
movq -0x40(%rbp), %rsi
jmp 0x5159
jmp 0x51ad
jmp 0x51b4
jmp 0x51b4
jmp 0x51b4
jmp 0x51ad
jmp 0x51b4
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
callq 0x30b0
jmp 0x51d9
movq %rax, %r14
movq -0x340(%rbp), %rdi
cmpq %rbx, %rdi
je 0x51d9
movq -0x330(%rbp), %rsi
jmp 0x51d1
jmp 0x51ad
jmp 0x5112
jmp 0x51ad
jmp 0x51ad
jmp 0x51ad
movq %rax, %r14
leaq -0x2c0(%rbp), %rdi
callq 0x30b0
jmp 0x5115
movq %rax, %r14
leaq -0x230(%rbp), %rdi
callq 0x30b0
jmp 0x516a
movq %rax, %r14
movq -0x2c0(%rbp), %rdi
cmpq %r12, %rdi
je 0x5115
movq -0x2b0(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x5115
movq %rax, %r14
movq -0x230(%rbp), %rdi
leaq -0x220(%rbp), %rax
cmpq %rax, %rdi
je 0x516a
movq -0x220(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x516a
movq %rax, %r14
leaq -0x40(%rbp), %rbx
jmp 0x5190
jmp 0x51b4
movq %rax, %r14
movq -0x2e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x51b7
movq -0x2d0(%rbp), %rsi
jmp 0x5159
movq %rax, %r14
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x51b7
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x51b7
jmp 0x51b4
jmp 0x51b4
movq %rax, %r14
leaq -0x40(%rbp), %rbx
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x5190
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0xb0(%rbp), %rdi
callq 0x6860
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x51d9
movq -0x40(%rbp), %rsi
jmp 0x51d1
jmp 0x51ad
movq %rax, %r14
jmp 0x51d9
jmp 0x51b4
movq %rax, %r14
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x51d9
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x5d0(%rbp), %rdi
callq 0x20a0
leaq -0x7d8(%rbp), %rdi
callq 0x20a0
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x5213
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x2230
movq %r14, %rdi
callq 0x2320