// File: 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:
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdx, 0x30(%rsp)
movq %rdi, %rax
movq 0x30(%rsp), %rdi
movq %rax, 0x38(%rsp)
movq %rax, %rcx
movq %rcx, 0x40(%rsp)
movq %rax, 0x1e0(%rsp)
movq %rsi, 0x1d8(%rsp)
movq %rdi, 0x1d0(%rsp)
movq 0x1d8(%rsp), %rax
movq %rax, 0x48(%rsp)
callq 0x13c80
cmpq $0x1, %rax
je 0x3f741
movq 0x48(%rsp), %rdi
addq $0x68, %rdi
callq 0x3ea90
movq %rax, %rsi
leaq 0x190(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x43630
movq 0x28(%rsp), %rdx
leaq 0x10e70(%rip), %rsi     # 0x50524
leaq 0x1b0(%rsp), %rdi
callq 0x19f30
jmp 0x3f6c3
movq 0x38(%rsp), %rdi
xorl %esi, %esi
leaq 0x1b0(%rsp), %rdx
callq 0xd9a0
jmp 0x3f6d9
leaq 0x1b0(%rsp), %rdi
callq 0x5260
leaq 0x190(%rsp), %rdi
callq 0x5260
jmp 0x3f99f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x188(%rsp)
movl %eax, 0x184(%rsp)
jmp 0x3f72f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x188(%rsp)
movl %eax, 0x184(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x5260
leaq 0x190(%rsp), %rdi
callq 0x5260
jmp 0x3f9ac
movq 0x30(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x101e0
testb $0x1, %al
jne 0x3f822
movq 0x30(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdx
leaq 0x10dc2(%rip), %rsi     # 0x50539
leaq 0x140(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xb960
movq 0x20(%rsp), %rsi
leaq 0x10daa(%rip), %rdx     # 0x5053f
leaq 0x160(%rsp), %rdi
callq 0xb910
jmp 0x3f7a4
movq 0x38(%rsp), %rdi
xorl %esi, %esi
leaq 0x160(%rsp), %rdx
callq 0xd9a0
jmp 0x3f7ba
leaq 0x160(%rsp), %rdi
callq 0x5260
leaq 0x140(%rsp), %rdi
callq 0x5260
jmp 0x3f99f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x188(%rsp)
movl %eax, 0x184(%rsp)
jmp 0x3f810
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x188(%rsp)
movl %eax, 0x184(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x5260
leaq 0x140(%rsp), %rdi
callq 0x5260
jmp 0x3f9ac
movq 0x30(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rsi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x51b0
movq 0x18(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0xbea0
jmp 0x3f856
leaq 0xe0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xbfe0
jmp 0x3f86d
movq 0x48(%rsp), %rdi
addq $0x68, %rdi
leaq 0xe0(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x43660
movq 0x8(%rsp), %rdi
callq 0xc450
leaq 0x98(%rsp), %rdi
callq 0xc040
leaq 0x78(%rsp), %rdi
callq 0x5260
movq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0xc080
movq 0x48(%rsp), %rdi
addq $0x30, %rdi
callq 0x436a0
leaq 0x57(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5770
movq 0x10(%rsp), %rdx
leaq 0xd008(%rip), %rsi      # 0x4c8e9
leaq 0x58(%rsp), %rdi
callq 0x5590
jmp 0x3f8ed
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x58(%rsp), %rdx
callq 0xd9a0
jmp 0x3f903
leaq 0x58(%rsp), %rdi
callq 0x5260
leaq 0x57(%rsp), %rdi
callq 0x5450
jmp 0x3f99f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x188(%rsp)
movl %eax, 0x184(%rsp)
jmp 0x3f953
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x188(%rsp)
movl %eax, 0x184(%rsp)
leaq 0x98(%rsp), %rdi
callq 0xc040
leaq 0x78(%rsp), %rdi
callq 0x5260
jmp 0x3f9ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x188(%rsp)
movl %eax, 0x184(%rsp)
jmp 0x3f993
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x188(%rsp)
movl %eax, 0x184(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x5260
leaq 0x57(%rsp), %rdi
callq 0x5450
jmp 0x3f9ac
movq 0x40(%rsp), %rax
addq $0x1e8, %rsp            # imm = 0x1E8
retq
movq 0x188(%rsp), %rdi
callq 0x5760
nopl (%rax)