// File: tewalds[P]morat/hex/gtpagent.cpp
// Function: Morat::Hex::GTP::gtp_pns_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 GTP::gtp_pns_params(vecstr args){
	AgentPNS * pns =  dynamic_cast<AgentPNS *>(agent);

	if(args.size() == 0)
		return GTPResponse(true, string("\n") +
			"Update the pns solver settings, eg: pns_params -m 100 -s 0 -d 1 -e 0.25 -a 2 -l 0\n"
			"  -m --memory   Memory limit in Mb                                       [" + to_str(pns->memlimit/(1024*1024)) + "]\n"
			"  -t --threads  How many threads to run                                  [" + to_str(pns->numthreads) + "]\n"
			"  -s --ties     Which side to assign ties to, 0 = handle, 1 = p1, 2 = p2 [" + to_str(pns->ties.to_i()) + "]\n"
			"  -d --df       Use depth-first thresholds                               [" + to_str(pns->df) + "]\n"
			"  -e --epsilon  How big should the threshold be                          [" + to_str(pns->epsilon) + "]\n"
			"  -a --abdepth  Run an alpha-beta search of this size at each leaf       [" + to_str(pns->ab) + "]\n"
			);

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

		if((arg == "-t" || arg == "--threads") && i+1 < args.size()){
			pns->numthreads = from_str<int>(args[++i]);
			pns->pool.set_num_threads(pns->numthreads);
		}else if((arg == "-m" || arg == "--memory") && i+1 < args.size()){
			uint64_t mem = from_str<uint64_t>(args[++i]);
			if(mem < 1) return GTPResponse(false, "Memory can't be less than 1mb");
			pns->set_memlimit(mem*1024*1024);
		}else if((arg == "-s" || arg == "--ties") && i+1 < args.size()){
			pns->ties = Side(from_str<int8_t>(args[++i]));
			pns->clear_mem();
		}else if((arg == "-d" || arg == "--df") && i+1 < args.size()){
			pns->df = from_str<bool>(args[++i]);
		}else if((arg == "-e" || arg == "--epsilon") && i+1 < args.size()){
			pns->epsilon = from_str<float>(args[++i]);
		}else if((arg == "-a" || arg == "--abdepth") && i+1 < args.size()){
			pns->ab = from_str<int>(args[++i]);
		}else{
			return GTPResponse(false, "Missing or unknown parameter");
		}
	}

	return GTPResponse(true, errs);
}

