// File: /workspace/github_cpp_makefile_star2_O1/tewalds[P]pentagod/gtpagent.cpp
// Function: PentagoGTP::gtp_ab_params(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 PentagoGTP::gtp_ab_params(vecstr args){
	AgentAB * ab =  dynamic_cast<AgentAB *>(agent);

	if(args.size() == 0)
		return GTPResponse(true, string("\n") +
			"Set player parameters, eg: params -r 4\n" +
			"  -M --maxmem      Max memory in Mb to use for the tree              [" + to_str(ab->memlimit/(1024*1024)) + "]\n" +
			"  -r --randomness  How many bits of randomness to add to the eval    [" + to_str(ab->randomness) + "]\n"
			);

	string errs;
	for(unsigned int i = 0; i < args.size(); i++) {
		string arg = args[i];

		if((arg == "-M" || arg == "--maxmem") && i+1 < args.size()){
			ab->set_memlimit(from_str<uint64_t>(args[++i])*1024*1024);
		}else if((arg == "-r" || arg == "--randomness") && i+1 < args.size()){
			ab->randomness = from_str<int>(args[++i]);
		}else{
			return GTPResponse(false, "Missing or unknown parameter");
		}
	}
	return GTPResponse(true, errs);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdx, %r15
movq %rdi, 0x8(%rsp)
movq 0x90(%rsi), %rdi
testq %rdi, %rdi
je 0x10afd
leaq 0x25f70(%rip), %rsi     # 0x36a58
leaq 0x26259(%rip), %rdx     # 0x36d48
xorl %ecx, %ecx
callq 0x4340
movq %rax, 0x10(%rsp)
jmp 0x10b06
movq $0x0, 0x10(%rsp)
movq 0x8(%r15), %rax
cmpq (%r15), %rax
je 0x10d27
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x10cad
leaq 0x48(%rsp), %rbp
xorl %r14d, %r14d
leaq 0x38(%rsp), %r12
leaq 0xd8(%rsp), %r13
xorl %ebx, %ebx
shlq $0x5, %r14
movq %rbp, 0x38(%rsp)
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x8df0
movq %r12, %rdi
leaq 0x19be2(%rip), %rsi     # 0x2a754
callq 0x40a0
testl %eax, %eax
je 0x10b8e
movq %r12, %rdi
leaq 0x19bd2(%rip), %rsi     # 0x2a757
callq 0x40a0
testl %eax, %eax
jne 0x10bce
leal 0x1(%rbx), %r14d
movq (%r15), %rdi
movq 0x8(%r15), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x10bce
movq %r14, %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x1560f
shlq $0x14, %rax
movq 0x10(%rsp), %rdi
movq (%rdi), %rcx
movb $0x1, %r13b
movq %rax, %rsi
callq *0x30(%rcx)
jmp 0x10c74
movq %r12, %rdi
leaq 0x19a4c(%rip), %rsi     # 0x2a624
callq 0x40a0
testl %eax, %eax
je 0x10bf4
movq %r12, %rdi
leaq 0x19b75(%rip), %rsi     # 0x2a760
callq 0x40a0
testl %eax, %eax
jne 0x10c27
leal 0x1(%rbx), %r14d
movq (%r15), %rdi
movq 0x8(%r15), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x10c27
movq %r14, %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0xd295
movq 0x10(%rsp), %rcx
movl %eax, 0x6c(%rcx)
movb $0x1, %r13b
jmp 0x10c74
leaq 0xe8(%rsp), %r14
movq %r14, 0xd8(%rsp)
movq %r13, %rdi
leaq 0x199ef(%rip), %rsi     # 0x2a630
leaq 0x19a04(%rip), %rdx     # 0x2a64c
callq 0xa874
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x8d7a
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x10c6e
callq 0x42b0
xorl %r13d, %r13d
movl %ebx, %r14d
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x10c83
callq 0x42b0
testb %r13b, %r13b
je 0x10cfc
incl %r14d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
movl %r14d, %ebx
cmpq %r14, %rcx
leaq 0xd8(%rsp), %r13
ja 0x10b4b
leaq 0x168(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x158(%rsp), %rdi
callq 0x8df0
leaq 0x158(%rsp), %rdx
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x8d7a
movq 0x158(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10cfc
callq 0x42b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x10d10
callq 0x42b0
movq 0x8(%rsp), %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x188(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x18da8(%rip), %rsi     # 0x29ae2
leaq 0x18da2(%rip), %rdx     # 0x29ae3
leaq 0x178(%rsp), %rdi
callq 0xa874
leaq 0x19949(%rip), %rsi     # 0x2a69e
leaq 0x178(%rsp), %rdi
callq 0x4610
leaq 0x108(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x10d93
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x10d9d
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xf8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19903(%rip), %rsi     # 0x2a6c6
callq 0x4610
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x10df5
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x10dff
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x80(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rsi
shrq $0x14, %rsi
leaq 0xb8(%rsp), %rdi
callq 0xd669
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %r8
movq 0xc0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x10e5f
movq 0x88(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x10e84
leaq 0xc8(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x10e7f
movq 0xc8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x10e98
movq 0xb8(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x40b0
jmp 0x10ea9
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4330
leaq 0x68(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x10ecd
movq %rsi, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x10ed5
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x194b2(%rip), %rsi     # 0x2a3ab
leaq 0x58(%rsp), %rdi
callq 0x4610
leaq 0x128(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x10f33
movq %rdx, 0x118(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x128(%rsp)
jmp 0x10f3c
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x118(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x197ab(%rip), %rsi     # 0x2a70d
callq 0x4610
leaq 0x48(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x10f8e
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x10f96
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rax
movl 0x6c(%rax), %esi
leaq 0x98(%rsp), %rdi
callq 0xd56b
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %r8
movq 0xa0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbx, %rcx
je 0x10fe8
movq 0x48(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1100d
leaq 0xa8(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x11008
movq 0xa8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x11021
movq 0x98(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x40b0
jmp 0x11032
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4330
leaq 0x28(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x11056
movq %rsi, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x1105e
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x20(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x19329(%rip), %rsi     # 0x2a3ab
leaq 0x18(%rsp), %rdi
callq 0x4610
leaq 0x148(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x110bc
movq %rdx, 0x138(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x148(%rsp)
jmp 0x110c5
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0x138(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x8d7a
movq 0x138(%rsp), %rdi
cmpq %r14, %rdi
je 0x11105
callq 0x42b0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11118
callq 0x42b0
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1112e
callq 0x42b0
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1113d
callq 0x42b0
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1114f
callq 0x42b0
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11162
callq 0x42b0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11178
callq 0x42b0
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x11187
callq 0x42b0
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x11199
callq 0x42b0
movq 0x178(%rsp), %rdi
cmpq %r15, %rdi
jne 0x10d0b
jmp 0x10d10
movq %rax, 0x8(%rsp)
movq 0x138(%rsp), %rdi
cmpq %r14, %rdi
je 0x111cd
callq 0x42b0
jmp 0x111cd
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x111e7
callq 0x42b0
jmp 0x111e7
movq %rax, 0x8(%rsp)
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11204
callq 0x42b0
jmp 0x11204
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1121a
callq 0x42b0
jmp 0x1121a
movq %rax, 0x8(%rsp)
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11233
callq 0x42b0
jmp 0x11233
movq %rax, 0x8(%rsp)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1124d
callq 0x42b0
jmp 0x1124d
movq %rax, 0x8(%rsp)
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1126a
callq 0x42b0
jmp 0x1126a
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x11280
callq 0x42b0
jmp 0x11280
movq %rax, 0x8(%rsp)
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x11292
callq 0x42b0
movq 0x178(%rsp), %rdi
cmpq %r15, %rdi
jne 0x1130a
jmp 0x1130f
movq %rax, 0x8(%rsp)
jmp 0x11292
movq %rax, 0x8(%rsp)
jmp 0x1130f
movq %rax, 0x8(%rsp)
movq 0x158(%rsp), %rdi
cmpq %rbx, %rdi
jne 0x112ef
jmp 0x112fb
jmp 0x112f6
movq %rax, 0x8(%rsp)
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x112e5
callq 0x42b0
jmp 0x112e5
jmp 0x112e0
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x112fb
callq 0x42b0
jmp 0x112fb
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x1130f
callq 0x42b0
movq 0x8(%rsp), %rdi
callq 0x45b0
nop