// File: Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::parseMakeMove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
values_t Adapter::parseMakeMove(std::string message)
{
  std::istringstream buffer(message);
  std::istream_iterator<std::string> beg(buffer), end;

  std::vector<std::string> messageWords(beg,end);   //Put all the words from the message into a vector

  std::string gameId = messageWords[5];       // Get the gameId from the string
  std::string tileType = messageWords[messageWords.size()-1]; //get the tileType that we are about to place
  std::string moveNum = messageWords[messageWords.size()-3];  //get the move number

  values_t out;
  out.gameId = gameId;
  out.tile_num = exprToTile(tileType);
  out.moveNumber = moveNum;

  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movq %rdx, -0x318(%rbp)
movq %rsi, %rax
movq -0x318(%rbp), %rsi
movq %rdi, -0x310(%rbp)
movq %rdi, %rcx
movq %rcx, -0x308(%rbp)
movq %rdi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x300(%rbp)
leaq -0x198(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
movl $0x8, %edx
callq 0x34a0
movq -0x2f8(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x11730
jmp 0x10b41
leaq -0x208(%rbp), %rdi
callq 0x11790
jmp 0x10b4f
leaq -0x250(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x117d0
jmp 0x10b64
leaq -0x280(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x117d0
jmp 0x10b79
leaq -0x281(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x11820
movq -0x320(%rbp), %rcx
leaq -0x220(%rbp), %rdi
leaq -0x250(%rbp), %rsi
leaq -0x280(%rbp), %rdx
callq 0x11840
jmp 0x10baf
leaq -0x281(%rbp), %rdi
callq 0x11940
leaq -0x280(%rbp), %rdi
callq 0x11960
leaq -0x250(%rbp), %rdi
callq 0x11960
leaq -0x220(%rbp), %rdi
movl $0x5, %esi
callq 0x119a0
movq %rax, %rsi
leaq -0x2a8(%rbp), %rdi
callq 0x3160
jmp 0x10bf5
leaq -0x220(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x11980
movq -0x328(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x119a0
movq %rax, %rsi
leaq -0x2c8(%rbp), %rdi
callq 0x3160
jmp 0x10c2b
leaq -0x220(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x11980
movq -0x330(%rbp), %rdi
movq %rax, %rsi
addq $-0x3, %rsi
callq 0x119a0
movq %rax, %rsi
leaq -0x2e8(%rbp), %rdi
callq 0x3160
jmp 0x10c62
movq -0x310(%rbp), %rdi
movb $0x0, -0x2e9(%rbp)
callq 0x83e0
jmp 0x10c77
movq -0x310(%rbp), %rdi
addq $0x40, %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x3040
jmp 0x10c90
movq -0x300(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0xf180
movl %eax, -0x334(%rbp)
jmp 0x10cab
movq -0x310(%rbp), %rdi
movl -0x334(%rbp), %eax
movl %eax, 0x4(%rdi)
addq $0x60, %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x3040
jmp 0x10ccd
movb $0x1, -0x2e9(%rbp)
testb $0x1, -0x2e9(%rbp)
jne 0x10e02
jmp 0x10df6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x10eae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x10ea2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x10e96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x10d69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
leaq -0x281(%rbp), %rdi
callq 0x11940
leaq -0x280(%rbp), %rdi
callq 0x11960
leaq -0x250(%rbp), %rdi
callq 0x11960
jmp 0x10e96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x10e8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x10e7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x10e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x10e66
movq -0x310(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
callq 0x8560
jmp 0x10e66
movq -0x310(%rbp), %rdi
callq 0x8560
leaq -0x2e8(%rbp), %rdi
callq 0x3210
leaq -0x2c8(%rbp), %rdi
callq 0x3210
leaq -0x2a8(%rbp), %rdi
callq 0x3210
leaq -0x220(%rbp), %rdi
callq 0x11650
leaq -0x208(%rbp), %rdi
callq 0x11960
leaq -0x1c8(%rbp), %rdi
callq 0x11960
leaq -0x198(%rbp), %rdi
callq 0x31a0
movq -0x308(%rbp), %rax
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
leaq -0x2e8(%rbp), %rdi
callq 0x3210
leaq -0x2c8(%rbp), %rdi
callq 0x3210
leaq -0x2a8(%rbp), %rdi
callq 0x3210
leaq -0x220(%rbp), %rdi
callq 0x11650
leaq -0x208(%rbp), %rdi
callq 0x11960
leaq -0x1c8(%rbp), %rdi
callq 0x11960
leaq -0x198(%rbp), %rdi
callq 0x31a0
movq -0x1d0(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)