// File: Doug0855[P]TigerZone/main.cpp
// Function: matchProtocol(Client&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void matchProtocol(Client &client, std::string &message_list)
{ //This protocol is called once for each match.
	Adapter adapter;
	values_t message_info;
	int number_of_tiles, game1_success, game2_success;
	int count = 0;
	bool lastMessage = true;
	std::string OPPONENT_ID;
	std::string message = getMesssage(client, message_list);
	std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
	Tile tile1;
	TileStack tStack;

	while (lastMessage) //while Game is not over
	{
		if (message.compare(0,1,"Y") == 0) //getting opponent player id
		{
			std::cout << "	OPPONENT PLAYER INFO" << std::endl;
			//message_info = adapter.translate(message);
			//OPPONENT_ID = message_info.playerId; 					//use opponent player id
			OPPONENT_ID = message.substr(24, std::string::npos-24);
			std::cout << "	Opponent ID is: " << OPPONENT_ID << std::endl;
			message = getMesssage(client, message_list);
			std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
		}
		else if (message.compare(0,1,"S") == 0) //getting starting tile information
		{
			std::cout << "	STARTING TILE INFO " << std::endl;
			message_info = adapter.translate(message);
			tile1 = Tile(message_info.tile_num); //getting first tile
			message = getMesssage(client, message_list);
			std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
		}
		else if (message.compare(0,1,"T") == 0) //get tile stack
		{
			std::cout << "	TILE STACK INFO" << std::endl;
			message_info = adapter.translate(message);
			number_of_tiles = message_info.number_of_tiles; //gettting the number of tiles
			tStack = TileStack(message_info.tile_stack); //getting tile stack
			message = getMesssage(client, message_list);
			std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
		}
		else if (message.compare(0,1,"M") == 0)
		{
			std::cout << "	MATCH BEGINS SOON" << std::endl;
			message_info = adapter.translate(message);
			//use planning time
			Player ai, opponent;
			Game game1("", ai, opponent, tStack, tile1, std::pair<int,int> (72,72));
			Game game2("", opponent, ai, tStack, tile1, std::pair<int,int> (72,72));
			game1_success = 0;
			game2_success = 0;
			for (int i = 0; i < number_of_tiles; i++)
			{
				std::cout<<"	Running moveProtocol: Game success for game 1 and 2 are " << game1_success << " and " << game2_success << std::endl;
				moveProtocol(client, message_list, game1, game2, game1_success, game2_success, OPPONENT_ID); //client, message_list, game1 and game2
				if (game1_success == -1 && game2_success == -1)
				{
					break;
				}
					//move must return a value to break from for loop in case of forfeit
				//std::cout<<"Running moveProtocol second time."<<std::endl;
				//moveProtocol(client, message_list, game1, game2, game1_success, game2_success); //client, message_list, game1 and game2
			}
			message = getMesssage(client, message_list);
			std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
		}
		else if (message.compare(0,1,"G") == 0)
		{
			std::cout << "	GAME OVER MESSAGE RECEIVED #" << count << std::endl;
			count++;
			if (count == 2)
				lastMessage = false;
			else
			{
				message = getMesssage(client, message_list);
				std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
			}
		}
		else //hopefully this is never reached
		{
			std::cout << "	ERROR: previous message could not be processed correctly. Message skipped!" << std::endl;
			std::cout << "		ERROR message: " << message << std::endl;
			message = getMesssage(client, message_list);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xdf0, %rsp            # imm = 0xDF0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xe260
leaq -0x1b8(%rbp), %rdi
callq 0x83e0
jmp 0x51dd
movl $0x0, -0x1d4(%rbp)
movb $0x1, -0x1d5(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x33c0
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x218(%rbp), %rdi
callq 0x4070
jmp 0x5210
movq 0x31da1(%rip), %rdi     # 0x36fb8
leaq 0x23e28(%rip), %rsi     # 0x29046
callq 0x32b0
movq %rax, -0xc20(%rbp)
jmp 0x522c
movq -0xc20(%rbp), %rdi
leaq 0x23e34(%rip), %rsi     # 0x2906e
callq 0x32b0
movq %rax, -0xc28(%rbp)
jmp 0x5248
movq -0xc28(%rbp), %rdi
leaq 0x23dfc(%rip), %rsi     # 0x29052
callq 0x32b0
movq %rax, -0xc30(%rbp)
jmp 0x5264
movq -0xc30(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3290
movq %rax, -0xc38(%rbp)
jmp 0x5280
movq -0xc38(%rbp), %rdi
movq 0x31d1a(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x5295
leaq -0x300(%rbp), %rdi
callq 0x26760
jmp 0x52a3
leaq -0x318(%rbp), %rdi
callq 0x23dd0
jmp 0x52b1
jmp 0x52b3
testb $0x1, -0x1d5(%rbp)
je 0x6357
leaq 0x23f87(%rip), %rcx     # 0x2924e
xorl %eax, %eax
movl %eax, %esi
leaq -0x218(%rbp), %rdi
movl $0x1, %edx
callq 0x3390
movl %eax, -0xc3c(%rbp)
jmp 0x52e4
movl -0xc3c(%rbp), %eax
cmpl $0x0, %eax
jne 0x54f1
movq 0x31cbe(%rip), %rdi     # 0x36fb8
leaq 0x23dc0(%rip), %rsi     # 0x290c1
callq 0x32b0
movq %rax, -0xc48(%rbp)
jmp 0x530f
movq -0xc48(%rbp), %rdi
movq 0x31c8b(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x5324
leaq -0x338(%rbp), %rdi
leaq -0x218(%rbp), %rsi
movl $0x18, %edx
movq $-0x19, %rcx
callq 0x32d0
jmp 0x5345
leaq -0x1f8(%rbp), %rdi
leaq -0x338(%rbp), %rsi
movq %rsi, -0xc58(%rbp)
callq 0x3360
movq -0xc58(%rbp), %rdi
callq 0x3210
movq 0x31c46(%rip), %rdi     # 0x36fb8
leaq 0x23d5e(%rip), %rsi     # 0x290d7
callq 0x32b0
movq %rax, -0xc50(%rbp)
jmp 0x5387
movq -0xc50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x3290
movq %rax, -0xc60(%rbp)
jmp 0x53a3
movq -0xc60(%rbp), %rdi
movq 0x31bf7(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x53b8
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x358(%rbp), %rdi
callq 0x4070
jmp 0x53ce
leaq -0x218(%rbp), %rdi
leaq -0x358(%rbp), %rsi
movq %rsi, -0xc70(%rbp)
callq 0x3360
movq -0xc70(%rbp), %rdi
callq 0x3210
movq 0x31bbd(%rip), %rdi     # 0x36fb8
leaq 0x23c44(%rip), %rsi     # 0x29046
callq 0x32b0
movq %rax, -0xc68(%rbp)
jmp 0x5410
movq -0xc68(%rbp), %rdi
leaq 0x23c50(%rip), %rsi     # 0x2906e
callq 0x32b0
movq %rax, -0xc78(%rbp)
jmp 0x542c
movq -0xc78(%rbp), %rdi
leaq 0x23c18(%rip), %rsi     # 0x29052
callq 0x32b0
movq %rax, -0xc80(%rbp)
jmp 0x5448
movq -0xc80(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3290
movq %rax, -0xc88(%rbp)
jmp 0x5464
movq -0xc88(%rbp), %rdi
movq 0x31b36(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x5479
jmp 0x6352
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x63e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x63cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x63c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x63b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x63a8
leaq 0x23d4c(%rip), %rcx     # 0x29244
xorl %eax, %eax
movl %eax, %esi
leaq -0x218(%rbp), %rdi
movl $0x1, %edx
callq 0x3390
movl %eax, -0xc8c(%rbp)
jmp 0x5515
movl -0xc8c(%rbp), %eax
cmpl $0x0, %eax
jne 0x56f9
movq 0x31a8d(%rip), %rdi     # 0x36fb8
leaq 0x23bb7(%rip), %rsi     # 0x290e9
callq 0x32b0
movq %rax, -0xc98(%rbp)
jmp 0x5540
movq -0xc98(%rbp), %rdi
movq 0x31a5a(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x5555
leaq -0x428(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3160
jmp 0x556a
leaq -0x408(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x428(%rbp), %rdx
callq 0xff00
jmp 0x5586
leaq -0x1b8(%rbp), %rdi
leaq -0x408(%rbp), %rsi
movq %rsi, -0xca0(%rbp)
callq 0x8480
movq -0xca0(%rbp), %rdi
callq 0x8560
leaq -0x428(%rbp), %rdi
callq 0x3210
movl -0x1b4(%rbp), %esi
leaq -0x510(%rbp), %rdi
callq 0x250d0
jmp 0x55cc
leaq -0x300(%rbp), %rdi
leaq -0x510(%rbp), %rsi
callq 0x86d0
jmp 0x55e1
leaq -0x510(%rbp), %rdi
callq 0x26870
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x530(%rbp), %rdi
callq 0x4070
jmp 0x5603
leaq -0x218(%rbp), %rdi
leaq -0x530(%rbp), %rsi
movq %rsi, -0xcb0(%rbp)
callq 0x3360
movq -0xcb0(%rbp), %rdi
callq 0x3210
movq 0x31988(%rip), %rdi     # 0x36fb8
leaq 0x23a0f(%rip), %rsi     # 0x29046
callq 0x32b0
movq %rax, -0xca8(%rbp)
jmp 0x5645
movq -0xca8(%rbp), %rdi
leaq 0x23a1b(%rip), %rsi     # 0x2906e
callq 0x32b0
movq %rax, -0xcb8(%rbp)
jmp 0x5661
movq -0xcb8(%rbp), %rdi
leaq 0x239e3(%rip), %rsi     # 0x29052
callq 0x32b0
movq %rax, -0xcc0(%rbp)
jmp 0x567d
movq -0xcc0(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3290
movq %rax, -0xcc8(%rbp)
jmp 0x5699
movq -0xcc8(%rbp), %rdi
movq 0x31901(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x56ae
jmp 0x6350
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x428(%rbp), %rdi
callq 0x3210
jmp 0x63a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x510(%rbp), %rdi
callq 0x26870
jmp 0x63a8
leaq 0x23e5c(%rip), %rcx     # 0x2955c
xorl %eax, %eax
movl %eax, %esi
leaq -0x218(%rbp), %rdi
movl $0x1, %edx
callq 0x3390
movl %eax, -0xccc(%rbp)
jmp 0x571d
movl -0xccc(%rbp), %eax
cmpl $0x0, %eax
jne 0x594f
movq 0x31885(%rip), %rdi     # 0x36fb8
leaq 0x239c4(%rip), %rsi     # 0x290fe
callq 0x32b0
movq %rax, -0xcd8(%rbp)
jmp 0x5748
movq -0xcd8(%rbp), %rdi
movq 0x31852(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x575d
leaq -0x600(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3160
jmp 0x5772
leaq -0x5e0(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x600(%rbp), %rdx
callq 0xff00
jmp 0x578e
leaq -0x1b8(%rbp), %rdi
leaq -0x5e0(%rbp), %rsi
movq %rsi, -0xce0(%rbp)
callq 0x8480
movq -0xce0(%rbp), %rdi
callq 0x8560
leaq -0x600(%rbp), %rdi
callq 0x3210
movl -0x1b8(%rbp), %eax
movl %eax, -0x1c8(%rbp)
leaq -0x1a0(%rbp), %rsi
leaq -0x630(%rbp), %rdi
callq 0x87f0
jmp 0x57e1
leaq -0x618(%rbp), %rdi
leaq -0x630(%rbp), %rsi
callq 0x240e0
jmp 0x57f6
leaq -0x318(%rbp), %rdi
leaq -0x618(%rbp), %rsi
callq 0x88e0
jmp 0x580b
leaq -0x618(%rbp), %rdi
callq 0x24220
leaq -0x630(%rbp), %rdi
callq 0x8910
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x650(%rbp), %rdi
callq 0x4070
jmp 0x5839
leaq -0x218(%rbp), %rdi
leaq -0x650(%rbp), %rsi
movq %rsi, -0xcf0(%rbp)
callq 0x3360
movq -0xcf0(%rbp), %rdi
callq 0x3210
movq 0x31752(%rip), %rdi     # 0x36fb8
leaq 0x237d9(%rip), %rsi     # 0x29046
callq 0x32b0
movq %rax, -0xce8(%rbp)
jmp 0x587b
movq -0xce8(%rbp), %rdi
leaq 0x237e5(%rip), %rsi     # 0x2906e
callq 0x32b0
movq %rax, -0xcf8(%rbp)
jmp 0x5897
movq -0xcf8(%rbp), %rdi
leaq 0x237ad(%rip), %rsi     # 0x29052
callq 0x32b0
movq %rax, -0xd00(%rbp)
jmp 0x58b3
movq -0xd00(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3290
movq %rax, -0xd08(%rbp)
jmp 0x58cf
movq -0xd08(%rbp), %rdi
movq 0x316cb(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x58e4
jmp 0x634e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x600(%rbp), %rdi
callq 0x3210
jmp 0x63a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x593e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x618(%rbp), %rdi
callq 0x24220
leaq -0x630(%rbp), %rdi
callq 0x8910
jmp 0x63a8
leaq 0x23726(%rip), %rcx     # 0x2907c
xorl %eax, %eax
movl %eax, %esi
leaq -0x218(%rbp), %rdi
movl $0x1, %edx
callq 0x3390
movl %eax, -0xd0c(%rbp)
jmp 0x5973
movl -0xd0c(%rbp), %eax
cmpl $0x0, %eax
jne 0x612c
movq 0x3162f(%rip), %rdi     # 0x36fb8
leaq 0x2377f(%rip), %rsi     # 0x2910f
callq 0x32b0
movq %rax, -0xd18(%rbp)
jmp 0x599e
movq -0xd18(%rbp), %rdi
movq 0x315fc(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x59b3
leaq -0x720(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3160
jmp 0x59c8
leaq -0x700(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x720(%rbp), %rdx
callq 0xff00
jmp 0x59e4
leaq -0x1b8(%rbp), %rdi
leaq -0x700(%rbp), %rsi
movq %rsi, -0xd20(%rbp)
callq 0x8480
movq -0xd20(%rbp), %rdi
callq 0x8560
leaq -0x720(%rbp), %rdi
callq 0x3210
leaq -0x740(%rbp), %rdi
callq 0x23c40
jmp 0x5a24
leaq -0x760(%rbp), %rdi
callq 0x23c40
jmp 0x5a32
leaq -0x821(%rbp), %rdi
movq %rdi, -0xd28(%rbp)
callq 0x3500
movq -0xd28(%rbp), %rdx
leaq 0x23c3e(%rip), %rsi     # 0x29691
leaq -0x820(%rbp), %rdi
callq 0x33b0
jmp 0x5a61
leaq -0x848(%rbp), %rdi
leaq -0x740(%rbp), %rsi
callq 0x8970
jmp 0x5a76
leaq -0x868(%rbp), %rdi
leaq -0x760(%rbp), %rsi
callq 0x8970
jmp 0x5a8b
leaq -0x880(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x89b0
jmp 0x5aa0
leaq -0x968(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x82a0
jmp 0x5ab5
movl $0x48, -0x974(%rbp)
movl $0x48, -0x978(%rbp)
leaq -0x970(%rbp), %rdi
leaq -0x974(%rbp), %rsi
leaq -0x978(%rbp), %rdx
callq 0x89e0
jmp 0x5ae5
movq -0x970(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
leaq -0x800(%rbp), %rdi
leaq -0x820(%rbp), %rsi
leaq -0x848(%rbp), %rdx
leaq -0x868(%rbp), %rcx
leaq -0x880(%rbp), %r8
leaq -0x968(%rbp), %r9
callq 0x13150
jmp 0x5b23
leaq -0x968(%rbp), %rdi
callq 0x26870
leaq -0x880(%rbp), %rdi
callq 0x24220
leaq -0x868(%rbp), %rdi
callq 0x23c60
leaq -0x848(%rbp), %rdi
callq 0x23c60
leaq -0x820(%rbp), %rdi
callq 0x3210
leaq -0x821(%rbp), %rdi
callq 0x32f0
leaq -0xa39(%rbp), %rdi
movq %rdi, -0xd30(%rbp)
callq 0x3500
movq -0xd30(%rbp), %rdx
leaq 0x23b05(%rip), %rsi     # 0x29691
leaq -0xa38(%rbp), %rdi
callq 0x33b0
jmp 0x5b9a
leaq -0xa60(%rbp), %rdi
leaq -0x760(%rbp), %rsi
callq 0x8970
jmp 0x5baf
leaq -0xa80(%rbp), %rdi
leaq -0x740(%rbp), %rsi
callq 0x8970
jmp 0x5bc4
leaq -0xa98(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x89b0
jmp 0x5bd9
leaq -0xb80(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x82a0
jmp 0x5bee
movl $0x48, -0xb8c(%rbp)
movl $0x48, -0xb90(%rbp)
leaq -0xb88(%rbp), %rdi
leaq -0xb8c(%rbp), %rsi
leaq -0xb90(%rbp), %rdx
callq 0x89e0
jmp 0x5c1e
movq -0xb88(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
leaq -0xa18(%rbp), %rdi
leaq -0xa38(%rbp), %rsi
leaq -0xa60(%rbp), %rdx
leaq -0xa80(%rbp), %rcx
leaq -0xa98(%rbp), %r8
leaq -0xb80(%rbp), %r9
callq 0x13150
jmp 0x5c5c
leaq -0xb80(%rbp), %rdi
callq 0x26870
leaq -0xa98(%rbp), %rdi
callq 0x24220
leaq -0xa80(%rbp), %rdi
callq 0x23c60
leaq -0xa60(%rbp), %rdi
callq 0x23c60
leaq -0xa38(%rbp), %rdi
callq 0x3210
leaq -0xa39(%rbp), %rdi
callq 0x32f0
movl $0x0, -0x1cc(%rbp)
movl $0x0, -0x1d0(%rbp)
movl $0x0, -0xb94(%rbp)
movl -0xb94(%rbp), %eax
cmpl -0x1c8(%rbp), %eax
jge 0x6001
movq 0x312dd(%rip), %rdi     # 0x36fb8
leaq 0x23440(%rip), %rsi     # 0x29122
callq 0x32b0
movq %rax, -0xd38(%rbp)
jmp 0x5cf0
movq -0xd38(%rbp), %rdi
movl -0x1cc(%rbp), %esi
callq 0x34c0
movq %rax, -0xd40(%rbp)
jmp 0x5d0b
movq -0xd40(%rbp), %rdi
leaq 0x23443(%rip), %rsi     # 0x2915c
callq 0x32b0
movq %rax, -0xd48(%rbp)
jmp 0x5d27
movq -0xd48(%rbp), %rdi
movl -0x1d0(%rbp), %esi
callq 0x34c0
movq %rax, -0xd50(%rbp)
jmp 0x5d42
movq -0xd50(%rbp), %rdi
movq 0x31258(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x5d57
movq -0x8(%rbp), %rax
movq %rax, -0xd60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd58(%rbp)
leaq -0xbb8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x3160
jmp 0x5d82
movq -0xd58(%rbp), %rsi
movq -0xd60(%rbp), %rdi
movq %rsp, %rax
leaq -0xbb8(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x800(%rbp), %rdx
leaq -0xa18(%rbp), %rcx
leaq -0x1cc(%rbp), %r8
leaq -0x1d0(%rbp), %r9
callq 0x4190
jmp 0x5dc0
leaq -0xbb8(%rbp), %rdi
callq 0x3210
cmpl $-0x1, -0x1cc(%rbp)
jne 0x5feb
cmpl $-0x1, -0x1d0(%rbp)
jne 0x5feb
jmp 0x6001
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x720(%rbp), %rdi
callq 0x3210
jmp 0x63a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x611b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5eda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5ece
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5ec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5eb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5eaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x968(%rbp), %rdi
callq 0x26870
leaq -0x880(%rbp), %rdi
callq 0x24220
leaq -0x868(%rbp), %rdi
callq 0x23c60
leaq -0x848(%rbp), %rdi
callq 0x23c60
leaq -0x820(%rbp), %rdi
callq 0x3210
leaq -0x821(%rbp), %rdi
callq 0x32f0
jmp 0x610f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5fa0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5f94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5f88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5f7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x5f70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0xb80(%rbp), %rdi
callq 0x26870
leaq -0xa98(%rbp), %rdi
callq 0x24220
leaq -0xa80(%rbp), %rdi
callq 0x23c60
leaq -0xa60(%rbp), %rdi
callq 0x23c60
leaq -0xa38(%rbp), %rdi
callq 0x3210
leaq -0xa39(%rbp), %rdi
callq 0x32f0
jmp 0x6103
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x60f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0xbb8(%rbp), %rdi
callq 0x3210
jmp 0x60f7
jmp 0x5fed
movl -0xb94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb94(%rbp)
jmp 0x5cc2
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0xbd8(%rbp), %rdi
callq 0x4070
jmp 0x6017
leaq -0x218(%rbp), %rdi
leaq -0xbd8(%rbp), %rsi
movq %rsi, -0xd70(%rbp)
callq 0x3360
movq -0xd70(%rbp), %rdi
callq 0x3210
movq 0x30f74(%rip), %rdi     # 0x36fb8
leaq 0x22ffb(%rip), %rsi     # 0x29046
callq 0x32b0
movq %rax, -0xd68(%rbp)
jmp 0x6059
movq -0xd68(%rbp), %rdi
leaq 0x23007(%rip), %rsi     # 0x2906e
callq 0x32b0
movq %rax, -0xd78(%rbp)
jmp 0x6075
movq -0xd78(%rbp), %rdi
leaq 0x22fcf(%rip), %rsi     # 0x29052
callq 0x32b0
movq %rax, -0xd80(%rbp)
jmp 0x6091
movq -0xd80(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3290
movq %rax, -0xd88(%rbp)
jmp 0x60ad
movq -0xd88(%rbp), %rdi
movq 0x30eed(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x60c2
leaq -0xa18(%rbp), %rdi
callq 0x13350
leaq -0x800(%rbp), %rdi
callq 0x13350
leaq -0x760(%rbp), %rdi
callq 0x23c60
leaq -0x740(%rbp), %rdi
callq 0x23c60
jmp 0x634c
leaq -0xa18(%rbp), %rdi
callq 0x13350
leaq -0x800(%rbp), %rdi
callq 0x13350
leaq -0x760(%rbp), %rdi
callq 0x23c60
leaq -0x740(%rbp), %rdi
callq 0x23c60
jmp 0x63a8
leaq 0x23417(%rip), %rcx     # 0x2954a
xorl %eax, %eax
movl %eax, %esi
leaq -0x218(%rbp), %rdi
movl $0x1, %edx
callq 0x3390
movl %eax, -0xd8c(%rbp)
jmp 0x6150
movl -0xd8c(%rbp), %eax
cmpl $0x0, %eax
jne 0x6297
movq 0x30e52(%rip), %rdi     # 0x36fb8
leaq 0x22ff5(%rip), %rsi     # 0x29162
callq 0x32b0
movq %rax, -0xd98(%rbp)
jmp 0x617b
movq -0xd98(%rbp), %rdi
movl -0x1d4(%rbp), %esi
callq 0x34c0
movq %rax, -0xda0(%rbp)
jmp 0x6196
movq -0xda0(%rbp), %rdi
movq 0x30e04(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x61ab
movl -0x1d4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1d4(%rbp)
cmpl $0x2, -0x1d4(%rbp)
jne 0x61cf
movb $0x0, -0x1d5(%rbp)
jmp 0x6292
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0xbf8(%rbp), %rdi
callq 0x4070
jmp 0x61e5
leaq -0x218(%rbp), %rdi
leaq -0xbf8(%rbp), %rsi
movq %rsi, -0xdb0(%rbp)
callq 0x3360
movq -0xdb0(%rbp), %rdi
callq 0x3210
movq 0x30da6(%rip), %rdi     # 0x36fb8
leaq 0x22e2d(%rip), %rsi     # 0x29046
callq 0x32b0
movq %rax, -0xda8(%rbp)
jmp 0x6227
movq -0xda8(%rbp), %rdi
leaq 0x22e39(%rip), %rsi     # 0x2906e
callq 0x32b0
movq %rax, -0xdb8(%rbp)
jmp 0x6243
movq -0xdb8(%rbp), %rdi
leaq 0x22e01(%rip), %rsi     # 0x29052
callq 0x32b0
movq %rax, -0xdc0(%rbp)
jmp 0x625f
movq -0xdc0(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3290
movq %rax, -0xdc8(%rbp)
jmp 0x627b
movq -0xdc8(%rbp), %rdi
movq 0x30d1f(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x6290
jmp 0x6292
jmp 0x634a
movq 0x30d1a(%rip), %rdi     # 0x36fb8
leaq 0x22edb(%rip), %rsi     # 0x29180
callq 0x32b0
movq %rax, -0xdd0(%rbp)
jmp 0x62b3
movq -0xdd0(%rbp), %rdi
movq 0x30ce7(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x62c8
movq 0x30ce9(%rip), %rdi     # 0x36fb8
leaq 0x22ef6(%rip), %rsi     # 0x291cc
callq 0x32b0
movq %rax, -0xdd8(%rbp)
jmp 0x62e4
movq -0xdd8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3290
movq %rax, -0xde0(%rbp)
jmp 0x6300
movq -0xde0(%rbp), %rdi
movq 0x30c9a(%rip), %rsi     # 0x36fa8
callq 0x32e0
jmp 0x6315
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0xc18(%rbp), %rdi
callq 0x4070
jmp 0x632b
leaq -0x218(%rbp), %rdi
leaq -0xc18(%rbp), %rsi
callq 0x3360
leaq -0xc18(%rbp), %rdi
callq 0x3210
jmp 0x634c
jmp 0x634e
jmp 0x6350
jmp 0x6352
jmp 0x52b3
leaq -0x318(%rbp), %rdi
callq 0x24220
leaq -0x300(%rbp), %rdi
callq 0x26870
leaq -0x218(%rbp), %rdi
callq 0x3210
leaq -0x1f8(%rbp), %rdi
callq 0x3210
leaq -0x1b8(%rbp), %rdi
callq 0x8560
leaq -0x108(%rbp), %rdi
callq 0xe2f0
addq $0xdf0, %rsp            # imm = 0xDF0
popq %rbp
retq
leaq -0x318(%rbp), %rdi
callq 0x24220
leaq -0x300(%rbp), %rdi
callq 0x26870
leaq -0x218(%rbp), %rdi
callq 0x3210
leaq -0x1f8(%rbp), %rdi
callq 0x3210
leaq -0x1b8(%rbp), %rdi
callq 0x8560
leaq -0x108(%rbp), %rdi
callq 0xe2f0
movq -0x1c0(%rbp), %rdi
callq 0x34f0
nopl (%rax)