// File: /workspace/github_cpp_makefile_star2_O1/Doug0855[P]TigerZone/main.cpp
// Function: moveProtocol(Client&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, Game&, Game&, int&, int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int moveProtocol(Client &client, std::string &message_list, Game &game1, Game &game2, int &success1, int &success2, std::string OPPONENT_ID)
{
	/*
	This protocol is called whenever a move needs to be made.
	It takes a reference to both games being played and two success values.
	These success values are used to calculate the number of iterations needed in the processing loop
	*/
	std::string message_to_send;
	std::string message;
	values_t message_info;
	Adapter adapter;
	int runTime = 3;
	Tile tmpTile;

	message = getMesssage(client, message_list);
	std::cout << GREEN << "Server sent: " << RESET << message << std::endl;

	if ((success1 == -1 || success2 == -1) && message.compare(0,1,"M") == 0) //Need to make a move
		runTime = 2;
	else if ((success1 == -1 || success2 == -1) && message.compare(0,1,"G") == 0) //Need to get a game piece
		runTime = 1;
	else if (success1 == -1 && success2 == -1) //Do nothing
		runTime = 0;

	for (int i = 0; i < runTime; i++)
	{
		if (message.compare(0,1,"M") == 0)
		{
			std::cout<<"	SERVER ASKING FOR A MOVE"<<std::endl;
			message_info = adapter.translate(message);
			if (game1.getID() == "")
				game1.setID(message_info.gameId);
			if (message_info.gameId == game1.getID())
			{
				//std::cout << "sent our move for tile: " << message_info.tile_num <<  " and game: " << message_info.gameId << std::endl;
				tmpTile = Tile(message_info.tile_num);
				message_to_send = game1.makeMove(tmpTile, message_info.moveNumber);
			}
			else if (message_info.gameId == game2.getID())
			{
				//std::cout << "sent our move for tile: " << message_info.tile_num <<  " and game: " << message_info.gameId << std::endl;
				tmpTile = Tile(message_info.tile_num);
				message_to_send = game2.makeMove(tmpTile, message_info.moveNumber);
			}
			std::cout << RED << "	We sent: " << RESET << message_to_send << std::endl;
			client.sendMessage(message_to_send);
			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 MOVES INFORMATION" << std::endl;
			message_info = adapter.translate(message);
			if (message_info.gameId != game1.getID() && game2.getID() == "")
				game2.setID(message_info.gameId);
			if (message_info.forfeit == -1)
			{
				if (game2.getID() == message_info.gameId)
					success2 = -1;
				else if (game1.getID() == message_info.gameId)
					success1 = -1;
				if (success1 == -1 && success2 == -1)
					break;
			}
			else
			{
				if (message_info.playerId == OPPONENT_ID)
				{
					tmpTile = Tile(message_info.tile_num);
					int i = message_info.coordinates.first;
					int j = message_info.coordinates.second;
					int orientation = message_info.rotation;

					if (message_info.gameId == game1.getID())
					{
						//std::cout << "	Received opponent move for tile: " << message_info.tile_num <<  " in game: " << message_info.gameId << std::endl;
						//std::cout << "		tile placed at <" << i << ", " << j << "> " << "with rotation: " << orientation << std::endl;
						//std::cout << "		croc? " << message_info.croc << " tiger? " << message_info.tiger << " zone " << "[" <<message_info.tiger_spot.first << ", " << message_info.tiger_spot.second << "] " << std::endl;
						tmpTile = Tile(message_info.tile_num);
						game1.enemyMove(tmpTile, i, j, orientation, message_info.tiger, message_info.croc, message_info.tiger_spot);
					}
					else if (message_info.gameId == game2.getID())
					{
						//std::cout << "	Received opponent move for tile: " << message_info.tile_num <<  " in game: " << message_info.gameId << std::endl;
						//std::cout << "		tile placed at <" << i << ", " << j << "> :" << "with rotation: " << orientation << std::endl;
						//std::cout << "		croc? " << message_info.croc << " tiger? " << message_info.tiger << " zone " << "[" <<message_info.tiger_spot.first << ", " << message_info.tiger_spot.second << "] " << std::endl;
						//tmpTile = Tile(message_info.tile_num);
						//debugging std::cout << "DEBUG FLAG" << std::endl;
						game2.enemyMove(tmpTile, i, j, orientation, message_info.tiger, message_info.croc, message_info.tiger_spot);
						//debugging std::cout << "DEBUG FLAG 2" << std::endl;
					}
				}
			}
			if (i < runTime-1) //if it isn't the final message, display the message the server sent.
			{
				message = getMesssage(client, message_list);
				std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x908, %rsp            # imm = 0x908
movq %r9, -0x48(%rbp)
movq %r8, -0x40(%rbp)
movq %rcx, -0x30(%rbp)
movq %rdx, %r12
movq %rsi, -0x198(%rbp)
movq %rdi, -0x80(%rbp)
leaq -0x290(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x90(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x210(%rbp), %rcx
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 -0x1f0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x1d0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movl $0x0, 0x14(%rcx)
leaq -0x760(%rbp), %rdi
callq 0x9efc
leaq -0x478(%rbp), %rdi
callq 0x169f2
leaq -0x188(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x198(%rbp), %rdx
callq 0x40d1
leaq -0xa0(%rbp), %rdi
leaq -0x188(%rbp), %rbx
movq %rbx, %rsi
callq 0x32b0
movq (%rbx), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x429a
callq 0x3200
movq 0x1ad27(%rip), %rdi     # 0x1efc8
leaq 0x13dba(%rip), %rsi     # 0x18062
movl $0x5, %edx
callq 0x3280
movq 0x1ad0f(%rip), %rdi     # 0x1efc8
leaq 0x13dca(%rip), %rsi     # 0x1808a
movl $0xd, %edx
callq 0x3280
movq 0x1acf7(%rip), %rdi     # 0x1efc8
leaq 0x13d96(%rip), %rsi     # 0x1806e
movl $0x4, %edx
callq 0x3280
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq 0x1acd1(%rip), %r13     # 0x1efc8
movq %r13, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3120
movq -0x40(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x4344
movq -0x48(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x4344
movq -0x40(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x4369
movq -0x48(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x4369
movq -0x48(%rbp), %rax
movl (%rax), %eax
movq -0x40(%rbp), %rcx
andl (%rcx), %eax
xorl %ecx, %ecx
cmpl $-0x1, %eax
setne %cl
leal (%rcx,%rcx,2), %ecx
jmp 0x438c
leaq 0x13d4d(%rip), %rcx     # 0x18098
leaq -0xa0(%rbp), %rdi
movl $0x1, %edx
xorl %esi, %esi
callq 0x32d0
movl $0x2, %ecx
testl %eax, %eax
jne 0x4319
jmp 0x438c
leaq 0x1421a(%rip), %rcx     # 0x1858a
leaq -0xa0(%rbp), %rdi
movl $0x1, %edx
xorl %esi, %esi
callq 0x32d0
movl $0x1, %ecx
testl %eax, %eax
jne 0x432b
movl $0xa0, %eax
leaq -0x260(%rbp), %rdx
addq %rax, %rdx
movq %rdx, -0x278(%rbp)
addq %rbx, %rax
movq %rax, -0x280(%rbp)
movl $0x88, %edx
leaq -0x478(%rbp), %rax
leaq (%rax,%rdx), %rsi
movq %rsi, -0x70(%rbp)
addq %rbx, %rdx
movq %rdx, -0x78(%rbp)
movl $0xb0, %edx
leaq (%rax,%rdx), %rsi
movq %rsi, -0x60(%rbp)
addq %rbx, %rdx
movq %rdx, -0x68(%rbp)
movl $0xd0, %edx
addq %rdx, %rax
movq %rax, -0x50(%rbp)
addq %rbx, %rdx
movq %rdx, -0x58(%rbp)
decl %ecx
movl %ecx, -0x1a4(%rbp)
leaq 0x80(%rbx), %rax
movq %rax, -0x270(%rbp)
leaq 0x90(%rbx), %rax
movq %rax, -0x268(%rbp)
movq -0x30(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x2a8(%rbp)
leaq 0x20(%r12), %rax
movq %rax, -0x2b0(%rbp)
movq $0x0, -0x1a0(%rbp)
movq %r12, -0x190(%rbp)
movl $0x1, %edx
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
leaq 0x13c44(%rip), %rcx     # 0x18098
callq 0x32d0
testl %eax, %eax
je 0x46a7
movl $0x1, %edx
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
leaq 0x14114(%rip), %rcx     # 0x1858a
callq 0x32d0
testl %eax, %eax
jne 0x54f4
movl $0x17, %edx
movq %r13, %rdi
leaq 0x13c33(%rip), %rsi     # 0x180c5
callq 0x3280
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x320(%rbp), %rax
movq %rax, -0x330(%rbp)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
addq %rsi, %rdx
leaq -0x330(%rbp), %r14
movq %r14, %rdi
callq 0x9da8
movq %rbx, %rdi
leaq -0x760(%rbp), %rsi
movq %r14, %rdx
callq 0xaf0a
movl -0x178(%rbp), %eax
movl %eax, -0x250(%rbp)
movups -0x188(%rbp), %xmm0
movaps %xmm0, -0x260(%rbp)
movq -0x248(%rbp), %rdi
movaps -0x240(%rbp), %xmm0
movq -0x170(%rbp), %rax
movq %rax, -0x248(%rbp)
movups -0x168(%rbp), %xmm1
movaps %xmm1, -0x240(%rbp)
movq %rdi, -0x170(%rbp)
movups %xmm0, -0x168(%rbp)
xorps %xmm0, %xmm0
leaq -0x170(%rbp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x4570
callq 0x3200
movups -0x158(%rbp), %xmm0
movaps %xmm0, -0x230(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x32b0
leaq -0x200(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x32b0
leaq -0x1e0(%rbp), %rdi
movq -0x270(%rbp), %rsi
callq 0x32b0
movq -0x280(%rbp), %rcx
movl 0x8(%rcx), %eax
movq -0x278(%rbp), %rdx
movl %eax, 0x8(%rdx)
movq (%rcx), %rax
movq %rax, (%rdx)
movq -0x108(%rbp), %rdi
cmpq -0x268(%rbp), %rdi
je 0x45e6
callq 0x3200
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x45fe
callq 0x3200
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x4616
callq 0x3200
movq -0x170(%rbp), %rdi
testq %rdi, %rdi
je 0x4627
callq 0x3200
movq -0x330(%rbp), %rdi
leaq -0x320(%rbp), %rax
cmpq %rax, %rdi
je 0x463f
callq 0x3200
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
movq -0x218(%rbp), %rdx
movb $0x1, %r14b
cmpq -0x180(%rbp), %rdx
leaq -0x498(%rbp), %r12
jne 0x4b6b
testq %rdx, %rdx
je 0x4b68
movq -0x188(%rbp), %rsi
movq -0x220(%rbp), %rdi
callq 0x3230
testl %eax, %eax
setne %r14b
jmp 0x4b6b
movl $0x19, %edx
movq %r13, %rdi
leaq 0x139e4(%rip), %rsi     # 0x1809a
callq 0x3280
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x380(%rbp), %rax
movq %rax, -0x390(%rbp)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
addq %rsi, %rdx
leaq -0x390(%rbp), %r14
movq %r14, %rdi
callq 0x9da8
movq %rbx, %rdi
leaq -0x760(%rbp), %rsi
movq %r14, %rdx
callq 0xaf0a
movl -0x178(%rbp), %eax
movl %eax, -0x250(%rbp)
movups -0x188(%rbp), %xmm0
movaps %xmm0, -0x260(%rbp)
movq -0x248(%rbp), %rdi
movaps -0x240(%rbp), %xmm0
movq -0x170(%rbp), %rax
movq %rax, -0x248(%rbp)
movups -0x168(%rbp), %xmm1
movaps %xmm1, -0x240(%rbp)
movq %rdi, -0x170(%rbp)
movups %xmm0, -0x168(%rbp)
xorps %xmm0, %xmm0
leaq -0x170(%rbp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x4794
callq 0x3200
movups -0x158(%rbp), %xmm0
movaps %xmm0, -0x230(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x32b0
leaq -0x200(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x32b0
leaq -0x1e0(%rbp), %rdi
movq -0x270(%rbp), %rsi
callq 0x32b0
movq -0x280(%rbp), %rcx
movl 0x8(%rcx), %eax
movq -0x278(%rbp), %rdx
movl %eax, 0x8(%rdx)
movq (%rcx), %rax
movq %rax, (%rdx)
movq -0x108(%rbp), %rdi
cmpq -0x268(%rbp), %rdi
je 0x480a
callq 0x3200
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x4822
callq 0x3200
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x483a
callq 0x3200
movq -0x170(%rbp), %rdi
testq %rdi, %rdi
je 0x484b
callq 0x3200
movq %rbx, %r15
movq -0x390(%rbp), %rdi
leaq -0x380(%rbp), %rax
cmpq %rax, %rdi
je 0x4866
callq 0x3200
leaq -0x178(%rbp), %rbx
movq %rbx, -0x188(%rbp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
movq %r15, %r14
movq %r15, %rdi
callq 0x9da8
movq %r14, %rdi
leaq 0x13eff(%rip), %rsi     # 0x18795
callq 0x30b0
movl %eax, %r14d
movq -0x188(%rbp), %rdi
cmpq %rbx, %rdi
je 0x48af
callq 0x3200
testl %r14d, %r14d
movq %r15, %rbx
movq 0x1a70c(%rip), %r13     # 0x1efc8
jne 0x4914
leaq -0x300(%rbp), %rax
movq %rax, -0x310(%rbp)
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rdx
addq %rsi, %rdx
leaq -0x310(%rbp), %rdi
callq 0x9da8
movq -0x2b0(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x3140
movq -0x310(%rbp), %rdi
leaq -0x300(%rbp), %rax
cmpq %rax, %rdi
je 0x4914
callq 0x3200
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
movq -0x218(%rbp), %rdx
cmpq -0x180(%rbp), %rdx
jne 0x4967
testq %rdx, %rdx
je 0x496c
movq -0x188(%rbp), %rsi
movq -0x220(%rbp), %rdi
callq 0x3230
testl %eax, %eax
sete %r14b
jmp 0x496f
xorl %r14d, %r14d
jmp 0x496f
movb $0x1, %r14b
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4987
callq 0x3200
testb %r14b, %r14b
je 0x4b04
movl -0x25c(%rbp), %esi
movq %rbx, %rdi
callq 0x158a8
movq -0x188(%rbp), %rax
movq -0x182(%rbp), %rcx
movq %rcx, -0x472(%rbp)
movq %rax, -0x478(%rbp)
leaq -0x468(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x3140
movq -0x158(%rbp), %rax
movq %rax, -0x448(%rbp)
leaq -0x440(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x3140
movq -0x130(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0x418(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x3140
movq -0x108(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x3140
movq -0xe0(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movq -0x68(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movq -0x60(%rbp), %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x9128
movq %rbx, %rdi
callq 0x16aa0
leaq -0x668(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0x8b34
leaq -0x360(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x370(%rbp), %r14
movq %r14, %rdi
callq 0x9da8
movq %rbx, %rdi
movq %r12, %rsi
leaq -0x668(%rbp), %rdx
movq %r14, %rcx
callq 0xd6c4
leaq -0x2a0(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4ae0
callq 0x3200
movq -0x370(%rbp), %rdi
leaq -0x360(%rbp), %rax
cmpq %rax, %rdi
je 0x4af8
callq 0x3200
leaq -0x668(%rbp), %rdi
jmp 0x4fc4
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
movq -0x218(%rbp), %rdx
cmpq -0x180(%rbp), %rdx
jne 0x4b60
testq %rdx, %rdx
je 0x4e30
movq -0x188(%rbp), %rsi
movq -0x220(%rbp), %rdi
callq 0x3230
testl %eax, %eax
sete %r14b
jmp 0x4e33
xorl %r14d, %r14d
jmp 0x4e33
xorl %r14d, %r14d
testb %r14b, %r14b
je 0x4bac
leaq -0x488(%rbp), %rax
movq %rax, -0x498(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x9da8
movq %r12, %rdi
leaq 0x13bf6(%rip), %rsi     # 0x18795
callq 0x30b0
testl %eax, %eax
sete %r12b
jmp 0x4baf
xorl %r12d, %r12d
testb %r14b, %r14b
je 0x4bcc
movq -0x498(%rbp), %rdi
leaq -0x488(%rbp), %rax
cmpq %rax, %rdi
je 0x4bcc
callq 0x3200
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4be4
callq 0x3200
testb %r12b, %r12b
movq -0x190(%rbp), %r12
je 0x4c46
leaq -0x2c0(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2d0(%rbp), %rdi
callq 0x9da8
movq -0x2a8(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x3140
movq -0x2d0(%rbp), %rdi
leaq -0x2c0(%rbp), %rax
cmpq %rax, %rdi
je 0x4c46
callq 0x3200
cmpl $-0x1, -0x1bc(%rbp)
je 0x4dcc
movq -0x1d8(%rbp), %rdx
movq 0x10(%rbp), %rax
cmpq 0x8(%rax), %rdx
jne 0x542b
testq %rdx, %rdx
je 0x4c84
movq (%rax), %rsi
movq -0x1e0(%rbp), %rdi
callq 0x3230
testl %eax, %eax
jne 0x542b
movl -0x25c(%rbp), %esi
movq %rbx, %rdi
callq 0x158a8
movq -0x188(%rbp), %rax
movq -0x182(%rbp), %rcx
movq %rcx, -0x472(%rbp)
movq %rax, -0x478(%rbp)
leaq -0x468(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x3140
movq -0x158(%rbp), %rax
movq %rax, -0x448(%rbp)
leaq -0x440(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x3140
movq -0x130(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0x418(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x3140
movq -0x108(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x3140
movq -0xe0(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movq -0x68(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movq -0x60(%rbp), %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x9128
movq %rbx, %rdi
callq 0x16aa0
movl -0x258(%rbp), %r14d
movl -0x230(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x22c(%rbp), %r15d
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
movq -0x218(%rbp), %rdx
cmpq -0x180(%rbp), %rdx
jne 0x5140
testq %rdx, %rdx
je 0x51d2
movq -0x188(%rbp), %rsi
movq -0x220(%rbp), %rdi
callq 0x3230
testl %eax, %eax
sete %r12b
jmp 0x51d5
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
movq -0x180(%rbp), %rdx
cmpq -0x218(%rbp), %rdx
jne 0x4e28
testq %rdx, %rdx
je 0x5148
movq -0x220(%rbp), %rsi
movq -0x188(%rbp), %rdi
callq 0x3230
testl %eax, %eax
sete %r14b
jmp 0x514b
xorl %r14d, %r14d
jmp 0x514b
movb $0x1, %r14b
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4e4b
callq 0x3200
testb %r14b, %r14b
je 0x4fc9
movl -0x25c(%rbp), %esi
movq %rbx, %rdi
callq 0x158a8
movq -0x188(%rbp), %rax
movq -0x182(%rbp), %rcx
movq %rcx, -0x472(%rbp)
movq %rax, -0x478(%rbp)
leaq -0x468(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x3140
movq -0x158(%rbp), %rax
movq %rax, -0x448(%rbp)
leaq -0x440(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x3140
movq -0x130(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0x418(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x3140
movq -0x108(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x3140
movq -0xe0(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movq -0x68(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movq -0x60(%rbp), %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x9128
movq %rbx, %rdi
callq 0x16aa0
leaq -0x580(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0x8b34
leaq -0x340(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x350(%rbp), %r14
movq %r14, %rdi
callq 0x9da8
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
leaq -0x580(%rbp), %rdx
movq %r14, %rcx
callq 0xd6c4
leaq -0x2a0(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4fa5
callq 0x3200
movq -0x350(%rbp), %rdi
leaq -0x340(%rbp), %rax
cmpq %rax, %rdi
je 0x4fbd
callq 0x3200
leaq -0x580(%rbp), %rdi
callq 0x16aa0
movl $0x5, %edx
movq %r13, %rdi
leaq 0x130dc(%rip), %rsi     # 0x180b4
callq 0x3280
movl $0xa, %edx
movq %r13, %rdi
leaq 0x130ce(%rip), %rsi     # 0x180ba
callq 0x3280
movl $0x4, %edx
movq %r13, %rdi
leaq 0x1306e(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x2a0(%rbp), %rsi
movq -0x298(%rbp), %rdx
movq %r13, %rdi
callq 0x3280
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x2e0(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq -0x2a0(%rbp), %rsi
movq -0x298(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2f0(%rbp), %rdi
callq 0x9da8
movq -0x80(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
callq 0xf404
movq -0x2f0(%rbp), %rdi
leaq -0x2e0(%rbp), %rax
cmpq %rax, %rdi
je 0x5098
callq 0x3200
movq %rbx, %rdi
movq -0x80(%rbp), %rsi
movq -0x198(%rbp), %rdx
callq 0x40d1
leaq -0xa0(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x50d2
callq 0x3200
movl $0x5, %edx
movq %r13, %rdi
leaq 0x12f81(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq %r13, %rdi
leaq 0x12f95(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq %r13, %rdi
leaq 0x12f65(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq %r13, %rdi
callq 0x3280
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3210
jmp 0x54e1
xorl %r12d, %r12d
jmp 0x51d5
movb $0x1, %r14b
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x5163
callq 0x3200
movq -0x48(%rbp), %rax
testb %r14b, %r14b
jne 0x53a6
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
movq -0x180(%rbp), %rdx
cmpq -0x218(%rbp), %rdx
jne 0x51ca
testq %rdx, %rdx
je 0x537e
movq -0x220(%rbp), %rsi
movq -0x188(%rbp), %rdi
callq 0x3230
testl %eax, %eax
sete %r14b
jmp 0x5381
xorl %r14d, %r14d
jmp 0x5381
movb $0x1, %r12b
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x51ed
callq 0x3200
testb %r12b, %r12b
je 0x5324
movl -0x25c(%rbp), %esi
movq %rbx, %rdi
callq 0x158a8
movq -0x190(%rbp), %r12
movl %r15d, -0x34(%rbp)
movl %r14d, %r15d
movq -0x188(%rbp), %rax
movq -0x182(%rbp), %rcx
movq %rcx, -0x472(%rbp)
movq %rax, -0x478(%rbp)
leaq -0x468(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x3140
movq -0x158(%rbp), %rax
movq %rax, -0x448(%rbp)
leaq -0x440(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x3140
movq -0x130(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0x418(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x3140
movq -0x108(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x3140
movq -0xe0(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movq -0x68(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movq -0x60(%rbp), %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x9128
movq %rbx, %rdi
callq 0x16aa0
leaq -0x930(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0x8b34
movzbl -0x1bf(%rbp), %r9d
movzbl -0x1c0(%rbp), %eax
movq %r12, %rdi
leaq -0x930(%rbp), %r14
movq %r14, %rsi
movl -0x38(%rbp), %edx
movl -0x34(%rbp), %ecx
movl %r15d, %r8d
pushq -0x228(%rbp)
pushq %rax
callq 0xd5f0
addq $0x10, %rsp
jmp 0x5423
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x9da8
movq -0x218(%rbp), %rdx
cmpq -0x180(%rbp), %rdx
jne 0x5379
testq %rdx, %rdx
je 0x53ae
movq -0x188(%rbp), %rsi
movq -0x220(%rbp), %rdi
callq 0x3230
testl %eax, %eax
sete %r12b
jmp 0x53b1
xorl %r12d, %r12d
jmp 0x53b1
movb $0x1, %r14b
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x5399
callq 0x3200
movq -0x40(%rbp), %rax
testb %r14b, %r14b
je 0x542b
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x542b
movb $0x1, %r12b
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x53c9
callq 0x3200
testb %r12b, %r12b
movq -0x190(%rbp), %r12
je 0x542b
movl %r14d, -0x34(%rbp)
leaq -0x848(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0x8b34
movzbl -0x1bf(%rbp), %r9d
movzbl -0x1c0(%rbp), %eax
movq -0x30(%rbp), %rdi
leaq -0x848(%rbp), %r14
movq %r14, %rsi
movl -0x38(%rbp), %edx
movl %r15d, %ecx
movl -0x34(%rbp), %r8d
pushq -0x228(%rbp)
pushq %rax
callq 0xd5f0
addq $0x10, %rsp
movq %r14, %rdi
callq 0x16aa0
movq -0x1a0(%rbp), %rax
cmpl -0x1a4(%rbp), %eax
jge 0x54f4
movq %rbx, %rdi
movq -0x80(%rbp), %rsi
movq -0x198(%rbp), %rdx
callq 0x40d1
leaq -0xa0(%rbp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x5478
callq 0x3200
movl $0x5, %edx
movq %r13, %rdi
leaq 0x12bdb(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq %r13, %rdi
leaq 0x12bef(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq %r13, %rdi
leaq 0x12bbf(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq %r13, %rdi
callq 0x3280
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
movq -0x1a0(%rbp), %rax
incl %eax
movq %rax, -0x1a0(%rbp)
jmp 0x443f
movq %rax, %rbx
leaq -0x848(%rbp), %rdi
jmp 0x567d
movq %rax, %rbx
leaq -0x930(%rbp), %rdi
jmp 0x567d
jmp 0x5688
jmp 0x5688
jmp 0x5688
jmp 0x5688
jmp 0x5688
jmp 0x5688
jmp 0x5688
movq %rax, %rbx
movq -0x350(%rbp), %rdi
leaq -0x340(%rbp), %rax
cmpq %rax, %rdi
je 0x556a
callq 0x3200
jmp 0x556a
movq %rax, %rbx
leaq -0x580(%rbp), %rdi
jmp 0x567d
jmp 0x5688
jmp 0x5688
jmp 0x5673
jmp 0x5688
movq %rax, %rbx
movq -0x2d0(%rbp), %rdi
leaq -0x2c0(%rbp), %rax
cmpq %rax, %rdi
je 0x568b
jmp 0x5668
movq %rax, %rbx
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x568b
jmp 0x5668
movq %rax, %rbx
movq -0x310(%rbp), %rdi
leaq -0x300(%rbp), %rax
cmpq %rax, %rdi
je 0x568b
jmp 0x5668
movq %rax, %rbx
movq -0x370(%rbp), %rdi
leaq -0x360(%rbp), %rax
cmpq %rax, %rdi
je 0x5607
callq 0x3200
jmp 0x5607
movq %rax, %rbx
leaq -0x668(%rbp), %rdi
jmp 0x567d
jmp 0x5688
jmp 0x5688
jmp 0x5688
jmp 0x5673
jmp 0x5688
movq %rax, %rbx
movq -0x330(%rbp), %rdi
leaq -0x320(%rbp), %rax
cmpq %rax, %rdi
je 0x568b
jmp 0x5668
jmp 0x5688
jmp 0x5688
movq %rax, %rbx
movq -0x2f0(%rbp), %rdi
leaq -0x2e0(%rbp), %rax
cmpq %rax, %rdi
je 0x568b
jmp 0x5668
jmp 0x5688
jmp 0x5688
movq %rax, %rbx
movq -0x390(%rbp), %rdi
leaq -0x380(%rbp), %rax
cmpq %rax, %rdi
je 0x568b
callq 0x3200
jmp 0x568b
jmp 0x5688
jmp 0x5673
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x16aa0
jmp 0x568b
jmp 0x5688
jmp 0x5688
movq %rax, %rbx
leaq -0x478(%rbp), %rdi
callq 0x16aa0
jmp 0x569c
movq %rax, %rbx
leaq -0x760(%rbp), %rdi
callq 0x9fa2
jmp 0x56ad
movq %rax, %rbx
movq -0x1e0(%rbp), %rdi
leaq -0x1d0(%rbp), %rax
cmpq %rax, %rdi
je 0x56c5
callq 0x3200
movq -0x200(%rbp), %rdi
leaq -0x1f0(%rbp), %rax
cmpq %rax, %rdi
je 0x56dd
callq 0x3200
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rax
cmpq %rax, %rdi
je 0x56f5
callq 0x3200
movq -0x248(%rbp), %rdi
testq %rdi, %rdi
je 0x5706
callq 0x3200
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x571e
callq 0x3200
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x5736
callq 0x3200
movq %rbx, %rdi
callq 0x33f0