LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tewalds[P]morat/hex/../lib/compacttree.h
// Function: Morat::CompactTree<Morat::Hex::AgentMCTS::Node>::Data::move(Morat::CompactTree<Morat::Hex::AgentMCTS::Node>::Data*)
void move(Data * s){
			assert(!empty()); //don't move an empty Data segment
			assert(*parent == s); //my parent points to my old location

			//update my parent with my new location
			*parent = this;

			//make sure the parent points back to the same place
			assert(parent_consistent());

			//update my children
			for(Node * i = begin(), * e = end(); i != e; ++i){
				if(i->children.data){
					i->children.data->parent = &(i->children.data);
					assert(i->children.data->parent_consistent());
				}
			}
		}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x1e600
xorb $-0x1, %al
testb $0x1, %al
jne 0x206e4
jmp 0x206e6
jmp 0x20705
leaq 0x2d4e8(%rip), %rdi     # 0x4dbd5
leaq 0x2cf74(%rip), %rsi     # 0x4d668
movl $0x5d, %edx
leaq 0x2d4de(%rip), %rcx     # 0x4dbde
callq 0x52a0
movq (%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
jne 0x20719
jmp 0x20738
leaq 0x2d52c(%rip), %rdi     # 0x4dc4c
leaq 0x2cf41(%rip), %rsi     # 0x4d668
movl $0x5e, %edx
leaq 0x2d4ab(%rip), %rcx     # 0x4dbde
callq 0x52a0
movq (%rsp), %rdi
movq 0x8(%rdi), %rax
movq %rdi, (%rax)
callq 0x20950
testb $0x1, %al
jne 0x2074e
jmp 0x20750
jmp 0x2076f
leaq 0x2d514(%rip), %rdi     # 0x4dc6b
leaq 0x2cf0a(%rip), %rsi     # 0x4d668
movl $0x64, %edx
leaq 0x2d474(%rip), %rcx     # 0x4dbde
callq 0x52a0
movq (%rsp), %rdi
callq 0x1e780
movq (%rsp), %rdi
movq %rax, 0x10(%rsp)
callq 0x1e790
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x20802
movq 0x10(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x207f0
movq 0x10(%rsp), %rcx
addq $0x28, %rcx
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x20950
testb $0x1, %al
jne 0x207cd
jmp 0x207cf
jmp 0x207ee
leaq 0x2d483(%rip), %rdi     # 0x4dc59
leaq 0x2ce8b(%rip), %rsi     # 0x4d668
movl $0x6a, %edx
leaq 0x2d3f5(%rip), %rcx     # 0x4dbde
callq 0x52a0
jmp 0x207f0
jmp 0x207f2
movq 0x10(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x10(%rsp)
jmp 0x2078b
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/compacttree.h
// Function: Morat::CompactTree<Morat::Hex::AgentMCTS::Node>::Chunk::dealloc(bool)
void dealloc(bool deallocnext = false){
			assert(capacity > 0 && mem != NULL);
			if(deallocnext && next != NULL){
				next->dealloc(deallocnext);
				delete next;
				next = NULL;
			}
			assert(next == NULL);
			capacity = 0;
			used = 0;
			delete[] (uint64_t *)mem;
			mem = NULL;
		}

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rsp)
xorl %eax, %eax
cmpl $0x0, 0xc(%rcx)
movb %al, 0x1e(%rsp)
jbe 0x20849
movq 0x10(%rsp), %rax
cmpq $0x0, 0x18(%rax)
setne %al
movb %al, 0x1e(%rsp)
movb 0x1e(%rsp), %al
testb $0x1, %al
jne 0x20853
jmp 0x20855
jmp 0x20874
leaq 0x2d423(%rip), %rdi     # 0x4dc7f
leaq 0x2ce05(%rip), %rsi     # 0x4d668
movl $0xd4, %edx
leaq 0x2d42c(%rip), %rcx     # 0x4dc9b
callq 0x52a0
testb $0x1, 0x1f(%rsp)
je 0x208cf
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x208cf
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movb 0x1f(%rsp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x20810
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x208c3
movq 0x8(%rsp), %rdi
callq 0x20940
movq 0x8(%rsp), %rdi
callq 0x53a0
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x208dc
jmp 0x208fb
leaq 0x2d12a(%rip), %rdi     # 0x4da0d
leaq 0x2cd7e(%rip), %rsi     # 0x4d668
movl $0xda, %edx
leaq 0x2d3a5(%rip), %rcx     # 0x4dc9b
callq 0x52a0
movq 0x10(%rsp), %rax
movl $0x0, 0xc(%rax)
movl $0x0, 0x10(%rax)
movq 0x18(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x20925
movq (%rsp), %rdi
callq 0x5530
movq 0x10(%rsp), %rax
movq $0x0, 0x18(%rax)
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/thread.h
// Function: Morat::Barrier::wait()
bool wait(){
		cond.lock();

		//wait for threads to exit
		while(counter > waitexit)
			cond.wait();

		bool flip = (++counter == numthreads);

		if(flip){
			counter--;
			if(numthreads > 1)
				counter += waitexit;
			cond.broadcast();
		}else{
			while(counter < waitexit)
				cond.wait();

			counter--;
			if(counter == waitexit){
				counter = 0;
				cond.broadcast();
			}
		}
		cond.unlock();

		return flip;
	}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x21c50
movq (%rsp), %rax
movl 0x5c(%rax), %eax
cmpl $0x40000000, %eax       # imm = 0x40000000
jbe 0x21b70
movq (%rsp), %rdi
callq 0x21c60
jmp 0x21b57
movq (%rsp), %rcx
movl 0x5c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rcx)
movl 0x58(%rcx), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movb %al, 0xf(%rsp)
testb $0x1, 0xf(%rsp)
je 0x21bc2
movq (%rsp), %rax
movl 0x5c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x5c(%rax)
movl 0x58(%rax), %eax
cmpl $0x1, %eax
jbe 0x21bb7
movq (%rsp), %rax
movl 0x5c(%rax), %ecx
addl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0x5c(%rax)
movq (%rsp), %rdi
callq 0x21c80
jmp 0x21c06
jmp 0x21bc4
movq (%rsp), %rax
movl 0x5c(%rax), %eax
cmpl $0x40000000, %eax       # imm = 0x40000000
jae 0x21bdd
movq (%rsp), %rdi
callq 0x21c60
jmp 0x21bc4
movq (%rsp), %rax
movl 0x5c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x5c(%rax)
movl 0x5c(%rax), %eax
cmpl $0x40000000, %eax       # imm = 0x40000000
jne 0x21c04
movq (%rsp), %rdi
movl $0x0, 0x5c(%rdi)
callq 0x21c80
jmp 0x21c06
movq (%rsp), %rdi
callq 0x21ca0
movb 0xf(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/thread.h
// Function: Morat::Barrier::~Barrier()
~Barrier(){
		cond.lock();

		//wait for threads to exit
		while(counter > waitexit)
			cond.wait();

		cond.unlock();
	}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x21c50
movq 0x8(%rsp), %rax
movl 0x5c(%rax), %eax
cmpl $0x40000000, %eax       # imm = 0x40000000
jbe 0x22915
movq 0x8(%rsp), %rdi
callq 0x21c60
jmp 0x22913
jmp 0x228f8
movq 0x8(%rsp), %rdi
callq 0x21ca0
movq 0x8(%rsp), %rdi
callq 0x22ad0
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0xd890
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/hex/../lib/thread.h
// Function: Morat::Barrier::reset(int)
void reset(int n){
		cond.lock();
		assert(counter == 0);
		numthreads = n;
		cond.unlock();
	}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x21c50
movq (%rsp), %rax
movl 0x5c(%rax), %eax
cmpl $0x0, %eax
jne 0x22d89
jmp 0x22da8
leaq 0x2b237(%rip), %rdi     # 0x4dfc7
leaq 0x2b202(%rip), %rsi     # 0x4df99
movl $0xca, %edx
leaq 0x2b231(%rip), %rcx     # 0x4dfd4
callq 0x52a0
movq (%rsp), %rdi
movl 0xc(%rsp), %eax
movl %eax, 0x58(%rdi)
callq 0x21ca0
addq $0x18, %rsp
retq
nopl (%rax)
// File: tewalds[P]morat/hex/../lib/policy_bridge.h
// Function: Morat::ProtectBridge<Morat::Hex::Board>::ProtectBridge()
ProtectBridge() : offset(0) {
		// precompute the valid moves around a pattern for all possible 6-patterns.
		for(unsigned int i = 0; i < 1<<12; i++){
			lookup[0][i] = lookup[1][i] = 0;
			unsigned int p = i;
			for(unsigned int d = 0; d < 6; d++){
				// player 1
				if((p & 0x1D) == 0x11) // 01 11 01 -> 01 00 01
					lookup[0][i] |= (1 << ((d+1)%6)); // +1 because we want to play in the empty spot

				// player 2
				if((p & 0x2E) == 0x22) // 10 11 10 -> 10 00 10
					lookup[1][i] |= (1 << ((d+1)%6));

				p = ((p & 0xFFC)>>2) | ((p & 0x3) << 10);
			}
		}
	}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x25340
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movl $0x0, 0x1c(%rsp)
cmpl $0x1000, 0x1c(%rsp)     # imm = 0x1000
jae 0x23b14
movq 0x8(%rsp), %rax
movl 0x1c(%rsp), %ecx
movb $0x0, 0x1004(%rax,%rcx)
movl 0x1c(%rsp), %ecx
movb $0x0, 0x4(%rax,%rcx)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
cmpl $0x6, 0x14(%rsp)
jae 0x23b02
movl 0x18(%rsp), %eax
andl $0x1d, %eax
cmpl $0x11, %eax
jne 0x23a97
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl $0x6, %ecx
xorl %edx, %edx
divl %ecx
movq 0x8(%rsp), %rax
movl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
movl 0x1c(%rsp), %ecx
movzbl 0x4(%rax,%rcx), %edx
orl %esi, %edx
movb %dl, 0x4(%rax,%rcx)
movl 0x18(%rsp), %eax
andl $0x2e, %eax
cmpl $0x22, %eax
jne 0x23ad6
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl $0x6, %ecx
xorl %edx, %edx
divl %ecx
movq 0x8(%rsp), %rax
movl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
movl 0x1c(%rsp), %ecx
movzbl 0x1004(%rax,%rcx), %edx
orl %esi, %edx
movb %dl, 0x1004(%rax,%rcx)
movl 0x18(%rsp), %eax
andl $0xffc, %eax            # imm = 0xFFC
shrl $0x2, %eax
movl 0x18(%rsp), %ecx
andl $0x3, %ecx
shll $0xa, %ecx
orl %ecx, %eax
movl %eax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x23a53
jmp 0x23b04
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x23a1b
addq $0x28, %rsp
retq
nopl (%rax)
// File: tewalds[P]morat/hex/../lib/thread.h
// Function: Morat::Thread::operator()(std::function<void ()>)
int operator()(std::function<void()> fn){
		assert(destruct == false);

		func = fn;
		destruct = true;
		return pthread_create(&thread, NULL, (void* (*)(void*)) &Thread::runner, this);
	}

// Assembly:
subq $0x28, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movb 0x8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x23ccc
jmp 0x23ceb
leaq 0x2a377(%rip), %rdi     # 0x4e04a
leaq 0x2a2bf(%rip), %rsi     # 0x4df99
movl $0x5c, %edx
leaq 0x2a376(%rip), %rcx     # 0x4e05c
callq 0x52a0
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x10, %rdi
callq 0x24480
movq 0x10(%rsp), %rcx
movb $0x1, 0x8(%rcx)
xorl %eax, %eax
movl %eax, %esi
leaq 0x7be(%rip), %rdx       # 0x244d0
movq %rcx, %rdi
callq 0x57b0
addq $0x28, %rsp
retq
nop
// File: tewalds[P]morat/hex/../lib/../lib/bits.h
// Function: Morat::mix_bits(unsigned int)
inline uint32_t mix_bits(uint32_t h){
	h ^= h >> 16;
	h *= 0x85ebca6b;
	h ^= h >> 13;
	h *= 0xc2b2ae35;
	h ^= h >> 16;
	return h;
}

// Assembly:
movl %edi, -0x4(%rsp)
movl -0x4(%rsp), %eax
shrl $0x10, %eax
xorl -0x4(%rsp), %eax
movl %eax, -0x4(%rsp)
imull $0x85ebca6b, -0x4(%rsp), %eax # imm = 0x85EBCA6B
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
shrl $0xd, %eax
xorl -0x4(%rsp), %eax
movl %eax, -0x4(%rsp)
imull $0xc2b2ae35, -0x4(%rsp), %eax # imm = 0xC2B2AE35
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
shrl $0x10, %eax
xorl -0x4(%rsp), %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nop
// File: tewalds[P]morat/hex/../lib/lbdist.h
// Function: Morat::LBDistsBase<Morat::Hex::LBDists, Morat::Hex::Board>::IntPQueue::reset()
void reset(){
			current = 0;
			num = 0;
			for(int i = 0; i < maxvals; i++)
				counts[i] = 0;
		}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movl $0x0, 0x7540(%rax)
movl $0x0, 0x7544(%rax)
movl $0x0, -0xc(%rsp)
cmpl $0x4, -0xc(%rsp)
jge 0x25484
movq -0x18(%rsp), %rax
movslq -0xc(%rsp), %rcx
movl $0x0, 0x7530(%rax,%rcx,4)
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x2545b
retq
nopw %cs:(%rax,%rax)
nop
// File: tewalds[P]morat/hex/../lib/sgf.h
// Function: Morat::SGFParser<Morat::Move>::next_node()
bool next_node() {
		eat_whitespace(_is);
		if(eat_char(_is, ';')){
			read_node();
			return true;
		}
		return false;
	}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq (%rax), %rdi
callq 0x46050
movq (%rsp), %rax
movq (%rax), %rdi
movl $0x3b, %esi
callq 0x46110
testb $0x1, %al
jne 0x26051
jmp 0x26061
movq (%rsp), %rdi
callq 0x26080
movb $0x1, 0x17(%rsp)
jmp 0x26066
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/sgf.h
// Function: Morat::SGFParser<Morat::Move>::read_node()
void read_node() {
		_properties.clear();
		char key[11], value[1025];
		for(int c = _is.peek(); _is.good() && 'A' <= c && c <= 'Z'; c = _is.peek()) {
			_is.getline(key, 10, '[');
			_is.getline(value, 1024, ']');
			_properties[key] = value;
		}
	}

// Assembly:
subq $0x498, %rsp            # imm = 0x498
movq %rdi, 0x490(%rsp)
movq 0x490(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x8, %rdi
callq 0x26220
movq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0x5170
movl %eax, 0x7c(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x5710
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x37(%rsp)
jne 0x260d9
jmp 0x260f6
xorl %eax, %eax
movl $0x41, %ecx
cmpl 0x7c(%rsp), %ecx
movb %al, 0x37(%rsp)
jg 0x260f6
cmpl $0x5a, 0x7c(%rsp)
setle %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x26103
jmp 0x26203
movq 0x38(%rsp), %rax
movq (%rax), %rdi
leaq 0x485(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movl $0xa, %edx
movl $0x5b, %ecx
callq 0x5810
movq 0x38(%rsp), %rax
movq (%rax), %rdi
leaq 0x80(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movl $0x400, %edx            # imm = 0x400
movl $0x5d, %ecx
callq 0x5810
movq 0x38(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
leaq 0x57(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x5770
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0x5590
jmp 0x2617e
movq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1a5b0
movq %rax, 0x8(%rsp)
jmp 0x26194
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x5580
jmp 0x261a5
leaq 0x58(%rsp), %rdi
callq 0x5260
leaq 0x57(%rsp), %rdi
callq 0x5450
movq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0x5170
movl %eax, 0x7c(%rsp)
jmp 0x260b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x261f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x5260
leaq 0x57(%rsp), %rdi
callq 0x5450
jmp 0x2620b
addq $0x498, %rsp            # imm = 0x498
retq
movq 0x48(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)
nop
// File: tewalds[P]morat/hex/agentmctsthread.cpp
// Function: Morat::Hex::AgentMCTS::AgentThread::update_rave(Morat::Hex::AgentMCTS::Node const*, Morat::Side)
void AgentMCTS::AgentThread::update_rave(const Node * node, Side to_play){
	Node * child = node->children.begin(),
	     * childend = node->children.end();

	for( ; child != childend; ++child)
		child->rave.addv(movelist.getrave(to_play, child->move));
}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movb %al, 0x47(%rsp)
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
addq $0x28, %rdi
callq 0x1c340
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
addq $0x28, %rdi
callq 0x1c390
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x277be
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0xcb78, %rdi           # imm = 0xCB78
movb 0x47(%rsp), %al
movb %al, 0x1f(%rsp)
movq 0x28(%rsp), %rdx
addq $0x24, %rdx
movzbl 0x1f(%rsp), %esi
callq 0x29820
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x28de0
movq 0x28(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x28(%rsp)
jmp 0x27764
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/hex/agentmctsthread.cpp
// Function: Morat::Hex::AgentMCTS::AgentThread::rollout_choose_move(Morat::Hex::Board&, Morat::Move const&)
Move AgentMCTS::AgentThread::rollout_choose_move(Board & board, const Move & prev){
	//look for instant wins
	if(agent->instantwin){
		Move move = instant_wins.choose_move(board, prev);
		if(move != M_UNKNOWN)
			return move;
	}

	//force a bridge reply
	if(agent->rolloutpattern){
		Move move = protect_bridge.choose_move(board, prev);
		if(move != M_UNKNOWN)
			return move;
	}

	//reuse the last good reply
	if(agent->lastgoodreply){
		Move move = last_good_reply.choose_move(board, prev);
		if(move != M_UNKNOWN)
			return move;
	}

	return random_policy.choose_move(board, prev);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rax), %rax
cmpl $0x0, 0xd8(%rax)
je 0x28bdc
movq (%rsp), %rdi
addq $0x2f08, %rdi           # imm = 0x2F08
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x29fb0
movw %ax, 0x36(%rsp)
movl $0xfffffffc, 0x14(%rsp) # imm = 0xFFFFFFFC
leaq 0x36(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x2a390
testb $0x1, %al
jne 0x28bd5
jmp 0x28bda
jmp 0x28c9a
jmp 0x28bdc
movq (%rsp), %rax
movq 0x40(%rax), %rax
testb $0x1, 0xd0(%rax)
je 0x28c2d
movq (%rsp), %rdi
addq $0xf04, %rdi            # imm = 0xF04
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x2a3b0
movw %ax, 0x36(%rsp)
movl $0xfffffffc, 0x10(%rsp) # imm = 0xFFFFFFFC
leaq 0x36(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2a390
testb $0x1, %al
jne 0x28c29
jmp 0x28c2b
jmp 0x28c9a
jmp 0x28c2d
movq (%rsp), %rax
movq 0x40(%rax), %rax
cmpl $0x0, 0xd4(%rax)
je 0x28c7b
movq (%rsp), %rdi
addq $0x4c, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x2a4f0
movw %ax, 0x36(%rsp)
movl $0xfffffffc, 0xc(%rsp)  # imm = 0xFFFFFFFC
leaq 0x36(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x2a390
testb $0x1, %al
jne 0x28c77
jmp 0x28c79
jmp 0x28c9a
jmp 0x28c7b
movq (%rsp), %rdi
addq $0xa14, %rdi            # imm = 0xA14
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x2a600
movw %ax, 0x36(%rsp)
movw 0x36(%rsp), %ax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: tewalds[P]morat/hex/../lib/movelist.h
// Function: Morat::MoveList<Morat::Hex::Board>::reset(Morat::Hex::Board*)
void reset(Board * b){
		tree = 0;
		rollout = 0;
		board = b;
		exp[0].clear();
		exp[1].clear();
		for(int i = 0; i < b->vec_size(); i++){
			rave[0][i].clear();
			rave[1][i].clear();
		}
	}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x0, 0x5594(%rdi)
movl $0x0, 0x5598(%rdi)
movq 0x18(%rsp), %rax
movq %rax, 0x55a0(%rdi)
callq 0x2aa00
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
callq 0x2aa00
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rdi
callq 0x102d0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x28d87
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
movslq 0x14(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x2aa00
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
addq $0x2710, %rdi           # imm = 0x2710
movslq 0x14(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x2aa00
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x28d23
addq $0x28, %rsp
retq
nopl (%rax)
// File: tewalds[P]morat/hex/../lib/movelist.h
// Function: Morat::MoveList<Morat::Hex::Board>::finishrollout(Morat::Outcome)
void finishrollout(Outcome won){
		exp[0].addloss();
		exp[1].addloss();
		if(won == Outcome::DRAW){
			exp[0].addtie();
			exp[1].addtie();
		}else{
			exp[won.to_i() - 1].addwin();

			for(MovePlayer * i = begin(), * e = end(); i != e; i++){
				ExpPair & r = rave[i->player.to_i() - 1][board->xy(*i)];
				r.addloss();
				if(+i->player == won)
					r.addwin();
			}
		}
		rollout = 0;
	}

// Assembly:
subq $0x48, %rsp
movb %sil, %al
movb %al, 0x47(%rsp)
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2aa50
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x2aa50
leaq 0x47(%rsp), %rdi
leaq 0x4449a(%rip), %rsi     # 0x6d4c3
callq 0x1c810
testb $0x1, %al
jne 0x29034
jmp 0x29051
movq 0x10(%rsp), %rdi
callq 0x2aa70
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x2aa70
jmp 0x29161
leaq 0x47(%rsp), %rdi
callq 0x1a4c0
movq 0x10(%rsp), %rdi
movsbl %al, %eax
subl $0x1, %eax
cltq
shlq $0x4, %rax
addq %rax, %rdi
callq 0x2aa90
movq 0x10(%rsp), %rdi
callq 0x2aab0
movq 0x10(%rsp), %rdi
movq %rax, 0x30(%rsp)
callq 0x2aad0
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
je 0x2915f
movq 0x10(%rsp), %rax
addq $0x20, %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
addq $0x2, %rdi
callq 0x1fc40
movq (%rsp), %rcx
movb %al, %dl
movq 0x10(%rsp), %rax
movsbl %dl, %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x2710, %rdx, %rdx     # imm = 0x2710
addq %rdx, %rcx
movq %rcx, 0x8(%rsp)
movq 0x55a0(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x11630
movl %eax, %ecx
movq 0x8(%rsp), %rax
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x2aa50
movq 0x30(%rsp), %rax
movb 0x2(%rax), %al
movb %al, 0x1e(%rsp)
movzbl 0x1e(%rsp), %edi
callq 0x1fba0
movb %al, 0x1f(%rsp)
leaq 0x1f(%rsp), %rdi
leaq 0x47(%rsp), %rsi
callq 0x1c810
testb $0x1, %al
jne 0x29140
jmp 0x2914a
movq 0x20(%rsp), %rdi
callq 0x2aa90
jmp 0x2914c
movq 0x30(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x30(%rsp)
jmp 0x29092
jmp 0x29161
movq 0x10(%rsp), %rax
movl $0x0, 0x5598(%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: tewalds[P]morat/hex/../lib/depthstats.h
// Function: Morat::DepthStats::add(unsigned int)
void add(unsigned int depth){
		num++;
		if(mindepth > depth) mindepth = depth;
		if(maxdepth < depth) maxdepth = depth;
		sumdepth += depth;
		sumdepthsq += depth*depth;
	}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movl (%rax), %eax
cmpl -0xc(%rsp), %eax
jbe 0x291af
movq -0x18(%rsp), %rax
movl -0xc(%rsp), %ecx
movl %ecx, (%rax)
movq -0x18(%rsp), %rax
movl 0x4(%rax), %eax
cmpl -0xc(%rsp), %eax
jae 0x291c9
movq -0x18(%rsp), %rax
movl -0xc(%rsp), %ecx
movl %ecx, 0x4(%rax)
movq -0x18(%rsp), %rax
movl -0xc(%rsp), %ecx
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movl -0xc(%rsp), %ecx
imull -0xc(%rsp), %ecx
movl %ecx, %ecx
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
retq
nop
// File: tewalds[P]morat/hex/../lib/lbdist.h
// Function: Morat::LBDistsBase<Morat::Hex::LBDists, Morat::Hex::Board>::run(Morat::Hex::Board const*, bool, Morat::Side)
void run(const Board * b, bool crossvcs = true, Side side = Side::BOTH) {
	// run the flood fills needed to generate the distances
		board = b;

		for(int i = 0; i < Board::LBDist_directions; i++)
			for(int j = 0; j < 2; j++)
				for(int k = 0; k < board->vec_size(); k++)
					dists[i][j][k] = maxdist; //far far away!

		if((side & Side::P1) == Side::P1) self()->init_player(crossvcs, Side::P1);
		if((side & Side::P2) == Side::P2) self()->init_player(crossvcs, Side::P2);
	}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movb %cl, 0x47(%rsp)
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
andb $0x1, %al
movb %al, 0x2f(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x9c58(%rax)
movl $0x0, 0x28(%rsp)
cmpl $0x2, 0x28(%rsp)
jge 0x2934a
movl $0x0, 0x24(%rsp)
cmpl $0x2, 0x24(%rsp)
jge 0x29338
movl $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rax
movl 0x20(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq 0x9c58(%rax), %rdi
callq 0x102d0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x29329
movq 0x10(%rsp), %rax
movslq 0x28(%rsp), %rcx
imulq $0x1388, %rcx, %rcx     # imm = 0x1388
addq %rcx, %rax
movslq 0x24(%rsp), %rcx
imulq $0x9c4, %rcx, %rcx      # imm = 0x9C4
addq %rcx, %rax
movslq 0x20(%rsp), %rcx
movl $0x3e8, (%rax,%rcx,4)   # imm = 0x3E8
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x292ca
jmp 0x2932b
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x292bb
jmp 0x2933a
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x292a8
leaq 0x47(%rsp), %rdi
leaq 0x44166(%rip), %rsi     # 0x6d4bc
callq 0x2ab20
movb %al, 0x1f(%rsp)
leaq 0x1f(%rsp), %rdi
leaq 0x44151(%rip), %rsi     # 0x6d4bc
callq 0x1f930
testb $0x1, %al
jne 0x29376
jmp 0x293a3
movq 0x10(%rsp), %rdi
callq 0x2ab70
movq %rax, %rdi
movb 0x2f(%rsp), %al
leaq 0x4412e(%rip), %rcx     # 0x6d4bc
movb (%rcx), %cl
movb %cl, 0x1e(%rsp)
andb $0x1, %al
movzbl %al, %esi
movzbl 0x1e(%rsp), %edx
callq 0x2ab80
leaq 0x47(%rsp), %rdi
leaq 0x4410e(%rip), %rsi     # 0x6d4bd
callq 0x2ab20
movb %al, 0x1d(%rsp)
leaq 0x1d(%rsp), %rdi
leaq 0x440f9(%rip), %rsi     # 0x6d4bd
callq 0x1f930
testb $0x1, %al
jne 0x293cf
jmp 0x293fc
movq 0x10(%rsp), %rdi
callq 0x2ab70
movq %rax, %rdi
movb 0x2f(%rsp), %al
leaq 0x440d6(%rip), %rcx     # 0x6d4bd
movb (%rcx), %cl
movb %cl, 0x1c(%rsp)
andb $0x1, %al
movzbl %al, %esi
movzbl 0x1c(%rsp), %edx
callq 0x2ab80
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: tewalds[P]morat/hex/board.h
// Function: Morat::Hex::Board::test_outcome(Morat::MoveValid const&, Morat::Side) const
Outcome test_outcome(const MoveValid & pos, Side turn) const {
		if(test_local(pos, turn)){
			Cell testcell = cells_[find_group(pos.xy)];
			int numgroups = 0;
			auto it = neighbors_small(pos);
			for (const MoveValid *i = it.begin(), *e = it.end(); i < e; i++) {
				if(i->on_board() && turn == get(i->xy)){
					const Cell * g = & cells_[find_group(i->xy)];
					testcell.edge   |= g->edge;
					testcell.size   += g->size;
					i++; //skip the next one
					numgroups++;
				}
			}

			int winmask = (turn == Side::P1 ? 3 : 0xC);
			if((testcell.edge & winmask) == winmask)
				return +turn;
		}

		return Outcome::UNKNOWN;
	}

// Assembly:
subq $0x98, %rsp
movb %dl, %al
movb %al, 0x96(%rsp)
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x80(%rsp), %rsi
movb 0x96(%rsp), %al
movb %al, 0x7f(%rsp)
movzbl 0x7f(%rsp), %edx
callq 0x2a830
testb $0x1, %al
jne 0x294b3
jmp 0x29676
movq 0x20(%rsp), %rdi
movq %rdi, %rax
addq $0x10, %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movswl 0x2(%rax), %esi
callq 0x1faf0
movq 0x18(%rsp), %rdi
movslq %eax, %rsi
callq 0x1fcf0
movq 0x20(%rsp), %rdi
movq (%rax), %rcx
movq %rcx, 0x68(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x70(%rsp)
movl $0x0, 0x64(%rsp)
movq 0x80(%rsp), %rsi
callq 0x1f8f0
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x11710
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x11720
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x2961d
movq 0x48(%rsp), %rdi
callq 0x11730
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x17(%rsp)
jne 0x2955e
jmp 0x2958b
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rax
movswl 0x2(%rax), %esi
callq 0x1f970
movb %al, 0x3f(%rsp)
leaq 0x96(%rsp), %rdi
leaq 0x3f(%rsp), %rsi
callq 0x1f930
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x29595
jmp 0x29608
movq 0x20(%rsp), %rdi
movq %rdi, %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rax
movswl 0x2(%rax), %esi
callq 0x1faf0
movq 0x8(%rsp), %rdi
movslq %eax, %rsi
callq 0x1fcf0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movzbl 0x6(%rax), %ecx
movzbl 0x6e(%rsp), %eax
orl %ecx, %eax
movb %al, 0x6e(%rsp)
movq 0x30(%rsp), %rax
movzwl 0x2(%rax), %ecx
movzwl 0x6a(%rsp), %eax
addl %ecx, %eax
movw %ax, 0x6a(%rsp)
movq 0x48(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x48(%rsp)
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x2960a
movq 0x48(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x48(%rsp)
jmp 0x29535
leaq 0x96(%rsp), %rdi
leaq 0x43e90(%rip), %rsi     # 0x6d4bc
callq 0x1f930
movb %al, %dl
movl $0xc, %eax
movl $0x3, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x2c(%rsp)
movzbl 0x6e(%rsp), %eax
andl 0x2c(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jne 0x29674
movb 0x96(%rsp), %al
movb %al, 0x2b(%rsp)
movzbl 0x2b(%rsp), %edi
callq 0x1fba0
movb %al, 0x97(%rsp)
jmp 0x29686
jmp 0x29676
leaq 0x43e43(%rip), %rax     # 0x6d4c0
movb (%rax), %al
movb %al, 0x97(%rsp)
movb 0x97(%rsp), %al
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: tewalds[P]morat/hex/board.h
// Function: Morat::Hex::Board::test_cell(Morat::Move const&) const
Cell test_cell(const Move & pos) const {
		Side turn = to_play();
		int posxy = xy(pos);

		Cell testcell = cells_[find_group(posxy)];
		auto it = neighbors_small(posxy);
		for (const MoveValid *i = it.begin(), *e = it.end(); i < e; i++) {
			if(i->on_board() && turn == get(i->xy)){
				const Cell * g = & cells_[find_group(i->xy)];
				testcell.edge   |= g->edge;
				testcell.size   += g->size; //not quite accurate if it's joining the same group twice
				i++; //skip the next one
			}
		}
		return testcell;
	}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x1a8a0
movq 0x18(%rsp), %rdi
movb %al, 0x57(%rsp)
movq 0x58(%rsp), %rsi
callq 0x11630
movq 0x18(%rsp), %rdi
movl %eax, 0x50(%rsp)
movq %rdi, %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
movl 0x50(%rsp), %esi
callq 0x1faf0
movq 0x10(%rsp), %rdi
movslq %eax, %rsi
callq 0x1fcf0
movq 0x18(%rsp), %rdi
movq (%rax), %rcx
movq %rcx, 0x68(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x70(%rsp)
movl 0x50(%rsp), %esi
callq 0x1fcb0
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x11710
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x11720
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x29aea
movq 0x38(%rsp), %rdi
callq 0x11730
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0xf(%rsp)
jne 0x29a3b
jmp 0x29a65
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rax
movswl 0x2(%rax), %esi
callq 0x1f970
movb %al, 0x2f(%rsp)
leaq 0x57(%rsp), %rdi
leaq 0x2f(%rsp), %rsi
callq 0x1f930
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x29a6f
jmp 0x29ad5
movq 0x18(%rsp), %rdi
movq %rdi, %rax
addq $0x10, %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movswl 0x2(%rax), %esi
callq 0x1faf0
movq (%rsp), %rdi
movslq %eax, %rsi
callq 0x1fcf0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movzbl 0x6(%rax), %ecx
movzbl 0x6e(%rsp), %eax
orl %ecx, %eax
movb %al, 0x6e(%rsp)
movq 0x20(%rsp), %rax
movzwl 0x2(%rax), %ecx
movzwl 0x6a(%rsp), %eax
addl %ecx, %eax
movw %ax, 0x6a(%rsp)
movq 0x38(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x38(%rsp)
jmp 0x29ad7
movq 0x38(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x38(%rsp)
jmp 0x29a12
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopl (%rax)
// File: tewalds[P]morat/hex/../lib/policy_instantwin.h
// Function: Morat::InstantWin<Morat::Hex::Board>::rollout_start(Morat::Hex::Board&, int)
void rollout_start(Board & board, int max) {
		if(max < 0)
			max *= - board.lines();
		max_rollout_moves = max;

		cur_rollout_moves = 0;
		saved_loss = M_UNKNOWN;
	}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x14(%rsp)
jge 0x29cdc
movq 0x18(%rsp), %rdi
callq 0x1fe80
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
imull 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, (%rax)
movl $0x0, 0x4(%rax)
leaq 0x12(%rsp), %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0xff00
movq 0x8(%rsp), %rax
movw 0x12(%rsp), %cx
movw %cx, 0x8(%rax)
addq $0x28, %rsp
retq
// File: tewalds[P]morat/hex/../lib/policy_lastgoodreply.h
// Function: Morat::LastGoodReply<Morat::Hex::Board>::rollout_end(Morat::Hex::Board const&, Morat::MoveList<Morat::Hex::Board> const&, Morat::Outcome)
void rollout_end(const Board & board, const MoveList<Board> & movelist, Outcome outcome) {
		if(!enabled || outcome != Outcome::DRAW)
			return;
		int m = -1;
		for(const MovePlayer * i = movelist.begin(), * e = movelist.end(); i != e; i++){
			if(m >= 0){
				if(+i->player == outcome && *i != M_SWAP)
					goodreply[i->player.to_i() - 1][m] = *i;
				else if(enabled == 2)
					goodreply[i->player.to_i() - 1][m] = M_UNKNOWN;
			}
			m = board.xy(*i);
		}
	}

// Assembly:
subq $0x68, %rsp
movb %cl, %al
movb %al, 0x67(%rsp)
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x9c4(%rax)
je 0x29e43
leaq 0x67(%rsp), %rdi
leaq 0x4368b(%rip), %rsi     # 0x6d4c3
callq 0x1b350
testb $0x1, %al
jne 0x29e43
jmp 0x29e48
jmp 0x29fa8
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x48(%rsp), %rdi
callq 0x2c790
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
callq 0x2c7b0
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x29fa8
cmpl $0x0, 0x44(%rsp)
jl 0x29f82
movq 0x38(%rsp), %rax
movb 0x2(%rax), %al
movb %al, 0x2e(%rsp)
movzbl 0x2e(%rsp), %edi
callq 0x1fba0
movb %al, 0x2f(%rsp)
leaq 0x2f(%rsp), %rdi
leaq 0x67(%rsp), %rsi
callq 0x1c810
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x17(%rsp)
jne 0x29ec1
jmp 0x29edc
movq 0x38(%rsp), %rdi
movl $0xffffffff, 0x28(%rsp) # imm = 0xFFFFFFFF
leaq 0x28(%rsp), %rsi
callq 0x2a390
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x29ee6
jmp 0x29f2b
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
addq $0x2, %rdi
callq 0x1fc40
movq 0x8(%rsp), %rdx
movb %al, %cl
movq 0x18(%rsp), %rax
movsbl %cl, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x4e2, %rcx, %rcx      # imm = 0x4E2
addq %rcx, %rax
movslq 0x44(%rsp), %rcx
movw (%rdx), %dx
movw %dx, (%rax,%rcx,2)
jmp 0x29f80
movq 0x18(%rsp), %rax
cmpl $0x2, 0x9c4(%rax)
jne 0x29f7e
leaq 0x26(%rsp), %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0xff00
movq 0x38(%rsp), %rdi
addq $0x2, %rdi
callq 0x1fc40
movb %al, %cl
movq 0x18(%rsp), %rax
movsbl %cl, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x4e2, %rcx, %rcx      # imm = 0x4E2
addq %rcx, %rax
movslq 0x44(%rsp), %rcx
movw 0x26(%rsp), %dx
movw %dx, (%rax,%rcx,2)
jmp 0x29f80
jmp 0x29f82
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x11630
movl %eax, 0x44(%rsp)
movq 0x38(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x38(%rsp)
jmp 0x29e6e
addq $0x68, %rsp
retq
nopl (%rax)
// File: tewalds[P]morat/hex/../lib/policy_bridge.h
// Function: Morat::ProtectBridge<Morat::Hex::Board>::choose_move(Morat::Hex::Board const&, Morat::Move const&)
Move choose_move(const Board & board, const Move & prev) {
		uint32_t p = board.pattern_small(prev);
		uint16_t r = lookup[board.to_play().to_i()-1][p];

		if(!r) // nothing to save
			return M_UNKNOWN;

		unsigned int i;
		if((r & (r - 1)) == 0){ // only one bit set
			i = trailing_zeros(r);
		} else { // multiple choices of bridges to save
			offset = (offset + 1) % 6; // rotate the starting offset to avoid directional bias
			r |= (r << 6);
			r >>= offset;
			i = (offset + trailing_zeros(r)) % 6;
		}
		return board.neighbors(prev)[i];
	}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2c8a0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movl %ecx, 0x24(%rsp)
addq $0x4, %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1a8a0
movb %al, 0x21(%rsp)
leaq 0x21(%rsp), %rdi
callq 0x1fc40
movb %al, %cl
movq 0x10(%rsp), %rax
movsbl %cl, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0xc, %rcx
addq %rcx, %rax
movl 0x24(%rsp), %ecx
movzbl (%rax,%rcx), %eax
movw %ax, 0x22(%rsp)
cmpw $0x0, 0x22(%rsp)
jne 0x2a449
leaq 0x46(%rsp), %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0xff00
jmp 0x2a4de
movzwl 0x22(%rsp), %eax
movzwl 0x22(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x2a46c
movzwl 0x22(%rsp), %eax
tzcntl %eax, %eax
movl %eax, 0x1c(%rsp)
jmp 0x2a4c2
movq 0x8(%rsp), %rax
movl (%rax), %eax
addl $0x1, %eax
movl $0x6, %ecx
cltd
idivl %ecx
movq 0x8(%rsp), %rax
movl %edx, (%rax)
movzwl 0x22(%rsp), %edx
shll $0x6, %edx
movzwl 0x22(%rsp), %ecx
orl %edx, %ecx
movw %cx, 0x22(%rsp)
movl (%rax), %ecx
movzwl 0x22(%rsp), %edx
sarl %cl, %edx
movl %edx, %ecx
movw %cx, 0x22(%rsp)
movl (%rax), %eax
movzwl 0x22(%rsp), %ecx
tzcntl %ecx, %ecx
addl %ecx, %eax
movl $0x6, %ecx
cltd
idivl %ecx
movl %edx, 0x1c(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x29bd0
movl 0x1c(%rsp), %ecx
movw (%rax,%rcx,4), %ax
movw %ax, 0x46(%rsp)
movw 0x46(%rsp), %ax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/policy_lastgoodreply.h
// Function: Morat::LastGoodReply<Morat::Hex::Board>::choose_move(Morat::Hex::Board const&, Morat::Move const&) const
Move choose_move(const Board & board, const Move & prev) const {
		if (enabled && prev != M_SWAP) {
			Move move = goodreply[board.to_play().to_i() - 1][board.xy(prev)];
			if(move != M_UNKNOWN && board.valid_move_fast(move))
				return move;
		}
		return M_UNKNOWN;
	}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rcx
movq %rcx, 0x10(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x9c4(%rcx)
movb %al, 0x1b(%rsp)
je 0x2a537
movq 0x28(%rsp), %rdi
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
leaq 0x24(%rsp), %rsi
callq 0x2a390
movb %al, 0x1b(%rsp)
movb 0x1b(%rsp), %al
testb $0x1, %al
jne 0x2a544
jmp 0x2a5e2
movq 0x30(%rsp), %rdi
callq 0x1a8a0
movb %al, 0x23(%rsp)
leaq 0x23(%rsp), %rdi
callq 0x1fc40
movb %al, %cl
movq 0x10(%rsp), %rax
movsbl %cl, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x4e2, %rcx, %rcx      # imm = 0x4E2
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x11630
movl %eax, %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, 0x46(%rsp)
movl $0xfffffffc, 0x1c(%rsp) # imm = 0xFFFFFFFC
leaq 0x46(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x2a390
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0xf(%rsp)
jne 0x2a5c1
jmp 0x2a5d4
movq 0x30(%rsp), %rdi
leaq 0x46(%rsp), %rsi
callq 0x2c910
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x2a5de
jmp 0x2a5e0
jmp 0x2a5f1
jmp 0x2a5e2
leaq 0x46(%rsp), %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0xff00
movw 0x46(%rsp), %ax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/policy_random.h
// Function: Morat::RandomPolicy<Morat::Hex::Board>::choose_move(Morat::Hex::Board const&, Morat::Move const&)
Move choose_move(const Board & board, const Move & prev) {
		while(true){
			int r = rand() % cur;
			cur--;
			Move m = moves[r];
			moves[r] = moves[cur];
			moves[cur] = m;
			if(board.valid_move_fast(m))
				return m;
		}
	}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2c950
movq 0x8(%rsp), %rcx
xorl %edx, %edx
divl 0x4ec(%rcx)
movq 0x8(%rsp), %rax
movl %edx, 0x14(%rsp)
movl 0x4ec(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4ec(%rax)
movslq 0x14(%rsp), %rcx
movw 0x4(%rax,%rcx,2), %cx
movw %cx, 0x36(%rsp)
movslq 0x4ec(%rax), %rdx
movslq 0x14(%rsp), %rcx
movw 0x4(%rax,%rdx,2), %dx
movw %dx, 0x4(%rax,%rcx,2)
movslq 0x4ec(%rax), %rcx
movw 0x36(%rsp), %dx
movw %dx, 0x4(%rax,%rcx,2)
movq 0x20(%rsp), %rdi
leaq 0x36(%rsp), %rsi
callq 0x2c910
testb $0x1, %al
jne 0x2a697
jmp 0x2a6a1
movw 0x36(%rsp), %ax
addq $0x38, %rsp
retq
jmp 0x2a61d
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/hex/agentmcts.h
// Function: Morat::Hex::AgentMCTS::AgentThread::reset()
void reset(){
			treelen.reset();
			gamelen.reset();

			use_rave = false;
			use_explore = false;

			for(int a = 0; a < 2; a++)
				for(int b = 0; b < Board::num_win_types; b++)
					win_types[a][b].reset();

			for(int a = 0; a < 4; a++)
				times[a] = 0;
		}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x12128, %rdi          # imm = 0x12128
callq 0x1e2d0
movq 0x8(%rsp), %rdi
addq $0x12148, %rdi          # imm = 0x12148
callq 0x1e2d0
movq 0x8(%rsp), %rax
movb $0x0, 0x2f14(%rax)
movb $0x0, 0x2f15(%rax)
movl $0x0, 0x1c(%rsp)
cmpl $0x2, 0x1c(%rsp)
jge 0x2a796
movl $0x0, 0x18(%rsp)
cmpl $0x1, 0x18(%rsp)
jge 0x2a787
movq 0x8(%rsp), %rdi
addq $0x12168, %rdi          # imm = 0x12168
movslq 0x1c(%rsp), %rax
shlq $0x5, %rax
addq %rax, %rdi
movslq 0x18(%rsp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x1e2d0
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x2a74a
jmp 0x2a789
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x2a73b
movl $0x0, 0x14(%rsp)
cmpl $0x4, 0x14(%rsp)
jge 0x2a7c9
movq 0x8(%rsp), %rax
movslq 0x14(%rsp), %rcx
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x121a8(%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2a79e
addq $0x28, %rsp
retq
nop
// File: tewalds[P]morat/hex/../lib/../lib/xorshift.h
// Function: Morat::XORShift_uint32::rand()
uint32_t rand(){
		r ^= (r << 13);
		r ^= (r >> 17);
		r ^= (r <<  5);
		return r * 1597334677;
	}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl (%rax), %ecx
shll $0xd, %ecx
xorl (%rax), %ecx
movl %ecx, (%rax)
movl (%rax), %ecx
shrl $0x11, %ecx
xorl (%rax), %ecx
movl %ecx, (%rax)
movl (%rax), %ecx
shll $0x5, %ecx
xorl (%rax), %ecx
movl %ecx, (%rax)
imull $0x5f356495, (%rax), %eax # imm = 0x5F356495
retq
nopl (%rax)
// File: tewalds[P]morat/hex/../lib/board_grid_hex.h
// Function: Morat::BoardGridHex<Morat::Hex::Board>::local(int, Morat::Side) const
int local(int i,               Side turn) const {
		Pattern p = pattern(i);
		Pattern x = ((p & 0xAAAAAAAAAull) >> 1) ^ (p & 0x555555555ull); // p1 is now when p1 or p2 but not both (ie off the board)
		p = x & (turn == Side::P1 ? p : p >> 1); // now just the selected player
		return (p & 0x000000FFF ? 3 : 0) |
		       (p & 0x000FFF000 ? 2 : 0) |
		       (p & 0xFFF000000 ? 1 : 0);
	}

// Assembly:
subq $0x38, %rsp
movb %dl, %al
movb %al, 0x37(%rsp)
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x2a9c0
movq %rax, 0x18(%rsp)
movabsq $0xaaaaaaaaa, %rax      # imm = 0xAAAAAAAAA
andq 0x18(%rsp), %rax
shrq %rax
movabsq $0x555555555, %rcx      # imm = 0x555555555
andq 0x18(%rsp), %rcx
xorq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x37(%rsp), %rdi
leaq 0x42b97(%rip), %rsi     # 0x6d4bc
callq 0x1f930
testb $0x1, %al
jne 0x2a930
jmp 0x2a93b
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
jmp 0x2a947
movq 0x18(%rsp), %rax
shrq %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
andq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdx
andq $0xfff, %rdx            # imm = 0xFFF
xorl %eax, %eax
movl $0x3, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movq 0x18(%rsp), %rsi
andq $0xfff000, %rsi         # imm = 0xFFF000
xorl %ecx, %ecx
movl $0x2, %edx
cmpq $0x0, %rsi
cmovnel %edx, %ecx
orl %ecx, %eax
movabsq $0xfff000000, %rsi      # imm = 0xFFF000000
andq 0x18(%rsp), %rsi
xorl %ecx, %ecx
movl $0x1, %edx
cmpq $0x0, %rsi
cmovnel %edx, %ecx
orl %ecx, %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: tewalds[P]morat/hex/lbdist.h
// Function: Morat::Hex::LBDists::init_player(bool, Morat::Side)
void init_player(bool crossvcs, Side player){
		int m = board->lines();
		int m1 = m-1;

		if (player == Side::P1) {
			for(int y = 0; y < m; y++) { init(0,  y, 0,  player, 2); } flood(0,  player, crossvcs);  // p1 edge 0
			for(int y = 0; y < m; y++) { init(m1, y, 1,  player, 5); } flood(1,  player, crossvcs);  // p1 edge 1
		} else {
			for(int x = 0; x < m; x++) { init(x,  0, 0,  player, 3); } flood(0,  player, crossvcs);  // p2 edge 0
			for(int x = 0; x < m; x++) { init(x, m1, 1,  player, 0); } flood(1,  player, crossvcs);  // p2 edge 1
		}
	}

// Assembly:
subq $0x48, %rsp
movb %dl, %cl
movb %sil, %al
movb %cl, 0x47(%rsp)
movq %rdi, 0x38(%rsp)
andb $0x1, %al
movb %al, 0x37(%rsp)
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x9c58(%rax), %rdi
callq 0x1fe80
movl %eax, 0x30(%rsp)
movl 0x30(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x2c(%rsp)
leaq 0x47(%rsp), %rdi
leaq 0x428f4(%rip), %rsi     # 0x6d4bc
callq 0x1f930
testb $0x1, %al
jne 0x2abd6
jmp 0x2acad
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x30(%rsp), %eax
jge 0x2ac1a
movq (%rsp), %rdi
movl 0x28(%rsp), %edx
movb 0x47(%rsp), %al
movb %al, 0x27(%rsp)
xorl %ecx, %ecx
movl $0x2, %r9d
movl %ecx, %esi
movzbl 0x27(%rsp), %r8d
callq 0x2ad90
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x2abde
movq (%rsp), %rdi
movb 0x47(%rsp), %al
movb %al, 0x26(%rsp)
movb 0x37(%rsp), %al
xorl %esi, %esi
andb $0x1, %al
movzbl 0x26(%rsp), %edx
movzbl %al, %ecx
callq 0x2aee0
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x30(%rsp), %eax
jge 0x2ac84
movq (%rsp), %rdi
movl 0x2c(%rsp), %esi
movl 0x20(%rsp), %edx
movb 0x47(%rsp), %al
movb %al, 0x1f(%rsp)
movl $0x1, %ecx
movl $0x5, %r9d
movzbl 0x1f(%rsp), %r8d
callq 0x2ad90
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x2ac43
movq (%rsp), %rdi
movb 0x47(%rsp), %al
movb %al, 0x1e(%rsp)
movb 0x37(%rsp), %al
movl $0x1, %esi
andb $0x1, %al
movzbl 0x1e(%rsp), %edx
movzbl %al, %ecx
callq 0x2aee0
jmp 0x2ad7c
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x30(%rsp), %eax
jge 0x2acf1
movq (%rsp), %rdi
movl 0x18(%rsp), %esi
movb 0x47(%rsp), %al
movb %al, 0x17(%rsp)
xorl %ecx, %ecx
movl $0x3, %r9d
movl %ecx, %edx
movzbl 0x17(%rsp), %r8d
callq 0x2ad90
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x2acb5
movq (%rsp), %rdi
movb 0x47(%rsp), %al
movb %al, 0x16(%rsp)
movb 0x37(%rsp), %al
xorl %esi, %esi
andb $0x1, %al
movzbl 0x16(%rsp), %edx
movzbl %al, %ecx
callq 0x2aee0
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x30(%rsp), %eax
jge 0x2ad58
movq (%rsp), %rdi
movl 0x10(%rsp), %esi
movl 0x2c(%rsp), %edx
movb 0x47(%rsp), %al
movb %al, 0xf(%rsp)
movl $0x1, %ecx
xorl %r9d, %r9d
movzbl 0xf(%rsp), %r8d
callq 0x2ad90
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x2ad1a
movq (%rsp), %rdi
movb 0x47(%rsp), %al
movb %al, 0xe(%rsp)
movb 0x37(%rsp), %al
movl $0x1, %esi
andb $0x1, %al
movzbl 0xe(%rsp), %edx
movzbl %al, %ecx
callq 0x2aee0
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/lbdist.h
// Function: Morat::LBDistsBase<Morat::Hex::LBDists, Morat::Hex::Board>::init(int, int, int, Morat::Side, int)
void init(int x, int y, int edge, Side player, int dir){
		Side val = board->get(x, y);
		if(val != ~player){
			bool empty = (val == Side::NONE);
			MoveValid move(x, y, board->xy(x, y));
			Q.push(MoveDist(move, empty, dir));
			dist(edge, player, move) = empty;
		}
	}

// Assembly:
subq $0x68, %rsp
movb %r8b, %al
movb %al, 0x67(%rsp)
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movl %edx, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movl %r9d, 0x48(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x9c58(%rax), %rdi
movl 0x54(%rsp), %esi
movl 0x50(%rsp), %edx
callq 0x2b170
movb %al, 0x47(%rsp)
movb 0x67(%rsp), %al
movb %al, 0x45(%rsp)
movzbl 0x45(%rsp), %edi
callq 0x1c680
movb %al, 0x46(%rsp)
leaq 0x47(%rsp), %rdi
leaq 0x46(%rsp), %rsi
callq 0x29c60
testb $0x1, %al
jne 0x2ae01
jmp 0x2aecd
leaq 0x47(%rsp), %rdi
leaq 0x426ae(%rip), %rsi     # 0x6d4bb
callq 0x1f930
movb %al, %cl
movq 0x20(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x44(%rsp)
movl 0x54(%rsp), %ecx
movl %ecx, 0x8(%rsp)
movl 0x50(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq 0x9c58(%rax), %rdi
movl 0x54(%rsp), %esi
movl 0x50(%rsp), %edx
callq 0x1fc80
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movl %eax, %ecx
leaq 0x40(%rsp), %rdi
callq 0x2b1c0
movq 0x20(%rsp), %rax
addq $0x2710, %rax           # imm = 0x2710
movq %rax, 0x10(%rsp)
movl 0x40(%rsp), %eax
movl %eax, 0x30(%rsp)
movb 0x44(%rsp), %al
andb $0x1, %al
movzbl %al, %edx
movl 0x48(%rsp), %ecx
movl 0x30(%rsp), %esi
leaq 0x34(%rsp), %rdi
callq 0x2b290
movq 0x10(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0x2b200
movq 0x20(%rsp), %rdi
movb 0x44(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x1c(%rsp)
movl 0x4c(%rsp), %esi
movb 0x67(%rsp), %al
movb %al, 0x2f(%rsp)
leaq 0x40(%rsp), %rcx
movzbl 0x2f(%rsp), %edx
callq 0x2b2c0
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: tewalds[P]morat/hex/../lib/lbdist.h
// Function: Morat::LBDistsBase<Morat::Hex::LBDists, Morat::Hex::Board>::IntPQueue::pop(Morat::LBDistsBase<Morat::Hex::LBDists, Morat::Hex::Board>::MoveDist&)
bool pop(MoveDist & ret){
			if(num == 0){
				current = 0;
				return false;
			}

			while(counts[current] == 0)
				current = (current+1) % maxvals;

			ret = vals[current][--counts[current]];
			num--;

			return true;
		}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
cmpl $0x0, 0x7544(%rax)
jne 0x2b3b6
movq -0x20(%rsp), %rax
movl $0x0, 0x7540(%rax)
movb $0x0, -0x1(%rsp)
jmp 0x2b451
jmp 0x2b3b8
movq -0x20(%rsp), %rax
movslq 0x7540(%rax), %rcx
cmpl $0x0, 0x7530(%rax,%rcx,4)
jne 0x2b3f1
movq -0x20(%rsp), %rax
movl 0x7540(%rax), %eax
addl $0x1, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movq -0x20(%rsp), %rax
movl %edx, 0x7540(%rax)
jmp 0x2b3b8
movq -0x20(%rsp), %rax
movslq 0x7540(%rax), %rcx
imulq $0x1d4c, %rcx, %rcx     # imm = 0x1D4C
movq %rax, %rdx
addq %rcx, %rdx
movslq 0x7540(%rax), %rsi
movl 0x7530(%rax,%rsi,4), %ecx
addl $-0x1, %ecx
movl %ecx, 0x7530(%rax,%rsi,4)
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rdx
movq -0x18(%rsp), %rcx
movq (%rdx), %rsi
movq %rsi, (%rcx)
movl 0x8(%rdx), %edx
movl %edx, 0x8(%rcx)
movl 0x7544(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x7544(%rax)
movb $0x1, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopl (%rax,%rax)