// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
cmpb %cl, 0x88(%rsi)
jne 0x1d869
leaq 0x97f7(%rip), %rcx      # 0x26eb1
movb 0x89(%rsi), %al
movq %rsi, %r14
cmpb (%rcx), %al
jge 0x1d89e
leaq 0x5(%rsp), %r12
leaq 0x80(%r14), %r15
movq %rdx, %rsi
movq %r12, %rdi
callq 0xd26c
movq %r15, %rdi
movq %r12, %rsi
callq 0x1cbd6
testb %al, %al
je 0x1d8d3
leaq 0x5(%rsp), %rsi
movq %r14, %rdi
callq 0x1c9fa
cmpl $0x2, 0xc8(%r14)
jl 0x1d839
leaq 0x148(%rsp), %r12
leaq 0x5(%rsp), %rsi
movq %r12, %rdi
callq 0xcfb0
leaq 0x8ed7(%rip), %rsi      # 0x26603
leaq 0x88(%rsp), %rdi
movq %r12, %rdx
callq 0xcf8b
leaq 0x8ecc(%rip), %rdx      # 0x2660f
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x8051
movb 0x89(%r14), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
leaq 0x68(%rsp), %rdi
callq 0x20caa
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xcf24
leaq 0x514b(%rip), %rdx      # 0x228dc
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x8051
movzbl 0xcd(%r14), %edx
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x17dc6
leaq 0x168(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xcf24
leaq 0x168(%rsp), %r14
movq %r14, %rdi
callq 0xd451
movq %r14, %rdi
callq 0x5150
leaq 0x48(%rsp), %rdi
callq 0x5150
leaq 0x8(%rsp), %rdi
callq 0x5150
leaq 0xc8(%rsp), %rdi
callq 0x5150
leaq 0x68(%rsp), %rdi
callq 0x5150
leaq 0xa8(%rsp), %rdi
callq 0x5150
leaq 0x88(%rsp), %rdi
callq 0x5150
leaq 0x148(%rsp), %rdi
callq 0x5150
leaq 0x509d(%rip), %rsi      # 0x228dd
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5110
pushq $0x1
popq %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x8d00
leaq 0x28(%rsp), %rdi
jmp 0x1d906
leaq 0x8d4d(%rip), %rsi      # 0x265bd
leaq 0x128(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5110
leaq 0x128(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8d00
leaq 0x128(%rsp), %rdi
jmp 0x1d906
leaq 0x8d37(%rip), %rsi      # 0x265dc
leaq 0x108(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5110
leaq 0x108(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8d00
leaq 0x108(%rsp), %rdi
jmp 0x1d906
leaq 0x8d1c(%rip), %rsi      # 0x265f6
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5110
leaq 0xe8(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8d00
leaq 0xe8(%rsp), %rdi
callq 0x5150
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x48(%rsp), %rdi
movq %rax, %rbx
callq 0x5150
jmp 0x1d92f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5150
jmp 0x1d93e
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x5150
jmp 0x1d950
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5150
jmp 0x1d95f
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x5150
leaq 0x88(%rsp), %rdi
callq 0x5150
leaq 0x148(%rsp), %rdi
jmp 0x1d9b9
movq %rax, %rbx
jmp 0x1d96c
movq %rax, %rbx
jmp 0x1d979
leaq 0x28(%rsp), %rdi
jmp 0x1d9b6
jmp 0x1d9c0
leaq 0xe8(%rsp), %rdi
jmp 0x1d9b6
jmp 0x1d9c0
leaq 0x108(%rsp), %rdi
jmp 0x1d9b6
jmp 0x1d9c0
leaq 0x128(%rsp), %rdi
movq %rax, %rbx
callq 0x5150
jmp 0x1d9c3
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5650
nop