// File: /workspace/github_cpp_makefile_star2_O1/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::parseTileStack(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
values_t Adapter::parseTileStack(std::string message)
{
  std::string token, substr;
  std::string delimiter = " "; //delimiter between tiles
  size_t pos = 0;
  std::vector<int> tile_stack;
  int tile_num;
  values_t out;

  substr = message.substr(14,message.find(" TILE")-14); //get first string integer
  out.number_of_tiles = stoi(substr);
  substr = message.erase(0, message.find("[")+1); //get string starting with the first tile to start tokeninzing tiles
  for (int i = 0; i < out.number_of_tiles; i++)
  {
  	pos = substr.find(" ");
  	token = substr.substr(0, pos);
  	substr.erase(0, pos + 1);
  	tile_num = exprToTile(token);
  	tile_stack.push_back(tile_num);
  }
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq -0xc0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xceb8(%rip), %rsi      # 0x186cf
leaq 0xceb2(%rip), %rdx      # 0x186d0
leaq -0xb0(%rbp), %rdi
callq 0x9e42
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
xorl %eax, %eax
movq %rax, -0x40(%rbp)
leaq 0x50(%rbx), %rcx
movq %rax, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movq %rcx, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movb %al, 0x50(%rbx)
leaq 0x70(%rbx), %rcx
movq %rcx, 0x60(%rbx)
movq %rax, 0x68(%rbx)
movb %al, 0x70(%rbx)
leaq 0x90(%rbx), %rcx
movq %rcx, 0x80(%rbx)
movq %rax, 0x88(%rbx)
movb %al, 0x90(%rbx)
movl $0x0, 0xa4(%rbx)
leaq 0xcd11(%rip), %rsi      # 0x1859e
movl $0x5, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x33e0
leaq -0xe(%rax), %rcx
leaq -0x90(%rbp), %rdi
movl $0xe, %edx
movq %r14, %rsi
movq %rbx, -0x30(%rbp)
callq 0x3240
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %r15
movq %r15, %rsi
callq 0x32b0
movq (%r15), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0xb8dc
callq 0x3200
movq -0x70(%rbp), %r12
callq 0x3040
movq %rax, %r15
movl (%rax), %ebx
movl $0x0, (%rax)
leaq -0x90(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x32e0
cmpq %r12, (%r13)
je 0xba81
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xba8d
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0xba8d
testl %ecx, %ecx
jne 0xb930
movl %ebx, (%r15)
movq -0x30(%rbp), %rbx
movl %eax, (%rbx)
leaq 0xcc67(%rip), %rsi      # 0x185a4
movl $0x1, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x33e0
leaq 0x1(%rax), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3070
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x3140
cmpl $0x0, (%rbx)
jle 0xba18
xorl %ebx, %ebx
leaq -0x70(%rbp), %r15
leaq -0x90(%rbp), %r12
leaq -0xd0(%rbp), %r13
movl $0x1, %ecx
movq %r15, %rdi
leaq 0xcd3d(%rip), %rsi      # 0x186cf
xorl %edx, %edx
callq 0x33e0
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3240
movq %r13, %rdi
movq %r12, %rsi
callq 0x32b0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0xb9cc
callq 0x3200
incq %r14
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3070
movq %r13, %rsi
callq 0xa5ba
movl %eax, -0x34(%rbp)
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0xb9fd
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0xba0a
leaq -0x50(%rbp), %rdi
leaq -0x34(%rbp), %rdx
callq 0xcbe0
incl %ebx
movq -0x30(%rbp), %rax
cmpl (%rax), %ebx
jl 0xb983
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0xba26
callq 0x3200
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
movq -0x30(%rbp), %rbx
je 0xba42
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xba54
callq 0x3200
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0xba6c
callq 0x3200
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc8e8(%rip), %rdi      # 0x18370
callq 0x3150
leaq 0xc8dc(%rip), %rdi      # 0x18370
callq 0x3320
jmp 0xbab2
movq %rax, %r14
jmp 0xbae4
jmp 0xbab2
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0xbab5
movl %ebx, (%r15)
jmp 0xbab5
jmp 0xbab2
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x8ca0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0xbacc
callq 0x3200
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xbae4
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xbaf6
callq 0x3200
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0xbb0e
callq 0x3200
movq %r14, %rdi
callq 0x33f0