// File: /workspace/github_cpp_makefile_star2_O1/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 0x2a348
movq %rsi, %r14
movb 0x89(%rsi), %al
leaq 0xc10f(%rip), %rcx      # 0x363b1
cmpb (%rcx), %al
jge 0x2a389
leaq 0x80(%r14), %r15
leaq 0x5(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x11286
movq %r15, %rdi
movq %r12, %rsi
callq 0x29258
testb %al, %al
je 0x2a3e7
leaq 0x68(%r14), %rdi
leaq 0x5(%rsp), %r12
movq %r12, %rsi
callq 0x291d8
movq 0xd8(%r14), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x28(%rax)
cmpl $0x2, 0xc8(%r14)
jge 0x2a42f
leaq 0xf8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x75f1(%rip), %rdx      # 0x31907
leaq 0xe8(%rsp), %rdi
movq %rdx, %rsi
callq 0xb0e0
leaq 0xe8(%rsp), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0xa7f0
movq 0xe8(%rsp), %rdi
jmp 0x2a428
leaq 0x158(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xb762(%rip), %rsi      # 0x35abd
leaq 0xb779(%rip), %rdx      # 0x35adb
leaq 0x148(%rsp), %r14
movq %r14, %rdi
callq 0xb0e0
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xa7f0
movq 0x148(%rsp), %rdi
jmp 0x2a3c8
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xb740(%rip), %rsi      # 0x35adc
leaq 0xb752(%rip), %rdx      # 0x35af5
leaq 0x128(%rsp), %r14
movq %r14, %rdi
callq 0xb0e0
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xa7f0
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x2a3d2
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 0xb6fc(%rip), %rsi      # 0x35af6
leaq 0xb701(%rip), %rdx      # 0x35b02
leaq 0x108(%rsp), %rdi
callq 0xb0e0
leaq 0x108(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa7f0
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
jne 0x2a3cd
jmp 0x2a3d2
leaq 0x168(%rsp), %r12
leaq 0x5(%rsp), %rsi
movq %r12, %rdi
callq 0x10cdc
leaq 0xb6b8(%rip), %rcx      # 0x35b03
movl $0xb, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0xd8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x2a485
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
jmp 0x2a498
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 0xb651(%rip), %rsi      # 0x35b0f
callq 0x56e0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x2a4e7
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r13)
jmp 0x2a4f4
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb 0x89(%r14), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
leaq 0xa8(%rsp), %rdi
callq 0x2f5ee
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0xb0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x2a54c
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2a571
leaq 0xb8(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x2a56c
movq 0xb8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2a585
movq 0xa8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x50c0
jmp 0x2a596
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x2a5b5
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
jmp 0x2a5c2
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x7320(%rip), %rsi      # 0x31906
leaq 0x8(%rsp), %rdi
callq 0x56e0
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x2a613
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbp)
jmp 0x2a620
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 0x1f6ee
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x90(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbp, %rcx
je 0x2a675
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2a69a
leaq 0x98(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x2a695
movq 0x98(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x2a6ae
movq 0x88(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x50c0
jmp 0x2a6bf
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x78(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x2a6de
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
jmp 0x2a6eb
movq %rsi, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x1f8c1(%rip), %rax     # 0x49fd0
movq (%rax), %rsi
leaq 0x78(%rsp), %r14
movq -0x10(%r14), %rdi
callq 0x5370
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x2a72e
callq 0x52e0
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a744
callq 0x52e0
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2a753
callq 0x52e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a766
callq 0x52e0
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a77c
callq 0x52e0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a78b
callq 0x52e0
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a79d
callq 0x52e0
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a303
callq 0x52e0
jmp 0x2a303
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a7da
callq 0x52e0
jmp 0x2a7da
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2a7ee
callq 0x52e0
jmp 0x2a7ee
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a806
callq 0x52e0
jmp 0x2a806
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a821
callq 0x52e0
jmp 0x2a821
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a835
callq 0x52e0
jmp 0x2a835
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a84c
callq 0x52e0
jmp 0x2a84c
movq %rax, %rbx
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x2a8a2
jmp 0x2a8a7
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
jmp 0x2a879
jmp 0x2a880
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
jne 0x2a8a2
jmp 0x2a8a7
movq %rax, %rbx
jmp 0x2a8a7
movq %rax, %rbx
movq 0x128(%rsp), %rdi
jmp 0x2a89d
movq %rax, %rbx
movq 0x148(%rsp), %rdi
cmpq %r15, %rdi
je 0x2a8a7
callq 0x52e0
movq %rbx, %rdi
callq 0x5670
nop