LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0xcfe0
movq 0x20(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
callq 0xd270
movq 0x18(%rsp), %rdi
movl %eax, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x16890
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
movq %rdi, 0x28(%rsp)
callq 0x16e60
cmpl $-0x1, 0x44(%rsp)
jne 0x15ba8
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x16e90
movl %eax, 0x14(%rsp)
jmp 0x15b93
movl 0x14(%rsp), %eax
cmpl $0xa, %eax
setle %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x10(%rsp)
jmp 0x15bb0
movl 0x44(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x10(%rsp), %ecx
testl %ecx, %ecx
setne 0x34(%rax)
movq (%rax), %rdi
callq 0x15fb0
movb %al, 0xf(%rsp)
jmp 0x15bcd
movb 0xf(%rsp), %al
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x15c1b
leaq 0x30(%rsp), %rdi
movl $0x24, %esi
movl $0x8, %ecx
movl %ecx, %edx
callq 0xde50
jmp 0x15bf1
movq 0x20(%rsp), %rax
movw 0x30(%rsp), %cx
movw %cx, 0x30(%rax)
jmp 0x15c63
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x16f70
jmp 0x15c68
movq 0x20(%rsp), %rax
testb $0x1, 0x34(%rax)
je 0x15c55
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x38, %rcx
movq %rcx, (%rsp)
movq (%rax), %rdi
callq 0x16f50
movl %eax, 0x8(%rsp)
jmp 0x15c44
movl 0x8(%rsp), %esi
movq (%rsp), %rdi
callq 0x16ea0
jmp 0x15c53
jmp 0x15c55
movq 0x20(%rsp), %rdi
callq 0x15cb0
jmp 0x15c61
jmp 0x15c63
addq $0x58, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x4660
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movw 0x30(%rax), %cx
shrw $0x8, %cx
andw $0xf, %cx
movzwl %cx, %ecx
addl $0x1, %ecx
movw %cx, %dx
movw 0x30(%rax), %cx
andw $0xf, %dx
shlw $0x8, %dx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw %dx, %cx
movw %cx, 0x30(%rax)
movw 0x30(%rax), %ax
shrw $0x8, %ax
andw $0xf, %ax
movzwl %ax, %eax
cmpl $0x8, %eax
jl 0x15d84
movq (%rsp), %rax
movw 0x30(%rax), %cx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw $0x0, %cx
movw %cx, 0x30(%rax)
movq (%rsp), %rax
movw 0x30(%rax), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
addl $0x1, %ecx
movw %cx, %dx
movw 0x30(%rax), %cx
andw $0xff, %dx
andw $0xff00, %cx            # imm = 0xFF00
orw %dx, %cx
movw %cx, 0x30(%rax)
movw 0x30(%rax), %ax
shlw $0x8, %ax
sarw $0x8, %ax
cwtl
cmpl $0x24, %eax
jl 0x15d6a
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x15e26
jmp 0x15d6c
movq (%rsp), %rsi
movq (%rsi), %rdi
addq $0x30, %rsi
callq 0xe640
xorb $-0x1, %al
testb $0x1, %al
jne 0x15d1c
jmp 0x15d84
movq (%rsp), %rdi
movq (%rdi), %rsi
addq $0x8, %rdi
movl $0x28, %edx
callq 0x4300
movq (%rsp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl 0x30(%rax), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %esi
callq 0xd040
andb $0x1, %al
movb %al, 0x17(%rsp)
testb $0x1, 0x17(%rsp)
je 0x15dc3
jmp 0x15de2
leaq 0x28471(%rip), %rdi     # 0x3e23b
leaq 0x28477(%rip), %rsi     # 0x3e248
movl $0x2e, %edx
leaq 0x2847c(%rip), %rcx     # 0x3e259
callq 0x4250
movq (%rsp), %rax
testb $0x1, 0x34(%rax)
je 0x15e1b
movq (%rsp), %rdi
addq $0x8, %rdi
callq 0xd9e0
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
addq $0x38, %rdi
movq 0x8(%rsp), %rsi
callq 0x17080
testb $0x1, %al
jne 0x15e19
jmp 0x15cc2
jmp 0x15e1b
jmp 0x15e1d
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl 0xc(%rsp), %edi
callq 0x16fc0
movl %eax, %ecx
movq (%rsp), %rax
shll $0x2, %ecx
movl %ecx, (%rax)
movl (%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x4(%rax)
movl $0x0, 0x8(%rax)
movl (%rax), %eax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, 0x8(%rsp)
movq (%rsp), %rcx
movl 0x8(%rsp), %eax
cmpl (%rcx), %eax
jae 0x16f3c
movq (%rsp), %rax
movq 0x10(%rax), %rax
movl 0x8(%rsp), %ecx
movq $0x0, (%rax,%rcx,8)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x16f0f
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: tewalds[P]pentagod/./hashset.h
// Function: HashSet::add(unsigned long)
bool add(uint64_t h){
		h = mix_bits(h);
		unsigned int i = h & mask;
		while(true){
			uint64_t t = table[i];
			if (t == 0) {
				table[i] = h;
				count++;
				return true;
			} else if (t == h) {
				return false;
			}
			i = (i+1) & mask;
		}
	}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x17140
movq 0x8(%rsp), %rcx
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movl 0x4(%rcx), %ecx
andq %rcx, %rax
movl %eax, 0x1c(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x1c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x170ff
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rsi
movq 0x10(%rax), %rcx
movl 0x1c(%rsp), %edx
movq %rsi, (%rcx,%rdx,8)
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movb $0x1, 0x37(%rsp)
jmp 0x17129
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0x17112
movb $0x0, 0x37(%rsp)
jmp 0x17129
jmp 0x17114
movq 0x8(%rsp), %rcx
movl 0x1c(%rsp), %eax
addl $0x1, %eax
andl 0x4(%rcx), %eax
movl %eax, 0x1c(%rsp)
jmp 0x170bb
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: tewalds[P]pentagod/./hashset.h
// Function: HashSet::mix_bits(unsigned long)
static uint64_t mix_bits(uint64_t h){
		h ^= (h >> 17);
		h ^= (h << 31);
		h ^= (h >>  8);
		return h;
	}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
shrq $0x11, %rax
xorq -0x8(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
shlq $0x1f, %rax
xorq -0x8(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
shrq $0x8, %rax
xorq -0x8(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
nop
// File: 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 %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x40(%rsp)
movb $0x0, -0x11(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, -0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, -0x28(%rsp)
movl $0x0, -0x2c(%rsp)
cmpl $0x20, -0x2c(%rsp)
jge 0x17237
movslq -0x2c(%rsp), %rcx
leaq 0x27e8f(%rip), %rax     # 0x3f070
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rsp)
movq -0x20(%rsp), %rax
andq -0x38(%rsp), %rax
cmpq -0x38(%rsp), %rax
jne 0x17209
movsbl -0x11(%rsp), %eax
orl $0x1, %eax
movb %al, -0x11(%rsp)
jmp 0x17228
movq -0x28(%rsp), %rax
andq -0x38(%rsp), %rax
cmpq -0x38(%rsp), %rax
jne 0x17226
movsbl -0x11(%rsp), %eax
orl $0x2, %eax
movb %al, -0x11(%rsp)
jmp 0x17228
jmp 0x1722a
movl -0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rsp)
jmp 0x171ce
movsbl -0x11(%rsp), %eax
movl %eax, -0x44(%rsp)
decl %eax
subl $0x2, %eax
jb 0x17254
jmp 0x17249
movl -0x44(%rsp), %eax
subl $0x3, %eax
je 0x1725e
jmp 0x17265
movb -0x11(%rsp), %al
movb %al, -0x1(%rsp)
jmp 0x1727f
movb $0x0, -0x1(%rsp)
jmp 0x1727f
movq -0x40(%rsp), %rax
movzbl 0x18(%rax), %edx
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
xorl %ecx, %ecx
cmpl $0x24, %edx
cmovgel %ecx, %eax
movb %al, -0x1(%rsp)
movb -0x1(%rsp), %al
retq
nopw %cs:(%rax,%rax)
nop
// File: tewalds[P]pentagod/./game.h
// Function: Game::move(Move const&)
bool move(const Move & m){
		if(getboard().move(m)){
			hist.push_back(m);
			return true;
		}
		return false;
	}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rsi
movq %rsi, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
xorl %edx, %edx
callq 0xcf40
movq 0x40(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0xd040
testb $0x1, %al
jne 0x172d3
jmp 0x172e9
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x17300
movb $0x1, 0x57(%rsp)
jmp 0x172ee
movb $0x0, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x28(%rsp)
movl 0x58(%rax), %eax
movl %eax, 0x1c(%rsp)
testl %eax, %eax
je 0x19456
jmp 0x19439
movl 0x1c(%rsp), %eax
subl $0x1, %eax
je 0x194dd
jmp 0x19448
movl 0x1c(%rsp), %eax
subl $0x2, %eax
je 0x19485
jmp 0x19520
movq 0x10(%rsp), %rax
vmovsd 0x60(%rax), %xmm0
vmulsd 0x80(%rax), %xmm0, %xmm0
vmovsd 0x24e28(%rip), %xmm1    # 0x3e298
vdivsd %xmm1, %xmm0, %xmm0
vaddsd 0x28(%rsp), %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rsp)
jmp 0x19520
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
vmovsd %xmm0, 0x20(%rsp)
vmovsd 0x20(%rsp), %xmm0
vpxor %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jbe 0x194db
movq 0x10(%rsp), %rax
vmovsd 0x23b66(%rip), %xmm0    # 0x3d020
vmulsd 0x60(%rax), %xmm0, %xmm0
vmulsd 0x80(%rax), %xmm0, %xmm0
vdivsd 0x20(%rsp), %xmm0, %xmm0
vaddsd 0x28(%rsp), %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rsp)
jmp 0x19520
jmp 0x194dd
movq 0x10(%rsp), %rdi
vmovsd 0x23b36(%rip), %xmm0    # 0x3d020
vmulsd 0x60(%rdi), %xmm0, %xmm0
vmulsd 0x80(%rdi), %xmm0, %xmm0
vmovsd %xmm0, 0x8(%rsp)
addq $0x38, %rdi
callq 0x1e5d0
vmovsd 0x8(%rsp), %xmm0
vcvtsi2sd %eax, %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
vaddsd 0x28(%rsp), %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rsp)
movq 0x10(%rsp), %rax
vmovsd 0x28(%rsp), %xmm0
vucomisd 0x80(%rax), %xmm0
jbe 0x19548
movq 0x10(%rsp), %rax
vmovsd 0x80(%rax), %xmm0
vmovsd %xmm0, 0x28(%rsp)
movq 0x10(%rsp), %rax
vmovsd 0x70(%rax), %xmm0
vaddsd 0x28(%rsp), %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rsp)
vmovsd 0x28(%rsp), %xmm0
addq $0x38, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
vmovsd %xmm0, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
testb $0x1, 0x78(%rax)
je 0x195af
movq (%rsp), %rax
vmovsd 0x70(%rax), %xmm0
vsubsd 0x18(%rsp), %xmm0, %xmm0
vaddsd 0x80(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x80(%rax)
jmp 0x195f8
movq (%rsp), %rax
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x10(%rsp)
vmovsd 0x70(%rax), %xmm0
vsubsd 0x18(%rsp), %xmm0, %xmm0
vmovsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1e600
movq %rax, %rcx
movq (%rsp), %rax
vmovsd (%rcx), %xmm0
vaddsd 0x80(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x80(%rax)
movq (%rsp), %rax
vpxor %xmm0, %xmm0, %xmm0
vucomisd 0x80(%rax), %xmm0
jbe 0x1961a
movq (%rsp), %rax
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x80(%rax)
addq $0x28, %rsp
retq
nop
// File: 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:
subq $0xf8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4670
movq 0x20(%rsp), %rdx
leaq 0x2375a(%rip), %rsi     # 0x3dab1
leaq 0xc0(%rsp), %rdi
callq 0x44d0
jmp 0x1a366
leaq 0xbf(%rsp), %rdi
callq 0x43f0
movq 0x18(%rsp), %rax
movq 0x90(%rax), %rsi
movq (%rsi), %rax
movq 0x40(%rax), %rax
leaq 0x90(%rsp), %rdi
callq *%rax
jmp 0x1a392
movl $0x0, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
movq %rax, (%rsp)
leaq 0x90(%rsp), %rdi
callq 0xd020
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x1a4da
movl 0x8c(%rsp), %eax
movl %eax, %esi
leaq 0x90(%rsp), %rdi
callq 0x15f60
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0xdec0
jmp 0x1a3ec
leaq 0x263ca(%rip), %rdx     # 0x407bd
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x93b0
jmp 0x1a404
leaq 0xc0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x4490
jmp 0x1a418
leaq 0x68(%rsp), %rdi
callq 0x4210
leaq 0x48(%rsp), %rdi
callq 0x4210
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x1a39d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0xbf(%rsp), %rdi
callq 0x43f0
jmp 0x1a56d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x1a560
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x1a553
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x1a4ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x4210
leaq 0x48(%rsp), %rdi
callq 0x4210
jmp 0x1a553
leaq 0x28(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x4170
jmp 0x1a4ee
movq 0x8(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
callq 0xb680
jmp 0x1a504
leaq 0x28(%rsp), %rdi
callq 0x4210
leaq 0x90(%rsp), %rdi
callq 0xfb50
leaq 0xc0(%rsp), %rdi
callq 0x4210
movq 0x10(%rsp), %rax
addq $0xf8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x4210
leaq 0x90(%rsp), %rdi
callq 0xfb50
leaq 0xc0(%rsp), %rdi
callq 0x4210
movq 0xb0(%rsp), %rdi
callq 0x4660
nopw (%rax,%rax)
// File: 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:
subq $0x68, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
testl %eax, %eax
je 0x1e249
jmp 0x1e22c
movl 0x3c(%rsp), %eax
subl $0x1, %eax
je 0x1e29c
jmp 0x1e237
movl 0x3c(%rsp), %eax
subl $0x2, %eax
je 0x1e2ef
jmp 0x1e33c
leaq 0x57(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4670
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x20322(%rip), %rsi     # 0x3e58b
callq 0x44d0
jmp 0x1e270
leaq 0x57(%rsp), %rdi
callq 0x43f0
jmp 0x1e389
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x57(%rsp), %rdi
callq 0x43f0
jmp 0x1e393
leaq 0x43(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x4670
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x202dc(%rip), %rsi     # 0x3e598
callq 0x44d0
jmp 0x1e2c3
leaq 0x43(%rsp), %rdi
callq 0x43f0
jmp 0x1e389
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x43(%rsp), %rdi
callq 0x43f0
jmp 0x1e393
leaq 0x42(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4670
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x20293(%rip), %rsi     # 0x3e5a2
callq 0x44d0
jmp 0x1e316
leaq 0x42(%rsp), %rdi
callq 0x43f0
jmp 0x1e389
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x42(%rsp), %rdi
callq 0x43f0
jmp 0x1e393
leaq 0x41(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4670
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x20af6(%rip), %rsi     # 0x3ee52
callq 0x44d0
jmp 0x1e363
leaq 0x41(%rsp), %rdi
callq 0x43f0
jmp 0x1e389
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x41(%rsp), %rdi
callq 0x43f0
jmp 0x1e393
movq 0x30(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x4660
nopl (%rax)
// File: 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:
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x1c0(%rsp)
vmovsd %xmm0, 0x1b8(%rsp)
movl %esi, 0x1b4(%rsp)
movl 0x1b4(%rsp), %edi
vmovsd 0x1f9e6(%rip), %xmm0    # 0x3e290
callq 0x1ed50
vmovsd %xmm0, 0x1a8(%rsp)
vmovsd 0x1b8(%rsp), %xmm0
vmovsd 0x1a8(%rsp), %xmm1
vmulsd %xmm1, %xmm0, %xmm0
vmovaps %xmm0, %xmm3
vpbroadcastq 0x2059d(%rip), %xmm4 # 0x3ee78
vpbroadcastq 0x2059c(%rip), %xmm2 # 0x3ee80
vpternlogq $0xf8, %xmm4, %xmm3, %xmm2
vaddsd %xmm2, %xmm0, %xmm2
vroundsd $0xb, %xmm2, %xmm0, %xmm0
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x1b8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x4280
leaq 0x30(%rsp), %rdi
vmovsd 0x1b8(%rsp), %xmm0
callq 0x46d0
jmp 0x1e921
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4390
jmp 0x1e931
leaq 0x20(%rsp), %rdi
callq 0x42a0
movq 0x8(%rsp), %rax
addq $0x1c8, %rsp            # imm = 0x1C8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x42a0
movq 0x18(%rsp), %rdi
callq 0x4660
nopw (%rax,%rax)
// File: 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:
subq $0x98, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movb $0x0, 0x7f(%rsp)
callq 0x1ed80
movq $0x0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x4330
movq %rax, 0x68(%rsp)
cmpq $-0x1, %rax
je 0x1eb94
movq 0x88(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
subq %rdx, %rcx
leaq 0x48(%rsp), %rdi
callq 0x43c0
jmp 0x1eb22
movq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1ed90
jmp 0x1eb33
leaq 0x48(%rsp), %rdi
callq 0x4210
movq 0x68(%rsp), %rax
movq %rax, (%rsp)
movq 0x80(%rsp), %rdi
callq 0x4570
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x70(%rsp)
jmp 0x1ead8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0x1ec0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x4210
jmp 0x1ec0e
movq 0x88(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x18(%rsp), %rdi
movq $-0x1, %rcx
callq 0x43c0
jmp 0x1ebb4
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1ed90
jmp 0x1ebc5
leaq 0x18(%rsp), %rdi
callq 0x4210
movb $0x1, 0x7f(%rsp)
testb $0x1, 0x7f(%rsp)
jne 0x1ec01
jmp 0x1ebf7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x4210
jmp 0x1ec0e
movq 0x8(%rsp), %rdi
callq 0xbe20
movq 0x10(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x8(%rsp), %rdi
callq 0xbe20
movq 0x40(%rsp), %rdi
callq 0x4660
nopw %cs:(%rax,%rax)
// File: 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 $0x48, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %rax
movq 0x8(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq %rax, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x8(%rax)
movq $0x0, 0x10(%rax)
movb $0x0, 0x18(%rax)
movb $-0x4, 0x1a(%rax)
movw $0xdead, 0x1c(%rax)     # imm = 0xDEAD
movq $0x0, 0x20(%rax)
callq 0x4570
cmpq $0x24, %rax
jne 0x1f49d
jmp 0x1f4bc
leaq 0x20ccc(%rip), %rdi     # 0x40170
leaq 0x20cd8(%rip), %rsi     # 0x40183
movl $0x24, %edx
leaq 0x20cd6(%rip), %rcx     # 0x4018d
callq 0x4250
leaq 0x2c(%rsp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x41c0
movl $0x0, 0x28(%rsp)
cmpl $0x24, 0x28(%rsp)
jge 0x1f59c
movq 0x10(%rsp), %rdi
movslq 0x28(%rsp), %rsi
callq 0x4720
movsbl (%rax), %eax
subl $0x30, %eax
movb %al, 0x27(%rsp)
movsbl 0x27(%rsp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x7(%rsp)
jl 0x1f518
movsbl 0x27(%rsp), %eax
cmpl $0x2, %eax
setle %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1f522
jmp 0x1f524
jmp 0x1f543
leaq 0x20c77(%rip), %rdi     # 0x401a2
leaq 0x20c51(%rip), %rsi     # 0x40183
movl $0x28, %edx
leaq 0x20c4f(%rip), %rcx     # 0x4018d
callq 0x4250
movsbl 0x27(%rsp), %eax
cmpl $0x0, %eax
jle 0x1f58a
movq 0x18(%rsp), %rax
movb 0x18(%rax), %cl
addb $0x1, %cl
movb %cl, 0x18(%rax)
movslq 0x28(%rsp), %rdx
leaq 0x1f9d9(%rip), %rcx     # 0x3ef40
movq (%rcx,%rdx,8), %rdx
movsbq 0x27(%rsp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movsbq 0x27(%rsp), %rax
movl 0x2c(%rsp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rsp,%rax,4)
jmp 0x1f58c
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x1f4d5
movl 0x30(%rsp), %ecx
movb $0x1, %al
cmpl 0x34(%rsp), %ecx
movb %al, 0x6(%rsp)
je 0x1f5c0
movl 0x30(%rsp), %eax
movl 0x34(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
sete %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x1f5ca
jmp 0x1f5cc
jmp 0x1f5eb
leaq 0x20be6(%rip), %rdi     # 0x401b9
leaq 0x20ba9(%rip), %rsi     # 0x40183
movl $0x30, %edx
leaq 0x20ba7(%rip), %rcx     # 0x4018d
callq 0x4250
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
orq 0x10(%rax), %rcx
movq %rcx, (%rax)
movzbl 0x18(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq 0x18(%rsp), %rax
addl $0x1, %edx
movb %dl, %cl
movb %cl, 0x19(%rax)
addq $0x48, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x78, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movb $0x0, 0x67(%rsp)
callq 0x44e0
movl $0x0, 0x60(%rsp)
cmpl $0x6, 0x60(%rsp)
jge 0x1f700
movl $0x0, 0x5c(%rsp)
cmpl $0x6, 0x5c(%rsp)
jge 0x1f6ee
movq 0x20(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl 0x60(%rsp), %edx
callq 0x24da0
movb %al, 0xf(%rsp)
jmp 0x1f689
movb 0xf(%rsp), %al
movzbl %al, %esi
leaq 0x38(%rsp), %rdi
callq 0x16070
jmp 0x1f69c
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4490
jmp 0x1f6ad
leaq 0x38(%rsp), %rdi
callq 0x4210
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x1f66a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x1f720
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x4210
jmp 0x1f720
jmp 0x1f6f0
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x1f657
movb $0x1, 0x67(%rsp)
testb $0x1, 0x67(%rsp)
jne 0x1f716
movq 0x10(%rsp), %rdi
callq 0x4210
movq 0x18(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x10(%rsp), %rdi
callq 0x4210
movq 0x30(%rsp), %rdi
callq 0x4660
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x88, %rsp
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x48(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x15fb0
movsbl %al, %eax
addl $0x3, %eax
movl %eax, %ecx
movq %rcx, 0x50(%rsp)
subl $0x6, %eax
ja 0x211b2
movq 0x50(%rsp), %rax
leaq 0x1ded3(%rip), %rcx     # 0x3ee90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x77(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x4670
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0x1ca8c(%rip), %rsi     # 0x3da72
callq 0x44d0
jmp 0x20fed
leaq 0x77(%rsp), %rdi
callq 0x43f0
jmp 0x211ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x77(%rsp), %rdi
callq 0x43f0
jmp 0x2120c
leaq 0x63(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x4670
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x1cf57(%rip), %rsi     # 0x3df90
callq 0x44d0
jmp 0x21040
leaq 0x63(%rsp), %rdi
callq 0x43f0
jmp 0x211ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x63(%rsp), %rdi
callq 0x43f0
jmp 0x2120c
leaq 0x62(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x4670
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rdx
leaq 0x1cf12(%rip), %rsi     # 0x3df9e
callq 0x44d0
jmp 0x21093
leaq 0x62(%rsp), %rdi
callq 0x43f0
jmp 0x211ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x62(%rsp), %rdi
callq 0x43f0
jmp 0x2120c
leaq 0x61(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4670
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x1cec8(%rip), %rsi     # 0x3dfa7
callq 0x44d0
jmp 0x210e6
leaq 0x61(%rsp), %rdi
callq 0x43f0
jmp 0x211ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x61(%rsp), %rdi
callq 0x43f0
jmp 0x2120c
leaq 0x60(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x4670
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x1c419(%rip), %rsi     # 0x3d54b
callq 0x44d0
jmp 0x21139
leaq 0x60(%rsp), %rdi
callq 0x43f0
jmp 0x211ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x43f0
jmp 0x2120c
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4670
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x1c3f2(%rip), %rsi     # 0x3d577
callq 0x44d0
jmp 0x2118c
leaq 0x5f(%rsp), %rdi
callq 0x43f0
jmp 0x211ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x5f(%rsp), %rdi
callq 0x43f0
jmp 0x2120c
leaq 0x5e(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4670
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x1c898(%rip), %rsi     # 0x3da6a
callq 0x44d0
jmp 0x211d9
leaq 0x5e(%rsp), %rdi
callq 0x43f0
jmp 0x211ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x5e(%rsp), %rdi
callq 0x43f0
jmp 0x2120c
movq 0x48(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0x4660
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
movl 0x24(%rsp), %ecx
shll %ecx
movl $0x1, %eax
shll %cl, %eax
cltq
movl $0x2, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, 0x18(%rsp)
movw $0x0, 0x16(%rsp)
movzwl 0x16(%rsp), %eax
movl 0x24(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x213e3
movw $0x0, 0x14(%rsp)
movzwl 0x14(%rsp), %eax
movl 0x24(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x213ce
movw 0x16(%rsp), %ax
movw %ax, 0x12(%rsp)
movw 0x14(%rsp), %ax
movw %ax, 0x10(%rsp)
movw $0x0, 0xe(%rsp)
movw $0x1, 0xc(%rsp)
movb $0x1, %al
cmpw $0x0, 0x12(%rsp)
movb %al, 0xb(%rsp)
jne 0x212e0
cmpw $0x0, 0x10(%rsp)
setne %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x212ea
jmp 0x2135f
movzwl 0x12(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2130d
movzwl 0x10(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2130d
movw $0x0, 0xe(%rsp)
jmp 0x2135f
movzwl 0xc(%rsp), %ecx
movzwl 0x12(%rsp), %eax
andl $0x1, %eax
shll %eax
movzwl 0x10(%rsp), %edx
andl $0x1, %edx
addl %edx, %eax
imull %eax, %ecx
movzwl 0xe(%rsp), %eax
addl %ecx, %eax
movw %ax, 0xe(%rsp)
movzwl 0xc(%rsp), %eax
imull $0x3, %eax, %eax
movw %ax, 0xc(%rsp)
movzwl 0x12(%rsp), %eax
sarl %eax
movw %ax, 0x12(%rsp)
movzwl 0x10(%rsp), %eax
sarl %eax
movw %ax, 0x10(%rsp)
jmp 0x212c5
movzwl 0xe(%rsp), %eax
movl 0x20(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x21377
jmp 0x21396
leaq 0x1eebe(%rip), %rdi     # 0x4023c
leaq 0x1edfe(%rip), %rsi     # 0x40183
movl $0xe1, %edx
leaq 0x1eec0(%rip), %rcx     # 0x40251
callq 0x4250
movw 0xe(%rsp), %dx
movq 0x18(%rsp), %rax
movzwl 0x16(%rsp), %esi
movl 0x24(%rsp), %ecx
shll %cl, %esi
movl %esi, %ecx
movzwl 0x14(%rsp), %esi
addl %esi, %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movw 0x14(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x14(%rsp)
jmp 0x21289
jmp 0x213d0
movw 0x16(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x16(%rsp)
jmp 0x21268
movq 0x18(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tewalds[P]pentagod/board.cpp
// Function: check(unsigned long, unsigned char, Board&)
void check(uint64_t h, uint8_t o, Board &b){
	if(h != b.hash())
		printf("expected hash: %lu, got: %lu\n", h, b.hash());
	if(o != b.orient())
		printf("expected orient: %i, got: %i\n", o, b.orient());
	if(h != b.hash() || o != b.orient())
		printf("%s", b.to_s().c_str());
	assert(h == b.hash());
	assert(o == b.orient());
}

// Assembly:
subq $0x88, %rsp
movb %sil, %al
movq %rdi, 0x80(%rsp)
movb %al, 0x7f(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
callq 0xd9e0
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
je 0x2145c
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
callq 0xd9e0
movq 0x30(%rsp), %rsi
movq %rax, %rdx
leaq 0x1ee31(%rip), %rdi     # 0x40286
movb $0x0, %al
callq 0x4060
movzbl 0x7f(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x70(%rsp), %rdi
callq 0xd270
movl %eax, %ecx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
je 0x214a0
movzbl 0x7f(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0x70(%rsp), %rdi
callq 0xd270
movl 0x28(%rsp), %esi
movl %eax, %edx
leaq 0x1ee0b(%rip), %rdi     # 0x402a4
movb $0x0, %al
callq 0x4060
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rdi
callq 0xd9e0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jne 0x214e1
movzbl 0x7f(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x70(%rsp), %rdi
callq 0xd270
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
je 0x21540
movq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x1, %edx
callq 0x1f740
movq 0x10(%rsp), %rdi
callq 0x4160
movq %rax, %rsi
leaq 0x1cd2a(%rip), %rdi     # 0x3e238
xorl %eax, %eax
callq 0x4060
jmp 0x21517
leaq 0x50(%rsp), %rdi
callq 0x4210
jmp 0x21540
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x4210
jmp 0x215cb
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
callq 0xd9e0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jne 0x21566
jmp 0x21585
leaq 0x1ed55(%rip), %rdi     # 0x402c2
leaq 0x1ec0f(%rip), %rsi     # 0x40183
movl $0xf4, %edx
leaq 0x1ed50(%rip), %rcx     # 0x402d0
callq 0x4250
movzbl 0x7f(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x70(%rsp), %rdi
callq 0xd270
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jne 0x215a4
jmp 0x215c3
leaq 0x1ed4c(%rip), %rdi     # 0x402f7
leaq 0x1ebd1(%rip), %rsi     # 0x40183
movl $0xf5, %edx
leaq 0x1ed12(%rip), %rcx     # 0x402d0
callq 0x4250
addq $0x88, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x4660
nopw %cs:(%rax,%rax)
// File: tewalds[P]pentagod/board.cpp
// Function: check(unsigned long, unsigned char, std::initializer_list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)
void check(uint64_t h, uint8_t o, std::initializer_list<string> moves){
	Board b;
	for(string m : moves){
		b.move(m);
	}
	check(h, o, b);
}

// Assembly:
subq $0xa8, %rsp
movb %sil, %al
movq %rdx, 0x98(%rsp)
movq %rcx, 0xa0(%rsp)
movq %rdi, 0x90(%rsp)
movb %al, 0x8f(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xcfe0
leaq 0x98(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x24f30
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0x24f40
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x21718
movq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4170
movq 0x8(%rsp), %rsi
leaq 0x24(%rsp), %rdi
movl $0x8, %edx
callq 0x155f0
jmp 0x216d4
movl 0x24(%rsp), %esi
leaq 0x60(%rsp), %rdi
callq 0xd040
jmp 0x216e4
leaq 0x28(%rsp), %rdi
callq 0x4210
movq 0x50(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x50(%rsp)
jmp 0x2169e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x4210
jmp 0x2173a
movq 0x90(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movzbl 0x8f(%rsp), %esi
callq 0x213f0
addq $0xa8, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x4660
nopw %cs:(%rax,%rax)
// File: tewalds[P]pentagod/./board.h
// Function: Board::get(int, int) const
uint8_t get(int x, int y) const {
		uint64_t mask = xybits[x + 6*y];
		if(sides[1] & mask) return 1;
		if(sides[2] & mask) return 2;
		return 0;
	}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl %edx, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movl -0x14(%rsp), %ecx
imull $0x6, -0x18(%rsp), %edx
addl %edx, %ecx
movslq %ecx, %rdx
leaq 0x1a174(%rip), %rcx     # 0x3ef40
movq (%rcx,%rdx,8), %rcx
movq %rcx, -0x20(%rsp)
movq 0x8(%rax), %rax
andq -0x20(%rsp), %rax
cmpq $0x0, %rax
je 0x24deb
movb $0x1, -0x1(%rsp)
jmp 0x24e0b
movq -0x28(%rsp), %rax
movq 0x10(%rax), %rax
andq -0x20(%rsp), %rax
cmpq $0x0, %rax
je 0x24e06
movb $0x2, -0x1(%rsp)
jmp 0x24e0b
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
retq
// File: tewalds[P]pentagod/move.cpp
// Function: check(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void check(const std::string a, int ao, const std::string b, int bo) {
	Move am = Move(b, bo).rotate(ao);
	Move bm = Move(a, ao).rotate(bo);
	printf("%s %2i <=> %s %2i ", a.c_str(), ao, b.c_str(), bo);
	printf("  :  %s %2i <=> %s %2i\n", bm.to_s().c_str(), bm.o, am.to_s().c_str(), am.o);
	assert(bm == Move(b, bo));
	assert(am == Move(a, ao));
}

// Assembly:
subq $0xd8, %rsp
movq %rdx, (%rsp)
movl %esi, %eax
movq (%rsp), %rsi
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
movq %rsi, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movl 0xbc(%rsp), %edx
leaq 0xb4(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x155f0
movq 0x8(%rsp), %rdi
movl 0xcc(%rsp), %esi
callq 0xd2b0
movq 0x18(%rsp), %rsi
movw %ax, 0xb8(%rsp)
movl 0xcc(%rsp), %edx
leaq 0xac(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x155f0
movq 0x10(%rsp), %rdi
movl 0xbc(%rsp), %esi
callq 0xd2b0
movq 0x18(%rsp), %rdi
movw %ax, 0xb0(%rsp)
callq 0x4160
movq 0x20(%rsp), %rdi
movq %rax, 0x28(%rsp)
movl 0xcc(%rsp), %eax
movl %eax, 0x34(%rsp)
callq 0x4160
movq 0x28(%rsp), %rsi
movl 0x34(%rsp), %edx
movq %rax, %rcx
movl 0xbc(%rsp), %r8d
leaq 0x1b3d6(%rip), %rdi     # 0x40447
xorl %eax, %eax
movl %eax, 0x44(%rsp)
callq 0x4060
movl 0x44(%rsp), %edx
leaq 0x88(%rsp), %rdi
movq %rdi, 0x38(%rsp)
leaq 0xb0(%rsp), %rsi
callq 0xdec0
movq 0x38(%rsp), %rdi
callq 0x4160
movl 0x44(%rsp), %edx
movq %rax, 0x48(%rsp)
movzwl 0xb0(%rsp), %eax
shrl $0xc, %eax
movl %eax, 0x50(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xdec0
jmp 0x250d0
leaq 0x68(%rsp), %rdi
callq 0x4160
movq 0x48(%rsp), %rsi
movl 0x50(%rsp), %edx
movq %rax, %rcx
movzwl 0xb8(%rsp), %r8d
shrl $0xc, %r8d
leaq 0x1b360(%rip), %rdi     # 0x4045a
xorl %eax, %eax
callq 0x4060
jmp 0x25103
leaq 0x68(%rsp), %rdi
callq 0x4210
leaq 0x88(%rsp), %rdi
callq 0x4210
movq 0x20(%rsp), %rsi
movl 0xbc(%rsp), %edx
leaq 0x58(%rsp), %rdi
callq 0x155f0
leaq 0xb0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x285a0
testb $0x1, %al
jne 0x25148
jmp 0x2514a
jmp 0x251a0
leaq 0x1b321(%rip), %rdi     # 0x40472
leaq 0x1b32c(%rip), %rsi     # 0x40484
movl $0xc, %edx
leaq 0x1b329(%rip), %rcx     # 0x4048d
callq 0x4250
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x25191
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x4210
leaq 0x88(%rsp), %rdi
callq 0x4210
jmp 0x251f7
movq 0x18(%rsp), %rsi
movl 0xcc(%rsp), %edx
leaq 0x54(%rsp), %rdi
callq 0x155f0
leaq 0xb8(%rsp), %rdi
leaq 0x54(%rsp), %rsi
callq 0x285a0
testb $0x1, %al
jne 0x251ce
jmp 0x251d0
jmp 0x251ef
leaq 0x1b2f1(%rip), %rdi     # 0x404c8
leaq 0x1b2a6(%rip), %rsi     # 0x40484
movl $0xd, %edx
leaq 0x1b2a3(%rip), %rcx     # 0x4048d
callq 0x4250
addq $0xd8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x4660
nopw %cs:(%rax,%rax)
// File: tewalds[P]pentagod/move.cpp
// Function: check_many(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::initializer_list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)
void check_many(std::string in, std::initializer_list<std::string> moves){
	assert(moves.size() == 8);
	int r = 0;
	for(std::string out : moves){
		check(in, out + ":" + to_str(r));
		r++;
	}
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
movq %rdi, 0xe0(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x24f80
cmpq $0x8, %rax
jne 0x25519
jmp 0x25538
leaq 0x1b013(%rip), %rdi     # 0x40533
leaq 0x1af5d(%rip), %rsi     # 0x40484
movl $0x1f, %edx
leaq 0x1b012(%rip), %rcx     # 0x40545
callq 0x4250
movl $0x0, 0xdc(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x24f30
movq %rax, 0xc8(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x24f40
movq %rax, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
cmpq 0xc0(%rsp), %rax
je 0x256fe
movq 0xc8(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x4170
movq 0x8(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x4170
jmp 0x255bc
leaq 0x184c0(%rip), %rdx     # 0x3da83
leaq 0x30(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x24e10
jmp 0x255d7
movl 0xdc(%rsp), %esi
leaq 0x10(%rsp), %rdi
callq 0x16070
jmp 0x255ea
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xe470
jmp 0x25600
leaq 0x80(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x25210
jmp 0x25614
leaq 0x50(%rsp), %rdi
callq 0x4210
leaq 0x10(%rsp), %rdi
callq 0x4210
leaq 0x30(%rsp), %rdi
callq 0x4210
leaq 0x80(%rsp), %rdi
callq 0x4210
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x4210
movq 0xc8(%rsp), %rax
addq $0x20, %rax
movq %rax, 0xc8(%rsp)
jmp 0x2557d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x256ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x256e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x256d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x256ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x4210
leaq 0x10(%rsp), %rdi
callq 0x4210
leaq 0x30(%rsp), %rdi
callq 0x4210
leaq 0x80(%rsp), %rdi
callq 0x4210
leaq 0xa0(%rsp), %rdi
callq 0x4210
jmp 0x25706
addq $0xf8, %rsp
retq
movq 0x78(%rsp), %rdi
callq 0x4660
// File: tewalds[P]pentagod/agentmcts.cpp
// Function: AgentMCTS::garbage_collect(Board&, AgentMCTS::Node*)
void AgentMCTS::garbage_collect(Board & board, Node * node){
	Node * child = node->children.begin(),
		 * end = node->children.end();

	int toplay = board.toplay();
	for( ; child != end; child++){
		if(child->children.num() == 0)
			continue;

		if(	(node->outcome >= 0 && child->exp.num() > gcsolved && (node->outcome != toplay || child->outcome == toplay || child->outcome == 0)) || //parent is solved, only keep the proof tree, plus heavy draws
			(node->outcome <  0 && child->exp.num() > (child->outcome >= 0 ? gcsolved : gclimit)) ){ // only keep heavy nodes, with different cutoffs for solved and unsolved
			board.move(child->move);
			garbage_collect(board, child);
			board.undo(child->move);
		}else{
			nodes -= child->dealloc(ctmem);
		}
	}
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
callq 0x2dc40
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
callq 0x2dc90
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
callq 0x17190
movzbl %al, %eax
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x29213
movq 0x28(%rsp), %rdi
addq $0x20, %rdi
callq 0x2dc00
cmpl $0x0, %eax
jne 0x290dc
jmp 0x29200
movq 0x30(%rsp), %rax
movsbl 0x12(%rax), %eax
cmpl $0x0, %eax
jl 0x2912d
movq 0x28(%rsp), %rdi
callq 0x2e5d0
movq 0x10(%rsp), %rcx
movl 0x70(%rcx), %ecx
cmpq %rcx, %rax
jbe 0x2912d
movq 0x30(%rsp), %rax
movsbl 0x12(%rax), %eax
cmpl 0x1c(%rsp), %eax
jne 0x29189
movq 0x28(%rsp), %rax
movsbl 0x12(%rax), %eax
cmpl 0x1c(%rsp), %eax
je 0x29189
movq 0x28(%rsp), %rax
movsbl 0x12(%rax), %eax
cmpl $0x0, %eax
je 0x29189
movq 0x30(%rsp), %rax
movsbl 0x12(%rax), %eax
cmpl $0x0, %eax
jge 0x291cc
movq 0x28(%rsp), %rdi
callq 0x2e5d0
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
movsbl 0x12(%rax), %eax
cmpl $0x0, %eax
jl 0x2916a
movq 0x10(%rsp), %rax
movl 0x70(%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0x29179
movq 0x10(%rsp), %rax
movl 0xd8(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x291cc
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x14(%rax), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %esi
callq 0xd040
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x29060
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x14, %rsi
callq 0x2e630
jmp 0x291fe
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdi
addq $0xf0, %rsi
callq 0x2d7c0
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, %ecx
movl %ecx, %edx
movq 0xd0(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0xd0(%rax)
jmp 0x29200
movq 0x28(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x28(%rsp)
jmp 0x290b4
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: tewalds[P]pentagod/agentmcts.cpp
// Function: AgentMCTS::stop_threads()
void AgentMCTS::stop_threads(){
	if(threadstate != Thread_Wait_Start){
		timedout();
		runbarrier.wait();
		CAS(threadstate, Thread_Wait_End, Thread_Wait_Start);
		assert(threadstate == Thread_Wait_Start);
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl 0xa80(%rax), %eax
cmpl $0x1, %eax
je 0x2ab33
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq (%rsp), %rdi
addq $0xaa0, %rdi            # imm = 0xAA0
callq 0x2c5d0
movq (%rsp), %rdi
addq $0xa80, %rdi            # imm = 0xA80
movl $0x6, 0xc(%rsp)
movl $0x1, 0x8(%rsp)
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x2c6b0
movq (%rsp), %rax
movl 0xa80(%rax), %eax
cmpl $0x1, %eax
jne 0x2ab12
jmp 0x2ab31
leaq 0x15b98(%rip), %rdi     # 0x406b1
leaq 0x15bb2(%rip), %rsi     # 0x406d2
movl $0xdb, %edx
leaq 0x15d21(%rip), %rcx     # 0x4084d
callq 0x4250
jmp 0x2ab33
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tewalds[P]pentagod/agentmcts.cpp
// Function: AgentMCTS::AgentMCTS()
AgentMCTS::AgentMCTS() {
	nodes = 0;
	runs = 0;
	gclimit = 5;
	time_used = 0;

	profile     = false;
	ponder      = false;
//#ifdef SINGLE_THREAD ... make sure only 1 thread
	numthreads  = 1;
	maxmem      = 1000*1024*1024;

	explore     = 1;
	parentexplore = true;
	knowledge   = true;
	useexplore  = 1;
	fpurgency   = 1;
	rollouts    = 10;

	keeptree    = true;
	minimax     = 1;
	visitexpand = 1;
	prunesymmetry = true;
	gcsolved    = 100000;

	win_score = 1;

	instantwin  = 0;

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

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x16230
movq 0x28(%rsp), %rdi
leaq 0x24e9c(%rip), %rax     # 0x4fa80
movq %rax, (%rdi)
subq $-0x80, %rdi
callq 0xcfe0
jmp 0x2abf2
movq 0x28(%rsp), %rdi
addq $0xa8, %rdi
movq %rdi, 0x20(%rsp)
callq 0x2d560
jmp 0x2ac0a
movq 0x28(%rsp), %rdi
addq $0xf0, %rdi
movq %rdi, 0x18(%rsp)
callq 0x2d5d0
jmp 0x2ac22
movq 0x28(%rsp), %rdi
addq $0xa88, %rdi            # imm = 0xA88
movq %rdi, 0x8(%rsp)
callq 0x2d660
movq 0x28(%rsp), %rdi
addq $0xaa0, %rdi            # imm = 0xAA0
movq %rdi, 0x10(%rsp)
movl $0x1, %esi
callq 0x16300
jmp 0x2ac55
movq 0x28(%rsp), %rdi
addq $0xb00, %rdi            # imm = 0xB00
movl $0x1, %esi
callq 0x16300
jmp 0x2ac6d
movq 0x28(%rsp), %rax
movq $0x0, 0xd0(%rax)
movq $0x0, 0xe0(%rax)
movl $0x5, 0xd8(%rax)
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0xb60(%rax)
movb $0x0, 0x48(%rax)
movb $0x0, 0x38(%rax)
movl $0x1, 0x3c(%rax)
movq $0x3e800000, 0x40(%rax) # imm = 0x3E800000
vmovss 0x158cb(%rip), %xmm0    # 0x40588
vmovss %xmm0, 0x4c(%rax)
movb $0x1, 0x49(%rax)
movb $0x1, 0x50(%rax)
vmovss 0x158b6(%rip), %xmm0    # 0x40588
vmovss %xmm0, 0x54(%rax)
vmovss 0x158a9(%rip), %xmm0    # 0x40588
vmovss %xmm0, 0x58(%rax)
movl $0xa, 0x5c(%rax)
movb $0x1, 0x60(%rax)
movl $0x1, 0x64(%rax)
movl $0x1, 0x68(%rax)
movb $0x1, 0x6c(%rax)
movl $0x186a0, 0x70(%rax)    # imm = 0x186A0
movl $0x1, 0x74(%rax)
movl $0x0, 0x78(%rax)
movl $0x1, 0xa80(%rax)
addq $0x48, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x2ad8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x2ad81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x2ad6d
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x16420
movq 0x8(%rsp), %rdi
callq 0x2d670
movq 0x18(%rsp), %rdi
callq 0x2d6d0
movq 0x20(%rsp), %rdi
callq 0x2d750
movq 0x28(%rsp), %rdi
callq 0x16560
movq 0x38(%rsp), %rdi
callq 0x4660
nop