// Assembly:
subq $0x448, %rsp            # imm = 0x448
movq %rdx, 0xa8(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rdi, %rax
movq %rax, 0xb8(%rsp)
movq %rdi, 0x440(%rsp)
movq %rsi, 0x438(%rsp)
movq %rdx, 0x430(%rsp)
movq 0x438(%rsp), %rax
movq 0xd8(%rax), %rax
movq %rax, 0xc0(%rsp)
cmpq $0x0, %rax
je 0x3db50
movq 0xc0(%rsp), %rdi
leaq 0x2edaa(%rip), %rsi     # 0x6c8e0
leaq 0x2f04b(%rip), %rdx     # 0x6cb88
xorl %eax, %eax
movl %eax, %ecx
callq 0x5480
movq %rax, 0xa0(%rsp)
jmp 0x3db5c
xorl %eax, %eax
movq %rax, 0xa0(%rsp)
jmp 0x3db5c
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq %rax, 0x428(%rsp)
callq 0x13c80
cmpq $0x0, %rax
jne 0x3e258
leaq 0x267(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x5770
movq 0x98(%rsp), %rdx
leaq 0xed41(%rip), %rsi      # 0x4c8e8
leaq 0x268(%rsp), %rdi
callq 0x5590
jmp 0x3dbb6
leaq 0x126ef(%rip), %rdx     # 0x502ac
leaq 0x288(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0xb910
jmp 0x3dbd4
movq 0x428(%rsp), %rax
movq 0x60(%rax), %rsi
shrq $0x14, %rsi
leaq 0x230(%rsp), %rdi
callq 0x1a9f0
jmp 0x3dbf3
leaq 0x2a8(%rsp), %rdi
leaq 0x288(%rsp), %rsi
leaq 0x230(%rsp), %rdx
callq 0x19e40
jmp 0x3dc12
leaq 0x12730(%rip), %rdx     # 0x50349
leaq 0x2c8(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0xb910
jmp 0x3dc30
movq 0x428(%rsp), %rax
movl 0x1538(%rax), %esi
leaq 0x210(%rsp), %rdi
callq 0x1a430
jmp 0x3dc4d
leaq 0x2e8(%rsp), %rdi
leaq 0x2c8(%rsp), %rsi
leaq 0x210(%rsp), %rdx
callq 0x19e40
jmp 0x3dc6c
leaq 0x12723(%rip), %rdx     # 0x50396
leaq 0x308(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0xb910
jmp 0x3dc8a
movq 0x428(%rsp), %rdi
addq $0x1534, %rdi           # imm = 0x1534
callq 0x1fc40
movb %al, 0x97(%rsp)
jmp 0x3dca7
movb 0x97(%rsp), %al
movsbl %al, %esi
leaq 0x1f0(%rsp), %rdi
callq 0x37290
jmp 0x3dcc0
leaq 0x328(%rsp), %rdi
leaq 0x308(%rsp), %rsi
leaq 0x1f0(%rsp), %rdx
callq 0x19e40
jmp 0x3dcdf
leaq 0x126fd(%rip), %rdx     # 0x503e3
leaq 0x348(%rsp), %rdi
leaq 0x328(%rsp), %rsi
callq 0xb910
jmp 0x3dcfd
movq 0x428(%rsp), %rax
movzbl 0x152c(%rax), %esi
andl $0x1, %esi
leaq 0x1d0(%rsp), %rdi
callq 0x3ede0
jmp 0x3dd1e
leaq 0x368(%rsp), %rdi
leaq 0x348(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
callq 0x19e40
jmp 0x3dd3d
leaq 0x126ec(%rip), %rdx     # 0x50430
leaq 0x388(%rsp), %rdi
leaq 0x368(%rsp), %rsi
callq 0xb910
jmp 0x3dd5b
movq 0x428(%rsp), %rax
vmovss 0x1530(%rax), %xmm0
leaq 0x1b0(%rsp), %rdi
callq 0x3ee80
jmp 0x3dd7a
leaq 0x3a8(%rsp), %rdi
leaq 0x388(%rsp), %rsi
leaq 0x1b0(%rsp), %rdx
callq 0x19e40
jmp 0x3dd99
leaq 0x126dd(%rip), %rdx     # 0x5047d
leaq 0x3c8(%rsp), %rdi
leaq 0x3a8(%rsp), %rsi
callq 0xb910
jmp 0x3ddb7
movq 0x428(%rsp), %rax
movl 0x1528(%rax), %esi
leaq 0x190(%rsp), %rdi
callq 0x1a430
jmp 0x3ddd4
leaq 0x3e8(%rsp), %rdi
leaq 0x3c8(%rsp), %rsi
leaq 0x190(%rsp), %rdx
callq 0x19e40
jmp 0x3ddf3
leaq 0x12d89(%rip), %rdx     # 0x50b83
leaq 0x408(%rsp), %rdi
leaq 0x3e8(%rsp), %rsi
callq 0xb910
jmp 0x3de11
movq 0xb0(%rsp), %rdi
movl $0x1, %esi
leaq 0x408(%rsp), %rdx
callq 0xd9a0
jmp 0x3de2d
leaq 0x408(%rsp), %rdi
callq 0x5260
leaq 0x3e8(%rsp), %rdi
callq 0x5260
leaq 0x190(%rsp), %rdi
callq 0x5260
leaq 0x3c8(%rsp), %rdi
callq 0x5260
leaq 0x3a8(%rsp), %rdi
callq 0x5260
leaq 0x1b0(%rsp), %rdi
callq 0x5260
leaq 0x388(%rsp), %rdi
callq 0x5260
leaq 0x368(%rsp), %rdi
callq 0x5260
leaq 0x1d0(%rsp), %rdi
callq 0x5260
leaq 0x348(%rsp), %rdi
callq 0x5260
leaq 0x328(%rsp), %rdi
callq 0x5260
leaq 0x1f0(%rsp), %rdi
callq 0x5260
leaq 0x308(%rsp), %rdi
callq 0x5260
leaq 0x2e8(%rsp), %rdi
callq 0x5260
leaq 0x210(%rsp), %rdi
callq 0x5260
leaq 0x2c8(%rsp), %rdi
callq 0x5260
leaq 0x2a8(%rsp), %rdi
callq 0x5260
leaq 0x230(%rsp), %rdi
callq 0x5260
leaq 0x288(%rsp), %rdi
callq 0x5260
leaq 0x268(%rsp), %rdi
callq 0x5260
leaq 0x267(%rsp), %rdi
callq 0x5450
jmp 0x3ea3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e246
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e239
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e22c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e21f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e212
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e205
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e1f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e1eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e1de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e1d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e1c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e1b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e1aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e19d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e190
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e183
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e176
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e169
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e15c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e14f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0x408(%rsp), %rdi
callq 0x5260
leaq 0x3e8(%rsp), %rdi
callq 0x5260
leaq 0x190(%rsp), %rdi
callq 0x5260
leaq 0x3c8(%rsp), %rdi
callq 0x5260
leaq 0x3a8(%rsp), %rdi
callq 0x5260
leaq 0x1b0(%rsp), %rdi
callq 0x5260
leaq 0x388(%rsp), %rdi
callq 0x5260
leaq 0x368(%rsp), %rdi
callq 0x5260
leaq 0x1d0(%rsp), %rdi
callq 0x5260
leaq 0x348(%rsp), %rdi
callq 0x5260
leaq 0x328(%rsp), %rdi
callq 0x5260
leaq 0x1f0(%rsp), %rdi
callq 0x5260
leaq 0x308(%rsp), %rdi
callq 0x5260
leaq 0x2e8(%rsp), %rdi
callq 0x5260
leaq 0x210(%rsp), %rdi
callq 0x5260
leaq 0x2c8(%rsp), %rdi
callq 0x5260
leaq 0x2a8(%rsp), %rdi
callq 0x5260
leaq 0x230(%rsp), %rdi
callq 0x5260
leaq 0x288(%rsp), %rdi
callq 0x5260
leaq 0x268(%rsp), %rdi
callq 0x5260
leaq 0x267(%rsp), %rdi
callq 0x5450
jmp 0x3ea4f
leaq 0x170(%rsp), %rdi
callq 0x55a0
movl $0x0, 0x16c(%rsp)
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
movq %rax, 0x88(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x88(%rsp), %rax
cmpq %rcx, %rax
jae 0x3e9b1
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rsi
leaq 0x148(%rsp), %rdi
callq 0x51b0
jmp 0x3e2c8
leaq 0x11e0b(%rip), %rsi     # 0x500da
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x87(%rsp)
jmp 0x3e2e5
movb 0x87(%rsp), %al
testb $0x1, %al
jne 0x3e31f
jmp 0x3e2f2
leaq 0x11de4(%rip), %rsi     # 0x500dd
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x86(%rsp)
jmp 0x3e30f
movb 0x86(%rsp), %al
testb $0x1, %al
jne 0x3e31f
jmp 0x3e3e3
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x78(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x78(%rsp), %rax
cmpq %rcx, %rax
jae 0x3e3e3
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
incl %eax
movl %eax, 0x16c(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x10220
movl %eax, 0x74(%rsp)
jmp 0x3e37b
movl 0x74(%rsp), %ecx
movq 0x428(%rsp), %rax
movl %ecx, 0x1538(%rax)
movq 0x428(%rsp), %rax
movq %rax, %rdi
addq $0x1430, %rdi           # imm = 0x1430
movl 0x1538(%rax), %esi
callq 0x31f70
jmp 0x3e3ac
jmp 0x3e961
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3ea30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e9a2
leaq 0x11d9e(%rip), %rsi     # 0x50188
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x73(%rsp)
jmp 0x3e3fd
movb 0x73(%rsp), %al
testb $0x1, %al
jne 0x3e42e
jmp 0x3e407
leaq 0x120bc(%rip), %rsi     # 0x504ca
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x72(%rsp)
jmp 0x3e421
movb 0x72(%rsp), %al
testb $0x1, %al
jne 0x3e42e
jmp 0x3e584
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x68(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x68(%rsp), %rax
cmpq %rcx, %rax
jae 0x3e584
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
incl %eax
movl %eax, 0x16c(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x1dc80
movq %rax, 0x60(%rsp)
jmp 0x3e48b
movq 0x60(%rsp), %rax
movq %rax, 0x140(%rsp)
cmpq $0x1, 0x140(%rsp)
jae 0x3e560
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x5770
movq 0x58(%rsp), %rdx
leaq 0x1200e(%rip), %rsi     # 0x504d3
leaq 0x120(%rsp), %rdi
callq 0x5590
jmp 0x3e4d4
movq 0xb0(%rsp), %rdi
xorl %esi, %esi
leaq 0x120(%rsp), %rdx
callq 0xd9a0
jmp 0x3e4ed
leaq 0x120(%rsp), %rdi
callq 0x5260
leaq 0x11f(%rsp), %rdi
callq 0x5450
movl $0x1, 0x118(%rsp)
jmp 0x3e96c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e54e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x5260
leaq 0x11f(%rsp), %rdi
callq 0x5450
jmp 0x3e9a2
movq 0x428(%rsp), %rdi
movq 0x140(%rsp), %rsi
shlq $0x14, %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x3e57f
jmp 0x3e95f
leaq 0x11be0(%rip), %rsi     # 0x5016b
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x57(%rsp)
jmp 0x3e59e
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x3e5cf
jmp 0x3e5a8
leaq 0x11f42(%rip), %rsi     # 0x504f1
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x56(%rsp)
jmp 0x3e5c2
movb 0x56(%rsp), %al
testb $0x1, %al
jne 0x3e5cf
jmp 0x3e676
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x48(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jae 0x3e676
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
incl %eax
movl %eax, 0x16c(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3ef90
movb %al, 0x47(%rsp)
jmp 0x3e627
movb 0x47(%rsp), %al
movb %al, 0x116(%rsp)
leaq 0x117(%rsp), %rdi
leaq 0x116(%rsp), %rsi
callq 0x1fd40
jmp 0x3e649
movq 0x428(%rsp), %rax
movb 0x117(%rsp), %cl
movb %cl, 0x1534(%rax)
movq 0x428(%rsp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
jmp 0x3e671
jmp 0x3e95d
leaq 0x11ad1(%rip), %rsi     # 0x5014e
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x46(%rsp)
jmp 0x3e690
movb 0x46(%rsp), %al
testb $0x1, %al
jne 0x3e6be
jmp 0x3e69a
leaq 0x11e57(%rip), %rsi     # 0x504f8
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x45(%rsp)
jmp 0x3e6b4
movb 0x45(%rsp), %al
testb $0x1, %al
jne 0x3e6be
jmp 0x3e730
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x38(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x3e730
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
incl %eax
movl %eax, 0x16c(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3ef10
movb %al, 0x37(%rsp)
jmp 0x3e716
movb 0x37(%rsp), %cl
movq 0x428(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x152c(%rax)
jmp 0x3e95b
leaq 0x119ed(%rip), %rsi     # 0x50124
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x36(%rsp)
jmp 0x3e74a
movb 0x36(%rsp), %al
testb $0x1, %al
jne 0x3e778
jmp 0x3e754
leaq 0x11da2(%rip), %rsi     # 0x504fd
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x35(%rsp)
jmp 0x3e76e
movb 0x35(%rsp), %al
testb $0x1, %al
jne 0x3e778
jmp 0x3e7ed
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x28(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x3e7ed
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
incl %eax
movl %eax, 0x16c(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x1dd00
vmovss %xmm0, 0x24(%rsp)
jmp 0x3e7d2
vmovss 0x24(%rsp), %xmm0
movq 0x428(%rsp), %rax
vmovss %xmm0, 0x1530(%rax)
jmp 0x3e959
leaq 0x11968(%rip), %rsi     # 0x5015c
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x23(%rsp)
jmp 0x3e807
movb 0x23(%rsp), %al
testb $0x1, %al
jne 0x3e835
jmp 0x3e811
leaq 0x11cef(%rip), %rsi     # 0x50507
leaq 0x148(%rsp), %rdi
callq 0xb0f0
movb %al, 0x22(%rsp)
jmp 0x3e82b
movb 0x22(%rsp), %al
testb $0x1, %al
jne 0x3e835
jmp 0x3e8a4
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x18(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x3e8a4
movq 0xa8(%rsp), %rdi
movl 0x16c(%rsp), %eax
incl %eax
movl %eax, 0x16c(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x10220
movl %eax, 0x14(%rsp)
jmp 0x3e88d
movl 0x14(%rsp), %ecx
movq 0x428(%rsp), %rax
movl %ecx, 0x1528(%rax)
jmp 0x3e957
leaq 0xef(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5770
movq 0x8(%rsp), %rdx
leaq 0x119cd(%rip), %rsi     # 0x5028f
leaq 0xf0(%rsp), %rdi
callq 0x5590
jmp 0x3e8d1
movq 0xb0(%rsp), %rdi
xorl %esi, %esi
leaq 0xf0(%rsp), %rdx
callq 0xd9a0
jmp 0x3e8ea
leaq 0xf0(%rsp), %rdi
callq 0x5260
leaq 0xef(%rsp), %rdi
callq 0x5450
movl $0x1, 0x118(%rsp)
jmp 0x3e96c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x3e948
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x5260
leaq 0xef(%rsp), %rdi
callq 0x5450
jmp 0x3e9a2
jmp 0x3e959
jmp 0x3e95b
jmp 0x3e95d
jmp 0x3e95f
jmp 0x3e961
movl $0x0, 0x118(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x5260
movl 0x118(%rsp), %eax
testl %eax, %eax
jne 0x3ea21
jmp 0x3e98a
jmp 0x3e98c
movl 0x16c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x16c(%rsp)
jmp 0x3e270
leaq 0x148(%rsp), %rdi
callq 0x5260
jmp 0x3ea30
leaq 0xc8(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x51b0
jmp 0x3e9c8
movq 0xb0(%rsp), %rdi
movl $0x1, %esi
leaq 0xc8(%rsp), %rdx
callq 0xd9a0
jmp 0x3e9e4
leaq 0xc8(%rsp), %rdi
callq 0x5260
movl $0x1, 0x118(%rsp)
jmp 0x3ea21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x5260
jmp 0x3ea30
leaq 0x170(%rsp), %rdi
callq 0x5260
jmp 0x3ea3f
leaq 0x170(%rsp), %rdi
callq 0x5260
jmp 0x3ea4f
movq 0xb8(%rsp), %rax
addq $0x448, %rsp            # imm = 0x448
retq
movq 0x258(%rsp), %rdi
callq 0x5760
nopl (%rax)