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

  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[1];
  out.gameId = gameId;
  std::string temp = messageWords[3];
  out.moveNumber = temp;

  if(messageWords[6] == "FORFEITED:")  //Check to see if the other player forfeited
  {
    out.forfeit = -1;
    return out;
  }
  else if(messageWords[6] == "PLACED")  //Check to see if the other player forfeited
  {
	std::string playerId = messageWords[5];
    std::string tileType = messageWords[7];
    int xCoord = stoi(messageWords[9]);
    int yCoord = stoi(messageWords[10]);
    int rotation = stoi(messageWords[11]);
    std::string animalType = messageWords[12];

	out.playerId = playerId;

	out.coordinates = convertCoordinates(xCoord, yCoord);
	out.rotation = numRotations(rotation);
	out.tile_num = exprToTile(tileType);
	if (animalType == "CROCODILE")
		out.croc = true;
	else
		out.croc = false;
	if (animalType == "TIGER")
		out.tiger = true;
	else
		out.tiger = false;


    if(messageWords.size() == 14 && animalType == "TIGER"){
      int tigerZone = stoi(messageWords[13]);
      out.tiger_spot = convertZone(tigerZone);   //Set the zone where the meeple is placed in the tile
    }

    return out;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movq %rdi, %rbx
leaq 0x50(%rdi), %rax
xorl %ecx, %ecx
movq %rcx, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movq %rax, 0x40(%rdi)
movq %rcx, 0x48(%rdi)
movb %cl, 0x50(%rdi)
leaq 0x70(%rdi), %rax
movq %rax, 0x60(%rdi)
movq %rcx, 0x68(%rdi)
movb %cl, 0x70(%rdi)
leaq 0x90(%rdi), %rax
movq %rax, 0x80(%rdi)
movq %rcx, 0x88(%rdi)
movb %cl, 0x90(%rdi)
movl $0x0, 0xa4(%rdi)
leaq -0x340(%rbp), %rdi
movq %rdx, %rsi
movl $0x8, %edx
callq 0x33b0
leaq -0x158(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0xc664
xorl %eax, %eax
leaq -0x110(%rbp), %r12
movq %rax, -0x18(%r12)
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movb %al, 0x10(%r12)
movq -0x158(%rbp), %rax
movq -0x150(%rbp), %rsi
leaq -0x180(%rbp), %rdi
movq %rax, -0x8(%rdi)
leaq -0x170(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x148(%rbp), %rdx
addq %rsi, %rdx
callq 0x9cc4
movb -0x130(%rbp), %al
movb %al, -0x160(%rbp)
movq -0x128(%rbp), %rax
movq -0x120(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
movq %rax, -0x8(%rdi)
leaq -0x1a8(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x118(%rbp), %rdx
addq %rsi, %rdx
callq 0x9cc4
movb -0x100(%rbp), %al
leaq -0x1c0(%rbp), %rdx
movb %al, 0x28(%rdx)
leaq -0x50(%rbp), %rdi
leaq -0x188(%rbp), %rsi
leaq -0x70(%rbp), %rcx
callq 0xc6b6
movq -0x1b8(%rbp), %rdi
cmpq %r15, %rdi
je 0xbf42
callq 0x3200
movq -0x180(%rbp), %rdi
cmpq %r14, %rdi
je 0xbf53
callq 0x3200
movq -0x50(%rbp), %rax
leaq -0x60(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x9cc4
leaq 0x40(%rbx), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3140
movq -0x50(%rbp), %rax
leaq -0x80(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x9cc4
leaq 0x60(%rbx), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3140
movl $0xc0, %r14d
movq -0x50(%rbp), %rdi
addq %r14, %rdi
leaq 0xc5df(%rip), %rsi      # 0x185a6
callq 0x30b0
testl %eax, %eax
je 0xc20b
addq -0x50(%rbp), %r14
leaq 0xc5d2(%rip), %rsi      # 0x185b1
movq %r14, %rdi
callq 0x30b0
movq -0x50(%rbp), %rax
leaq -0xe8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
addq %rsi, %rdx
leaq -0xf8(%rbp), %rdi
callq 0x9cc4
movq -0x50(%rbp), %rax
leaq -0xc8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0xe0(%rax), %rsi
movq 0xe8(%rax), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %rdi
callq 0x9cc4
movq -0x50(%rbp), %rax
movq 0x120(%rax), %r12
callq 0x3040
movl (%rax), %r15d
movq %rax, -0x38(%rbp)
movl $0x0, (%rax)
leaq -0xb0(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x32e0
cmpq %r12, (%r13)
je 0xc40e
movq %rax, %rcx
movslq %ecx, %rax
cmpq %rcx, %rax
jne 0xc41a
movq -0x38(%rbp), %rax
movl (%rax), %r14d
cmpl $0x22, %r14d
je 0xc41a
movq %rcx, -0x30(%rbp)
testl %r14d, %r14d
jne 0xc0b0
movq -0x38(%rbp), %rax
movl %r15d, (%rax)
movl %r15d, %r14d
movq -0x50(%rbp), %rax
movq 0x140(%rax), %r13
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
leaq -0xb0(%rbp), %r12
movq %r13, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x32e0
cmpq %r13, (%r12)
je 0xc426
movq %rax, %rdx
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq $-0x80000000, %rax      # imm = 0x80000000
cmpq %rcx, %rax
jb 0xc432
movq -0x38(%rbp), %rax
movl (%rax), %r15d
cmpl $0x22, %r15d
je 0xc432
movq %rdx, -0xb8(%rbp)
testl %r15d, %r15d
jne 0xc129
movq -0x38(%rbp), %rax
movl %r14d, (%rax)
movl %r14d, %r15d
movq -0x50(%rbp), %rax
movq 0x160(%rax), %r12
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
leaq -0xb0(%rbp), %r14
movq %r12, %rdi
movq %r14, %rsi
movl $0xa, %edx
callq 0x32e0
cmpq %r12, (%r14)
je 0xc43e
movq %rax, %r13
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0xc44a
movq -0x38(%rbp), %rax
movl (%rax), %eax
cmpl $0x22, %eax
je 0xc44a
testl %eax, %eax
jne 0xc194
movq -0x38(%rbp), %rax
movl %r15d, (%rax)
movq -0x50(%rbp), %rax
leaq -0xa0(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x180(%rax), %rsi
movq 0x188(%rax), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rdi
callq 0x9cc4
leaq 0x80(%rbx), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x3140
movq -0x30(%rbp), %rax
addl $0x48, %eax
movl $0x48, %ecx
subl -0xb8(%rbp), %ecx
movl %ecx, 0x30(%rbx)
movl %eax, 0x34(%rbx)
cmpl $0x5a, %r13d
je 0xc221
cmpl $0x10e, %r13d           # imm = 0x10E
je 0xc21a
cmpl $0xb4, %r13d
jne 0xc228
movl $0x2, %eax
jmp 0xc22a
movl $0xffffffff, 0xa4(%rbx) # imm = 0xFFFFFFFF
jmp 0xc38c
movl $0x3, %eax
jmp 0xc22a
movl $0x1, %eax
jmp 0xc22a
xorl %eax, %eax
leaq -0x60(%rbp), %r15
leaq -0x80(%rbp), %r13
movl %eax, 0x8(%rbx)
leaq -0xd8(%rbp), %rsi
callq 0xa4c4
movl %eax, 0x4(%rbx)
leaq 0xc36d(%rip), %rsi      # 0x185b8
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
sete 0xa0(%rbx)
leaq 0xc4f2(%rip), %rsi      # 0x18755
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
sete 0xa1(%rbx)
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
cmpq $0x1c0, %rax            # imm = 0x1C0
jne 0xc344
leaq 0xc4c6(%rip), %rsi      # 0x18755
leaq -0xb0(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
jne 0xc344
movq -0x50(%rbp), %rax
movq 0x1a0(%rax), %r14
movq -0x38(%rbp), %rax
movl (%rax), %r13d
movl $0x0, (%rax)
leaq -0x190(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x32e0
cmpq %r14, (%r15)
je 0xc456
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0xc462
movq -0x38(%rbp), %rcx
movl (%rcx), %ecx
cmpl $0x22, %ecx
je 0xc462
testl %ecx, %ecx
jne 0xc30f
movq -0x38(%rbp), %rcx
movl %r13d, (%rcx)
decl %eax
movl $0x2, %ecx
movl $0x2, %edx
cmpl $0x7, %eax
ja 0xc336
movl %eax, %eax
leaq 0xc337(%rip), %rcx      # 0x18660
movl (%rcx,%rax,4), %ecx
leaq 0xc34d(%rip), %rdx      # 0x18680
movl (%rdx,%rax,4), %edx
movl %ecx, 0x38(%rbx)
movl %edx, 0x3c(%rbx)
leaq -0x60(%rbp), %r15
leaq -0x80(%rbp), %r13
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
leaq -0xe8(%rbp), %r14
je 0xc35c
callq 0x3200
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
leaq -0x110(%rbp), %r12
je 0xc37b
callq 0x3200
movq -0xf8(%rbp), %rdi
cmpq %r14, %rdi
je 0xc38c
callq 0x3200
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0xc39d
callq 0x3200
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0xc3ab
callq 0x3200
leaq -0x50(%rbp), %rdi
callq 0xc60c
movq -0x120(%rbp), %rdi
cmpq %r12, %rdi
je 0xc3c5
callq 0x3200
leaq -0x140(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc3da
callq 0x3200
movq 0x12bdf(%rip), %rsi     # 0x1efc0
leaq -0x340(%rbp), %rdi
callq 0x3300
leaq -0x2c8(%rbp), %rdi
callq 0x30d0
movq %rbx, %rax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbf5b(%rip), %rdi      # 0x18370
callq 0x3150
leaq 0xbf4f(%rip), %rdi      # 0x18370
callq 0x3320
leaq 0xbf43(%rip), %rdi      # 0x18370
callq 0x3150
leaq 0xbf37(%rip), %rdi      # 0x18370
callq 0x3320
leaq 0xbf2b(%rip), %rdi      # 0x18370
callq 0x3150
leaq 0xbf1f(%rip), %rdi      # 0x18370
callq 0x3320
leaq 0xbf13(%rip), %rdi      # 0x18370
callq 0x3150
leaq 0xbf07(%rip), %rdi      # 0x18370
callq 0x3320
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xc488
movq -0x38(%rbp), %rax
movl %r13d, (%rax)
jmp 0xc488
movq %rax, -0x30(%rbp)
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
je 0xc54f
callq 0x3200
jmp 0xc54f
movq %rax, -0x30(%rbp)
jmp 0xc54f
movq %rax, -0x30(%rbp)
jmp 0xc567
jmp 0xc4b6
movq %rax, -0x30(%rbp)
jmp 0xc57f
jmp 0xc4c1
movq %rax, -0x30(%rbp)
jmp 0xc594
movq %rax, -0x30(%rbp)
jmp 0xc5a6
movq %rax, -0x30(%rbp)
movq -0x1b8(%rbp), %rdi
cmpq %r15, %rdi
je 0xc4ee
callq 0x3200
jmp 0xc4ee
movq %rax, -0x30(%rbp)
movq -0x180(%rbp), %rdi
cmpq %r14, %rdi
je 0xc5af
callq 0x3200
jmp 0xc5af
movq %rax, -0x30(%rbp)
jmp 0xc5af
movq %rax, -0x30(%rbp)
jmp 0xc5dc
movq %rax, -0x30(%rbp)
jmp 0xc5fb
jmp 0xc53b
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xc54f
movq -0x38(%rbp), %rax
movl %r14d, (%rax)
jmp 0xc54f
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xc54f
movq -0x38(%rbp), %rax
movl %r15d, (%rax)
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0xc567
callq 0x3200
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0xc57f
callq 0x3200
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0xc594
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xc5a6
callq 0x3200
leaq -0x50(%rbp), %rdi
callq 0xc60c
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0xc5c7
callq 0x3200
leaq -0x140(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc5dc
callq 0x3200
movq 0x129dd(%rip), %rsi     # 0x1efc0
leaq -0x340(%rbp), %rdi
callq 0x3300
leaq -0x2c8(%rbp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x8b68
movq -0x30(%rbp), %rdi
callq 0x33f0