// File: Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::parseStartingTile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
values_t Adapter::parseStartingTile(std::string message)
{
	std::string starting_tile, substr;
	values_t out;

	starting_tile = message.substr(17, message.find(" AT")-17); //get string where tile description starts until before " AT"
	out.tile_num = exprToTile(starting_tile);
	substr = message.substr(message.find("AT ")+3,message.find(" ", message.find("AT ")+3, 1)-message.find("AT ")-3); //get first string integer
	out.i =  stoi(substr);
	substr = message.erase(0, message.find(substr) + substr.length() + 1); //get string with last two integers
	out.j = stoi(substr.substr(0,substr.find(" ")));
	substr = substr.erase(0,substr.find(" ")+1); //get string with last int
	substr = substr.substr(0,std::string::npos); //get the last integer
	out.rotation = stoi(substr);
	return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdx, -0x110(%rbp)
movq %rdi, -0xf8(%rbp)
movq %rdi, %rax
movq %rax, -0x108(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x33c0
leaq -0x58(%rbp), %rdi
callq 0x33c0
movq -0xf8(%rbp), %rdi
movb $0x0, -0x59(%rbp)
callq 0x83e0
jmp 0x1032e
movq -0x110(%rbp), %rdi
leaq 0x1921e(%rip), %rsi     # 0x2955a
xorl %eax, %eax
movl %eax, %edx
callq 0x3540
movq -0x110(%rbp), %rsi
movq %rax, %rcx
addq $-0x11, %rcx
leaq -0x90(%rbp), %rdi
movl $0x11, %edx
callq 0x32d0
jmp 0x10366
leaq -0x38(%rbp), %rdi
movq %rdi, -0x120(%rbp)
leaq -0x90(%rbp), %rsi
movq %rsi, -0x128(%rbp)
callq 0x3360
movq -0x128(%rbp), %rdi
callq 0x3210
movq -0x100(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0xf180
movl %eax, -0x114(%rbp)
jmp 0x103ab
movq -0x110(%rbp), %rdi
movq -0xf8(%rbp), %rax
movl -0x114(%rbp), %ecx
movl %ecx, 0x4(%rax)
leaq 0x192aa(%rip), %rsi     # 0x29673
movq %rsi, -0x148(%rbp)
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x140(%rbp)
callq 0x3540
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
movq -0x110(%rbp), %rdi
addq $0x3, %rax
movq %rax, -0x130(%rbp)
callq 0x3540
movq -0x110(%rbp), %rdi
movq %rax, %rdx
addq $0x3, %rdx
leaq 0x191b1(%rip), %rsi     # 0x295cb
movl $0x1, %ecx
callq 0x34e0
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
movq -0x110(%rbp), %rdi
movq %rax, -0x138(%rbp)
callq 0x3540
movq -0x138(%rbp), %rcx
movq -0x110(%rbp), %rsi
movq -0x130(%rbp), %rdx
subq %rax, %rcx
addq $-0x3, %rcx
leaq -0xb0(%rbp), %rdi
callq 0x32d0
jmp 0x1046f
leaq -0x58(%rbp), %rdi
movq %rdi, -0x158(%rbp)
leaq -0xb0(%rbp), %rsi
movq %rsi, -0x160(%rbp)
callq 0x3360
movq -0x160(%rbp), %rdi
callq 0x3210
movq -0x158(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x8ca0
movl %eax, -0x14c(%rbp)
jmp 0x104b6
movq -0x110(%rbp), %rdi
movq -0xf8(%rbp), %rax
movl -0x14c(%rbp), %ecx
movl %ecx, 0xc(%rax)
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x178(%rbp)
leaq -0x58(%rbp), %rsi
movq %rsi, -0x180(%rbp)
callq 0x3560
movq -0x180(%rbp), %rdi
movq %rax, -0x170(%rbp)
callq 0x3430
movq -0x110(%rbp), %rdi
movq -0x178(%rbp), %rsi
movq %rax, %rcx
movq -0x170(%rbp), %rax
leaq 0x1(%rax,%rcx), %rdx
callq 0x30a0
movq %rax, -0x168(%rbp)
jmp 0x10526
movq -0x168(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x3040
jmp 0x10538
leaq 0x1908c(%rip), %rsi     # 0x295cb
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x188(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x3540
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
movq %rax, %rcx
leaq -0xd0(%rbp), %rdi
callq 0x32d0
jmp 0x10579
xorl %eax, %eax
movl %eax, %esi
leaq -0xd0(%rbp), %rdi
movl $0xa, %edx
callq 0x8ca0
movl %eax, -0x194(%rbp)
jmp 0x10596
movq -0xf8(%rbp), %rax
movl -0x194(%rbp), %ecx
movl %ecx, 0x10(%rax)
leaq -0xd0(%rbp), %rdi
callq 0x3210
leaq 0x19012(%rip), %rsi     # 0x295cb
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x1a8(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x3540
movq -0x1b0(%rbp), %rdi
movq -0x1a8(%rbp), %rsi
movq %rax, %rdx
incq %rdx
callq 0x30a0
movq %rax, -0x1a0(%rbp)
jmp 0x105f6
movq -0x1a0(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x3040
jmp 0x10608
xorl %eax, %eax
movl %eax, %edx
leaq -0xf0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movq $-0x1, %rcx
callq 0x32d0
jmp 0x10625
leaq -0x58(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
leaq -0xf0(%rbp), %rsi
movq %rsi, -0x1c8(%rbp)
callq 0x3360
movq -0x1c8(%rbp), %rdi
callq 0x3210
movq -0x1c0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x8ca0
movl %eax, -0x1b4(%rbp)
jmp 0x1066c
movq -0xf8(%rbp), %rax
movl -0x1b4(%rbp), %ecx
movl %ecx, 0x8(%rax)
movb $0x1, -0x59(%rbp)
testb $0x1, -0x59(%rbp)
jne 0x106ca
jmp 0x106be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x106f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x106ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3210
jmp 0x106ec
movq -0xf8(%rbp), %rdi
callq 0x8560
leaq -0x58(%rbp), %rdi
callq 0x3210
leaq -0x38(%rbp), %rdi
callq 0x3210
movq -0x108(%rbp), %rax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0x8560
leaq -0x58(%rbp), %rdi
callq 0x3210
leaq -0x38(%rbp), %rdi
callq 0x3210
movq -0x68(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)