// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/hex/gtpgeneral.cpp
// Function: Morat::Hex::GTP::play(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Morat::Side)
GTPResponse GTP::play(const std::string & pos, Side to_play){
	if(to_play != hist->to_play())
		return GTPResponse(false, "It is the other player's turn!");

	if(hist->outcome() >= Outcome::DRAW)
		return GTPResponse(false, "The game is already over.");

	Move m(pos);

	if(!hist->valid_move(m))
		return GTPResponse(false, "Invalid move");

	move(m);

	if(verbose >= 2)
		logerr("Placement: " + m.to_s() + ", outcome: " + hist->outcome().to_s() + "\n" + hist->to_s(colorboard));

	return GTPResponse(true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
cmpb %cl, 0x88(%rsi)
jne 0x2a24e
leaq 0xc212(%rip), %rcx      # 0x363b1
movb 0x89(%rsi), %al
movq %rsi, %r14
cmpb (%rcx), %al
jge 0x2a28f
leaq 0x5(%rsp), %r12
leaq 0x80(%r14), %r15
movq %rdx, %rsi
movq %r12, %rdi
callq 0x11418
movq %r15, %rdi
movq %r12, %rsi
callq 0x29154
testb %al, %al
je 0x2a2ed
leaq 0x5(%rsp), %r12
leaq 0x68(%r14), %rdi
movq %r12, %rsi
callq 0x290d4
movq 0xd8(%r14), %rdi
movq %r12, %rsi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x2, 0xc8(%r14)
jge 0x2a335
leaq 0xf8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x76eb(%rip), %rdx      # 0x31907
leaq 0xe8(%rsp), %rdi
movq %rdx, %rsi
callq 0xb1dc
leaq 0xe8(%rsp), %rdx
movl $0x1, %esi
movq %rbx, %rdi
callq 0xa8ba
movq 0xe8(%rsp), %rdi
jmp 0x2a32e
leaq 0x158(%rsp), %r15
leaq 0x148(%rsp), %r14
leaq 0xb858(%rip), %rsi      # 0x35abd
leaq 0xb86f(%rip), %rdx      # 0x35adb
movq %r14, %rdi
movq %r15, -0x10(%r15)
callq 0xb1dc
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xa8ba
movq 0x148(%rsp), %rdi
jmp 0x2a2ce
leaq 0x138(%rsp), %r15
leaq 0x128(%rsp), %r14
leaq 0xb836(%rip), %rsi      # 0x35adc
leaq 0xb848(%rip), %rdx      # 0x35af5
movq %r14, %rdi
movq %r15, -0x10(%r15)
callq 0xb1dc
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xa8ba
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x2a2d8
callq 0x52e0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x118(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xb7f6(%rip), %rsi      # 0x35af6
leaq 0xb7fb(%rip), %rdx      # 0x35b02
leaq 0x108(%rsp), %rdi
callq 0xb1dc
leaq 0x108(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa8ba
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
jne 0x2a2d3
jmp 0x2a2d8
leaq 0x168(%rsp), %r12
leaq 0x5(%rsp), %rsi
movq %r12, %rdi
callq 0x10e7e
leaq 0xb7b2(%rip), %rcx      # 0x35b03
movl $0xb, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0xd8(%rsp), %r12
movq %rax, %rcx
addq $0x10, %rcx
movq %r12, -0x10(%r12)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x2a38b
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
jmp 0x2a39e
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
movq 0x8(%rax), %rdx
leaq 0xc8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb74b(%rip), %rsi      # 0x35b0f
callq 0x56e0
leaq 0x38(%rsp), %r13
movq %rax, %rcx
addq $0x10, %rcx
movq %r13, -0x10(%r13)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x2a3ed
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r13)
jmp 0x2a3fa
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
leaq 0x7(%rsp), %rsi
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb 0x89(%r14), %al
movb %al, (%rsi)
leaq 0xa8(%rsp), %rdi
callq 0x2f4de
movq 0x30(%rsp), %r8
movq 0xb0(%rsp), %rdx
movq 0x28(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r13, %rcx
je 0x2a452
movq 0x38(%rsp), %rdi
movq 0xa8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x2a47e
leaq 0xb8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x2a479
movq 0xb8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x2a48a
leaq 0x28(%rsp), %rdi
callq 0x50c0
jmp 0x2a49b
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x18(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x2a4ba
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
jmp 0x2a4c7
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x741b(%rip), %rsi      # 0x31906
leaq 0x8(%rsp), %rdi
callq 0x56e0
leaq 0x58(%rsp), %rbp
movq %rax, %rcx
addq $0x10, %rcx
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x2a518
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbp)
jmp 0x2a525
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movzbl 0xcd(%r14), %edx
leaq 0x88(%rsp), %rdi
movq %r15, %rsi
callq 0x1f644
movq 0x50(%rsp), %r8
movq 0x90(%rsp), %rdx
movq 0x48(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %rbp, %rcx
je 0x2a57a
movq 0x58(%rsp), %rdi
movq 0x88(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x2a5a6
leaq 0x98(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x2a5a1
movq 0x98(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x2a5b2
leaq 0x48(%rsp), %rdi
callq 0x50c0
jmp 0x2a5c3
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x78(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x2a5e2
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
jmp 0x2a5ef
movq %rsi, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
leaq 0x78(%rsp), %r14
movq %rsi, 0x70(%rsp)
movq %rcx, (%rax)
movq 0x1e9c2(%rip), %rax     # 0x48fd0
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq -0x10(%r14), %rdi
movq (%rax), %rsi
callq 0x5370
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x2a632
callq 0x52e0
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a648
callq 0x52e0
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2a657
callq 0x52e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a66a
callq 0x52e0
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a680
callq 0x52e0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a68f
callq 0x52e0
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a6a1
callq 0x52e0
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a209
callq 0x52e0
jmp 0x2a209
leaq 0x98(%rsp), %rcx
movq %rax, %rbx
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x2a6de
callq 0x52e0
jmp 0x2a6de
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2a6f2
callq 0x52e0
jmp 0x2a6f2
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a70a
callq 0x52e0
jmp 0x2a70a
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a725
callq 0x52e0
jmp 0x2a725
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a739
callq 0x52e0
jmp 0x2a739
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a750
callq 0x52e0
jmp 0x2a750
movq %rax, %rbx
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x2a7a0
jmp 0x2a7a5
movq 0xe8(%rsp), %rdi
jmp 0x2a777
jmp 0x2a781
movq 0x108(%rsp), %rdi
movq %rax, %rbx
cmpq %r14, %rdi
jne 0x2a7a0
jmp 0x2a7a5
movq %rax, %rbx
jmp 0x2a7a5
movq 0x128(%rsp), %rdi
jmp 0x2a798
movq 0x148(%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x2a7a5
callq 0x52e0
movq %rbx, %rdi
callq 0x5670
nop