// File: /workspace/github_cpp_makefile_star2_O1/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 %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rsi), %rdi
callq 0x2d7a7
movq (%r15), %rdi
callq 0x5110
cmpl $0x28, %eax
jne 0x10c8e
movq %r12, 0x28(%rsp)
movq %r12, %rdi
movq %r14, 0x10(%rsp)
movq %r14, %rsi
movq %r13, %rdx
callq 0x1089c
movq %r15, %rdi
callq 0x130d4
testb %al, %al
je 0x10c5d
movq 0x10(%rsp), %rcx
leaq 0x10(%rcx), %rax
movq %rax, 0x20(%rsp)
leaq 0x28(%rcx), %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %r14
movq %r15, %rdi
callq 0x130fe
movl %eax, %ebp
movq 0x28(%r13), %rsi
leaq 0x10(%rsi), %rdx
movl $0x0, %eax
movl $0x0, %ecx
cmpq $0x2, %rsi
cmovaeq %rdx, %rax
jb 0x10ae9
movzwl 0x6(%rsi), %ecx
leaq (%rcx,%rcx,2), %rcx
shll $0x4, %ecx
addq %rcx, %rdx
movq %rdx, %rcx
cmpq %rcx, %rax
je 0x10b13
movl %ebp, %edx
shrl $0x8, %edx
movb 0x24(%rax), %sil
xorb %bpl, %sil
movb 0x25(%rax), %dil
xorb %dl, %dil
orb %sil, %dil
cmoveq %rax, %r12
je 0x10b16
addq $0x30, %rax
cmpq %rcx, %rax
jne 0x10af3
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rsi
callq 0x1324c
movq %r12, %rdi
movq %r14, %rsi
callq 0xcca4
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x10b40
callq 0x52e0
movq (%r15), %rdi
callq 0x2d7a7
movq (%r15), %rdi
movl $0x29, %esi
callq 0x2d807
testb %al, %al
jne 0x10c4d
movq 0x10(%rsp), %r14
movzwl 0x8(%r14), %eax
movw %ax, 0x58(%rsp)
movq (%r14), %rax
movq %rax, 0x50(%rsp)
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
callq 0xb34a
movq 0x18(%rsp), %rax
vmovups (%rax), %xmm0
vmovups %xmm0, 0x18(%rbx)
movq 0x40(%r14), %rax
vmovups 0x38(%r14), %xmm0
vmovups %xmm0, 0x88(%rsp)
testq %rax, %rax
je 0x10bc1
movq 0x39415(%rip), %rcx     # 0x49fc8
cmpb $0x0, (%rcx)
je 0x10bbd
incl 0x8(%rax)
jmp 0x10bc1
lock
incl 0x8(%rax)
movswl %bp, %eax
movsbl %bpl, %ecx
movsbl 0x50(%rsp), %edx
imull %ecx, %edx
sarl $0x8, %eax
addl %edx, %eax
movw %bp, 0xc(%rsp)
movw %ax, 0xe(%rsp)
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
leaq 0xc(%rsp), %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x13778
movq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x10a38
movq (%r15), %rdi
callq 0x2d7a7
movq (%r15), %rdi
movl $0x29, %esi
callq 0x2d807
testb %al, %al
je 0x10c6f
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
leaq 0x30(%rsp), %r14
je 0x10c3e
callq 0xb170
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x10c4d
callq 0x52e0
movq %r15, %rdi
callq 0x130d4
testb %al, %al
jne 0x10ab2
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21af3(%rip), %rdi     # 0x32769
leaq 0x2194a(%rip), %rsi     # 0x325c7
leaq 0x21a96(%rip), %rcx     # 0x3271a
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x51d0
leaq 0x21a72(%rip), %rdi     # 0x32707
leaq 0x2192b(%rip), %rsi     # 0x325c7
leaq 0x21a77(%rip), %rcx     # 0x3271a
movl $0x196, %edx            # imm = 0x196
callq 0x51d0
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x10cd3
callq 0x52e0
jmp 0x10cd3
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x9ce0
movq %rbx, %rdi
callq 0x5670
nop