// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/hex/agentmcts.cpp
// Function: Morat::Hex::AgentMCTS::load_sgf(Morat::SGFParser<Morat::Move>&, Morat::Hex::Board const&, Morat::Hex::AgentMCTS::Node&)
void AgentMCTS::load_sgf(SGFParser<Move> & sgf, const Board & board, Node & node) {
	assert(sgf.has_children());
	create_children_simple(board, & node);

	while(sgf.next_child()){
		Move m = sgf.move();
		Node & child = *find_child(&node, m);
		child.from_s(sgf.comment());
		if(sgf.done_child()){
			continue;
		}else{
			// has children!
			Board b = board;
			b.move(m);
			load_sgf(sgf, b, child);
			assert(sgf.done_child());
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %r12
movq (%rsi), %rdi
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
callq 0x2d6bb
movq (%r15), %rdi
callq 0x5110
cmpl $0x28, %eax
jne 0x10e31
movq %r12, 0x28(%rsp)
movq %r12, %rdi
movq %r14, 0x10(%rsp)
movq %r14, %rsi
movq %r13, %rdx
callq 0x10a4c
movq %r15, %rdi
callq 0x131da
testb %al, %al
je 0x10e00
movq 0x10(%rsp), %rcx
leaq 0x30(%rsp), %r14
leaq 0x10(%rcx), %rax
addq $0x28, %rcx
movq %rax, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r15, %rdi
callq 0x13204
movq 0x28(%r13), %rdx
movl %eax, %r12d
movl $0x0, %ebp
movl $0x0, %eax
leaq 0x10(%rdx), %rcx
cmpq $0x2, %rdx
cmovaeq %rcx, %rbp
jb 0x10c96
movzwl 0x6(%rdx), %eax
leaq (%rax,%rax,2), %rax
shll $0x4, %eax
addq %rax, %rcx
movq %rcx, %rax
cmpq %rax, %rbp
je 0x10cb5
movl %r12d, %ecx
shrl $0x8, %ecx
cmpb %r12b, 0x24(%rbp)
jne 0x10cac
cmpb %cl, 0x25(%rbp)
je 0x10cb7
addq $0x30, %rbp
cmpq %rax, %rbp
jne 0x10ca1
xorl %ebp, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x13352
movq %rbp, %rdi
movq %r14, %rsi
callq 0xcd94
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x10ce1
callq 0x52e0
movq (%r15), %rdi
callq 0x2d6bb
movq (%r15), %rdi
movl $0x29, %esi
callq 0x2d71b
testb %al, %al
jne 0x10df0
movq 0x10(%rsp), %r14
movq 0x20(%rsp), %rsi
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movzwl 0x8(%r14), %eax
movw %ax, 0x58(%rsp)
movq (%r14), %rax
movq %rax, 0x50(%rsp)
callq 0xb44a
movq 0x18(%rsp), %rax
vmovups (%rax), %xmm0
vmovups %xmm0, 0x18(%rbx)
vmovups 0x38(%r14), %xmm0
movq 0x40(%r14), %rax
vmovups %xmm0, 0x88(%rsp)
testq %rax, %rax
je 0x10d62
movq 0x38274(%rip), %rcx     # 0x48fc8
cmpb $0x0, (%rcx)
je 0x10d5e
incl 0x8(%rax)
jmp 0x10d62
lock
incl 0x8(%rax)
movsbl 0x50(%rsp), %edx
movsbl %r12b, %ecx
movswl %r12w, %eax
movw %r12w, 0xc(%rsp)
sarl $0x8, %eax
imull %ecx, %edx
addl %edx, %eax
movw %ax, 0xe(%rsp)
leaq 0x50(%rsp), %rbx
leaq 0xc(%rsp), %rsi
movl $0x1, %edx
movl $0x1, %ecx
movq %rbx, %rdi
callq 0x1388c
movq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x10be4
movq (%r15), %rdi
callq 0x2d6bb
movq (%r15), %rdi
movl $0x29, %esi
callq 0x2d71b
testb %al, %al
je 0x10e12
movq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %r14
testq %rdi, %rdi
je 0x10de1
callq 0xb272
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x10df0
callq 0x52e0
movq %r15, %rdi
callq 0x131da
testb %al, %al
jne 0x10c5e
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21950(%rip), %rdi     # 0x32769
leaq 0x217a7(%rip), %rsi     # 0x325c7
leaq 0x218f3(%rip), %rcx     # 0x3271a
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x51d0
leaq 0x218cf(%rip), %rdi     # 0x32707
leaq 0x21788(%rip), %rsi     # 0x325c7
leaq 0x218d4(%rip), %rcx     # 0x3271a
movl $0x196, %edx            # imm = 0x196
callq 0x51d0
movq 0x30(%rsp), %rdi
movq %rax, %rbx
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x10e76
callq 0x52e0
jmp 0x10e76
leaq 0x50(%rsp), %rdi
movq %rax, %rbx
callq 0x9d96
movq %rbx, %rdi
callq 0x5670