// File: Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::translate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
values_t Adapter::translate(std::string message)
{
	values_t output;
	if (message.compare(0,8,"STARTING") == 0) //STARTING TILE IS <tile> AT <x> <y> <orientation>
	{
		return parseStartingTile(message);
	}
	if (message.compare(0,3,"THE") == 0) //THE REMAINING <number_tiles> TILES ARE [ <tiles> ]
	{
	  return parseTileStack(message);
	}
	if (message.compare(0,5,"MATCH") == 0) // MATCH BEGINS IN <timeplan> SECONDS
	{
	  return parseMatch(message);
	}
	if (message.compare(0,4,"MAKE") == 0) // MAKE YOUR MOVE IN GAME <gid> WITHIN <timemove> SECOND: MOVE <#> PLACE <tile>
	{
	  return parseMakeMove(message);
	}
	if (message.compare(0,4,"GAME") == 0) // INITIAL ACCESS TO A GAME MESSAGE
	{
	  return parseGameMove(message);
	}
	return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdx, -0x190(%rbp)
movq %rdi, -0x1a8(%rbp)
movq %rdi, %rax
movq %rax, -0x1a0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x83e0
movq -0x190(%rbp), %rdi
leaq 0x195ef(%rip), %rcx     # 0x29543
xorl %eax, %eax
movl %eax, %esi
movl $0x8, %edx
callq 0x3390
movl %eax, -0x184(%rbp)
jmp 0xff6a
movl -0x184(%rbp), %eax
cmpl $0x0, %eax
jne 0xffff
movq -0x190(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x3160
jmp 0xff8e
movq -0x198(%rbp), %rsi
movq -0x1a8(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
callq 0x102d0
jmp 0xffaa
leaq -0xf8(%rbp), %rdi
callq 0x3210
movl $0x1, -0xfc(%rbp)
jmp 0x1028e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x102aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x3210
jmp 0x102aa
movq -0x190(%rbp), %rdi
leaq 0x1953f(%rip), %rcx     # 0x2954c
xorl %eax, %eax
movl %eax, %esi
movl $0x3, %edx
callq 0x3390
movl %eax, -0x1ac(%rbp)
jmp 0x10023
movl -0x1ac(%rbp), %eax
cmpl $0x0, %eax
jne 0x1009d
movq -0x190(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x3160
jmp 0x10043
movq -0x198(%rbp), %rsi
movq -0x1a8(%rbp), %rdi
leaq -0x120(%rbp), %rdx
callq 0x10720
jmp 0x1005f
leaq -0x120(%rbp), %rdi
callq 0x3210
movl $0x1, -0xfc(%rbp)
jmp 0x1028e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x3210
jmp 0x102aa
movq -0x190(%rbp), %rdi
leaq 0x19183(%rip), %rcx     # 0x2922e
xorl %eax, %eax
movl %eax, %esi
movl $0x5, %edx
callq 0x3390
movl %eax, -0x1b0(%rbp)
jmp 0x100c1
movl -0x1b0(%rbp), %eax
cmpl $0x0, %eax
jne 0x1013b
movq -0x190(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0x3160
jmp 0x100e1
movq -0x198(%rbp), %rsi
movq -0x1a8(%rbp), %rdi
leaq -0x140(%rbp), %rdx
callq 0x10a80
jmp 0x100fd
leaq -0x140(%rbp), %rdi
callq 0x3210
movl $0x1, -0xfc(%rbp)
jmp 0x1028e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x3210
jmp 0x102aa
movq -0x190(%rbp), %rdi
leaq 0x19407(%rip), %rcx     # 0x29550
xorl %eax, %eax
movl %eax, %esi
movl $0x4, %edx
callq 0x3390
movl %eax, -0x1b4(%rbp)
jmp 0x1015f
movl -0x1b4(%rbp), %eax
cmpl $0x0, %eax
jne 0x101d9
movq -0x190(%rbp), %rsi
leaq -0x160(%rbp), %rdi
callq 0x3160
jmp 0x1017f
movq -0x198(%rbp), %rsi
movq -0x1a8(%rbp), %rdi
leaq -0x160(%rbp), %rdx
callq 0x10ad0
jmp 0x1019b
leaq -0x160(%rbp), %rdi
callq 0x3210
movl $0x1, -0xfc(%rbp)
jmp 0x1028e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x3210
jmp 0x102aa
movq -0x190(%rbp), %rdi
leaq 0x1936e(%rip), %rcx     # 0x29555
xorl %eax, %eax
movl %eax, %esi
movl $0x4, %edx
callq 0x3390
movl %eax, -0x1b8(%rbp)
jmp 0x101fd
movl -0x1b8(%rbp), %eax
cmpl $0x0, %eax
jne 0x10271
movq -0x190(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x3160
jmp 0x1021d
movq -0x198(%rbp), %rsi
movq -0x1a8(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0x10ed0
jmp 0x10239
leaq -0x180(%rbp), %rdi
callq 0x3210
movl $0x1, -0xfc(%rbp)
jmp 0x1028e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x3210
jmp 0x102aa
movq -0x1a8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x119f0
movl $0x1, -0xfc(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x8560
movq -0x1a0(%rbp), %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
leaq -0xc8(%rbp), %rdi
callq 0x8560
movq -0xd0(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)