// File: /workspace/github_cpp_makefile_star2_O1/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 %rsi, %r12
movq %rdi, %rbx
addq $0x1430, %rdi           # imm = 0x1430
callq 0x1d134
leaq 0x10(%rbx), %rdi
movsbl (%r12), %eax
movsbl 0x10(%rbx), %ecx
imull %eax, %ecx
movsbl 0x1(%r12), %eax
addl %ecx, %eax
movzwl (%r12), %ecx
leaq 0x8(%rsp), %r14
movw %cx, (%r14)
movw %ax, 0x2(%r14)
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x13778
xorl %ebp, %ebp
movq %rbp, 0x1518(%rbx)
movb $0x0, 0x8(%rbx)
movq 0x58(%rbx), %r15
movw $0x78fc, 0x12(%r14)     # imm = 0x78FC
leaq 0x20(%rsp), %r13
movq %rbp, (%r13)
leaq 0x1540(%rbx), %r14
movq 0x1558(%rbx), %rax
leaq 0x10(%rax), %rcx
cmpq $0x2, %rax
cmovaeq %rcx, %rbp
movb (%r12), %dl
movb 0x1(%r12), %dil
addq $0x18, %rbp
cmpq $0x2, %rax
jb 0x1c780
movzwl 0x6(%rax), %r8d
shll $0x5, %r8d
addq %rcx, %r8
jmp 0x1c783
xorl %r8d, %r8d
leaq -0x18(%rbp), %rsi
cmpq %r8, %rsi
je 0x1c7d6
cmpb %dl, -0x6(%rbp)
jne 0x1c797
cmpb %dil, -0x5(%rbp)
je 0x1c79d
addq $0x20, %rbp
jmp 0x1c76c
leaq 0x8(%rsp), %rdi
callq 0x1c4a4
movq 0x20(%rsp), %rax
movq (%rbp), %rcx
movq %rcx, 0x20(%rsp)
movq %rax, (%rbp)
movq 0x20(%rsp), %rax
cmpq $0x2, %rax
jb 0x1c7c8
movq %r13, 0x8(%rax)
movq (%rbp), %rax
cmpq $0x2, %rax
jb 0x1c7d6
movq %rbp, 0x8(%rax)
leaq 0x70(%rbx), %rsi
movq %r14, %rdi
callq 0x1c4f4
movl %eax, %eax
subq %rax, 0x58(%rbx)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1c4a4
movq 0x1558(%rbx), %rcx
movq 0x20(%rsp), %rax
movq %rax, 0x1558(%rbx)
movq %rcx, 0x20(%rsp)
cmpq $0x2, %rax
jb 0x1c81e
leaq 0x1558(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rax
cmpq $0x2, %rax
jb 0x1c82d
movq %r13, 0x8(%rax)
testq %r15, %r15
jne 0x1c875
movq 0x58(%rbx), %r15
movq %r14, %rdi
callq 0x1e56c
movl %eax, %eax
cmpq %rax, %r15
jne 0x1cd48
cmpq $0x0, 0x58(%rbx)
jne 0x1c859
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
leaq 0x8(%rsp), %rdi
callq 0x1c01e
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x138(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x17865(%rip), %rsi     # 0x340ee
leaq 0x17870(%rip), %rdx     # 0x34100
leaq 0x128(%rsp), %rdi
callq 0xb0e0
leaq 0x108(%rsp), %rdi
movq %r15, %rsi
callq 0x1148d
movq 0x128(%rsp), %rcx
movq 0x130(%rsp), %r8
movq 0x110(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x1c8db
movq 0x138(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1c900
leaq 0x118(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x1c8fb
movq 0x118(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1c917
movq 0x108(%rsp), %rsi
leaq 0x128(%rsp), %rdi
callq 0x50c0
jmp 0x1c928
leaq 0x108(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x1c947
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x1c954
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x15c18(%rip), %rsi     # 0x32590
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1c9a9
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r13)
jmp 0x1c9bc
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 0x1148d
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %r8
movq 0xf0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x1ca16
movq 0x98(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1ca3b
leaq 0xf8(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x1ca36
movq 0xf8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1ca52
movq 0xe8(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x50c0
jmp 0x1ca63
leaq 0xe8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x58(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x1ca82
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x1ca8f
movq %rsi, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x15ae7(%rip), %rsi     # 0x3259a
leaq 0x48(%rsp), %rdi
callq 0x56e0
leaq 0xb8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1cae3
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rbp)
jmp 0x1caf6
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 0x15700(%rip), %xmm0, %xmm0 # 0x32220
vcvtusi2sd %r15, %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
leaq 0xc8(%rsp), %rdi
movl $0x1, %esi
callq 0x2f81c
movq 0xa8(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0xd0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbp, %rcx
je 0x1cb6a
movq 0xb8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1cb8f
leaq 0xd8(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x1cb8a
movq 0xd8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1cba6
movq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x50c0
jmp 0x1cbb7
leaq 0xc8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x78(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x1cbd6
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x1cbe3
movq %rsi, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1599c(%rip), %rsi     # 0x325a3
leaq 0x68(%rsp), %rdi
callq 0x56e0
leaq 0x158(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1cc37
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r15)
jmp 0x1cc4a
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 0x2d364(%rip), %rax     # 0x49fd0
movq (%rax), %rsi
movq 0x148(%rsp), %rdi
callq 0x5370
movq 0x148(%rsp), %rdi
cmpq %r15, %rdi
je 0x1cc8e
callq 0x52e0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cca1
callq 0x52e0
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ccb7
callq 0x52e0
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1ccc9
callq 0x52e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ccdc
callq 0x52e0
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ccf2
callq 0x52e0
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x1cd04
callq 0x52e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cd17
callq 0x52e0
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cd2d
callq 0x52e0
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x1c832
callq 0x52e0
jmp 0x1c832
leaq 0x15863(%rip), %rdi     # 0x325b2
leaq 0x16fb0(%rip), %rsi     # 0x33d06
leaq 0x173a4(%rip), %rcx     # 0x34101
movl $0xe9, %edx
callq 0x51d0
jmp 0x1ce4c
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cd87
callq 0x52e0
jmp 0x1cd87
movq %rax, %rbx
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cda2
callq 0x52e0
jmp 0x1cda2
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1cdb9
callq 0x52e0
jmp 0x1cdb9
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cdd1
callq 0x52e0
jmp 0x1cdd1
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cdec
callq 0x52e0
jmp 0x1cdec
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x1ce03
callq 0x52e0
jmp 0x1ce03
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ce1b
callq 0x52e0
jmp 0x1ce1b
movq %rax, %rbx
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ce36
callq 0x52e0
jmp 0x1ce36
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ce4f
callq 0x52e0
jmp 0x1ce4f
jmp 0x1ce4c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1c01e
movq %rbx, %rdi
callq 0x5670
nop