// File: tewalds[P]morat/hex/agentpns.cpp
// Function: Morat::Hex::AgentPNS::move_stats[abi:cxx11](std::vector<Morat::Move, std::allocator<Morat::Move>> const&) const
std::string AgentPNS::move_stats(const vecmove& moves) const {
	std::string s = "";
	const Node * node = & root;

	if(moves.size()){
		s += "path:\n";
		for(auto m : moves){
			if(node){
				node = find_child(node, m);
				s += node->to_s() + "\n";
			}
		}
	}

	if(node){
		s += "children:\n";
		for(auto & n : node->children)
			s += n.to_s() + "\n";
	}
	return s;
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0x28(%rsp)
movb $0x0, 0x11f(%rsp)
leaq 0x11e(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x5770
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0x1d595(%rip), %rsi     # 0x4c8e9
callq 0x5590
jmp 0x2f35b
leaq 0x11e(%rsp), %rdi
callq 0x5450
movq 0x28(%rsp), %rax
addq $0x1540, %rax           # imm = 0x1540
movq %rax, 0x100(%rsp)
movq 0x120(%rsp), %rdi
callq 0x1c5d0
cmpq $0x0, %rax
je 0x2f558
movq 0x30(%rsp), %rdi
leaq 0x1e099(%rip), %rsi     # 0x4d437
callq 0x53b0
jmp 0x2f3a5
movq 0x120(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0xf8(%rsp), %rdi
callq 0x1c6f0
movq %rax, 0xf0(%rsp)
movq 0xf8(%rsp), %rdi
callq 0x1c720
movq %rax, 0xe8(%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1c750
testb $0x1, %al
jne 0x2f3fd
jmp 0x2f556
leaq 0xf0(%rsp), %rdi
callq 0x1c790
movw (%rax), %ax
movw %ax, 0xe6(%rsp)
cmpq $0x0, 0x100(%rsp)
je 0x2f542
movq 0x28(%rsp), %rdi
movq 0x100(%rsp), %rsi
leaq 0xe6(%rsp), %rdx
callq 0x2f250
movq %rax, 0x18(%rsp)
jmp 0x2f445
movq 0x18(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x2c960
jmp 0x2f469
leaq 0x1d478(%rip), %rdx     # 0x4c8e8
leaq 0xc0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xb910
jmp 0x2f487
movq 0x30(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x5520
jmp 0x2f49b
leaq 0xc0(%rsp), %rdi
callq 0x5260
leaq 0xa0(%rsp), %rdi
callq 0x5260
jmp 0x2f542
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x11e(%rsp), %rdi
callq 0x5450
jmp 0x2f6d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x2f6cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x2f530
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x5260
leaq 0xa0(%rsp), %rdi
callq 0x5260
jmp 0x2f6cb
jmp 0x2f544
leaq 0xf0(%rsp), %rdi
callq 0x1c7a0
jmp 0x2f3df
jmp 0x2f558
cmpq $0x0, 0x100(%rsp)
je 0x2f6a2
movq 0x30(%rsp), %rdi
leaq 0x1decb(%rip), %rsi     # 0x4d43e
callq 0x53b0
jmp 0x2f57a
movq 0x100(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdi
callq 0x30e90
movq %rax, 0x10(%rsp)
jmp 0x2f5a2
movq 0x10(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x98(%rsp), %rdi
callq 0x30ee0
movq %rax, 0x8(%rsp)
jmp 0x2f5c3
movq 0x8(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rax
cmpq 0x88(%rsp), %rax
je 0x2f6a0
movq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x2c960
jmp 0x2f60a
leaq 0x1d2d7(%rip), %rdx     # 0x4c8e8
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xb910
jmp 0x2f622
movq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5520
jmp 0x2f633
leaq 0x60(%rsp), %rdi
callq 0x5260
leaq 0x40(%rsp), %rdi
callq 0x5260
movq 0x90(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x90(%rsp)
jmp 0x2f5d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x2f694
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x5260
leaq 0x40(%rsp), %rdi
callq 0x5260
jmp 0x2f6cb
jmp 0x2f6a2
movb $0x1, 0x11f(%rsp)
testb $0x1, 0x11f(%rsp)
jne 0x2f6be
movq 0x30(%rsp), %rdi
callq 0x5260
movq 0x20(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
movq 0x30(%rsp), %rdi
callq 0x5260
movq 0x110(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)