// File: tewalds[P]morat/hex/../lib/gtpbase.h
// Function: Morat::GTPBase::cmd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
GTPResponse cmd(std::string line){
		vecstr parts = explode(line, " ");
		std::string id;

		if(parts.size() > 1 && atoi(parts[0].c_str())){
			id = parts[0];
			parts.erase(parts.begin());
		}

		std::string name = parts[0];
		parts.erase(parts.begin());

		int cb = find_callback(name);
		GTPResponse response;

		if(cb < 0){
			response = GTPResponse(false, "Unknown command");
		}else{
			response = callbacks[cb].func(parts);
		}

		response.id = id;

		return response;
	}

// Assembly:
subq $0x218, %rsp            # imm = 0x218
movq %rdx, 0x40(%rsp)
movq %rdi, 0x48(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x210(%rsp)
movq %rsi, 0x208(%rsp)
movq %rdx, 0x200(%rsp)
movq 0x208(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x1c7(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x5770
movq 0x60(%rsp), %rdx
leaq 0x4575b(%rip), %rsi     # 0x508d7
leaq 0x1c8(%rsp), %rdi
callq 0x5590
jmp 0xb18b
movq 0x40(%rsp), %rsi
leaq 0x1e8(%rsp), %rdi
leaq 0x1c8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x48aa0
jmp 0xb1a9
leaq 0x1c8(%rsp), %rdi
callq 0x5260
leaq 0x1c7(%rsp), %rdi
callq 0x5450
leaq 0x190(%rsp), %rdi
callq 0x55a0
leaq 0x1e8(%rsp), %rdi
callq 0x13c80
cmpq $0x1, %rax
jbe 0xb2ed
leaq 0x1e8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x5680
cmpl $0x0, %eax
je 0xb2ed
xorl %eax, %eax
movl %eax, %esi
leaq 0x1e8(%rsp), %rdi
callq 0x13ca0
movq %rax, %rsi
leaq 0x190(%rsp), %rdi
callq 0x5050
jmp 0xb234
leaq 0x1e8(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x13d30
movq %rax, 0x180(%rsp)
leaq 0x188(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x13d60
movq 0x30(%rsp), %rdi
movq 0x188(%rsp), %rsi
callq 0x13cc0
movq %rax, 0x38(%rsp)
jmp 0xb27c
movq 0x38(%rsp), %rax
movq %rax, 0x178(%rsp)
jmp 0xb2ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
jmp 0xb2c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x5260
leaq 0x1c7(%rsp), %rdi
callq 0x5450
jmp 0xb5d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
jmp 0xb5bf
xorl %eax, %eax
movl %eax, %esi
leaq 0x1e8(%rsp), %rdi
callq 0x13ca0
movq %rax, %rsi
leaq 0x158(%rsp), %rdi
callq 0x51b0
jmp 0xb310
leaq 0x1e8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x13d30
movq %rax, 0x148(%rsp)
leaq 0x150(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x13d60
movq 0x20(%rsp), %rdi
movq 0x150(%rsp), %rsi
callq 0x13cc0
movq %rax, 0x28(%rsp)
jmp 0xb358
movq 0x58(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x140(%rsp)
leaq 0x158(%rsp), %rsi
callq 0x13da0
movl %eax, 0x1c(%rsp)
jmp 0xb37d
movq 0x48(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x13c(%rsp)
movb $0x0, 0x13b(%rsp)
callq 0x13e40
jmp 0xb39c
cmpl $0x0, 0x13c(%rsp)
jge 0xb490
leaq 0xcf(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5770
movq 0x10(%rsp), %rdx
leaq 0x4150f(%rip), %rsi     # 0x4c8d7
leaq 0xd0(%rsp), %rdi
callq 0x5590
jmp 0xb3d7
leaq 0xf0(%rsp), %rdi
xorl %esi, %esi
leaq 0xd0(%rsp), %rdx
callq 0xd9a0
jmp 0xb3f0
movq 0x48(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x13e70
leaq 0xf0(%rsp), %rdi
callq 0xb5f0
leaq 0xd0(%rsp), %rdi
callq 0x5260
leaq 0xcf(%rsp), %rdi
callq 0x5450
jmp 0xb540
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
jmp 0xb5b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
jmp 0xb47e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x5260
leaq 0xcf(%rsp), %rdi
callq 0x5450
jmp 0xb5a8
movq 0x58(%rsp), %rdi
addq $0x10, %rdi
movslq 0x13c(%rsp), %rsi
callq 0xd980
addq $0x40, %rax
movq %rax, 0x8(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x13f30
jmp 0xb4c3
movq 0x8(%rsp), %rsi
leaq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x13ed0
jmp 0xb4dc
movq 0x48(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x13e70
leaq 0x80(%rsp), %rdi
callq 0xb5f0
leaq 0x68(%rsp), %rdi
callq 0xe140
jmp 0xb540
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
jmp 0xb5a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0xe140
jmp 0xb5a8
movq 0x48(%rsp), %rdi
addq $0x8, %rdi
leaq 0x190(%rsp), %rsi
callq 0x5050
jmp 0xb558
movb $0x1, 0x13b(%rsp)
testb $0x1, 0x13b(%rsp)
jne 0xb574
movq 0x48(%rsp), %rdi
callq 0xb5f0
leaq 0x158(%rsp), %rdi
callq 0x5260
leaq 0x190(%rsp), %rdi
callq 0x5260
leaq 0x1e8(%rsp), %rdi
callq 0xe140
movq 0x50(%rsp), %rax
addq $0x218, %rsp            # imm = 0x218
retq
movq 0x48(%rsp), %rdi
callq 0xb5f0
leaq 0x158(%rsp), %rdi
callq 0x5260
leaq 0x190(%rsp), %rdi
callq 0x5260
leaq 0x1e8(%rsp), %rdi
callq 0xe140
movq 0x1b8(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)