// File: /workspace/github_cpp_makefile_star2_O3/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 0xcfae(%rip), %rsi      # 0x186cf
leaq 0xcfa8(%rip), %rdx      # 0x186d0
leaq -0xb0(%rbp), %rdi
callq 0x9d62
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 0xce07(%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 0xb7e6
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 0xb98b
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xb997
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0xb997
testl %ecx, %ecx
jne 0xb83a
movl %ebx, (%r15)
movq -0x30(%rbp), %rbx
movl %eax, (%rbx)
leaq 0xcd5d(%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 0xb930
xorl %ebx, %ebx
leaq -0x70(%rbp), %r15
leaq -0x90(%rbp), %r12
leaq -0xd0(%rbp), %r13
movl $0x1, %ecx
movq %r15, %rdi
leaq 0xce33(%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 0xb8d6
callq 0x3200
incq %r14
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3070
movq %r13, %rsi
callq 0xa4c4
movl %eax, -0x34(%rbp)
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0xb907
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0xb914
leaq -0x50(%rbp), %rdi
leaq -0x34(%rbp), %rdx
callq 0xcafc
incl %ebx
movq -0x30(%rbp), %rax
cmpl (%rax), %ebx
jl 0xb88d
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0xb930
callq 0x3200
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xb948
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
movq -0x30(%rbp), %rbx
je 0xb95e
callq 0x3200
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0xb976
callq 0x3200
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc9de(%rip), %rdi      # 0x18370
callq 0x3150
leaq 0xc9d2(%rip), %rdi      # 0x18370
callq 0x3320
jmp 0xb9bc
movq %rax, %r14
jmp 0xb9ee
jmp 0xb9bc
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0xb9bf
movl %ebx, (%r15)
jmp 0xb9bf
jmp 0xb9bc
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x8b68
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0xb9d6
callq 0x3200
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xb9ee
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xba00
callq 0x3200
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0xba18
callq 0x3200
movq %r14, %rdi
callq 0x33f0