// File: muzuka[P]Cards-Against-Humanity-Online/Client.cpp
// Function: main
int main(int argc, char* argv[]) {
	
	if (argc != 3) {
		printf("Usage: %s <server IP> <Server Port>\n", argv[0]);
		exit(EXIT_FAILURE);
	}
	
	printf("Welcome to Cards Against Humanity Online!\n");
	printf("Experience all of the hilarious and bad humour of the real thing.\n");
	printf("What do you want as a username(Must be unique and have no spaces):\n");
	cin >> name;
	self.setName(name);
	printf("Please wait until you have connected.\n");
	
	if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
		printf("socket() failed\n");
		exit(EXIT_FAILURE);
	}
	self.setSocket(sock);
	
	int yes = 1;
	if (setsockopt(self.getSocket(), SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) < 0) {
		printf("setsockopt() failed\n");
		exit(EXIT_FAILURE);
	}
	
	memset(&serverAddr, 0, sizeof(serverAddr));
	serverAddr.sin_family = AF_INET;
	serverAddr.sin_port = htons(atoi(argv[2]));
	serverAddr.sin_addr.s_addr = inet_addr(argv[1]);
	
	printf("Connecting to server.\n");
	if (connect(self.getSocket(), (struct sockaddr*) &serverAddr, sizeof(serverAddr)) < 0) {
		printf("connect() failed\n");
		exit(EXIT_FAILURE);
	}
	printf("Connected to Server successfully.\n");

	bytesSent = send(self.getSocket(), self.getName().c_str(), self.getName().length(), 0);
	if (bytesSent <= 0) {
		printf("Couldn't send name.\n");
		exit(EXIT_FAILURE);
	}
	
	// while sent name isn't available
	while(!isReady) {
		memset(&inBuffer, 0, sizeof(inBuffer));
		bytesRecv = 0;
		while(bytesRecv <= 0) {
			// receive confirmation
			bytesRecv = recv(self.getSocket(), (char*)&inBuffer, 1, 0);
		}
		printf("Received answer from Server: %s\n", (char*)inBuffer);
		if (inBuffer[0] == 'y') {
			break;
		}
		else if(inBuffer[0] == 'n'){
			printf("The name was already taken, please enter another:\n");
			cin >> name;
			self.setName(name);
			bytesSent = send(self.getSocket(), self.getName().c_str(), self.getName().length(), 0);
			if (bytesSent <= 0) {
				printf("Couldn't send name.\n");
				exit(EXIT_FAILURE);
			}
		}
		
	}
	printf("The name was accepted!\n");
	// Receive cards
	for(int i = 0; i < 10; i++) {
		memset(&inBuffer, 0, sizeof(inBuffer));
		bytesRecv = 0;
		while(bytesRecv <= 0) {
			bytesRecv = recv(self.getSocket(), (char*)&inBuffer, 100, 0);
		}
		parseMessage(string(inBuffer));
	}
	
	if(self.getHand().empty()) {
		printf("Hand is empty.\n");
	}
	else {
		printf("This is your current hand.\nPlease enter the number to choose one when prompted.\n");
		printHand(self.getHand());
	}
	// Start main loop
	while(running) {
		
		printf("A new round has begun!\n");
		
		// receive NOTIFY for new judge
		while (true) {
			memset(&inBuffer, 0, sizeof(inBuffer));
			bytesRecv = 0;
			while(bytesRecv <= 0) {
				bytesRecv = recv(self.getSocket(), (char*)&inBuffer, 100, 0);
			}
			if (string(inBuffer).length() != 0) {
				printf("The new judge is %s.\n", string(inBuffer).c_str());
				parseMessage(string(inBuffer));
				break;
			}
		}
		
		// receive POST for new black card
		while (true) {
			memset(&inBuffer, 0, sizeof(inBuffer));
			bytesRecv = 0;
			while(bytesRecv <= 0) {
				bytesRecv = recv(self.getSocket(), (char*)&inBuffer, 300, 0);
			}
			if (string(inBuffer).length() != 0) {
				printf("The black card is %s.\n", string(inBuffer).c_str());
				parseMessage(string(inBuffer));
				break;
			}
		}
		
		// Judge Code --------------------------------------
		if(isJudge) {
			printf("Please wait for the others' answers.\n");
			int playerNum = 0;
			// Get number of answers to expect.
			while (playerNum <= 0) {
				memset(&inBuffer, 0, sizeof(inBuffer));
				bytesRecv = 0;
				while (bytesRecv <= 0) {
					bytesRecv = recv(self.getSocket(), (char*)&inBuffer, 100, 0);
				}
				if (string(inBuffer).length() != 0) {
					printf("About to parse notify.\n%s\n", string(inBuffer).c_str());
					playerNum = parseMessage(string(inBuffer));
				}
				else {
					printf("Nothing received yet.\n");
				}
				
				
			}
			printf("PlayerNum is equal to %d.\n", playerNum);
			// receive answers
			for (int i = 0; i < playerNum; i++) {
				memset(&inBuffer, 0, sizeof(inBuffer));
				bytesRecv = 0;
				while (bytesRecv <= 0) {
					bytesRecv = recv(self.getSocket(), (char*)&inBuffer, 100, 0);
				}
				printf("new answer(before parsing):\n%s\n", (char*)inBuffer);
				parseMessage(string(inBuffer));
			}
			
			printf("Got all %d of the answers.\n", playerNum);
			
			printf("All of the answers are ready.\n");
			printAnswers(answers, blackCard.numOfAnswers);
			printf("Please select the best answer:\nCommands:\n");
			printf("a # to send answer.\nt # to test answer.\nh to see choices.\ns to see score.\nq to quit.\n");
			
			cin >> answer;
			if (answer == 'q') {
				note = composeNOTIFYMessage('q', self.getName());
				bytesSent = send(self.getSocket(), (char*)note.c_str(), 100, 0);
				if (bytesSent <= 0) {
					printf("Couldn't send quit.\n");
					exit(EXIT_FAILURE);
				}
				exit(EXIT_FAILURE);
			}
			else if (answer == 'h') {
				printAnswers(answers, blackCard.numOfAnswers);
			}
			else if (answer == 's') {
				printf("You have won %d rounds.\n", self.getScore());
			}
			else {
				cin >> num[0];
			}
			while (!ready) {
				switch (answer) {
					case 'a':
						if(num[0] > blackCard.numOfAnswers || num[0] < 1) {
							printf("Choice is out of range. Try again.");
							break;
						}
						chosen = composeNOTIFYMessage('w', answers[blackCard.numOfAnswers*(num[0] - 1)].owner);
						bytesSent = send(self.getSocket(), (char*)chosen.c_str(), 100, 0);
						if (bytesSent <= 0) {
							printf("Couldn't send NOTIFY.\n");
							exit(EXIT_FAILURE);
						}
						printf("Sent winner to server.\n");
						ready = !ready;
						break;
					case 't':
						int place;
						switch (blackCard.numOfAnswers) {
							case 1:
								ans[0] = answers[num[0]-1].content;
								testAnswer = substitute(blackCard.content, ans, '_');
								printf("%s\n", testAnswer.c_str());
								break;
							case 2:
								place = blackCard.numOfAnswers*(num[0]-1);
								ans[0] = answers[place].content;
								ans[1] = answers[place + 1].content;
								testAnswer = substitute(blackCard.content, ans, '_');
								printf("%s\n", testAnswer.c_str());
								break;
							case 3:
								place = blackCard.numOfAnswers*(num[0]-1);
								ans[0] = answers[place].content;
								ans[1] = answers[place + 1].content;
								ans[2] = answers[place + 2].content;
								testAnswer = substitute(blackCard.content, ans, '_');
								printf("%s\n", testAnswer.c_str());
								break;
							default:
								break;
						}
						break;
					default:
						break;
				}
				if (!ready) {
					printf("Please select the best answer:\nCommands:\n");
					printf("a # to send answer.\nt # to test answer.\nh to see hand\ns to see score\nq to quit.\n");
					
					cin >> answer;
					if (answer == 'q') {
						note = composeNOTIFYMessage('q', self.getName());
						bytesSent = send(self.getSocket(), (char*)note.c_str(), 100, 0);
						if (bytesSent <= 0) {
							printf("Couldn't send quit.\n");
							exit(EXIT_FAILURE);
						}
						exit(EXIT_FAILURE);
					}
					else if (answer == 'h') {
						printAnswers(answers, blackCard.numOfAnswers);
					}
					else if (answer == 's') {
						printf("You have won %d rounds.\n", self.getScore());
					}
					else {
						cin >> num[0];
					}
				}
			}
		}
		// Non-Judge Code---------------------------------------------------
		else {
			
			// Make a choice
			while (!inputValid) {
				getInput();
				processInput();
			}
			
			for (int i = 0; i < blackCard.numOfAnswers; i++) {
				bytesSent = send(self.getSocket(), (char*)composeREQUESTMessage().c_str(), 100, 0);
				if (bytesSent <= 0) {
					printf("Couldn't send request.\n");
					exit(EXIT_FAILURE);
				}
			}
			
			for (int i = 0; i < blackCard.numOfAnswers; i++) {
				bytesRecv = 0;
				memset(&inBuffer, 0, sizeof(inBuffer));
				while (bytesRecv <= 0) {
					bytesRecv = recv(self.getSocket(), (char*)&inBuffer, 100, 0);
				}
				if (string(inBuffer).length() != 0) {
					printf("Received new white card on request.\n");
					parseMessage(string(inBuffer));
				}
				else {
					i--;
				}
				
			}
			printf("Received all new cards as needed.\n");
			
			while (true) {
				memset(&inBuffer, 0, sizeof(inBuffer));
				bytesRecv = 0;
				while (bytesRecv <= 0) {
					bytesRecv = recv(self.getSocket(), (char*)&inBuffer, 100, 0);
				}
				if (string(inBuffer).length() != 0) {
					parseMessage(string(inBuffer));
					break;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x770, %rsp            # imm = 0x770
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x3, -0x8(%rbp)
je 0x46de
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x5951(%rip), %rdi      # 0xa01e
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
leaq 0x595e(%rip), %rdi      # 0xa043
xorl %eax, %eax
movb %al, -0x581(%rbp)
callq 0x2060
movb -0x581(%rbp), %al
leaq 0x596f(%rip), %rdi      # 0xa06e
callq 0x2060
movb -0x581(%rbp), %al
leaq 0x59a0(%rip), %rdi      # 0xa0b1
callq 0x2060
movq 0x98c3(%rip), %rdi      # 0xdfe0
leaq 0x9dbc(%rip), %rsi      # 0xe4e0
movq %rsi, -0x580(%rbp)
callq 0x22a0
movq -0x580(%rbp), %rsi
leaq -0x30(%rbp), %rdi
movq %rdi, -0x578(%rbp)
callq 0x2100
movq -0x578(%rbp), %rsi
leaq 0x9cdb(%rip), %rdi      # 0xe430
callq 0x2c60
jmp 0x475c
leaq -0x30(%rbp), %rdi
callq 0x23e8
leaq 0x5989(%rip), %rdi      # 0xa0f5
movb $0x0, %al
callq 0x2060
movl $0x2, %edi
movl $0x1, %esi
movl $0x6, %edx
callq 0x2090
movl %eax, 0x9a9b(%rip)      # 0xe228
cmpl $0x0, %eax
jge 0x47c4
leaq 0x5983(%rip), %rdi      # 0xa11c
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
movl 0x9a5e(%rip), %esi      # 0xe228
leaq 0x9c5f(%rip), %rdi      # 0xe430
callq 0x2ca0
movl $0x1, -0x40(%rbp)
leaq 0x9c4c(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x40(%rbp), %rcx
movl $0x4, %r8d
callq 0x2380
cmpl $0x0, %eax
jge 0x4821
leaq 0x591d(%rip), %rdi      # 0xa12d
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
leaq 0x9bb0(%rip), %rdi      # 0xe3d8
xorl %esi, %esi
movl $0x10, %edx
callq 0x2140
movw $0x2, 0x9b9b(%rip)      # 0xe3d8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2320
movzwl %ax, %edi
callq 0x2070
movw %ax, 0x9b81(%rip)       # 0xe3da
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2200
movl %eax, 0x9b70(%rip)      # 0xe3dc
leaq 0x58cf(%rip), %rdi      # 0xa142
movb $0x0, %al
callq 0x2060
leaq 0x9baf(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x9b49(%rip), %rsi      # 0xe3d8
movl $0x10, %edx
callq 0x21c0
cmpl $0x0, %eax
jge 0x48b6
leaq 0x58b4(%rip), %rdi      # 0xa159
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
leaq 0x58ae(%rip), %rdi      # 0xa16b
xorl %eax, %eax
callq 0x2060
leaq 0x9b65(%rip), %rdi      # 0xe430
movq %rdi, -0x598(%rbp)
callq 0x2c80
movq -0x598(%rbp), %rsi
movl %eax, -0x5a4(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x5a0(%rbp)
callq 0x2c30
movq -0x5a0(%rbp), %rdi
callq 0x20f0
movq -0x598(%rbp), %rsi
movq %rax, -0x590(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x2c30
jmp 0x4919
leaq -0x80(%rbp), %rdi
callq 0x2300
movl -0x5a4(%rbp), %edi
movq -0x590(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2120
movq %rax, -0x5b0(%rbp)
jmp 0x4942
movq -0x5b0(%rbp), %rax
movl %eax, 0x98e1(%rip)      # 0xe230
leaq -0x80(%rbp), %rdi
callq 0x23e8
leaq -0x60(%rbp), %rdi
callq 0x23e8
cmpl $0x0, 0x98c8(%rip)      # 0xe230
jg 0x49b3
leaq 0x581d(%rip), %rdi      # 0xa18e
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x49a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x23e8
leaq -0x60(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
jmp 0x49b5
movb 0x9868(%rip), %al       # 0xe223
xorb $-0x1, %al
testb $0x1, %al
jne 0x49c6
jmp 0x4bd8
leaq 0x9873(%rip), %rdi      # 0xe240
xorl %esi, %esi
movl $0xc8, %edx
callq 0x2140
movl $0x0, 0x9849(%rip)      # 0xe22c
cmpl $0x0, 0x9842(%rip)      # 0xe22c
jg 0x4a15
leaq 0x9a3d(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x983f(%rip), %rsi      # 0xe240
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x20c0
movl %eax, 0x9819(%rip)      # 0xe22c
jmp 0x49e3
leaq 0x5787(%rip), %rdi      # 0xa1a3
leaq 0x981d(%rip), %rsi      # 0xe240
movb $0x0, %al
callq 0x2060
movsbl 0x980f(%rip), %eax      # 0xe240
cmpl $0x79, %eax
jne 0x4a3b
jmp 0x4bd8
movsbl 0x97fe(%rip), %eax      # 0xe240
cmpl $0x6e, %eax
jne 0x4bd1
leaq 0x5772(%rip), %rdi      # 0xa1c4
xorl %eax, %eax
callq 0x2060
movq 0x9580(%rip), %rdi      # 0xdfe0
leaq 0x9a79(%rip), %rsi      # 0xe4e0
movq %rsi, -0x5c0(%rbp)
callq 0x22a0
movq -0x5c0(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x5b8(%rbp)
callq 0x2100
movq -0x5b8(%rbp), %rsi
leaq 0x9995(%rip), %rdi      # 0xe430
callq 0x2c60
jmp 0x4aa2
leaq -0xa0(%rbp), %rdi
callq 0x23e8
leaq 0x997b(%rip), %rdi      # 0xe430
movq %rdi, -0x5d0(%rbp)
callq 0x2c80
movq -0x5d0(%rbp), %rsi
movl %eax, -0x5dc(%rbp)
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x5d8(%rbp)
callq 0x2c30
movq -0x5d8(%rbp), %rdi
callq 0x20f0
movq -0x5d0(%rbp), %rsi
movq %rax, -0x5c8(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x2c30
jmp 0x4b09
leaq -0xe0(%rbp), %rdi
callq 0x2300
movl -0x5dc(%rbp), %edi
movq -0x5c8(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2120
movq %rax, -0x5e8(%rbp)
jmp 0x4b35
movq -0x5e8(%rbp), %rax
movl %eax, 0x96ee(%rip)      # 0xe230
leaq -0xe0(%rbp), %rdi
callq 0x23e8
leaq -0xc0(%rbp), %rdi
callq 0x23e8
cmpl $0x0, 0x96cf(%rip)      # 0xe230
jg 0x4bcf
leaq 0x5624(%rip), %rdi      # 0xa18e
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4bbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x23e8
leaq -0xc0(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
jmp 0x4bd1
jmp 0x4bd3
jmp 0x49b5
leaq 0x5618(%rip), %rdi      # 0xa1f7
movb $0x0, %al
callq 0x2060
movl $0x0, -0xe4(%rbp)
cmpl $0xa, -0xe4(%rbp)
jge 0x4cec
leaq 0x963c(%rip), %rdi      # 0xe240
xorl %esi, %esi
movl $0xc8, %edx
callq 0x2140
movl $0x0, 0x9612(%rip)      # 0xe22c
cmpl $0x0, 0x960b(%rip)      # 0xe22c
jg 0x4c4c
leaq 0x9806(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x9608(%rip), %rsi      # 0xe240
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x20c0
movl %eax, 0x95e2(%rip)      # 0xe22c
jmp 0x4c1a
leaq -0x109(%rbp), %rdi
movq %rdi, -0x5f0(%rbp)
callq 0x2370
movq -0x5f0(%rbp), %rdx
leaq 0x95d3(%rip), %rsi      # 0xe240
leaq -0x108(%rbp), %rdi
callq 0x8350
jmp 0x4c7b
leaq -0x108(%rbp), %rdi
callq 0x62c0
jmp 0x4c89
leaq -0x108(%rbp), %rdi
callq 0x23e8
leaq -0x109(%rbp), %rdi
callq 0x2240
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x4bf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4cdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x23e8
leaq -0x109(%rbp), %rdi
callq 0x2240
jmp 0x62a9
leaq -0x128(%rbp), %rdi
leaq 0x9736(%rip), %rsi      # 0xe430
callq 0x3130
leaq -0x128(%rbp), %rdi
callq 0x8400
movb %al, -0x5f1(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x31b0
movb -0x5f1(%rbp), %al
testb $0x1, %al
jne 0x4d29
jmp 0x4d39
leaq 0x54df(%rip), %rdi      # 0xa20f
movb $0x0, %al
callq 0x2060
jmp 0x4d9a
leaq 0x54df(%rip), %rdi      # 0xa21f
xorl %eax, %eax
callq 0x2060
leaq 0x96e2(%rip), %rsi      # 0xe430
leaq -0x140(%rbp), %rdi
movq %rdi, -0x600(%rbp)
callq 0x3130
movq -0x600(%rbp), %rdi
callq 0x6820
jmp 0x4d6f
leaq -0x140(%rbp), %rdi
callq 0x31b0
jmp 0x4d9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x31b0
jmp 0x62a9
jmp 0x4d9c
testb $0x1, 0x9465(%rip)      # 0xe208
je 0x629d
leaq 0x54c0(%rip), %rdi      # 0xa270
movb $0x0, %al
callq 0x2060
leaq 0x9482(%rip), %rdi      # 0xe240
xorl %esi, %esi
movl $0xc8, %edx
callq 0x2140
movl $0x0, 0x9458(%rip)      # 0xe22c
cmpl $0x0, 0x9451(%rip)      # 0xe22c
jg 0x4e06
leaq 0x964c(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x944e(%rip), %rsi      # 0xe240
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x20c0
movl %eax, 0x9428(%rip)      # 0xe22c
jmp 0x4dd4
leaq -0x161(%rbp), %rdi
movq %rdi, -0x608(%rbp)
callq 0x2370
movq -0x608(%rbp), %rdx
leaq 0x9419(%rip), %rsi      # 0xe240
leaq -0x160(%rbp), %rdi
callq 0x8350
jmp 0x4e35
leaq -0x160(%rbp), %rdi
callq 0x2300
movq %rax, -0x610(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x23e8
leaq -0x161(%rbp), %rdi
callq 0x2240
movq -0x610(%rbp), %rax
cmpq $0x0, %rax
je 0x4fbc
leaq -0x189(%rbp), %rdi
movq %rdi, -0x618(%rbp)
callq 0x2370
movq -0x618(%rbp), %rdx
leaq 0x93ae(%rip), %rsi      # 0xe240
leaq -0x188(%rbp), %rdi
callq 0x8350
jmp 0x4ea0
leaq -0x188(%rbp), %rdi
callq 0x20f0
movq %rax, %rsi
leaq 0x53d2(%rip), %rdi      # 0xa288
xorl %eax, %eax
callq 0x2060
jmp 0x4ebf
leaq -0x188(%rbp), %rdi
callq 0x23e8
leaq -0x189(%rbp), %rdi
callq 0x2240
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x620(%rbp)
callq 0x2370
movq -0x620(%rbp), %rdx
leaq 0x9348(%rip), %rsi      # 0xe240
leaq -0x1b0(%rbp), %rdi
callq 0x8350
jmp 0x4f06
leaq -0x1b0(%rbp), %rdi
callq 0x62c0
jmp 0x4f14
leaq -0x1b0(%rbp), %rdi
callq 0x23e8
leaq -0x1b1(%rbp), %rdi
callq 0x2240
jmp 0x4fc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x161(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4f74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x23e8
leaq -0x189(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4fab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x23e8
leaq -0x1b1(%rbp), %rdi
callq 0x2240
jmp 0x62a9
jmp 0x4db7
jmp 0x4fc3
leaq 0x9276(%rip), %rdi      # 0xe240
xorl %esi, %esi
movl $0xc8, %edx
callq 0x2140
movl $0x0, 0x924c(%rip)      # 0xe22c
cmpl $0x0, 0x9245(%rip)      # 0xe22c
jg 0x5012
leaq 0x9440(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x9242(%rip), %rsi      # 0xe240
movl $0x12c, %edx            # imm = 0x12C
xorl %ecx, %ecx
callq 0x20c0
movl %eax, 0x921c(%rip)      # 0xe22c
jmp 0x4fe0
leaq -0x1d9(%rbp), %rdi
movq %rdi, -0x628(%rbp)
callq 0x2370
movq -0x628(%rbp), %rdx
leaq 0x920d(%rip), %rsi      # 0xe240
leaq -0x1d8(%rbp), %rdi
callq 0x8350
jmp 0x5041
leaq -0x1d8(%rbp), %rdi
callq 0x2300
movq %rax, -0x630(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x23e8
leaq -0x1d9(%rbp), %rdi
callq 0x2240
movq -0x630(%rbp), %rax
cmpq $0x0, %rax
je 0x51c8
leaq -0x201(%rbp), %rdi
movq %rdi, -0x638(%rbp)
callq 0x2370
movq -0x638(%rbp), %rdx
leaq 0x91a2(%rip), %rsi      # 0xe240
leaq -0x200(%rbp), %rdi
callq 0x8350
jmp 0x50ac
leaq -0x200(%rbp), %rdi
callq 0x20f0
movq %rax, %rsi
leaq 0x51dc(%rip), %rdi      # 0xa29e
xorl %eax, %eax
callq 0x2060
jmp 0x50cb
leaq -0x200(%rbp), %rdi
callq 0x23e8
leaq -0x201(%rbp), %rdi
callq 0x2240
leaq -0x229(%rbp), %rdi
movq %rdi, -0x640(%rbp)
callq 0x2370
movq -0x640(%rbp), %rdx
leaq 0x913c(%rip), %rsi      # 0xe240
leaq -0x228(%rbp), %rdi
callq 0x8350
jmp 0x5112
leaq -0x228(%rbp), %rdi
callq 0x62c0
jmp 0x5120
leaq -0x228(%rbp), %rdi
callq 0x23e8
leaq -0x229(%rbp), %rdi
callq 0x2240
jmp 0x51cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1d9(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5180
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x23e8
leaq -0x201(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x51b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x23e8
leaq -0x229(%rbp), %rdi
callq 0x2240
jmp 0x62a9
jmp 0x4fc3
testb $0x1, 0x9050(%rip)      # 0xe224
je 0x5e7c
leaq 0x50d4(%rip), %rdi      # 0xa2b5
movb $0x0, %al
callq 0x2060
movl $0x0, -0x230(%rbp)
cmpl $0x0, -0x230(%rbp)
jg 0x5429
leaq 0x903a(%rip), %rdi      # 0xe240
xorl %esi, %esi
movl $0xc8, %edx
callq 0x2140
movl $0x0, 0x9010(%rip)      # 0xe22c
cmpl $0x0, 0x9009(%rip)      # 0xe22c
jg 0x524e
leaq 0x9204(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x9006(%rip), %rsi      # 0xe240
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x20c0
movl %eax, 0x8fe0(%rip)      # 0xe22c
jmp 0x521c
leaq -0x251(%rbp), %rdi
movq %rdi, -0x648(%rbp)
callq 0x2370
movq -0x648(%rbp), %rdx
leaq 0x8fd1(%rip), %rsi      # 0xe240
leaq -0x250(%rbp), %rdi
callq 0x8350
jmp 0x527d
leaq -0x250(%rbp), %rdi
callq 0x2300
movq %rax, -0x650(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x23e8
leaq -0x251(%rbp), %rdi
callq 0x2240
movq -0x650(%rbp), %rax
cmpq $0x0, %rax
je 0x5416
leaq -0x279(%rbp), %rdi
movq %rdi, -0x658(%rbp)
callq 0x2370
movq -0x658(%rbp), %rdx
leaq 0x8f66(%rip), %rsi      # 0xe240
leaq -0x278(%rbp), %rdi
callq 0x8350
jmp 0x52e8
leaq -0x278(%rbp), %rdi
callq 0x20f0
movq %rax, %rsi
leaq 0x4fdd(%rip), %rdi      # 0xa2db
xorl %eax, %eax
callq 0x2060
jmp 0x5307
leaq -0x278(%rbp), %rdi
callq 0x23e8
leaq -0x279(%rbp), %rdi
callq 0x2240
leaq -0x2a1(%rbp), %rdi
movq %rdi, -0x660(%rbp)
callq 0x2370
movq -0x660(%rbp), %rdx
leaq 0x8f00(%rip), %rsi      # 0xe240
leaq -0x2a0(%rbp), %rdi
callq 0x8350
jmp 0x534e
leaq -0x2a0(%rbp), %rdi
callq 0x62c0
movl %eax, -0x664(%rbp)
jmp 0x5362
movl -0x664(%rbp), %eax
movl %eax, -0x230(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x23e8
leaq -0x2a1(%rbp), %rdi
callq 0x2240
jmp 0x5424
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x251(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x53ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x23e8
leaq -0x279(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5405
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x23e8
leaq -0x2a1(%rbp), %rdi
callq 0x2240
jmp 0x62a9
leaq 0x4ed9(%rip), %rdi      # 0xa2f6
movb $0x0, %al
callq 0x2060
jmp 0x51f2
movl -0x230(%rbp), %esi
leaq 0x4ed7(%rip), %rdi      # 0xa30d
movb $0x0, %al
callq 0x2060
movl $0x0, -0x2a8(%rbp)
movl -0x2a8(%rbp), %eax
cmpl -0x230(%rbp), %eax
jge 0x5564
leaq 0x8de0(%rip), %rdi      # 0xe240
xorl %esi, %esi
movl $0xc8, %edx
callq 0x2140
movl $0x0, 0x8db6(%rip)      # 0xe22c
cmpl $0x0, 0x8daf(%rip)      # 0xe22c
jg 0x54a8
leaq 0x8faa(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x8dac(%rip), %rsi      # 0xe240
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x20c0
movl %eax, 0x8d86(%rip)      # 0xe22c
jmp 0x5476
leaq 0x4e79(%rip), %rdi      # 0xa328
leaq 0x8d8a(%rip), %rsi      # 0xe240
movq %rsi, -0x678(%rbp)
xorl %eax, %eax
callq 0x2060
leaq -0x2c9(%rbp), %rdi
movq %rdi, -0x670(%rbp)
callq 0x2370
movq -0x678(%rbp), %rsi
movq -0x670(%rbp), %rdx
leaq -0x2c8(%rbp), %rdi
callq 0x8350
jmp 0x54f3
leaq -0x2c8(%rbp), %rdi
callq 0x62c0
jmp 0x5501
leaq -0x2c8(%rbp), %rdi
callq 0x23e8
leaq -0x2c9(%rbp), %rdi
callq 0x2240
movl -0x2a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2a8(%rbp)
jmp 0x5447
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5553
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x23e8
leaq -0x2c9(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movl -0x230(%rbp), %esi
leaq 0x4dd7(%rip), %rdi      # 0xa348
xorl %eax, %eax
movb %al, -0x681(%rbp)
callq 0x2060
movb -0x681(%rbp), %al
leaq 0x4dd9(%rip), %rdi      # 0xa364
callq 0x2060
leaq 0x8f69(%rip), %rsi      # 0xe500
leaq -0x2e8(%rbp), %rdi
movq %rdi, -0x680(%rbp)
callq 0x3340
movq -0x680(%rbp), %rdi
movl 0x8e55(%rip), %esi      # 0xe40c
callq 0x68a0
jmp 0x55be
leaq -0x2e8(%rbp), %rdi
callq 0x31b0
leaq 0x4db2(%rip), %rdi      # 0xa383
movb $0x0, %al
callq 0x2060
leaq 0x4dce(%rip), %rdi      # 0xa3ad
movb $0x0, %al
callq 0x2060
movq 0x89f3(%rip), %rdi      # 0xdfe0
leaq 0x8f98(%rip), %rsi      # 0xe58c
callq 0x22b0
movsbl 0x8f8c(%rip), %eax      # 0xe58c
cmpl $0x71, %eax
jne 0x5706
leaq 0x8e20(%rip), %rsi      # 0xe430
leaq -0x328(%rbp), %rdi
movq %rdi, -0x690(%rbp)
callq 0x2c30
movq -0x690(%rbp), %rdx
leaq -0x308(%rbp), %rdi
movl $0x71, %esi
callq 0x6950
jmp 0x563d
leaq 0x8f8c(%rip), %rdi      # 0xe5d0
leaq -0x308(%rbp), %rsi
callq 0x2280
leaq -0x308(%rbp), %rdi
callq 0x23e8
leaq -0x328(%rbp), %rdi
callq 0x23e8
leaq 0x8dc1(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, -0x694(%rbp)
leaq 0x8f4f(%rip), %rdi      # 0xe5d0
callq 0x20f0
movl -0x694(%rbp), %edi
movq %rax, %rsi
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x2120
movl %eax, 0x8b8f(%rip)      # 0xe230
cmpl $0x0, 0x8b88(%rip)      # 0xe230
jg 0x56fc
leaq 0x4d52(%rip), %rdi      # 0xa403
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0x31b0
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
movl $0x1, %edi
callq 0x2270
movsbl 0x8e7f(%rip), %eax      # 0xe58c
cmpl $0x68, %eax
jne 0x576b
leaq 0x8de7(%rip), %rsi      # 0xe500
leaq -0x340(%rbp), %rdi
movq %rdi, -0x6a0(%rbp)
callq 0x3340
movq -0x6a0(%rbp), %rdi
movl 0x8cd3(%rip), %esi      # 0xe40c
callq 0x68a0
jmp 0x5740
leaq -0x340(%rbp), %rdi
callq 0x31b0
jmp 0x57aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x31b0
jmp 0x62a9
movsbl 0x8e1a(%rip), %eax      # 0xe58c
cmpl $0x73, %eax
jne 0x5795
leaq 0x8cb2(%rip), %rdi      # 0xe430
callq 0x2cc0
movl %eax, %esi
leaq 0x4c8c(%rip), %rdi      # 0xa418
movb $0x0, %al
callq 0x2060
jmp 0x57a8
movq 0x8844(%rip), %rdi      # 0xdfe0
leaq 0x8ddd(%rip), %rsi      # 0xe580
callq 0x2160
jmp 0x57aa
jmp 0x57ac
jmp 0x57ae
movb 0x8a6e(%rip), %al       # 0xe222
xorb $-0x1, %al
testb $0x1, %al
jne 0x57bf
jmp 0x5e77
movsbl 0x8dc6(%rip), %eax      # 0xe58c
movl %eax, -0x6a4(%rbp)
subl $0x61, %eax
je 0x57e7
jmp 0x57d3
movl -0x6a4(%rbp), %eax
subl $0x74, %eax
je 0x592a
jmp 0x5c9c
movl 0x8d93(%rip), %eax      # 0xe580
cmpl 0x8c19(%rip), %eax      # 0xe40c
jg 0x57fe
cmpl $0x1, 0x8d84(%rip)      # 0xe580
jge 0x5811
leaq 0x4c2c(%rip), %rdi      # 0xa431
movb $0x0, %al
callq 0x2060
jmp 0x5c9e
movl 0x8bf5(%rip), %eax      # 0xe40c
movl 0x8d63(%rip), %ecx      # 0xe580
decl %ecx
imull %ecx, %eax
movslq %eax, %rsi
leaq 0x8cd4(%rip), %rdi      # 0xe500
callq 0x32b0
movq %rax, %rsi
addq $0x28, %rsi
leaq -0x380(%rbp), %rdi
movq %rdi, -0x6b0(%rbp)
callq 0x2100
movq -0x6b0(%rbp), %rdx
leaq -0x360(%rbp), %rdi
movl $0x77, %esi
callq 0x6950
jmp 0x5865
leaq 0x8d44(%rip), %rdi      # 0xe5b0
leaq -0x360(%rbp), %rsi
callq 0x2280
leaq -0x360(%rbp), %rdi
callq 0x23e8
leaq -0x380(%rbp), %rdi
callq 0x23e8
leaq 0x8b99(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, -0x6b4(%rbp)
leaq 0x8d07(%rip), %rdi      # 0xe5b0
callq 0x20f0
movl -0x6b4(%rbp), %edi
movq %rax, %rsi
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x2120
movl %eax, 0x8967(%rip)      # 0xe230
cmpl $0x0, 0x8960(%rip)      # 0xe230
jg 0x5907
leaq 0x4b7b(%rip), %rdi      # 0xa454
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
leaq 0x4b5d(%rip), %rdi      # 0xa46b
movb $0x0, %al
callq 0x2060
movb 0x8907(%rip), %al       # 0xe222
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0x88fd(%rip)       # 0xe222
jmp 0x5c9e
movl 0x8adc(%rip), %eax      # 0xe40c
movl %eax, -0x6b8(%rbp)
subl $0x1, %eax
je 0x5962
jmp 0x593d
movl -0x6b8(%rbp), %eax
subl $0x2, %eax
je 0x5a34
jmp 0x594e
movl -0x6b8(%rbp), %eax
subl $0x3, %eax
je 0x5b54
jmp 0x5c98
movl 0x8c18(%rip), %eax      # 0xe580
decl %eax
movslq %eax, %rsi
leaq 0x8b8c(%rip), %rdi      # 0xe500
callq 0x32b0
movq %rax, %rsi
leaq 0x8b9d(%rip), %rdi      # 0xe520
movq %rdi, -0x6c0(%rbp)
callq 0x2050
leaq 0x8a52(%rip), %rsi      # 0xe3e8
leaq -0x3c8(%rbp), %rdi
movq %rdi, -0x6c8(%rbp)
callq 0x2100
movq -0x6c8(%rbp), %rsi
movq -0x6c0(%rbp), %rdx
leaq -0x3a8(%rbp), %rdi
movl $0x5f, %ecx
callq 0x6cd0
jmp 0x59ca
leaq 0x8bbf(%rip), %rdi      # 0xe590
leaq -0x3a8(%rbp), %rsi
callq 0x2280
leaq -0x3a8(%rbp), %rdi
callq 0x23e8
leaq -0x3c8(%rbp), %rdi
callq 0x23e8
leaq 0x8b94(%rip), %rdi      # 0xe590
callq 0x20f0
movq %rax, %rsi
leaq 0x48e7(%rip), %rdi      # 0xa2f2
movb $0x0, %al
callq 0x2060
jmp 0x5c9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3c8(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
leaq 0x89ad(%rip), %rax      # 0xe3e8
movq %rax, -0x6e0(%rbp)
movl 0x89c4(%rip), %eax      # 0xe40c
movl 0x8b32(%rip), %ecx      # 0xe580
decl %ecx
imull %ecx, %eax
movl %eax, -0x384(%rbp)
movslq -0x384(%rbp), %rsi
leaq 0x8a99(%rip), %rdi      # 0xe500
movq %rdi, -0x6e8(%rbp)
callq 0x32b0
movq %rax, %rsi
leaq 0x8aa3(%rip), %rdi      # 0xe520
movq %rdi, -0x6d0(%rbp)
callq 0x2050
movq -0x6e8(%rbp), %rdi
movl -0x384(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x32b0
movq %rax, %rsi
leaq 0x8a96(%rip), %rdi      # 0xe540
callq 0x2050
movq -0x6e0(%rbp), %rsi
leaq -0x408(%rbp), %rdi
movq %rdi, -0x6d8(%rbp)
callq 0x2100
movq -0x6d8(%rbp), %rsi
movq -0x6d0(%rbp), %rdx
leaq -0x3e8(%rbp), %rdi
movl $0x5f, %ecx
callq 0x6cd0
jmp 0x5aea
leaq 0x8a9f(%rip), %rdi      # 0xe590
leaq -0x3e8(%rbp), %rsi
callq 0x2280
leaq -0x3e8(%rbp), %rdi
callq 0x23e8
leaq -0x408(%rbp), %rdi
callq 0x23e8
leaq 0x8a74(%rip), %rdi      # 0xe590
callq 0x20f0
movq %rax, %rsi
leaq 0x47c7(%rip), %rdi      # 0xa2f2
movb $0x0, %al
callq 0x2060
jmp 0x5c9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
leaq 0x888d(%rip), %rax      # 0xe3e8
movq %rax, -0x700(%rbp)
movl 0x88a4(%rip), %eax      # 0xe40c
movl 0x8a12(%rip), %ecx      # 0xe580
decl %ecx
imull %ecx, %eax
movl %eax, -0x384(%rbp)
movslq -0x384(%rbp), %rsi
leaq 0x8979(%rip), %rdi      # 0xe500
movq %rdi, -0x708(%rbp)
callq 0x32b0
movq %rax, %rsi
leaq 0x8983(%rip), %rdi      # 0xe520
movq %rdi, -0x6f0(%rbp)
callq 0x2050
movq -0x708(%rbp), %rdi
movl -0x384(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x32b0
movq %rax, %rsi
leaq 0x8976(%rip), %rdi      # 0xe540
callq 0x2050
movq -0x708(%rbp), %rdi
movl -0x384(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x32b0
movq %rax, %rsi
leaq 0x896f(%rip), %rdi      # 0xe560
callq 0x2050
movq -0x700(%rbp), %rsi
leaq -0x448(%rbp), %rdi
movq %rdi, -0x6f8(%rbp)
callq 0x2100
movq -0x6f8(%rbp), %rsi
movq -0x6f0(%rbp), %rdx
leaq -0x428(%rbp), %rdi
movl $0x5f, %ecx
callq 0x6cd0
jmp 0x5c31
leaq 0x8958(%rip), %rdi      # 0xe590
leaq -0x428(%rbp), %rsi
callq 0x2280
leaq -0x428(%rbp), %rdi
callq 0x23e8
leaq -0x448(%rbp), %rdi
callq 0x23e8
leaq 0x892d(%rip), %rdi      # 0xe590
callq 0x20f0
movq %rax, %rsi
leaq 0x4680(%rip), %rdi      # 0xa2f2
movb $0x0, %al
callq 0x2060
jmp 0x5c9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
jmp 0x5c9a
jmp 0x5c9e
jmp 0x5c9e
testb $0x1, 0x857d(%rip)      # 0xe222
jne 0x5e72
leaq 0x46d1(%rip), %rdi      # 0xa383
movb $0x0, %al
callq 0x2060
leaq 0x47c3(%rip), %rdi      # 0xa483
movb $0x0, %al
callq 0x2060
movq 0x8312(%rip), %rdi      # 0xdfe0
leaq 0x88b7(%rip), %rsi      # 0xe58c
callq 0x22b0
movsbl 0x88ab(%rip), %eax      # 0xe58c
cmpl $0x71, %eax
jne 0x5dca
leaq 0x873f(%rip), %rsi      # 0xe430
leaq -0x488(%rbp), %rdi
movq %rdi, -0x710(%rbp)
callq 0x2c30
movq -0x710(%rbp), %rdx
leaq -0x468(%rbp), %rdi
movl $0x71, %esi
callq 0x6950
jmp 0x5d1e
leaq 0x88ab(%rip), %rdi      # 0xe5d0
leaq -0x468(%rbp), %rsi
callq 0x2280
leaq -0x468(%rbp), %rdi
callq 0x23e8
leaq -0x488(%rbp), %rdi
callq 0x23e8
leaq 0x86e0(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, -0x714(%rbp)
leaq 0x886e(%rip), %rdi      # 0xe5d0
callq 0x20f0
movl -0x714(%rbp), %edi
movq %rax, %rsi
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x2120
movl %eax, 0x84ae(%rip)      # 0xe230
cmpl $0x0, 0x84a7(%rip)      # 0xe230
jg 0x5dc0
leaq 0x4671(%rip), %rdi      # 0xa403
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x488(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
movl $0x1, %edi
callq 0x2270
movsbl 0x87bb(%rip), %eax      # 0xe58c
cmpl $0x68, %eax
jne 0x5e2f
leaq 0x8723(%rip), %rsi      # 0xe500
leaq -0x4a0(%rbp), %rdi
movq %rdi, -0x720(%rbp)
callq 0x3340
movq -0x720(%rbp), %rdi
movl 0x860f(%rip), %esi      # 0xe40c
callq 0x68a0
jmp 0x5e04
leaq -0x4a0(%rbp), %rdi
callq 0x31b0
jmp 0x5e6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0x31b0
jmp 0x62a9
movsbl 0x8756(%rip), %eax      # 0xe58c
cmpl $0x73, %eax
jne 0x5e59
leaq 0x85ee(%rip), %rdi      # 0xe430
callq 0x2cc0
movl %eax, %esi
leaq 0x45c8(%rip), %rdi      # 0xa418
movb $0x0, %al
callq 0x2060
jmp 0x5e6c
movq 0x8180(%rip), %rdi      # 0xdfe0
leaq 0x8719(%rip), %rsi      # 0xe580
callq 0x2160
jmp 0x5e6e
jmp 0x5e70
jmp 0x5e72
jmp 0x57ae
jmp 0x6298
jmp 0x5e7e
movb 0x839d(%rip), %al       # 0xe221
xorb $-0x1, %al
testb $0x1, %al
jne 0x5e8c
jmp 0x5e98
callq 0x6ee0
callq 0x7560
jmp 0x5e7e
movl $0x0, -0x4a4(%rbp)
movl -0x4a4(%rbp), %eax
cmpl 0x855e(%rip), %eax      # 0xe40c
jge 0x5f70
leaq 0x8575(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, -0x72c(%rbp)
leaq -0x4c8(%rbp), %rdi
movq %rdi, -0x738(%rbp)
callq 0x7b70
movq -0x738(%rbp), %rdi
callq 0x20f0
movl -0x72c(%rbp), %edi
movq %rax, %rsi
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x2120
movq %rax, -0x728(%rbp)
jmp 0x5f03
movq -0x728(%rbp), %rax
movl %eax, 0x8320(%rip)      # 0xe230
leaq -0x4c8(%rbp), %rdi
callq 0x23e8
cmpl $0x0, 0x830d(%rip)      # 0xe230
jg 0x5f5a
leaq 0x45a8(%rip), %rdi      # 0xa4d4
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x23e8
jmp 0x62a9
jmp 0x5f5c
movl -0x4a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4a4(%rbp)
jmp 0x5ea2
movl $0x0, -0x4cc(%rbp)
movl -0x4cc(%rbp), %eax
cmpl 0x8486(%rip), %eax      # 0xe40c
jge 0x6124
movl $0x0, 0x8296(%rip)      # 0xe22c
leaq 0x82a3(%rip), %rdi      # 0xe240
xorl %esi, %esi
movl $0xc8, %edx
callq 0x2140
cmpl $0x0, 0x827c(%rip)      # 0xe22c
jg 0x5fdb
leaq 0x8477(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x8279(%rip), %rsi      # 0xe240
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x20c0
movl %eax, 0x8253(%rip)      # 0xe22c
jmp 0x5fa9
leaq -0x4f1(%rbp), %rdi
movq %rdi, -0x740(%rbp)
callq 0x2370
movq -0x740(%rbp), %rdx
leaq 0x8244(%rip), %rsi      # 0xe240
leaq -0x4f0(%rbp), %rdi
callq 0x8350
jmp 0x600a
leaq -0x4f0(%rbp), %rdi
callq 0x2300
movq %rax, -0x748(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x23e8
leaq -0x4f1(%rbp), %rdi
callq 0x2240
movq -0x748(%rbp), %rax
cmpq $0x0, %rax
je 0x60ff
leaq 0x449f(%rip), %rdi      # 0xa4ec
xorl %eax, %eax
callq 0x2060
leaq -0x519(%rbp), %rdi
movq %rdi, -0x750(%rbp)
callq 0x2370
movq -0x750(%rbp), %rdx
leaq 0x81cb(%rip), %rsi      # 0xe240
leaq -0x518(%rbp), %rdi
callq 0x8350
jmp 0x6083
leaq -0x518(%rbp), %rdi
callq 0x62c0
jmp 0x6091
leaq -0x518(%rbp), %rdi
callq 0x23e8
leaq -0x519(%rbp), %rdi
callq 0x2240
jmp 0x610e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x4f1(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x60ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x518(%rbp), %rdi
callq 0x23e8
leaq -0x519(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movl -0x4cc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4cc(%rbp)
jmp 0x6110
movl -0x4cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4cc(%rbp)
jmp 0x5f7a
leaq 0x43e6(%rip), %rdi      # 0xa511
movb $0x0, %al
callq 0x2060
leaq 0x8107(%rip), %rdi      # 0xe240
xorl %esi, %esi
movl $0xc8, %edx
callq 0x2140
movl $0x0, 0x80dd(%rip)      # 0xe22c
cmpl $0x0, 0x80d6(%rip)      # 0xe22c
jg 0x6181
leaq 0x82d1(%rip), %rdi      # 0xe430
callq 0x2c80
movl %eax, %edi
leaq 0x80d3(%rip), %rsi      # 0xe240
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x20c0
movl %eax, 0x80ad(%rip)      # 0xe22c
jmp 0x614f
leaq -0x541(%rbp), %rdi
movq %rdi, -0x758(%rbp)
callq 0x2370
movq -0x758(%rbp), %rdx
leaq 0x809e(%rip), %rsi      # 0xe240
leaq -0x540(%rbp), %rdi
callq 0x8350
jmp 0x61b0
leaq -0x540(%rbp), %rdi
callq 0x2300
movq %rax, -0x760(%rbp)
leaq -0x540(%rbp), %rdi
callq 0x23e8
leaq -0x541(%rbp), %rdi
callq 0x2240
movq -0x760(%rbp), %rax
cmpq $0x0, %rax
je 0x6291
leaq -0x569(%rbp), %rdi
movq %rdi, -0x768(%rbp)
callq 0x2370
movq -0x768(%rbp), %rdx
leaq 0x8033(%rip), %rsi      # 0xe240
leaq -0x568(%rbp), %rdi
callq 0x8350
jmp 0x621b
leaq -0x568(%rbp), %rdi
callq 0x62c0
jmp 0x6229
leaq -0x568(%rbp), %rdi
callq 0x23e8
leaq -0x569(%rbp), %rdi
callq 0x2240
jmp 0x6296
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x541(%rbp), %rdi
callq 0x2240
jmp 0x62a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6283
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x568(%rbp), %rdi
callq 0x23e8
leaq -0x569(%rbp), %rdi
callq 0x2240
jmp 0x62a9
jmp 0x6132
jmp 0x6298
jmp 0x4d9c
movl -0x4(%rbp), %eax
addq $0x770, %rsp            # imm = 0x770
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2360
nopw %cs:(%rax,%rax)