// File: /workspace/github_cpp_makefile_star2_O3/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 $0x168, %rsp            # imm = 0x168
movq %rdi, %rbx
addq $0x1430, %rdi           # imm = 0x1430
movq %rsi, %r12
callq 0x1d0dc
movsbl (%r12), %eax
movsbl 0x10(%rbx), %ecx
leaq 0x68(%rsp), %r14
leaq 0x10(%rbx), %rdi
movl $0x1, %edx
movq %r14, %rsi
imull %eax, %ecx
movsbl 0x1(%r12), %eax
addl %ecx, %eax
movzwl (%r12), %ecx
movw %cx, (%r14)
movl $0x1, %ecx
movw %ax, 0x2(%r14)
callq 0x1388c
xorl %r15d, %r15d
movq %r15, 0x1518(%rbx)
movb $0x0, 0x8(%rbx)
leaq 0x1540(%rbx), %rsi
leaq 0x1558(%rbx), %rbp
movq 0x58(%rbx), %r13
movw $0x78fc, 0x12(%r14)     # imm = 0x78FC
leaq 0x80(%rsp), %r14
movq %r15, (%r14)
movq 0x1558(%rbx), %rax
movb (%r12), %dl
movb 0x1(%r12), %dil
movq %rsi, %r12
leaq 0x10(%rax), %rcx
cmpq $0x2, %rax
cmovaeq %rcx, %r15
addq $0x18, %r15
cmpq $0x2, %rax
jb 0x1c723
movzwl 0x6(%rax), %r8d
shll $0x5, %r8d
addq %rcx, %r8
jmp 0x1c726
xorl %r8d, %r8d
leaq -0x18(%r15), %rsi
cmpq %r8, %rsi
je 0x1c778
cmpb %dl, -0x6(%r15)
jne 0x1c73b
cmpb %dil, -0x5(%r15)
je 0x1c741
addq $0x20, %r15
jmp 0x1c70f
leaq 0x68(%rsp), %rdi
callq 0x1c43a
movq 0x80(%rsp), %rax
movq (%r15), %rcx
movq %rcx, 0x80(%rsp)
movq %rax, (%r15)
cmpq $0x2, %rcx
jb 0x1c76e
movq %r14, 0x8(%rcx)
movq (%r15), %rax
cmpq $0x2, %rax
jb 0x1c778
movq %r15, 0x8(%rax)
leaq 0x70(%rbx), %rsi
movq %r12, %rdi
callq 0x1c48a
movl %eax, %eax
subq %rax, 0x58(%rbx)
leaq 0x68(%rsp), %rsi
movq %r12, %rdi
callq 0x1c43a
movq (%rbp), %rax
movq 0x80(%rsp), %rcx
movq %r13, %r15
movq %rcx, (%rbp)
movq %rax, 0x80(%rsp)
cmpq $0x2, %rcx
jb 0x1c7c4
movq %rbp, 0x8(%rcx)
movq 0x80(%rsp), %rax
cmpq $0x2, %rax
jb 0x1c7ce
movq %r14, 0x8(%rax)
testq %r15, %r15
jne 0x1c816
movq 0x58(%rbx), %r15
movq %r12, %rdi
callq 0x1e4ec
movl %eax, %eax
cmpq %rax, %r15
jne 0x1cce8
cmpq $0x0, 0x58(%rbx)
jne 0x1c7fa
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
leaq 0x68(%rsp), %rdi
callq 0x1bfd4
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %r14
leaq 0x138(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x178c1(%rip), %rsi     # 0x340ee
leaq 0x178cc(%rip), %rdx     # 0x34100
leaq 0x128(%rsp), %rdi
callq 0xb1dc
leaq 0x108(%rsp), %rdi
movq %r15, %rsi
callq 0x1161f
movq 0x130(%rsp), %r8
movq 0x110(%rsp), %rdx
movq 0x128(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r12, %rcx
je 0x1c87f
movq 0x138(%rsp), %rdi
movq 0x108(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1c8ab
leaq 0x118(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x1c8a6
movq 0x118(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1c8ba
leaq 0x128(%rsp), %rdi
callq 0x50c0
jmp 0x1c8cb
leaq 0x108(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x18(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x1c8ea
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x1c8f7
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x15c75(%rip), %rsi     # 0x32590
leaq 0x8(%rsp), %rdi
callq 0x56e0
leaq 0x98(%rsp), %r13
movq %rax, %rcx
addq $0x10, %rcx
movq %r13, -0x10(%r13)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x1c94c
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r13)
jmp 0x1c95f
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x90(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x58(%rbx), %rsi
leaq 0xe8(%rsp), %rdi
callq 0x1161f
movq 0x90(%rsp), %r8
movq 0xf0(%rsp), %rdx
movq 0x88(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r13, %rcx
je 0x1c9b9
movq 0x98(%rsp), %rdi
movq 0xe8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1c9e5
leaq 0xf8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x1c9e0
movq 0xf8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1c9f4
leaq 0x88(%rsp), %rdi
callq 0x50c0
jmp 0x1ca05
leaq 0xe8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x38(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x1ca24
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x1ca31
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x15b45(%rip), %rsi     # 0x3259a
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0xb8(%rsp), %rbp
movq %rax, %rcx
addq $0x10, %rcx
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x1ca85
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rbp)
jmp 0x1ca98
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
vcvtusi2sdq 0x58(%rbx), %xmm1, %xmm0
vmulsd 0x1575e(%rip), %xmm0, %xmm0 # 0x32220
vcvtusi2sd %r15, %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
leaq 0xc8(%rsp), %rdi
movl $0x1, %esi
callq 0x2f6e8
movq 0xb0(%rsp), %r8
movq 0xd0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %rbp, %rcx
je 0x1cb0c
movq 0xb8(%rsp), %rdi
movq 0xc8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1cb38
leaq 0xd8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x1cb33
movq 0xd8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1cb47
leaq 0xa8(%rsp), %rdi
callq 0x50c0
jmp 0x1cb58
leaq 0xc8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x58(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x1cb77
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x1cb84
movq %rsi, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x159fb(%rip), %rsi     # 0x325a3
leaq 0x48(%rsp), %rdi
callq 0x56e0
leaq 0x158(%rsp), %r15
movq %rax, %rcx
addq $0x10, %rcx
movq %r15, -0x10(%r15)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x1cbd8
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r15)
jmp 0x1cbeb
movq %rdx, 0x148(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x158(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x150(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x2c3c3(%rip), %rax     # 0x48fd0
movq 0x148(%rsp), %rdi
movq (%rax), %rsi
callq 0x5370
movq 0x148(%rsp), %rdi
cmpq %r15, %rdi
je 0x1cc2f
callq 0x52e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cc42
callq 0x52e0
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cc58
callq 0x52e0
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1cc6a
callq 0x52e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cc7d
callq 0x52e0
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cc93
callq 0x52e0
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x1cca5
callq 0x52e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ccb8
callq 0x52e0
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ccce
callq 0x52e0
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x1cce0
callq 0x52e0
movq %r14, %r12
jmp 0x1c7d3
leaq 0x158c3(%rip), %rdi     # 0x325b2
leaq 0x17010(%rip), %rsi     # 0x33d06
leaq 0x17404(%rip), %rcx     # 0x34101
movl $0xe9, %edx
callq 0x51d0
jmp 0x1cdec
leaq 0x58(%rsp), %rcx
movq %rax, %rbx
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x1cd27
callq 0x52e0
jmp 0x1cd27
movq %rax, %rbx
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cd42
callq 0x52e0
jmp 0x1cd42
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1cd59
callq 0x52e0
jmp 0x1cd59
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cd71
callq 0x52e0
jmp 0x1cd71
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cd8c
callq 0x52e0
jmp 0x1cd8c
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x1cda3
callq 0x52e0
jmp 0x1cda3
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cdbb
callq 0x52e0
jmp 0x1cdbb
movq %rax, %rbx
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cdd6
callq 0x52e0
jmp 0x1cdd6
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x1cdef
callq 0x52e0
jmp 0x1cdef
jmp 0x1cdec
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x1bfd4
movq %rbx, %rdi
callq 0x5670
nop