// File: /workspace/github_cpp_makefile_star2_O1/tewalds[P]morat/hex/gtpgeneral.cpp
// Function: Morat::Hex::GTP::gtp_boardsize(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
GTPResponse GTP::gtp_boardsize(vecstr args){
	if(args.size() != 1)
		return GTPResponse(false, "Current board size: " + hist->size());

	if(!Board::valid_size(args[0]))
		return GTPResponse(false, "Size " + args[0] + " is out of range.");

	hist = History<Board>(Board(args[0]));
	set_board();
	time_control.new_game();

	return GTPResponse(true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rdi
movq 0x8(%rdx), %rax
subq %rdi, %rax
cmpq $0x20, %rax
jne 0x29892
movq %rdx, %r15
callq 0xaed9
addl $-0x3, %eax
cmpl $0x17, %eax
jae 0x298ee
movq (%r15), %rax
leaq 0xd0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %r15
movq %r15, %rdi
callq 0xa866
leaq 0xe0(%rsp), %rdi
movq %r15, %rsi
callq 0x9b7a
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x9c56
vmovaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movq %rax, 0x78(%r14)
movq 0x68(%r14), %rdi
vmovups %xmm0, 0x68(%r14)
vxorps %xmm1, %xmm1, %xmm1
vmovaps %xmm1, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x29732
callq 0x52e0
vxorps %xmm1, %xmm1, %xmm1
movzwl 0x20(%rsp), %eax
movw %ax, 0x88(%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x80(%r14)
vmovups 0x28(%rsp), %xmm0
movq 0x38(%rsp), %rax
movq %rax, 0xa0(%r14)
movq 0x90(%r14), %rdi
vmovups %xmm0, 0x90(%r14)
vmovups %xmm1, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
testq %rdi, %rdi
je 0x29786
callq 0x52e0
vmovaps 0x40(%rsp), %xmm0
vmovups %xmm0, 0xa8(%r14)
vmovaps 0x50(%rsp), %xmm0
vxorps %xmm1, %xmm1, %xmm1
vmovaps %xmm1, 0x50(%rsp)
movq 0xc0(%r14), %rdi
vmovups %xmm0, 0xb8(%r14)
testq %rdi, %rdi
je 0x297bf
callq 0xb170
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x297ce
callq 0xb170
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x297dd
callq 0x52e0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x297eb
callq 0x52e0
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x297fd
callq 0xb170
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x2980f
callq 0x52e0
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x29821
callq 0x52e0
movq 0xd8(%r14), %rdi
leaq 0x80(%r14), %rsi
movq (%rdi), %rax
movl $0x1, %edx
callq *0x20(%rax)
vmovsd 0x40(%r14), %xmm0
vmovsd %xmm0, 0x60(%r14)
leaq 0xb0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x80ae(%rip), %rdx      # 0x31907
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0xb0e0
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0xa7f0
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
jne 0x299c1
jmp 0x299c6
movsbl 0x80(%r14), %esi
movq %rsp, %r14
movq %r14, %rdi
callq 0x11187
leaq 0xc1e4(%rip), %rcx      # 0x35a90
movl $0x14, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x90(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x29939
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x29942
movq (%r15), %rdx
leaq 0xc1ad(%rip), %rsi      # 0x35aa5
movq %rsp, %r14
movq %r14, %rdi
callq 0x9805
leaq 0xc1a1(%rip), %rsi      # 0x35aab
movq %r14, %rdi
callq 0x56e0
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x29975
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x2997e
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0x80(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa7f0
movq 0x80(%rsp), %rdi
jmp 0x299a9
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0x60(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa7f0
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x299b3
callq 0x52e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x299c6
callq 0x52e0
movq %rbx, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
jne 0x29a42
jmp 0x29a47
movq %rax, %rbx
movq 0x60(%rsp), %rdi
jmp 0x29a25
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x9ce0
jmp 0x29a0b
jmp 0x29a31
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
jne 0x29a42
jmp 0x29a47
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x29a34
callq 0x52e0
jmp 0x29a34
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29a47
callq 0x52e0
movq %rbx, %rdi
callq 0x5670
nop