LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./board.h
// Function: Board::flip_side(unsigned long)
static uint64_t flip_side(uint64_t b){ // flip one player
		//starting pattern
		// 0  1  2 15 16  9
		// 7  8  3 14 17 10
		// 6  5  4 13 12 11
		//shifted down by 9
		// 0  1  2  6  7  0
		// 7  8  3  5  8  1
		// 6  5  4  4  3  2
		//linearized pattern from:to
		// 0  1  2  3  4  5  6  7  8
		// 0  7  6  5  4  3  2  1  8

		//flip along a diagonal axis
		//make sure this matches Move::rotate
		return (flipquad[(b & (0x1FFull <<  0)) >>  0] <<  0) |
		       (flipquad[(b & (0x1FFull <<  9)) >>  9] << 27) |
		       (flipquad[(b & (0x1FFull << 18)) >> 18] << 18) |
		       (flipquad[(b & (0x1FFull << 27)) >> 27] <<  9);
	}

// Assembly:
leaq 0x1604f(%rip), %rdx     # 0x1e180
movl $0x909, %esi            # imm = 0x909
movl $0x1ff, %eax            # imm = 0x1FF
movl %edi, %ecx
movl $0x912, %r8d            # imm = 0x912
bextrl %esi, %edi, %esi
andl %eax, %ecx
movq (%rdx,%rsi,8), %rsi
shlq $0x1b, %rsi
orq (%rdx,%rcx,8), %rsi
bextrl %r8d, %edi, %ecx
shrq $0x1b, %rdi
andl %eax, %edi
movq (%rdx,%rcx,8), %rcx
movq (%rdx,%rdi,8), %rax
shlq $0x12, %rcx
shlq $0x9, %rax
orq %rcx, %rax
orq %rsi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./move.h
// Function: Move::to_s[abi:cxx11](bool) const
std::string to_s(bool orient = false) const {
		if(l == M_UNKNOWN) return "unknown";
		if(l == M_NONE)    return "none";
		if(l == M_SWAP)    return "swap";
		if(l == M_RESIGN)  return "resign";

		std::string s = std::string() + char(y() + 'a') + to_str(x() + 1) + char(r + 's');
		if(orient)
			s += ":" + to_str(o);
		return s;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movzbl (%rsi), %eax
movq %rdi, %rbx
leal -0xfc(%rax), %ecx
cmpl $0x3, %ecx
ja 0x81e6
leaq 0x13fa3(%rip), %rax     # 0x1c140
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x148c5(%rip), %rsi     # 0x1ca72
jmp 0x81c8
leaq 0x148ce(%rip), %rsi     # 0x1ca84
jmp 0x81c8
leaq 0x148c0(%rip), %rsi     # 0x1ca7f
jmp 0x81c8
leaq 0x148b2(%rip), %rsi     # 0x1ca7a
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x40f0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78(%rsp), %rcx
cbtw
movb $0x6, %r15b
movl %edx, %ebp
movq %rsi, %r14
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
idivb %r15b
addb $0x61, %al
movsbl %al, %edx
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x8343
movsbl (%r14), %eax
idivb %r15b
movsbl %ah, %eax
incb %al
movsbl %al, %esi
leaq 0x48(%rsp), %rdi
callq 0x83cc
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x8365
movb 0x1(%r14), %al
andb $0xf, %al
addb $0x73, %al
movsbl %al, %edx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8343
leaq 0x8(%rsp), %rdi
callq 0x4130
leaq 0x48(%rsp), %rdi
callq 0x4130
leaq 0x28(%rsp), %rdi
callq 0x4130
leaq 0x68(%rsp), %rdi
callq 0x4130
testb %bpl, %bpl
je 0x81d5
movzwl (%r14), %esi
shrl $0xc, %esi
leaq 0x28(%rsp), %rdi
callq 0x83cc
leaq 0x147e5(%rip), %rsi     # 0x1ca8b
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x8423
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4610
leaq 0x8(%rsp), %rdi
callq 0x4130
leaq 0x28(%rsp), %rdi
callq 0x4130
jmp 0x81d5
leaq 0x8(%rsp), %rdi
movq %rax, %r14
callq 0x4130
jmp 0x82ed
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x4130
jmp 0x82fc
movq %rax, %r14
movq %rbx, %rdi
jmp 0x8336
leaq 0x8(%rsp), %rdi
movq %rax, %r14
callq 0x4130
jmp 0x8313
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x4130
jmp 0x8322
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x4130
jmp 0x8331
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x4130
movq %r14, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./gtp.h
// Function: GTPclient::find_callback(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int find_callback(const string & name){
		for(unsigned int i = 0; i < callbacks.size(); i++)
			if(callbacks[i].name == name)
				return i;
		return -1;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
pushq $0x60
popq %r12
pushq $-0x1
popq %rbx
movq 0x18(%r15), %rdi
movq 0x20(%r15), %rax
movl %ebp, %ecx
subq %rdi, %rax
cqto
idivq %r12
cmpq %rcx, %rax
jbe 0x89b3
imulq $0x60, %rcx, %rax
movq %r14, %rsi
addq %rax, %rdi
callq 0x8ae3
testb %al, %al
jne 0x89b1
incl %ebp
jmp 0x8983
movl %ebp, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_mcts(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_mcts(vecstr args){
	delete agent;
	agent = new AgentMCTS();
	agent->set_board(game.getboard());
	return GTPResponse(true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x90(%rsi), %rdi
movq %rsi, %r14
testq %rdi, %rdi
je 0x954b
movq (%rdi), %rax
callq *0x8(%rax)
movl $0xb68, %edi            # imm = 0xB68
callq 0x42f0
movq %rax, %r15
movq %rax, %rdi
callq 0x14080
movq %r15, 0x90(%r14)
addq $0x38, %r14
leaq 0x20(%rsp), %r12
xorl %edx, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x7a62
movq (%r15), %rax
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq *0x20(%rax)
leaq 0x13526(%rip), %rsi     # 0x1cab9
leaq 0x20(%rsp), %rdx
movq %rsp, %rdi
callq 0x40f0
pushq $0x1
popq %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x761c
movq %rsp, %rdi
callq 0x4130
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdi
movq %rax, %rbx
callq 0x4130
jmp 0x95e2
movq %rax, %rbx
jmp 0x95e2
movq %r15, %rdi
movq %rax, %rbx
callq 0x42c0
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_pns(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_pns(vecstr args){
	delete agent;
	agent = new AgentPNS();
	agent->set_board(game.getboard());
	return GTPResponse(true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x90(%rsi), %rdi
movq %rsi, %r14
testq %rdi, %rdi
je 0x960d
movq (%rdi), %rax
callq *0x8(%rax)
movl $0xb00, %edi            # imm = 0xB00
callq 0x42f0
movq %rax, %r15
movq %rax, %rdi
callq 0xa8e4
movq %r15, 0x90(%r14)
addq $0x38, %r14
leaq 0x20(%rsp), %r12
xorl %edx, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x7a62
movq (%r15), %rax
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq *0x20(%rax)
leaq 0x13464(%rip), %rsi     # 0x1cab9
leaq 0x20(%rsp), %rdx
movq %rsp, %rdi
callq 0x40f0
pushq $0x1
popq %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x761c
movq %rsp, %rdi
callq 0x4130
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdi
movq %rax, %rbx
callq 0x4130
jmp 0x96a4
movq %rax, %rbx
jmp 0x96a4
movq %r15, %rdi
movq %rax, %rbx
callq 0x42c0
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_ab(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(vecstr args){
	delete agent;
	agent = new AgentAB();
	agent->set_board(game.getboard());
	return GTPResponse(true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x90(%rsi), %rdi
movq %rsi, %r14
testq %rdi, %rdi
je 0x96cf
movq (%rdi), %rax
callq *0x8(%rax)
pushq $0x70
popq %rdi
callq 0x42f0
movq %rax, %r15
movq %rax, %rdi
callq 0xaa1c
movq %r15, 0x90(%r14)
addq $0x38, %r14
leaq 0x20(%rsp), %r12
xorl %edx, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x7a62
movq (%r15), %rax
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq *0x20(%rax)
leaq 0x133a4(%rip), %rsi     # 0x1cab9
leaq 0x20(%rsp), %rdx
movq %rsp, %rdi
callq 0x40f0
pushq $0x1
popq %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x761c
movq %rsp, %rdi
callq 0x4130
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdi
movq %rax, %rbx
callq 0x4130
jmp 0x9764
movq %rax, %rbx
jmp 0x9764
movq %r15, %rdi
movq %rax, %rbx
callq 0x42c0
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::won_str[abi:cxx11](int) const
string PentagoGTP::won_str(int outcome) const {
	switch(outcome){
		case -3: return "none";
		case -2: return "black_or_draw";
		case -1: return "white_or_draw";
		case 0:  return "draw";
		case 1:  return "white";
		case 2:  return "black";
		case 3:  return "draw by simultaneous win";
		default: return "unknown";
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
addl $0x3, %edx
movq %rdi, %rbx
cmpl $0x6, %edx
ja 0x99b8
leaq 0x13619(%rip), %rax     # 0x1cf90
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x130f3(%rip), %rsi     # 0x1ca7a
leaq 0xf(%rsp), %rdx
jmp 0x99ee
leaq 0x12bbe(%rip), %rsi     # 0x1c553
leaq 0xb(%rsp), %rdx
jmp 0x99ee
leaq 0x13617(%rip), %rsi     # 0x1cfba
leaq 0xd(%rsp), %rdx
jmp 0x99ee
leaq 0x13612(%rip), %rsi     # 0x1cfc3
leaq 0xc(%rsp), %rdx
jmp 0x99ee
leaq 0x130b3(%rip), %rsi     # 0x1ca72
leaq 0x8(%rsp), %rdx
jmp 0x99ee
leaq 0x135df(%rip), %rsi     # 0x1cfac
leaq 0xe(%rsp), %rdx
jmp 0x99ee
leaq 0x12ba4(%rip), %rsi     # 0x1c57f
leaq 0xa(%rsp), %rdx
jmp 0x99ee
leaq 0x135df(%rip), %rsi     # 0x1cfc8
leaq 0x9(%rsp), %rdx
movq %rbx, %rdi
callq 0x40f0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_clearboard(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_clearboard(vecstr args){
	game.clear();
	set_board();

	time_remain = time.game;

	log("clear_board");
	return GTPResponse(true);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq 0x38(%rsi), %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rax, 0x40(%rsi)
je 0x9a1b
movq %rax, 0x40(%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x6f8c
vmovsd 0x68(%r14), %xmm0
vmovsd %xmm0, 0x80(%r14)
leaq 0x12aaa(%rip), %rsi     # 0x1c4e6
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x40f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x79e4
leaq 0x8(%rsp), %rdi
callq 0x4130
leaq 0x13050(%rip), %rsi     # 0x1cab9
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x40f0
pushq $0x1
popq %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x761c
leaq 0x28(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x28(%rsp), %rdi
movq %rax, %rbx
jmp 0x9ab1
jmp 0x9ab8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4130
jmp 0x9abb
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_undo(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_undo(vecstr args){
	int num = 1;
	if(args.size() >= 1)
		num = from_str<int>(args[0]);

	while(num--){
		game.undo();
		log("undo");
	}
	set_board(false);
	if(verbose >= 2)
		logerr(game.getboard().to_s(colorboard) + "\n");
	return GTPResponse(true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rax
movq (%rdx), %rdi
movq %rsi, %r14
movq %rax, 0x8(%rsp)
cmpq %rdi, 0x8(%rdx)
je 0x9af2
callq 0xac0f
movl %eax, %ebp
jmp 0x9af5
pushq $0x1
popq %rbp
leaq 0x38(%r14), %r15
leaq 0x12aab(%rip), %r12     # 0x1c5ab
leaq 0x50(%rsp), %r13
leaq 0x30(%rsp), %rbx
subl $0x1, %ebp
jb 0x9b44
movq 0x40(%r14), %rax
cmpq 0x38(%r14), %rax
je 0x9b21
addq $-0x4, %rax
movq %rax, 0x40(%r14)
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x40f0
movq %r14, %rdi
movq %r13, %rsi
callq 0x79e4
movq %r13, %rdi
callq 0x4130
jmp 0x9b0a
movq %r14, %rdi
xorl %esi, %esi
callq 0x6f8c
cmpl $0x2, 0x50(%r14)
jl 0x9baf
leaq 0x50(%rsp), %rbx
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %rdi
callq 0x7a62
movzbl 0x54(%r14), %edx
leaq 0x30(%rsp), %r14
movq %rbx, %rsi
movq %r14, %rdi
callq 0xf8fc
leaq 0x12f35(%rip), %rdx     # 0x1cab8
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x6821
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0xac65
movq %rbx, %rdi
callq 0x4130
leaq 0x30(%rsp), %rdi
callq 0x4130
leaq 0x12f03(%rip), %rsi     # 0x1cab9
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x40f0
pushq $0x1
popq %rsi
movq 0x8(%rsp), %rbx
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x761c
leaq 0x10(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x9c1c
leaq 0x10(%rsp), %rdi
movq %rax, %rbx
jmp 0x9c1c
jmp 0x9c0f
movq %rax, %rbx
jmp 0x9c21
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x4130
movq %rbx, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_all_legal(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_all_legal(vecstr args){
	string ret;
	for(MoveIterator move(game.getboard()); !move.done(); ++move)
		ret += move->to_s() + " ";
	return GTPResponse(true, ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
leaq 0x20(%rsp), %rax
movq %rdi, 0x8(%rsp)
addq $0x38, %rsi
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x50(%rsp), %rdi
xorl %edx, %edx
callq 0x7a62
leaq 0x78(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $-0x1
popq %rdx
callq 0xac78
leaq 0xa8(%rsp), %r14
leaq 0xc8(%rsp), %r15
leaq 0x15b33(%rip), %r12     # 0x1f7bd
leaq 0x50(%rsp), %r13
leaq 0x10(%rsp), %rbp
leaq 0x78(%rsp), %rbx
cmpb $0x24, 0xa8(%rsp)
jge 0x9ce3
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x8178
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6821
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4610
movq %r13, %rdi
callq 0x4130
movq %r15, %rdi
callq 0x4130
movq %rbx, %rdi
callq 0xad32
jmp 0x9c99
leaq 0xb0(%rsp), %rdi
callq 0xb368
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x43f0
pushq $0x1
popq %rsi
movq 0x8(%rsp), %rbx
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x761c
leaq 0x30(%rsp), %rdi
callq 0x4130
leaq 0x10(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30(%rsp), %rdi
movq %rax, %rbx
callq 0x4130
jmp 0x9d86
jmp 0x9d4e
movq %rax, %rbx
jmp 0x9d86
jmp 0x9d76
movq %rax, %rbx
jmp 0x9d67
leaq 0x50(%rsp), %rdi
movq %rax, %rbx
callq 0x4130
leaq 0xc8(%rsp), %rdi
callq 0x4130
jmp 0x9d79
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xb368
leaq 0x10(%rsp), %rdi
callq 0x4130
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_history(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_history(vecstr args){
	string ret;
	vector<Move> hist = game.get_hist();
	for(unsigned int i = 0; i < hist.size(); i++)
		ret += hist[i].to_s() + " ";
	return GTPResponse(true, ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq 0x28(%rsp), %rax
movq %rdi, %rbx
addq $0x38, %rsi
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %rdi
callq 0xadfe
leaq 0x58(%rsp), %r14
leaq 0x159e8(%rip), %r15     # 0x1f7bd
leaq 0x78(%rsp), %r12
leaq 0x18(%rsp), %r13
xorl %ebp, %ebp
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movl %ebp, %ebp
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbp, %rcx
jbe 0x9e33
leaq (%rax,%rbp,4), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x8178
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6821
movq %r13, %rdi
movq %r12, %rsi
callq 0x4610
movq %r12, %rdi
callq 0x4130
movq %r14, %rdi
callq 0x4130
incl %ebp
jmp 0x9de1
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x43f0
pushq $0x1
popq %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x761c
leaq 0x38(%rsp), %rdi
callq 0x4130
movq %rsp, %rdi
callq 0x8958
leaq 0x18(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38(%rsp), %rdi
movq %rax, %rbx
jmp 0x9eab
jmp 0x9eb2
movq %rax, %rbx
jmp 0x9ebd
leaq 0x78(%rsp), %rdi
movq %rax, %rbx
callq 0x4130
jmp 0x9ea6
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4130
jmp 0x9eb5
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8958
leaq 0x18(%rsp), %rdi
callq 0x4130
movq %rbx, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_playgame(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_playgame(vecstr args){
	GTPResponse ret(true);

	for(unsigned int i = 0; ret.success && i < args.size(); i++)
		ret = play(args[i], game.toplay());

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, (%rsp)
leaq 0x12750(%rip), %rsi     # 0x1cab9
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x40f0
pushq $0x1
popq %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x761c
leaq 0x10(%rsp), %rdi
callq 0x4130
movq (%rsp), %rax
leaq 0x30(%rsp), %r13
xorl %r15d, %r15d
addq $0x38, %rax
movq %rax, 0x8(%rsp)
cmpb $0x1, (%rbx)
jne 0xa3fc
movq (%r14), %rbp
movq 0x8(%r14), %rax
movl %r15d, %r12d
subq %rbp, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0xa3fc
movq 0x8(%rsp), %rdi
callq 0xae4e
shlq $0x5, %r12
addq %r12, %rbp
movq (%rsp), %rsi
movq %r13, %rdi
movq %rbp, %rdx
movl %eax, %ecx
callq 0x9ed0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x89be
movq %r13, %rdi
callq 0x66c6
incl %r15d
jmp 0xa3a7
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rdi
movq %rax, %r14
callq 0x4130
jmp 0xa42d
movq %rax, %r14
jmp 0xa42d
movq %rbx, %rdi
movq %rax, %r14
callq 0x66c6
movq %r14, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpgeneral.cpp
// Function: PentagoGTP::gtp_play(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_play(vecstr args){
	if(args.size() != 2)
		return GTPResponse(false, "Wrong number of arguments");

	char toplay = 0;
	switch(tolower(args[0][0])){
		case 'w': toplay = 1; break;
		case 'b': toplay = 2; break;
		default:
			return GTPResponse(false, "Invalid player selection");
	}

	return play(args[1], toplay);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq (%rdx), %r15
movq 0x8(%rdx), %rax
movq %rdi, %rbx
subq %r15, %rax
cmpq $0x40, %rax
jne 0xa46e
movq (%r15), %rax
movq %rsi, %r14
movsbl (%rax), %edi
callq 0x4420
cmpl $0x77, %eax
je 0xa49a
cmpl $0x62, %eax
jne 0xa4b1
pushq $0x2
jmp 0xa49c
leaq 0x12500(%rip), %rsi     # 0x1c975
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x40f0
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x761c
leaq 0x30(%rsp), %rdi
jmp 0xa4db
pushq $0x1
popq %rcx
addq $0x20, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x9ed0
jmp 0xa4e0
leaq 0x12b8d(%rip), %rsi     # 0x1d045
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x40f0
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x761c
leaq 0x10(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x10(%rsp), %rdi
jmp 0xa4fb
jmp 0xa505
leaq 0x30(%rsp), %rdi
movq %rax, %rbx
callq 0x4130
jmp 0xa508
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./agentpns.h
// Function: AgentPNS::AgentPNS()
AgentPNS() {
		df = true;
		epsilon = 0.25;
		ties = 0;
		numthreads = 1;
		gclimit = 5;

		nodes = 0;
		reset();

		set_memlimit(1000*1024*1024);

		//no threads started until a board is set
		threadstate = Thread_Wait_Start;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x202bc(%rip), %rax     # 0x2abb0
vxorps %xmm0, %xmm0, %xmm0
leaq 0x50(%rdi), %r14
movq %rdi, %rbx
vmovups %xmm0, 0x19(%rdi)
vmovups %xmm0, 0x10(%rdi)
movw $0xfc01, 0x29(%rdi)     # imm = 0xFC01
movb $0x8, 0x2b(%rdi)
movw $0xdead, 0x2c(%rdi)     # imm = 0xDEAD
andq $0x0, 0x30(%rdi)
addq $0x10, %rax
movq %rax, (%rdi)
movq %r14, %rdi
callq 0xafea
andq $0x0, 0xa08(%rbx)
vxorps %xmm0, %xmm0, %xmm0
leaq 0xa10(%rbx), %r15
vmovups %xmm0, 0x9f8(%rbx)
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xb048
leaq 0xa70(%rbx), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0xb048
movw $0x8efc, 0xaf4(%rbx)    # imm = 0x8EFC
andq $0x0, 0xaf8(%rbx)
movb $0x1, 0xad0(%rbx)
movq $0x3e800000, 0xad4(%rbx) # imm = 0x3E800000
movl $0x1, 0xadc(%rbx)
movl $0x5, 0x48(%rbx)
andq $0x0, 0x38(%rbx)
andl $0x0, 0x9e0(%rbx)
andq $0x0, 0x9e8(%rbx)
movb $0x0, 0x8(%rbx)
movq (%rbx), %rax
movl $0x3e800000, %esi       # imm = 0x3E800000
movq %rbx, %rdi
callq *0x30(%rax)
movl $0x1, 0x9f0(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xae0(%rbx), %rdi
movq %rax, %r13
callq 0xb06a
movq %r12, %rdi
callq 0xb0a2
jmp 0xa9ef
movq %rax, %r13
movq %r15, %rdi
callq 0xb0a2
jmp 0xa9fc
movq %rax, %r13
addq $0x9f8, %rbx            # imm = 0x9F8
movq %rbx, %rdi
callq 0xb248
movq %r14, %rdi
callq 0xb0d8
movq %r13, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./agentab.h
// Function: AgentAB::AgentAB()
AgentAB() : rand(std::rand()) {
		maxdepth = 0;
		nodes_seen = 0;
		time_used = 0;
		TT = NULL;
		set_memlimit(100*1024*1024);

		randomness = 2;
	}

// Assembly:
pushq %rbx
leaq 0x202c4(%rip), %rax     # 0x2ace8
vxorps %xmm0, %xmm0, %xmm0
movq %rdi, %rbx
vmovups %xmm0, 0x19(%rdi)
vmovups %xmm0, 0x10(%rdi)
movw $0xfc01, 0x29(%rdi)     # imm = 0xFC01
movb $0x8, 0x2b(%rdi)
movw $0xdead, 0x2c(%rdi)     # imm = 0xDEAD
andq $0x0, 0x30(%rdi)
addq $0x10, %rax
movq %rax, (%rdi)
callq 0x4090
testl %eax, %eax
movl $0x92d68ca2, %ecx       # imm = 0x92D68CA2
vxorps %xmm0, %xmm0, %xmm0
movl $0x6400000, %esi        # imm = 0x6400000
movq %rbx, %rdi
cmovnel %eax, %ecx
movl %ecx, 0x68(%rbx)
andl $0x0, 0x50(%rbx)
andq $0x0, 0x38(%rbx)
vmovups %xmm0, 0x58(%rbx)
movq (%rbx), %rax
callq *0x30(%rax)
movl $0x2, 0x6c(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./move.h
// Function: Move::Move(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
Move(const std::string & str, unsigned int O = 8){
		if(     str == "swap"    ){ l = M_SWAP;    r = 14; o = O; }
		else if(str == "resign"  ){ l = M_RESIGN;  r = 14; o = O; }
		else if(str == "none"    ){ l = M_NONE;    r = 14; o = O; }
		else if(str == "unknown" ){ l = M_UNKNOWN; r = 14; o = O; }
		else if(str.length() <= 2){ l = M_NONE;    r = 14; o = O; }
		else{
			unsigned int y = tolower(str[0]) - 'a'; //[abcdef]
			unsigned int x = str[1] - '1';          //[123456]
			l = y*6+x;

			char c = tolower(str[2]);
			if(     c >= '1' && c <= '8') r = c - '1'; //[12345678]
			else if(c >= 's' && c <= 'z') r = c - 's'; //[stuvwxyz]
			else if(c >= 'a' && c <= 'h') r = c - 'a'; //[abcdefgh]
			else r = 0; //unknown, but do something

			if(str.length() == 5) {
				assert(O == 8 && str[3] == ':');
				o = str[4] - '0';
			} else {
				o = O;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq 0x11fe2(%rip), %rsi     # 0x1ca7f
movq %rdi, %rbx
movq %r14, %rdi
movl %edx, %ebp
callq 0x6462
testb %al, %al
je 0xaabc
shll $0xc, %ebp
orl $0xeff, %ebp            # imm = 0xEFF
jmp 0xabd3
leaq 0x11fc1(%rip), %rsi     # 0x1ca84
movq %r14, %rdi
callq 0x6462
testb %al, %al
je 0xaadd
shll $0xc, %ebp
orl $0xefe, %ebp            # imm = 0xEFE
jmp 0xabd3
leaq 0x11f96(%rip), %rsi     # 0x1ca7a
movq %r14, %rdi
callq 0x6462
testb %al, %al
je 0xaafe
shll $0xc, %ebp
orl $0xefd, %ebp            # imm = 0xEFD
jmp 0xabd3
leaq 0x11f6d(%rip), %rsi     # 0x1ca72
movq %r14, %rdi
callq 0x6462
testb %al, %al
je 0xab1f
shll $0xc, %ebp
orl $0xefc, %ebp            # imm = 0xEFC
jmp 0xabd3
cmpq $0x2, 0x8(%r14)
jbe 0xaaf0
movq (%r14), %r15
movsbl (%r15), %edi
callq 0x4420
movzbl 0x1(%r15), %ecx
imull $0x6, %eax, %eax
movzbl 0x1(%rbx), %edx
leal 0x89(%rax,%rcx), %eax
shll $0x8, %edx
movzbl %al, %r15d
orl %edx, %r15d
movw %r15w, (%rbx)
movq (%r14), %rax
movsbl 0x2(%rax), %edi
callq 0x4420
movsbl %al, %ecx
leal -0x31(%rcx), %edx
cmpl $0x7, %edx
ja 0xab78
shll $0x8, %eax
movl $0xf00, %ecx            # imm = 0xF00
addl %ecx, %eax
andl %ecx, %eax
jmp 0xab8d
leal -0x73(%rcx), %edx
cmpl $0x7, %edx
ja 0xabe1
shll $0x8, %eax
addl $0xd00, %eax            # imm = 0xD00
andl $0xf00, %eax            # imm = 0xF00
andl $0xfffff0ff, %r15d      # imm = 0xFFFFF0FF
orl %eax, %r15d
movw %r15w, (%rbx)
cmpq $0x5, 0x8(%r14)
jne 0xabc3
cmpl $0x8, %ebp
jne 0xabf2
movq (%r14), %rax
cmpb $0x3a, 0x3(%rax)
jne 0xabf2
movzbl 0x4(%rax), %eax
andl $0xfff, %r15d           # imm = 0xFFF
shll $0xc, %eax
orl %eax, %r15d
jmp 0xabd0
shll $0xc, %ebp
andl $0xfff, %r15d           # imm = 0xFFF
orl %ebp, %r15d
movl %r15d, %ebp
movw %bp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
addl $-0x61, %ecx
cmpl $0x7, %ecx
jbe 0xab6a
andl $0xf0ff, %r15d          # imm = 0xF0FF
jmp 0xab97
leaq 0x12615(%rip), %rdi     # 0x1d20e
leaq 0x11de5(%rip), %rsi     # 0x1c9e5
leaq 0x1261f(%rip), %rcx     # 0x1d226
pushq $0x4a
popq %rdx
callq 0x41c0
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./moveiterator.h
// Function: MoveIterator::MoveIterator(Board const&, int)
MoveIterator(const Board & b, int Unique = -1) : base_board(b), move(M_SWAP, b.orient()) {
		unique = (Unique == -1 ? base_board.num_moves() <= Board::unique_depth : Unique);

		if(base_board.won() >= 0){
			move = Move(36, 8); //already done
		} else {
			if(unique)
				hashes.init(base_board.moves_avail());
			++(*this); //find the first valid move
		}
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
vxorps %xmm0, %xmm0, %xmm0
movq %rsi, (%rdi)
movl %edx, %ebp
movq %rdi, %rbx
vmovups %xmm0, 0x8(%rdi)
vmovups %xmm0, 0x11(%rdi)
movw $0xfc01, 0x21(%rdi)     # imm = 0xFC01
movb $0x8, 0x23(%rdi)
movw $0xdead, 0x24(%rdi)     # imm = 0xDEAD
andq $0x0, 0x28(%rdi)
movq %rsi, %rdi
callq 0x7bf8
shll $0xc, %eax
orl $0xeff, %eax            # imm = 0xEFF
movw %ax, 0x30(%rbx)
andq $0x0, 0x38(%rbx)
andl $0x0, 0x40(%rbx)
andq $0x0, 0x48(%rbx)
cmpl $-0x1, %ebp
je 0xacd8
movq (%rbx), %rdi
testl %ebp, %ebp
setne %al
jmp 0xace2
movq (%rbx), %rdi
cmpb $0xb, 0x18(%rdi)
setb %al
leaq 0x38(%rbx), %r14
movb %al, 0x34(%rbx)
callq 0xae70
testb %al, %al
js 0xacfa
movw $0x8824, 0x30(%rbx)     # imm = 0x8824
jmp 0xad1a
cmpb $0x1, 0x34(%rbx)
jne 0xad12
movq (%rbx), %rdi
callq 0xb35c
movq %r14, %rdi
movl %eax, %esi
callq 0xb30a
movq %rbx, %rdi
callq 0xad32
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movq %rax, %rbx
callq 0xb368
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./moveiterator.h
// Function: MoveIterator::operator++()
MoveIterator & operator ++ (){ //prefix form
		while(true){
			move.r++;
			if(move.r >= 8){
				move.r = 0;
				do{
					move.l++;
					if(move.l >= 36) //done
						return *this;
				}while(!base_board.valid_move_fast(move));
			}
			after = base_board;
			bool move_success = after.move(move);
			assert(move_success);
			if(unique){
				uint64_t h = after.hash();
				if(!hashes.add(h))
					continue;
			}
			break;
		}
		return *this;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x30(%rdi), %r14
leaq 0x8(%rdi), %r15
leaq 0x38(%rdi), %r12
movq %rdi, %rbx
movzwl (%r14), %eax
leal 0x100(%rax), %ecx
andl $0xf0ff, %eax           # imm = 0xF0FF
movl %ecx, %edx
andl $0xf00, %edx            # imm = 0xF00
orl %eax, %edx
btl $0xb, %ecx
movw %dx, (%r14)
jae 0xad8b
movw %ax, (%r14)
movb (%r14), %al
incb %al
movb %al, (%r14)
cmpb $0x23, %al
jg 0xadd2
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x8448
testb %al, %al
je 0xad70
movq (%rbx), %rax
movq %r15, %rdi
movq 0x20(%rax), %rcx
movq %rcx, 0x20(%r15)
vmovups (%rax), %ymm0
vmovups %ymm0, (%r15)
movl 0x30(%rbx), %esi
vzeroupper
callq 0x7ada
testb %al, %al
je 0xade1
cmpb $0x1, 0x34(%rbx)
jne 0xadd2
movq %r15, %rdi
callq 0x7f14
movq %r12, %rdi
movq %rax, %rsi
callq 0xb3c8
testb %al, %al
je 0xad49
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1246c(%rip), %rdi     # 0x1d254
leaq 0x12472(%rip), %rsi     # 0x1d261
leaq 0x1247c(%rip), %rcx     # 0x1d272
pushq $0x2e
popq %rdx
callq 0x41c0
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./hashset.h
// Function: HashSet::init(unsigned int)
void init(unsigned int s){
		size = roundup(s)*4;
		mask = size-1;
		count = 0;
		table = new uint64_t[size];
		for(unsigned int i = 0; i < size; i++)
			table[i] = 0;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %edi
callq 0xb382
leal (,%rax,4), %r14d
leal -0x1(,%rax,4), %eax
movl %r14d, (%rbx)
movl %eax, 0x4(%rbx)
andl $0x0, 0x8(%rbx)
leaq (,%r14,8), %rdi
callq 0x4030
xorl %ecx, %ecx
movq %rax, 0x10(%rbx)
cmpq %rcx, %r14
je 0xb353
andq $0x0, (%rax,%rcx,8)
incq %rcx
jmp 0xb344
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./hashset.h
// Function: HashSet::add(unsigned long)
static uint64_t mix_bits(uint64_t h){
		h ^= (h >> 17);
		h ^= (h << 31);
		h ^= (h >>  8);
		return h;
	}

// Assembly:
movq %rsi, %rax
shrq $0x11, %rax
xorq %rsi, %rax
movq 0x10(%rdi), %rsi
movq %rax, %rcx
shlq $0x1f, %rcx
xorq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
xorq %rcx, %rax
movl 0x4(%rdi), %ecx
movl %eax, %edx
andl %ecx, %edx
movl %edx, %edx
movq (%rsi,%rdx,8), %r8
testq %r8, %r8
je 0xb407
cmpq %rax, %r8
je 0xb40e
incl %edx
andl %ecx, %edx
jmp 0xb3f1
movq %rax, (%rsi,%rdx,8)
incl 0x8(%rdi)
testq %r8, %r8
sete %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./board.h
// Function: Board::won_calc() const
int8_t won_calc() const {
		int8_t wonside = 0;
		uint64_t ws = sides[1];
		uint64_t bs = sides[2];

		for(int i = 0; i < 32; i++){
			uint64_t wm = winmaps[i];
			if     ((ws & wm) == wm) wonside |= 1;
			else if((bs & wm) == wm) wonside |= 2;
		}

		switch(wonside){
			case 1:
			case 2:  return wonside;
			case 3:  return 0; //wonside == 3 when both sides win simultaneously
			default: return (nummoves >= 36 ? 0 : -3);
		}
	}

// Assembly:
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdx
leaq 0x12c5b(%rip), %r8      # 0x1e080
xorl %esi, %esi
xorl %eax, %eax
cmpq $0x20, %rsi
je 0xb458
movq (%r8,%rsi,8), %r9
andnq %r9, %rcx, %r10
jne 0xb43e
orb $0x1, %al
jmp 0xb453
movzbl %al, %r10d
orb $0x2, %al
andnq %r9, %rdx, %r9
testq %r9, %r9
movzbl %al, %eax
cmovnel %r10d, %eax
incq %rsi
jmp 0xb429
decb %al
cmpb $0x3, %al
jae 0xb46c
shlb $0x3, %al
movl $0x201, %ecx            # imm = 0x201
shrxl %eax, %ecx, %eax
retq
xorl %ecx, %ecx
cmpb $0x24, 0x18(%rdi)
movl $0xfd, %eax
cmovael %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpagent.cpp
// Function: PentagoGTP::get_time()
double PentagoGTP::get_time(){
	double ret = 0;

	switch(time.method){
		case TimeControl::PERCENT:
			ret += time.param*time_remain/100;
			break;
		case TimeControl::STATS:{
			double gamelen = agent->gamelen();
			if(gamelen > 0){
				ret += 2.0*time.param*time_remain / gamelen;
				break;
			}
		}//fall back to even
		case TimeControl::EVEN:
			ret += 2.0*time.param*time_remain / game.moves_remain();
			break;
	}

	if(ret > time_remain)
		ret = time_remain;

	ret += time.move;

	return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl 0x58(%rdi), %eax
movq %rdi, %rbx
cmpl $0x2, %eax
je 0xc318
cmpl $0x1, %eax
je 0xc346
vxorpd %xmm0, %xmm0, %xmm0
testl %eax, %eax
jne 0xc37c
vmovsd 0x60(%rbx), %xmm0
vmulsd 0x80(%rbx), %xmm0, %xmm0
vdivsd 0x10f92(%rip), %xmm0, %xmm0 # 0x1d2a8
jmp 0xc374
movq 0x90(%rbx), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
vxorpd %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jbe 0xc346
vmovsd 0x60(%rbx), %xmm2
vaddsd %xmm2, %xmm2, %xmm2
vmulsd 0x80(%rbx), %xmm2, %xmm2
vdivsd %xmm0, %xmm2, %xmm0
jmp 0xc378
vmovsd 0x60(%rbx), %xmm0
leaq 0x38(%rbx), %rdi
vaddsd %xmm0, %xmm0, %xmm0
vmulsd 0x80(%rbx), %xmm0, %xmm0
vmovsd %xmm0, 0x8(%rsp)
callq 0xf1d6
vmovsd 0x8(%rsp), %xmm1
vcvtsi2sd %eax, %xmm2, %xmm0
vdivsd %xmm0, %xmm1, %xmm0
vxorpd %xmm1, %xmm1, %xmm1
vaddsd %xmm1, %xmm0, %xmm0
vmovsd 0x80(%rbx), %xmm1
vminsd %xmm0, %xmm1, %xmm0
vaddsd 0x70(%rbx), %xmm0, %xmm0
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpagent.cpp
// Function: PentagoGTP::time_used(double)
void PentagoGTP::time_used(double used){
	if(time.flexible)
		time_remain += time.move - used;
	else
		time_remain += min(0.0, time.move - used);
	if(time_remain < 0)
			time_remain = 0;
}

// Assembly:
kmovb 0x78(%rdi), %k1
vmovsd 0x70(%rdi), %xmm1
vsubsd %xmm0, %xmm1, %xmm0
vxorpd %xmm1, %xmm1, %xmm1
vminsd %xmm1, %xmm0, %xmm2
vmovsd %xmm0, %xmm2, %xmm2 {%k1}
vaddsd 0x80(%rdi), %xmm2, %xmm0
vucomisd %xmm0, %xmm1
vmovsd %xmm0, 0x80(%rdi)
jbe 0xc3ce
andq $0x0, 0x80(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpagent.cpp
// Function: PentagoGTP::gtp_pv(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_pv(vecstr args){
	string pvstr = "";
	vector<Move> pv = agent->get_pv();
	for(unsigned int i = 0; i < pv.size(); i++)
		pvstr += pv[i].to_s() + " ";
	return GTPResponse(true, pvstr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xff1b(%rip), %rsi      # 0x1cab9
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x40f0
movq 0x90(%r14), %rsi
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x40(%rax)
leaq 0x78(%rsp), %r14
leaq 0x12bf4(%rip), %r15     # 0x1f7bd
leaq 0x58(%rsp), %r12
leaq 0x18(%rsp), %r13
xorl %ebp, %ebp
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movl %ebp, %ebp
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbp, %rcx
jbe 0xcc27
leaq (%rax,%rbp,4), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x8178
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6821
movq %r13, %rdi
movq %r12, %rsi
callq 0x4610
movq %r12, %rdi
callq 0x4130
movq %r14, %rdi
callq 0x4130
incl %ebp
jmp 0xcbd5
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x43f0
pushq $0x1
popq %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x761c
leaq 0x38(%rsp), %rdi
callq 0x4130
movq %rsp, %rdi
callq 0x8958
leaq 0x18(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38(%rsp), %rdi
movq %rax, %rbx
jmp 0xcc9f
jmp 0xcca6
movq %rax, %rbx
jmp 0xccb1
leaq 0x58(%rsp), %rdi
movq %rax, %rbx
callq 0x4130
jmp 0xcc9a
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x4130
jmp 0xcca9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8958
leaq 0x18(%rsp), %rdi
callq 0x4130
movq %rbx, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/gtpagent.cpp
// Function: PentagoGTP::gtp_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_params(vecstr args){
	if(dynamic_cast<AgentAB   *>(agent)) return gtp_ab_params(args);
	if(dynamic_cast<AgentMCTS *>(agent)) return gtp_mcts_params(args);
	if(dynamic_cast<AgentPNS  *>(agent)) return gtp_pns_params(args);

	return GTPResponse(false, "Unknown Agent type");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq 0x90(%rsi), %r12
movq %rdi, %rbx
testq %r12, %r12
je 0xcdb6
movq %rdx, %r15
leaq 0x1e06c(%rip), %rdx     # 0x2ad58
movq %rsi, %r14
leaq 0x1dd72(%rip), %rsi     # 0x2aa68
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x4340
testq %rax, %rax
je 0xcd2d
leaq 0x60(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdi
callq 0x8a0c
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xce32
leaq 0x60(%rsp), %rdi
jmp 0xcdaf
leaq 0x1ddb4(%rip), %rdx     # 0x2aae8
leaq 0x1dd2d(%rip), %rsi     # 0x2aa68
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x4340
testq %rax, %rax
je 0xcd6f
leaq 0x48(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdi
callq 0x8a0c
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xd294
leaq 0x48(%rsp), %rdi
jmp 0xcdaf
leaq 0x1deaa(%rip), %rdx     # 0x2ac20
leaq 0x1dceb(%rip), %rsi     # 0x2aa68
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x4340
testq %rax, %rax
je 0xcdb6
leaq 0x30(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdi
callq 0x8a0c
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xe88c
leaq 0x30(%rsp), %rdi
callq 0x77a0
jmp 0xcde5
leaq 0x1088e(%rip), %rsi     # 0x1d64b
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x40f0
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x761c
leaq 0x10(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0xce10
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0xce10
leaq 0x60(%rsp), %rdi
movq %rax, %rbx
callq 0x77a0
jmp 0xce29
leaq 0x10(%rsp), %rdi
movq %rax, %rbx
callq 0x4130
jmp 0xce29
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./pentagogtp.h
// Function: TimeControl::method_name[abi:cxx11]()
string method_name(){
		switch(method){
			case PERCENT: return "percent";
			case EVEN:    return "even";
			case STATS:   return "stats";
			default:      return "WTF? unknown time control method";
		}
	}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl (%rsi), %eax
movq %rdi, %rbx
cmpl $0x2, %eax
je 0xf032
cmpl $0x1, %eax
je 0xf024
testl %eax, %eax
jne 0xf040
leaq 0xe57e(%rip), %rsi      # 0x1d59b
leaq 0xf(%rsp), %rdx
jmp 0xf04c
leaq 0xe57d(%rip), %rsi      # 0x1d5a8
leaq 0xe(%rsp), %rdx
jmp 0xf04c
leaq 0xe579(%rip), %rsi      # 0x1d5b2
leaq 0xd(%rsp), %rdx
jmp 0xf04c
leaq 0xee1b(%rip), %rsi      # 0x1de62
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x40f0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/string.cpp
// Function: to_str[abi:cxx11](double, int)
string to_str(double a, int prec){
	double p = pow(10.0, prec);
	a = round(a*p)/p;

	stringstream out;
//	out.precision(prec);
	out << a;
	return out.str();
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
vmovsd %xmm0, (%rsp)
vcvtsi2sd %esi, %xmm1, %xmm1
vmovsd 0xeb27(%rip), %xmm0     # 0x1de90
movq %rdi, %rbx
callq 0x4570
vmulsd (%rsp), %xmm0, %xmm1
vpbroadcastq 0xeb19(%rip), %xmm2 # 0x1de98
leaq 0x8(%rsp), %rdi
vpternlogq $0xf8, 0xeb11(%rip){1to2}, %xmm1, %xmm2 # 0x1dea0
vaddsd %xmm2, %xmm1, %xmm1
vroundsd $0xb, %xmm1, %xmm1, %xmm1
vdivsd %xmm0, %xmm1, %xmm0
vmovsd %xmm0, (%rsp)
callq 0x41f0
leaq 0x18(%rsp), %rdi
vmovsd (%rsp), %xmm0
callq 0x44f0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x44d0
leaq 0x8(%rsp), %rdi
callq 0x4210
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
leaq 0x8(%rsp), %rdi
movq %rax, %rbx
callq 0x4210
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/string.cpp
// Function: explode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vecstr explode(const string & str, const string & sep){
	vecstr ret;
	string::size_type old = 0, pos = 0;
	while((pos = str.find_first_of(sep, old)) != string::npos){
		ret.push_back(str.substr(old, pos - old));
		old = pos + sep.length();
	}
	ret.push_back(str.substr(old));
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
andq $0x0, 0x10(%rdi)
vxorps %xmm0, %xmm0, %xmm0
leaq 0x8(%rsp), %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
vmovups %xmm0, (%rdi)
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x4290
cmpq $-0x1, %rax
je 0xf4fc
movq %rax, %rcx
movq %rax, %r13
subq %rbp, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x4300
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf5ee
movq %r12, %rdi
callq 0x4130
addq 0x8(%r15), %r13
movq %r13, %rbp
jmp 0xf4b5
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r14, %rsi
movq %rbp, %rdx
callq 0x4300
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xf5ee
leaq 0x8(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf541
jmp 0xf53c
movq %rax, %r14
jmp 0xf54e
leaq 0x8(%rsp), %rdi
movq %rax, %r14
callq 0x4130
movq %rbx, %rdi
callq 0x77a0
movq %r14, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/board.cpp
// Function: Board::Board(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Board::Board(string str) {
	sides[1] = 0;
	sides[2] = 0;
	nummoves = 0;
	outcome = -4;
	cached_score = default_score;
	cached_hash = 0;

	assert(str.length() == 36);
	int moved[3] = {0,0,0};
	for(int i = 0; i < 36; i++){
		int8_t side = str[i] - '0';
		assert(side >= 0 && side <= 2);

		if(side > 0){
			nummoves++;
			sides[side] |= xybits[i];
			moved[side]++;
		}
	}
	assert(moved[1] == moved[2] || moved[1] == moved[2] + 1); //even number of moves per player
	sides[0] = sides[1] | sides[2];
	to_play = (nummoves % 2) + 1;
}

// Assembly:
subq $0x18, %rsp
vxorps %xmm0, %xmm0, %xmm0
movb $0x0, 0x18(%rdi)
vmovups %xmm0, 0x8(%rdi)
movb $-0x4, 0x1a(%rdi)
movw $0xdead, 0x1c(%rdi)     # imm = 0xDEAD
andq $0x0, 0x20(%rdi)
cmpq $0x24, 0x8(%rsi)
jne 0xf830
andl $0x0, 0x10(%rsp)
andq $0x0, 0x8(%rsp)
xorl %edx, %edx
xorl %eax, %eax
movq (%rsi), %rcx
leaq 0xe7a8(%rip), %rsi      # 0x1df50
cmpq $0x120, %rdx            # imm = 0x120
je 0xf7e2
movb (%rcx), %r8b
addb $-0x30, %r8b
cmpb $0x3, %r8b
jae 0xf813
testb %r8b, %r8b
je 0xf7d9
incb %al
movzbl %r8b, %r8d
movb %al, 0x18(%rdi)
movq (%rdx,%rsi), %r9
orq %r9, (%rdi,%r8,8)
incl 0x8(%rsp,%r8,4)
addq $0x8, %rdx
incq %rcx
jmp 0xf7a8
movl 0xc(%rsp), %ecx
movl 0x10(%rsp), %edx
cmpl %edx, %ecx
sete %sil
incl %edx
cmpl %edx, %ecx
sete %cl
orb %sil, %cl
je 0xf849
movq 0x10(%rdi), %rcx
andb $0x1, %al
orq 0x8(%rdi), %rcx
incb %al
movq %rcx, (%rdi)
movb %al, 0x19(%rdi)
addq $0x18, %rsp
retq
leaq 0xf998(%rip), %rdi      # 0x1f1b2
leaq 0xf972(%rip), %rsi      # 0x1f193
leaq 0xf975(%rip), %rcx      # 0x1f19d
pushq $0x28
popq %rdx
callq 0x41c0
leaq 0xf949(%rip), %rdi      # 0x1f180
leaq 0xf955(%rip), %rsi      # 0x1f193
leaq 0xf958(%rip), %rcx      # 0x1f19d
pushq $0x24
jmp 0xf82a
leaq 0xf979(%rip), %rdi      # 0x1f1c9
leaq 0xf93c(%rip), %rsi      # 0x1f193
leaq 0xf93f(%rip), %rcx      # 0x1f19d
pushq $0x30
jmp 0xf82a
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/board.cpp
// Function: Board::state[abi:cxx11]() const
string Board::state() const {
	string s;
	for(int y = 0; y < 6; y++)
		for(int x = 0; x < 6; x++)
			s += to_str((int)get(x, y));
	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x10(%rdi), %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
movq %rsp, %r15
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpl $0x6, %ebp
je 0xf8cb
xorl %r12d, %r12d
cmpl $0x6, %r12d
je 0xf8c7
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x11b42
movzbl %al, %esi
movq %r15, %rdi
callq 0xaee1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4610
movq %r15, %rdi
callq 0x4130
incl %r12d
jmp 0xf891
incl %ebp
jmp 0xf889
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xf8eb
movq %rsp, %rdi
movq %rax, %r14
callq 0x4130
movq %rbx, %rdi
callq 0x4130
movq %r14, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/board.cpp
// Function: Board::won_str[abi:cxx11]() const
string Board::won_str() const {
	switch(won()){
		case -3: return "none";
		case -2: return "black_or_draw";
		case -1: return "white_or_draw";
		case 0:
		case 3:  return "draw";
		case 1:  return "white";
		case 2:  return "black";
	}
	return "unknown";
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xae70
movzbl %al, %eax
cmpb $0x3, %al
jbe 0x103d0
cmpl $0xff, %eax
je 0x1040a
cmpl $0xfe, %eax
je 0x103ee
cmpl $0xfd, %eax
jne 0x10426
leaq 0xc6b1(%rip), %rsi      # 0x1ca7a
leaq 0xf(%rsp), %rdx
jmp 0x10432
leaq 0xdad9(%rip), %rcx      # 0x1deb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xcbdc(%rip), %rsi      # 0x1cfc3
leaq 0xc(%rsp), %rdx
jmp 0x10432
leaq 0xcbb7(%rip), %rsi      # 0x1cfac
leaq 0xe(%rsp), %rdx
jmp 0x10432
leaq 0xc150(%rip), %rsi      # 0x1c553
leaq 0xb(%rsp), %rdx
jmp 0x10432
leaq 0xcba9(%rip), %rsi      # 0x1cfba
leaq 0xd(%rsp), %rdx
jmp 0x10432
leaq 0xc160(%rip), %rsi      # 0x1c57f
leaq 0xa(%rsp), %rdx
jmp 0x10432
leaq 0xc645(%rip), %rsi      # 0x1ca72
leaq 0x9(%rsp), %rdx
movq %rbx, %rdi
callq 0x40f0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/board.cpp
// Function: gen_lookup3to2(unsigned int, unsigned int)
uint16_t * gen_lookup3to2(unsigned int inbits, unsigned int outbits){
	uint16_t * lookup = new uint16_t[1 << (inbits*2)];
	for(uint16_t i = 0; i < (1 << inbits);  i++){ //top bits
		for(uint16_t j = 0; j < (1 << inbits); j++){ //bottom bits
			uint16_t bi = i, bj = j, val = 0, exp = 1;
			while(bi || bj){
				if((bi & 1) && (bj & 1)){ //not base 3 if both are set
					val = 0;
					break;
				}
				val += exp * (2*(bi & 1) + (bj & 1));
				exp *= 3;
				bi >>= 1;
				bj >>= 1;
			}
			assert(val < (1 << outbits));
			lookup[(i << inbits) + j] = val;
//			printf("%5X, ", val);
//			if(j % 16 == 15)
//				printf("\n");
		}
	}
	return lookup;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
leal (%rbx,%rbx), %eax
movl %esi, %ebp
pushq $0x2
popq %rcx
shlxl %eax, %ecx, %edi
callq 0x4030
pushq $0x1
popq %rdx
shlxl %ebx, %edx, %ecx
shlxl %ebp, %edx, %edx
xorl %esi, %esi
movzwl %si, %edi
cmpl %edi, %ecx
jle 0x10510
shlxl %ebx, %edi, %edi
xorl %r10d, %r10d
movzwl %r10w, %r8d
cmpl %r8d, %ecx
jle 0x10509
movw $0x1, %r11w
movl %esi, %ebp
xorl %r9d, %r9d
movl %ebp, %r14d
orw %r10w, %r14w
je 0x104e9
movl %ebp, %r14d
movl %r10d, %r15d
andw $0x1, %r14w
sete %r12b
andw $0x1, %r15w
sete %r13b
orb %r12b, %r13b
cmpb $0x1, %r13b
jne 0x104e6
movzwl %r14w, %r14d
movzwl %r15w, %r15d
movzwl %bp, %ebp
movzwl %r10w, %r10d
leal (%r15,%r14,2), %r14d
shrl %ebp
shrl %r10d
imull %r11d, %r14d
leal (%r11,%r11,2), %r11d
addl %r14d, %r9d
jmp 0x10497
xorl %r9d, %r9d
movzwl %r9w, %r10d
cmpl %r10d, %edx
jle 0x1051f
leal (%rdi,%r8), %r10d
incl %r8d
movslq %r10d, %r10
movw %r9w, (%rax,%r10,2)
movl %r8d, %r10d
jmp 0x10484
incl %esi
jmp 0x10471
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xed26(%rip), %rdi      # 0x1f24c
leaq 0xec66(%rip), %rsi      # 0x1f193
leaq 0xed2d(%rip), %rcx      # 0x1f261
movl $0xe1, %edx
callq 0x41c0