// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x700(%rbp), %rdi
callq 0x9efc
leaq -0x200(%rbp), %rcx
xorl %eax, %eax
movq %rax, -0x18(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rcx)
movups %xmm0, -0x38(%rcx)
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x1e0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x1c0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movl $0x0, 0x14(%rcx)
leaq -0x190(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x50(%rbp), %rdi
movq %r14, -0x58(%rbp)
movq %r14, %rsi
movq %rbx, -0x60(%rbp)
movq %rbx, %rdx
callq 0x40d1
movq 0x197ea(%rip), %rdi     # 0x1efc8
leaq 0x1287d(%rip), %rsi     # 0x18062
movl $0x5, %edx
callq 0x3280
movq 0x197d2(%rip), %rdi     # 0x1efc8
leaq 0x1288d(%rip), %rsi     # 0x1808a
movl $0xd, %edx
callq 0x3280
movq 0x197ba(%rip), %rdi     # 0x1efc8
leaq 0x12859(%rip), %rsi     # 0x1806e
movl $0x4, %edx
callq 0x3280
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x1979a(%rip), %rdi     # 0x1efc8
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x568(%rbp), %rdi
callq 0x169f2
leaq -0x2d8(%rbp), %rdi
callq 0x14f0c
leaq -0x180(%rbp), %rsi
movl $0xa0, %eax
leaq -0x250(%rbp), %rcx
addq %rax, %rcx
movq %rcx, -0x88(%rbp)
addq %rsi, %rax
movq %rax, -0x90(%rbp)
movl $0x88, %ecx
leaq -0x568(%rbp), %rax
leaq (%rax,%rcx), %rdx
movq %rdx, -0x278(%rbp)
addq %rsi, %rcx
movq %rcx, -0x280(%rbp)
movl $0xb0, %ecx
leaq (%rax,%rcx), %rdx
movq %rdx, -0x268(%rbp)
addq %rsi, %rcx
movq %rcx, -0x270(%rbp)
movl $0xd0, %ecx
addq %rcx, %rax
movq %rax, -0x258(%rbp)
addq %rsi, %rcx
movq %rcx, -0x260(%rbp)
leaq 0x80(%rsi), %rax
movq %rax, -0x80(%rbp)
leaq 0x90(%rsi), %rax
movq %rax, -0x78(%rbp)
movb $0x1, %al
movl %eax, -0x64(%rbp)
leaq -0x7e8(%rbp), %r12
movabsq $0x4800000048, %r13     # imm = 0x4800000048
movl $0x0, -0x2c(%rbp)
movl $0x1, %edx
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
leaq 0x12935(%rip), %rcx     # 0x1826a
callq 0x32d0
testl %eax, %eax
je 0x5aa2
movl $0x1, %edx
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
leaq 0x1290c(%rip), %rcx     # 0x18260
callq 0x32d0
testl %eax, %eax
je 0x5c41
movl $0x1, %edx
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
leaq 0x12c29(%rip), %rcx     # 0x1859c
callq 0x32d0
testl %eax, %eax
je 0x5fbd
movl $0x1, %edx
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
leaq 0x12706(%rip), %rcx     # 0x18098
callq 0x32d0
testl %eax, %eax
je 0x62a2
movl $0x1, %edx
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
leaq 0x12bd9(%rip), %rcx     # 0x1858a
callq 0x32d0
testl %eax, %eax
je 0x678b
movl $0x4b, %edx
movq 0x195fe(%rip), %rdi     # 0x1efc8
leaq 0x127cb(%rip), %rsi     # 0x1819c
callq 0x3280
movq 0x195eb(%rip), %rcx     # 0x1efc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq 0x195cd(%rip), %rdi     # 0x1efc8
callq 0x3030
movq %rax, %rdi
callq 0x3180
movl $0x11, %edx
movq 0x195b4(%rip), %rdi     # 0x1efc8
leaq 0x127cd(%rip), %rsi     # 0x181e8
callq 0x3280
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x19599(%rip), %rdi     # 0x1efc8
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x180(%rbp), %rbx
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x40d1
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x5fae
callq 0x3200
jmp 0x5fae
movl $0x15, %edx
movq 0x1951a(%rip), %rdi     # 0x1efc8
leaq 0x12628(%rip), %rsi     # 0x180dd
callq 0x3280
movq 0x19507(%rip), %rcx     # 0x1efc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq 0x194e9(%rip), %rdi     # 0x1efc8
callq 0x3030
movq %rax, %rdi
callq 0x3180
movl $0x18, %edx
leaq -0x180(%rbp), %rbx
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
movq $-0x19, %rcx
callq 0x3240
leaq -0x1a0(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x5b32
callq 0x3200
movl $0x11, %edx
movq 0x1948a(%rip), %rdi     # 0x1efc8
leaq 0x125ae(%rip), %rsi     # 0x180f3
callq 0x3280
movq -0x1a0(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq 0x19469(%rip), %rdi     # 0x1efc8
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x180(%rbp), %rbx
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x40d1
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x5bc9
callq 0x3200
movl $0x5, %edx
movq 0x193f3(%rip), %rdi     # 0x1efc8
leaq 0x12486(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq 0x193db(%rip), %rdi     # 0x1efc8
leaq 0x12496(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq 0x193c3(%rip), %rdi     # 0x1efc8
leaq 0x12462(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x193a8(%rip), %rdi     # 0x1efc8
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
jmp 0x5f9b
movl $0x14, %edx
movq 0x1937b(%rip), %rdi     # 0x1efc8
leaq 0x124b1(%rip), %rsi     # 0x18105
callq 0x3280
movq 0x19368(%rip), %rcx     # 0x1efc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq 0x1934a(%rip), %rdi     # 0x1efc8
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x368(%rbp), %rax
movq %rax, -0x378(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x378(%rbp), %rbx
movq %rbx, %rdi
callq 0x9da8
leaq -0x180(%rbp), %rdi
leaq -0x700(%rbp), %rsi
movq %rbx, %rdx
callq 0xaf0a
movl -0x170(%rbp), %eax
movl %eax, -0x240(%rbp)
movups -0x180(%rbp), %xmm0
movaps %xmm0, -0x250(%rbp)
movq -0x238(%rbp), %rdi
movaps -0x230(%rbp), %xmm0
movq -0x168(%rbp), %rax
movq %rax, -0x238(%rbp)
movups -0x160(%rbp), %xmm1
movaps %xmm1, -0x230(%rbp)
movq %rdi, -0x168(%rbp)
movups %xmm0, -0x160(%rbp)
xorps %xmm0, %xmm0
leaq -0x170(%rbp), %rax
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
testq %rdi, %rdi
je 0x5d3b
callq 0x3200
movups -0x150(%rbp), %xmm0
movaps %xmm0, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x32b0
leaq -0x1f0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x32b0
leaq -0x1d0(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x32b0
movq -0x90(%rbp), %rcx
movl 0x8(%rcx), %eax
movq -0x88(%rbp), %rdx
movl %eax, 0x8(%rdx)
movq (%rcx), %rax
movq %rax, (%rdx)
movq -0x100(%rbp), %rdi
cmpq -0x78(%rbp), %rdi
je 0x5dab
callq 0x3200
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x5dc3
callq 0x3200
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x5ddb
callq 0x3200
movq -0x168(%rbp), %rdi
testq %rdi, %rdi
je 0x5dec
callq 0x3200
movq -0x378(%rbp), %rdi
leaq -0x368(%rbp), %rax
cmpq %rax, %rdi
je 0x5e04
callq 0x3200
movl -0x24c(%rbp), %esi
leaq -0x180(%rbp), %rdi
callq 0x158a8
movq -0x180(%rbp), %rax
movq -0x17a(%rbp), %rcx
movq %rcx, -0x562(%rbp)
movq %rax, -0x568(%rbp)
leaq -0x558(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x3140
movq -0x150(%rbp), %rax
movq %rax, -0x538(%rbp)
leaq -0x530(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x3140
movq -0x128(%rbp), %rax
movq %rax, -0x510(%rbp)
leaq -0x508(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x3140
movq -0x100(%rbp), %rax
movq %rax, -0x4e8(%rbp)
movq -0x278(%rbp), %rdi
movq -0x280(%rbp), %rsi
callq 0x3140
movq -0xd8(%rbp), %rax
movq %rax, -0x4c0(%rbp)
movq -0x270(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movq -0x268(%rbp), %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq -0x258(%rbp), %rdi
movq -0x260(%rbp), %rsi
callq 0x9128
leaq -0x180(%rbp), %rbx
movq %rbx, %rdi
callq 0x16aa0
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x40d1
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x5f28
callq 0x3200
movl $0x5, %edx
movq 0x19094(%rip), %rdi     # 0x1efc8
leaq 0x12127(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq 0x1907c(%rip), %rdi     # 0x1efc8
leaq 0x12137(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq 0x19064(%rip), %rdi     # 0x1efc8
leaq 0x12103(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x19049(%rip), %rdi     # 0x1efc8
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
testb $0x1, -0x64(%rbp)
jne 0x5923
jmp 0x68c2
movl $0x10, %edx
movq 0x18fff(%rip), %rdi     # 0x1efc8
leaq 0x1214a(%rip), %rsi     # 0x1811a
callq 0x3280
movq 0x18fec(%rip), %rcx     # 0x1efc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq 0x18fce(%rip), %rdi     # 0x1efc8
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x348(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x358(%rbp), %rbx
movq %rbx, %rdi
callq 0x9da8
leaq -0x180(%rbp), %rdi
leaq -0x700(%rbp), %rsi
movq %rbx, %rdx
callq 0xaf0a
movl -0x170(%rbp), %eax
movl %eax, -0x240(%rbp)
movups -0x180(%rbp), %xmm0
movaps %xmm0, -0x250(%rbp)
movq -0x238(%rbp), %rdi
movaps -0x230(%rbp), %xmm0
movq -0x168(%rbp), %rax
movq %rax, -0x238(%rbp)
movups -0x160(%rbp), %xmm1
movaps %xmm1, -0x230(%rbp)
movq %rdi, -0x168(%rbp)
movups %xmm0, -0x160(%rbp)
xorps %xmm0, %xmm0
leaq -0x170(%rbp), %rax
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
testq %rdi, %rdi
je 0x60b7
callq 0x3200
movups -0x150(%rbp), %xmm0
movaps %xmm0, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x32b0
leaq -0x1f0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x32b0
leaq -0x1d0(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x32b0
movq -0x90(%rbp), %rcx
movl 0x8(%rcx), %eax
movq -0x88(%rbp), %rdx
movl %eax, 0x8(%rdx)
movq (%rcx), %rax
movq %rax, (%rdx)
movq -0x100(%rbp), %rdi
cmpq -0x78(%rbp), %rdi
je 0x6127
callq 0x3200
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x613f
callq 0x3200
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x6157
callq 0x3200
movq -0x168(%rbp), %rdi
testq %rdi, %rdi
je 0x6168
callq 0x3200
movq -0x358(%rbp), %rdi
leaq -0x348(%rbp), %rax
cmpq %rax, %rdi
je 0x6180
callq 0x3200
movl -0x250(%rbp), %eax
movl %eax, -0x94(%rbp)
leaq -0x440(%rbp), %rbx
movq %rbx, %rdi
leaq -0x238(%rbp), %rsi
callq 0x8cfc
leaq -0x180(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x150e0
leaq -0x2d8(%rbp), %rdi
movq %r15, %rsi
callq 0x9644
movq %r15, %rdi
callq 0x151ae
movq -0x440(%rbp), %rdi
testq %rdi, %rdi
je 0x61dc
callq 0x3200
leaq -0x180(%rbp), %rbx
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x40d1
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x6217
callq 0x3200
movl $0x5, %edx
movq 0x18da5(%rip), %rdi     # 0x1efc8
leaq 0x11e38(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq 0x18d8d(%rip), %rdi     # 0x1efc8
leaq 0x11e48(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq 0x18d75(%rip), %rdi     # 0x1efc8
leaq 0x11e14(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x18d5a(%rip), %rdi     # 0x1efc8
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
jmp 0x5fae
movl $0x12, %edx
movq 0x18d1a(%rip), %rdi     # 0x1efc8
leaq 0x11e76(%rip), %rsi     # 0x1812b
callq 0x3280
movq 0x18d07(%rip), %rcx     # 0x1efc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq 0x18ce9(%rip), %rdi     # 0x1efc8
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x328(%rbp), %rax
movq %rax, -0x338(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x338(%rbp), %rbx
movq %rbx, %rdi
callq 0x9da8
leaq -0x180(%rbp), %rdi
leaq -0x700(%rbp), %rsi
movq %rbx, %rdx
callq 0xaf0a
movl -0x170(%rbp), %eax
movl %eax, -0x240(%rbp)
movups -0x180(%rbp), %xmm0
movaps %xmm0, -0x250(%rbp)
movq -0x238(%rbp), %rdi
movaps -0x230(%rbp), %xmm0
movq -0x168(%rbp), %rax
movq %rax, -0x238(%rbp)
movups -0x160(%rbp), %xmm1
movaps %xmm1, -0x230(%rbp)
movq %rdi, -0x168(%rbp)
movups %xmm0, -0x160(%rbp)
xorps %xmm0, %xmm0
leaq -0x170(%rbp), %rax
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
testq %rdi, %rdi
je 0x639c
callq 0x3200
movups -0x150(%rbp), %xmm0
movaps %xmm0, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x32b0
leaq -0x1f0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x32b0
leaq -0x1d0(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x32b0
movq -0x90(%rbp), %rcx
movl 0x8(%rcx), %eax
movq -0x88(%rbp), %rdx
movl %eax, 0x8(%rdx)
movq (%rcx), %rax
movq %rax, (%rdx)
movq -0x100(%rbp), %rdi
cmpq -0x78(%rbp), %rdi
je 0x640c
callq 0x3200
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x6424
callq 0x3200
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x643c
callq 0x3200
movq -0x168(%rbp), %rdi
testq %rdi, %rdi
je 0x644d
callq 0x3200
movq -0x338(%rbp), %rdi
leaq -0x328(%rbp), %rax
cmpq %rax, %rdi
je 0x6465
callq 0x3200
leaq -0x318(%rbp), %rdi
callq 0x14e70
leaq -0x2f8(%rbp), %rdi
callq 0x14e70
leaq -0x2b0(%rbp), %rax
movq %rax, -0x2c0(%rbp)
leaq -0x2c0(%rbp), %rdi
leaq 0x122fc(%rip), %rdx     # 0x18795
movq %rdx, %rsi
callq 0x9e42
leaq -0x428(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x9b18
movl -0x300(%rbp), %eax
movl %eax, -0x410(%rbp)
leaq -0x408(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x9b18
movl -0x2e0(%rbp), %eax
movl %eax, -0x3f0(%rbp)
leaq -0x3e8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x9c98
movq %r12, %rdi
leaq -0x568(%rbp), %rsi
callq 0x8b34
movq %r13, (%rsp)
leaq -0x180(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
leaq -0x428(%rbp), %rbx
movq %rbx, %rdx
leaq -0x408(%rbp), %r14
movq %r14, %rcx
leaq -0x3e8(%rbp), %r13
movq %r13, %r8
movq %r12, %r9
callq 0xccfc
movq %r12, %rdi
callq 0x16aa0
movq %r13, %rdi
callq 0x151ae
movq %r14, %rdi
callq 0x14e84
movq %rbx, %rdi
callq 0x14e84
movq -0x2c0(%rbp), %rdi
leaq -0x2b0(%rbp), %rax
cmpq %rax, %rdi
je 0x6571
callq 0x3200
leaq -0x290(%rbp), %rax
movq %rax, -0x2a0(%rbp)
leaq -0x2a0(%rbp), %rdi
leaq 0x12208(%rip), %rdx     # 0x18795
movq %rdx, %rsi
callq 0x9e42
leaq -0x3d0(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x9b18
movabsq $0x4800000048, %rbx     # imm = 0x4800000048
movl -0x2e0(%rbp), %eax
movl %eax, -0x3b8(%rbp)
leaq -0x3b0(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x9b18
movl -0x300(%rbp), %eax
movl %eax, -0x398(%rbp)
leaq -0x390(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x9c98
leaq -0x8d0(%rbp), %r12
movq %r12, %rdi
leaq -0x568(%rbp), %rsi
callq 0x8b34
movq %rbx, %r13
movq %rbx, (%rsp)
leaq -0x608(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
leaq -0x3d0(%rbp), %rbx
movq %rbx, %rdx
leaq -0x3b0(%rbp), %r15
movq %r15, %rcx
leaq -0x390(%rbp), %r14
movq %r14, %r8
movq %r12, %r9
callq 0xccfc
movq %r12, %rdi
callq 0x16aa0
movq %r14, %rdi
callq 0x151ae
movq %r15, %rdi
callq 0x14e84
movq %rbx, %rdi
callq 0x14e84
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x6679
callq 0x3200
xorl %eax, %eax
movl %eax, -0x6c(%rbp)
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x94(%rbp)
leaq -0x7e8(%rbp), %r12
jg 0x697b
leaq -0x460(%rbp), %rbx
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x40d1
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x460(%rbp), %rdi
leaq -0x450(%rbp), %rax
cmpq %rax, %rdi
je 0x66d0
callq 0x3200
movl $0x5, %edx
movq 0x188ec(%rip), %rdi     # 0x1efc8
leaq 0x1197f(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq 0x188d4(%rip), %rdi     # 0x1efc8
leaq 0x1198f(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq 0x188bc(%rip), %rdi     # 0x1efc8
leaq 0x1195b(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x188a1(%rip), %rdi     # 0x1efc8
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x608(%rbp), %rdi
callq 0xce4c
leaq -0x180(%rbp), %rdi
callq 0xce4c
leaq -0x2f8(%rbp), %rdi
callq 0x14e84
leaq -0x318(%rbp), %rdi
callq 0x14e84
jmp 0x5fae
movl $0x1d, %edx
movq 0x18831(%rip), %rdi     # 0x1efc8
leaq 0x119e0(%rip), %rsi     # 0x1817e
callq 0x3280
movq 0x1881e(%rip), %rdi     # 0x1efc8
movl -0x2c(%rbp), %esi
callq 0x33c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl $0x2, %eax
jne 0x67fc
movl $0x2, -0x2c(%rbp)
movl $0x0, -0x64(%rbp)
jmp 0x5fae
leaq -0x180(%rbp), %rbx
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x40d1
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x6837
callq 0x3200
movl $0x5, %edx
movq 0x18785(%rip), %rdi     # 0x1efc8
leaq 0x11818(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq 0x1876d(%rip), %rdi     # 0x1efc8
leaq 0x11828(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq 0x18755(%rip), %rdi     # 0x1efc8
leaq 0x117f4(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x1873a(%rip), %rdi     # 0x1efc8
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
jmp 0x5fae
leaq -0x2d8(%rbp), %rdi
callq 0x151ae
leaq -0x568(%rbp), %rdi
callq 0x16aa0
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq -0x200(%rbp), %rbx
je 0x68f3
callq 0x3200
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x690b
callq 0x3200
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x6923
callq 0x3200
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
cmpq %rax, %rdi
je 0x693b
callq 0x3200
movq -0x210(%rbp), %rdi
cmpq %rbx, %rdi
je 0x694c
callq 0x3200
movq -0x238(%rbp), %rdi
testq %rdi, %rdi
je 0x695d
callq 0x3200
leaq -0x700(%rbp), %rdi
callq 0x9fa2
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18646(%rip), %rdi     # 0x1efc8
leaq 0x117b5(%rip), %rsi     # 0x1813e
movl $0x39, %edx
callq 0x3280
movl -0x6c(%rbp), %esi
movq 0x1862b(%rip), %rdi     # 0x1efc8
callq 0x33c0
movq %rax, %rbx
leaq 0x117cc(%rip), %rsi     # 0x18178
movl $0x5, %edx
movq %rax, %rdi
callq 0x3280
movl -0x68(%rbp), %esi
movq %rbx, %rdi
callq 0x33c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x470(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x1a0(%rbp), %rsi
movq -0x198(%rbp), %rdx
addq %rsi, %rdx
leaq -0x480(%rbp), %rbx
movq %rbx, %rdi
callq 0x9da8
movq %rbx, (%rsp)
leaq -0x180(%rbp), %rdx
leaq -0x608(%rbp), %rcx
leaq -0x6c(%rbp), %r8
leaq -0x68(%rbp), %r9
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x41a6
movq %rax, %rbx
movq -0x480(%rbp), %rdi
cmpq %r14, %rdi
je 0x6c0a
callq 0x3200
jmp 0x6c0a
jmp 0x6c4d
movq %rax, %rbx
jmp 0x6c5c
jmp 0x6bd8
movq %rax, %rbx
jmp 0x6c7a
jmp 0x6c07
movq %rax, %rbx
jmp 0x6b62
movq %rax, %rbx
jmp 0x6b6e
movq %rax, %rbx
jmp 0x6c22
movq %rax, %rbx
jmp 0x6c2e
jmp 0x6c4d
movq %rax, %rbx
movq -0x338(%rbp), %rdi
leaq -0x328(%rbp), %rax
jmp 0x6bf3
jmp 0x6c4d
jmp 0x6c07
movq %rax, %rbx
leaq -0x8d0(%rbp), %rdi
callq 0x16aa0
jmp 0x6ad5
movq %rax, %rbx
leaq -0x390(%rbp), %rdi
callq 0x151ae
jmp 0x6ae6
movq %rax, %rbx
leaq -0x3b0(%rbp), %rdi
callq 0x14e84
jmp 0x6af7
movq %rax, %rbx
leaq -0x3d0(%rbp), %rdi
callq 0x14e84
jmp 0x6b08
movq %rax, %rbx
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x6c16
callq 0x3200
jmp 0x6c16
movq %rax, %rbx
jmp 0x6c16
movq %rax, %rbx
leaq -0x7e8(%rbp), %rdi
callq 0x16aa0
jmp 0x6b45
movq %rax, %rbx
leaq -0x3e8(%rbp), %rdi
callq 0x151ae
jmp 0x6b56
movq %rax, %rbx
leaq -0x408(%rbp), %rdi
callq 0x14e84
leaq -0x428(%rbp), %rdi
callq 0x14e84
movq -0x2c0(%rbp), %rdi
leaq -0x2b0(%rbp), %rax
cmpq %rax, %rdi
je 0x6c22
callq 0x3200
jmp 0x6c22
jmp 0x6c4d
jmp 0x6c4d
movq %rax, %rbx
leaq -0x180(%rbp), %rdi
callq 0x151ae
jmp 0x6bad
movq %rax, %rbx
movq -0x440(%rbp), %rdi
testq %rdi, %rdi
jne 0x6bf8
jmp 0x6c50
jmp 0x6c4d
movq %rax, %rbx
movq -0x358(%rbp), %rdi
leaq -0x348(%rbp), %rax
jmp 0x6bf3
jmp 0x6c4d
movq %rax, %rbx
jmp 0x6c68
jmp 0x6c4d
movq %rax, %rbx
movq -0x378(%rbp), %rdi
leaq -0x368(%rbp), %rax
cmpq %rax, %rdi
je 0x6c50
callq 0x3200
jmp 0x6c50
jmp 0x6c4d
jmp 0x6c4d
jmp 0x6c4d
jmp 0x6c4d
movq %rax, %rbx
leaq -0x608(%rbp), %rdi
callq 0xce4c
leaq -0x180(%rbp), %rdi
callq 0xce4c
leaq -0x2f8(%rbp), %rdi
callq 0x14e84
leaq -0x318(%rbp), %rdi
callq 0x14e84
jmp 0x6c50
movq %rax, %rbx
leaq -0x180(%rbp), %rdi
callq 0x16aa0
jmp 0x6c50
movq %rax, %rbx
leaq -0x2d8(%rbp), %rdi
callq 0x151ae
leaq -0x568(%rbp), %rdi
callq 0x16aa0
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c7a
callq 0x3200
leaq -0x190(%rbp), %rax
movq -0x1a0(%rbp), %rdi
cmpq %rax, %rdi
je 0x6c92
callq 0x3200
leaq -0x250(%rbp), %rdi
callq 0x8ca0
leaq -0x700(%rbp), %rdi
callq 0x9fa2
movq %rbx, %rdi
callq 0x33f0