// File: /workspace/github_cpp_makefile_star2_O3/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 %rdi, 0x8(%rsp)
movq 0x90(%rsi), %rdi
movq %rdx, %r15
testq %rdi, %rdi
je 0x10a19
leaq 0x25344(%rip), %rdx     # 0x35d48
leaq 0x2504d(%rip), %rsi     # 0x35a58
xorl %ecx, %ecx
callq 0x4340
movq %rax, 0x10(%rsp)
jmp 0x10a22
movq $0x0, 0x10(%rsp)
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x10c36
leaq 0x28(%rsp), %rcx
leaq 0x48(%rsp), %rbp
xorl %r14d, %r14d
leaq 0x38(%rsp), %r12
leaq 0xd8(%rsp), %r13
xorl %ebx, %ebx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
shlq $0x5, %r14
movq %rbp, 0x38(%rsp)
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x8e30
leaq 0x18cc6(%rip), %rsi     # 0x29744
movq %r12, %rdi
callq 0x40a0
testl %eax, %eax
je 0x10a9d
leaq 0x18cb6(%rip), %rsi     # 0x29747
movq %r12, %rdi
callq 0x40a0
testl %eax, %eax
jne 0x10add
movq (%r15), %rdi
movq 0x8(%r15), %rax
leal 0x1(%rbx), %r14d
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x10add
movq %r14, %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x15505
movq 0x10(%rsp), %rdi
shlq $0x14, %rax
movb $0x1, %r13b
movq (%rdi), %rcx
movq %rax, %rsi
callq *0x30(%rcx)
jmp 0x10b83
leaq 0x18b30(%rip), %rsi     # 0x29614
movq %r12, %rdi
callq 0x40a0
testl %eax, %eax
je 0x10b03
leaq 0x18c59(%rip), %rsi     # 0x29750
movq %r12, %rdi
callq 0x40a0
testl %eax, %eax
jne 0x10b36
movq (%r15), %rdi
movq 0x8(%r15), %rax
leal 0x1(%rbx), %r14d
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x10b36
movq %r14, %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0xd201
movq 0x10(%rsp), %rcx
movb $0x1, %r13b
movl %eax, 0x6c(%rcx)
jmp 0x10b83
leaq 0xe8(%rsp), %r14
movq %r14, 0xd8(%rsp)
leaq 0x18ad3(%rip), %rsi     # 0x29620
leaq 0x18ae8(%rip), %rdx     # 0x2963c
movq %r13, %rdi
callq 0xa810
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x8dba
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x10b7d
callq 0x42b0
xorl %r13d, %r13d
movl %ebx, %r14d
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x10b92
callq 0x42b0
testb %r13b, %r13b
je 0x10c0b
movq (%r15), %rax
movq 0x8(%r15), %rcx
incl %r14d
leaq 0xd8(%rsp), %r13
movl %r14d, %ebx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r14, %rcx
ja 0x10a5a
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x168(%rsp), %rbx
movq %rbx, -0x10(%rbx)
addq %rsi, %rdx
leaq 0x158(%rsp), %rdi
callq 0x8e30
movq 0x8(%rsp), %rdi
leaq 0x158(%rsp), %rdx
movl $0x1, %esi
callq 0x8dba
movq 0x158(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10c0b
callq 0x42b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x10c1f
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 0x17e99(%rip), %rsi     # 0x28ae2
leaq 0x17e93(%rip), %rdx     # 0x28ae3
leaq 0x178(%rsp), %rdi
callq 0xa810
leaq 0x18a2a(%rip), %rsi     # 0x2968e
leaq 0x178(%rsp), %rdi
callq 0x4610
leaq 0x108(%rsp), %r12
movq %rax, %rcx
addq $0x10, %rcx
movq %r12, -0x10(%r12)
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x10ca2
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x10cac
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 0x189e4(%rip), %rsi     # 0x296b6
callq 0x4610
leaq 0x88(%rsp), %r13
movq %rax, %rcx
addq $0x10, %rcx
movq %r13, -0x10(%r13)
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x10d04
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x10d0e
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x80(%rsp)
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x48(%rcx), %rsi
shrq $0x14, %rsi
leaq 0xb8(%rsp), %rdi
callq 0xd5e9
movq 0x80(%rsp), %r8
movq 0xc0(%rsp), %rdx
movq 0x78(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r13, %rcx
je 0x10d6e
movq 0x88(%rsp), %rdi
movq 0xb8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x10d9a
leaq 0xc8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x10d95
movq 0xc8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x10da6
leaq 0x78(%rsp), %rdi
callq 0x40b0
jmp 0x10db7
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4330
leaq 0x68(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
je 0x10ddb
movq %rsi, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x10de3
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x18594(%rip), %rsi     # 0x2939b
leaq 0x58(%rsp), %rdi
callq 0x4610
leaq 0x128(%rsp), %rbp
movq %rax, %rcx
addq $0x10, %rcx
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x10e41
movq %rdx, 0x118(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x128(%rsp)
jmp 0x10e4a
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 0x1888d(%rip), %rsi     # 0x296fd
callq 0x4610
leaq 0x48(%rsp), %rbx
movq %rax, %rcx
addq $0x10, %rcx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x10e9c
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x10ea4
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x6c(%rcx), %esi
leaq 0x98(%rsp), %rdi
callq 0xd4eb
movq 0x40(%rsp), %r8
movq 0xa0(%rsp), %rdx
movq 0x38(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %rbx, %rcx
je 0x10ef6
movq 0x48(%rsp), %rdi
movq 0x98(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x10f22
leaq 0xa8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x10f1d
movq 0xa8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x10f2e
leaq 0x38(%rsp), %rdi
callq 0x40b0
jmp 0x10f3f
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4330
leaq 0x28(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
je 0x10f63
movq %rsi, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x10f6b
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x20(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1840c(%rip), %rsi     # 0x2939b
leaq 0x18(%rsp), %rdi
callq 0x4610
leaq 0x148(%rsp), %r14
movq %rax, %rcx
addq $0x10, %rcx
movq %r14, -0x10(%r14)
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x10fc9
movq %rdx, 0x138(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x148(%rsp)
jmp 0x10fd2
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 0x8dba
movq 0x138(%rsp), %rdi
cmpq %r14, %rdi
je 0x11012
callq 0x42b0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11025
callq 0x42b0
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1103b
callq 0x42b0
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1104a
callq 0x42b0
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1105c
callq 0x42b0
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1106f
callq 0x42b0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11085
callq 0x42b0
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x11094
callq 0x42b0
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x110a6
callq 0x42b0
movq 0x178(%rsp), %rdi
cmpq %r15, %rdi
jne 0x10c1a
jmp 0x10c1f
movq 0x158(%rsp), %rdi
movq %rax, 0x8(%rsp)
cmpq %rbx, %rdi
jne 0x11206
jmp 0x11212
jmp 0x1120d
movq 0x138(%rsp), %rdi
movq %rax, 0x8(%rsp)
cmpq %r14, %rdi
je 0x110fa
callq 0x42b0
jmp 0x110fa
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11114
callq 0x42b0
jmp 0x11114
movq %rax, 0x8(%rsp)
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11131
callq 0x42b0
jmp 0x11131
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x11147
callq 0x42b0
jmp 0x11147
movq %rax, 0x8(%rsp)
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11160
callq 0x42b0
jmp 0x11160
movq %rax, 0x8(%rsp)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1117a
callq 0x42b0
jmp 0x1117a
movq %rax, 0x8(%rsp)
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11197
callq 0x42b0
jmp 0x11197
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x111ad
callq 0x42b0
jmp 0x111ad
movq %rax, 0x8(%rsp)
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x111bf
callq 0x42b0
movq 0x178(%rsp), %rdi
cmpq %r15, %rdi
jne 0x11221
jmp 0x11226
movq %rax, 0x8(%rsp)
jmp 0x111bf
movq %rax, 0x8(%rsp)
jmp 0x11226
movq 0xd8(%rsp), %rdi
movq %rax, 0x8(%rsp)
cmpq %r14, %rdi
je 0x111fc
callq 0x42b0
jmp 0x111fc
jmp 0x111f7
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11212
callq 0x42b0
jmp 0x11212
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x11226
callq 0x42b0
movq 0x8(%rsp), %rdi
callq 0x45b0