// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/hex/agentpns.h
// Function: Morat::Hex::AgentPNS::move(Morat::Move const&)
void move(const Move & m){
		pool.pause();

		rootboard.move(m);
		reset();


		uint64_t nodesbefore = nodes;

		Node child;

		for(Node * i = root.children.begin(); i != root.children.end(); i++){
			if(i->move == m){
				child = *i;          //copy the child experience to temp
				child.swap_tree(*i); //move the child tree to temp
				break;
			}
		}

		nodes -= root.dealloc(ctmem);
		root = child;
		root.swap_tree(child);

		if(nodesbefore > 0)
			logerr(std::string("PNS Nodes before: ") + to_str(nodesbefore) + ", after: " + to_str(nodes) + ", saved " + to_str(100.0*nodes/nodesbefore, 1) + "% of the tree\n");

		assert(nodes == root.size());

		if(nodes == 0)
			clear_mem();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdi, %rbx
addq $0x1430, %rdi           # imm = 0x1430
movq %rsi, %r14
callq 0x164b8
leaq 0x10(%rbx), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
movl %ecx, %edx
callq 0xe1ea
andq $0x0, 0x1518(%rbx)
movb $0x0, 0x8(%rbx)
leaq 0x30(%rsp), %r12
xorl %ebp, %ebp
leaq 0x1540(%rbx), %r15
leaq 0x1558(%rbx), %r13
movq 0x58(%rbx), %rax
movw $0x78fc, -0x6(%r12)     # imm = 0x78FC
andq $0x0, (%r12)
movb (%r14), %dl
movb 0x1(%r14), %dil
movq %rax, 0x10(%rsp)
movq 0x1558(%rbx), %rax
leaq 0x10(%rax), %rcx
cmpq $0x2, %rax
cmovaeq %rcx, %rbp
addq $0x18, %rbp
cmpq $0x2, %rax
jb 0x15f5d
movzwl 0x6(%rax), %r8d
shll $0x5, %r8d
addq %rcx, %r8
jmp 0x15f60
xorl %r8d, %r8d
leaq -0x18(%rbp), %rsi
cmpq %r8, %rsi
je 0x15f8f
cmpb %dl, -0x6(%rbp)
jne 0x15f74
cmpb %dil, -0x5(%rbp)
je 0x15f7a
addq $0x20, %rbp
jmp 0x15f49
leaq 0x18(%rsp), %rdi
callq 0x15ca8
movq %r12, %rdi
movq %rbp, %rsi
callq 0x15cfe
leaq 0x70(%rbx), %rsi
movq %r15, %rdi
callq 0x15d4c
movl %eax, %eax
subq %rax, 0x58(%rbx)
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x15ca8
movq %r13, %rdi
movq %r12, %rsi
callq 0x15cfe
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x16147
leaq 0xed50(%rip), %rsi      # 0x24d1e
leaq 0x98(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x5110
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0xd463
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xcf24
leaq 0xd3de(%rip), %rdx      # 0x233ec
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x8051
movq 0x58(%rbx), %rsi
leaq 0x58(%rsp), %rdi
callq 0xd463
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0xcf24
leaq 0xd3a4(%rip), %rdx      # 0x233f6
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x8051
vcvtusi2sdq 0x58(%rbx), %xmm0, %xmm0
vmulsd 0xd162(%rip), %xmm0, %xmm0 # 0x231d8
vcvtusi2sd %r14, %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
leaq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x20e6c
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0xcf24
leaq 0xd351(%rip), %rdx      # 0x233ff
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x8051
leaq 0x158(%rsp), %r14
movq %r14, %rdi
callq 0xd451
movq %r14, %rdi
callq 0x5150
leaq 0x138(%rsp), %rdi
callq 0x5150
leaq 0x38(%rsp), %rdi
callq 0x5150
leaq 0x118(%rsp), %rdi
callq 0x5150
leaq 0xf8(%rsp), %rdi
callq 0x5150
leaq 0x58(%rsp), %rdi
callq 0x5150
leaq 0xd8(%rsp), %rdi
callq 0x5150
leaq 0xb8(%rsp), %rdi
callq 0x5150
leaq 0x78(%rsp), %rdi
callq 0x5150
leaq 0x98(%rsp), %rdi
callq 0x5150
movq 0x58(%rbx), %r14
movq %r15, %rdi
callq 0x17462
movl %eax, %eax
cmpq %rax, %r14
jne 0x16186
cmpq $0x0, 0x58(%rbx)
jne 0x1616a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
leaq 0x18(%rsp), %rdi
callq 0x157b8
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd281(%rip), %rdi      # 0x2340e
leaq 0xe7a2(%rip), %rsi      # 0x24936
leaq 0xeb96(%rip), %rcx      # 0x24d31
movl $0xe9, %edx
callq 0x51f0
jmp 0x16245
leaq 0x138(%rsp), %rdi
movq %rax, %rbx
callq 0x5150
jmp 0x161bf
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x5150
jmp 0x161ce
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x5150
jmp 0x161e0
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x5150
jmp 0x161f2
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x5150
leaq 0xd8(%rsp), %rdi
callq 0x5150
leaq 0xb8(%rsp), %rdi
callq 0x5150
leaq 0x78(%rsp), %rdi
callq 0x5150
leaq 0x98(%rsp), %rdi
callq 0x5150
jmp 0x16248
movq %rax, %rbx
jmp 0x161fc
movq %rax, %rbx
jmp 0x16209
movq %rax, %rbx
jmp 0x16216
movq %rax, %rbx
jmp 0x16220
jmp 0x16245
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x157b8
movq %rbx, %rdi
callq 0x5650