// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]pentagod/./agentpns.h
// Function: AgentPNS::move(Move const&)
void move(const Move & m){
		stop_threads();

		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(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 %rsi, %r14
movq %rdi, %rbx
callq 0x186a6
movl (%r14), %esi
leaq 0x10(%rbx), %rdi
callq 0x7ada
andl $0x0, 0x9e0(%rbx)
andq $0x0, 0x9e8(%rbx)
movb $0x0, 0x8(%rbx)
leaq 0x30(%rsp), %r12
xorl %ebp, %ebp
leaq 0xae0(%rbx), %r15
leaq 0xaf8(%rbx), %r13
movq 0x38(%rbx), %rax
movw $0x8efc, -0x4(%r12)     # imm = 0x8EFC
andq $0x0, (%r12)
movzwl (%r14), %edx
movq %rax, 0x10(%rsp)
movq 0xaf8(%rbx), %rax
leaq 0x10(%rax), %rcx
cmpq $0x2, %rax
cmovaeq %rcx, %rbp
addq $0x18, %rbp
cmpq $0x2, %rax
jb 0x1980d
movzwl 0x6(%rax), %edi
shll $0x5, %edi
addq %rcx, %rdi
jmp 0x1980f
xorl %edi, %edi
leaq -0x18(%rbp), %rsi
cmpq %rdi, %rsi
je 0x19839
cmpw %dx, -0x4(%rbp)
je 0x19824
addq $0x20, %rbp
jmp 0x197fb
leaq 0x18(%rsp), %rdi
callq 0x1928a
movq %r12, %rdi
movq %rbp, %rsi
callq 0x192d8
leaq 0x50(%rbx), %rsi
movq %r15, %rdi
callq 0x1960a
movl %eax, %eax
subq %rax, 0x38(%rbx)
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x1928a
movq %r13, %rdi
movq %r12, %rsi
callq 0x192d8
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x199f1
leaq 0x6d21(%rip), %rsi      # 0x20599
leaq 0x98(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x40f0
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0xaf8f
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x8365
leaq 0x604b(%rip), %rdx      # 0x1f903
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x6821
movq 0x38(%rbx), %rsi
leaq 0x58(%rsp), %rdi
callq 0xaf8f
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x8365
leaq 0x6011(%rip), %rdx      # 0x1f90d
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x6821
vcvtusi2sdq 0x38(%rbx), %xmm0, %xmm0
vmulsd 0x3988(%rip), %xmm0, %xmm0 # 0x1d2a8
vcvtusi2sd %r14, %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
leaq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0xf350
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x8365
leaq 0x5fbe(%rip), %rdx      # 0x1f916
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x6821
leaq 0x158(%rsp), %r14
movq %r14, %rdi
callq 0xac65
movq %r14, %rdi
callq 0x4130
leaq 0x138(%rsp), %rdi
callq 0x4130
leaq 0x38(%rsp), %rdi
callq 0x4130
leaq 0x118(%rsp), %rdi
callq 0x4130
leaq 0xf8(%rsp), %rdi
callq 0x4130
leaq 0x58(%rsp), %rdi
callq 0x4130
leaq 0xd8(%rsp), %rdi
callq 0x4130
leaq 0xb8(%rsp), %rdi
callq 0x4130
leaq 0x78(%rsp), %rdi
callq 0x4130
leaq 0x98(%rsp), %rdi
callq 0x4130
movq 0x38(%rbx), %r14
movq %r15, %rdi
callq 0x19e3a
movl %eax, %eax
cmpq %rax, %r14
jne 0x19a30
cmpq $0x0, 0x38(%rbx)
jne 0x19a14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
leaq 0x18(%rsp), %rdi
callq 0xb06a
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5eee(%rip), %rdi      # 0x1f925
leaq 0x36e8(%rip), %rsi      # 0x1d126
leaq 0x6b67(%rip), %rcx      # 0x205ac
movl $0xfb, %edx
callq 0x41c0
jmp 0x19aef
leaq 0x138(%rsp), %rdi
movq %rax, %rbx
callq 0x4130
jmp 0x19a69
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4130
jmp 0x19a78
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x4130
jmp 0x19a8a
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x4130
jmp 0x19a9c
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4130
leaq 0xd8(%rsp), %rdi
callq 0x4130
leaq 0xb8(%rsp), %rdi
callq 0x4130
leaq 0x78(%rsp), %rdi
callq 0x4130
leaq 0x98(%rsp), %rdi
callq 0x4130
jmp 0x19af2
movq %rax, %rbx
jmp 0x19aa6
movq %rax, %rbx
jmp 0x19ab3
movq %rax, %rbx
jmp 0x19ac0
movq %rax, %rbx
jmp 0x19aca
jmp 0x19aef
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xb06a
movq %rbx, %rdi
callq 0x4590