// File: /workspace/github_cpp_makefile_star2_O1/antoniogarro[P]Hara/tree.cpp
// Function: Tree::print() const
void Tree::print() const
{
  int threshold = root[active]->get_visits()/30;
  std::string sp = "  ";
  std::cerr << "Active tree: " << active << " " << get_size() <<" nodes.\n";
  print(root[active], threshold, 0);

  Node *best = get_best();
  std::cerr << "#Expected: " << best->get_value(1) << ", visits "
            << best->get_visits() << " PV:\n";

  bool side = !goban->get_side();
  for (Node *n = root[active]->get_best_child(); n; n = n->get_best_child()) {
      side ? std::cerr << "B" :  std::cerr << "W";
      n->print(goban->get_size());
      side = !side;
  }
  std::cerr << "\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0x1c(%rdi), %rax
movq (%rdi,%rax,8), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, (%rsp)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xae5(%rip), %rsi       # 0xb494
leaq 0xae0(%rip), %rdx       # 0xb496
leaq 0x8(%rsp), %rdi
callq 0x71d4
movq 0x5629(%rip), %rdi      # 0xfff0
leaq 0xe4e(%rip), %rsi       # 0xb81c
movl $0xd, %edx
callq 0x31f0
movl 0x1c(%rbx), %esi
movq 0x560e(%rip), %rdi      # 0xfff0
callq 0x32f0
movq %rax, %r14
leaq 0xaa4(%rip), %rsi       # 0xb495
movl $0x1, %edx
movq %rax, %rdi
callq 0x31f0
movslq 0x1c(%rbx), %rax
movl 0x10(%rbx,%rax,4), %esi
movq %r14, %rdi
callq 0x32f0
leaq 0xe15(%rip), %rsi       # 0xb82a
movl $0x8, %edx
movq %rax, %rdi
callq 0x31f0
movsd (%rsp), %xmm0
divsd 0xdb1(%rip), %xmm0      # 0xb7e0
cvttsd2si %xmm0, %edx
movslq 0x1c(%rbx), %rax
movq (%rbx,%rax,8), %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xa848
movslq 0x1c(%rbx), %rax
movq (%rbx,%rax,8), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0xaa82
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movsd 0x8(%rax), %xmm1
addsd 0x18(%rax), %xmm1
ucomisd %xmm0, %xmm1
cmovaq %rax, %r14
maxsd %xmm0, %xmm1
movq 0x40(%rax), %rax
movapd %xmm1, %xmm0
testq %rax, %rax
jne 0xaa5d
jmp 0xaa85
xorl %r14d, %r14d
movq 0x5564(%rip), %rdi      # 0xfff0
leaq 0xda0(%rip), %rsi       # 0xb833
movl $0xb, %edx
callq 0x31f0
movsd 0x57b(%rip), %xmm0      # 0xb020
movq %r14, %rdi
callq 0x9ebe
movq 0x553c(%rip), %rdi      # 0xfff0
callq 0x32a0
movq %rax, %r15
leaq 0xd7c(%rip), %rsi       # 0xb83f
movl $0x9, %edx
movq %rax, %rdi
callq 0x31f0
movsd 0x8(%r14), %xmm0
movq %r15, %rdi
callq 0x32a0
leaq 0xd64(%rip), %rsi       # 0xb849
movl $0x5, %edx
movq %rax, %rdi
callq 0x31f0
movslq 0x1c(%rbx), %rax
movq (%rbx,%rax,8), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0xab2f
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movsd 0x8(%rax), %xmm1
addsd 0x18(%rax), %xmm1
ucomisd %xmm0, %xmm1
cmovaq %rax, %r14
maxsd %xmm0, %xmm1
movq 0x40(%rax), %rax
movapd %xmm1, %xmm0
testq %rax, %rax
jne 0xab0a
jmp 0xab32
xorl %r14d, %r14d
testq %r14, %r14
je 0xabbf
movq 0x20(%rbx), %rax
movb (%rax), %bpl
leaq 0xd08(%rip), %r13       # 0xb851
leaq 0xcff(%rip), %r12       # 0xb84f
movq 0x5499(%rip), %r15      # 0xfff0
testb $0x1, %bpl
movq %r12, %rsi
cmovneq %r13, %rsi
movl $0x1, %edx
movq %r15, %rdi
callq 0x31f0
movq 0x20(%rbx), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0xa02e
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xabb3
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movsd 0x8(%rax), %xmm1
addsd 0x18(%rax), %xmm1
ucomisd %xmm0, %xmm1
cmovaq %rax, %r14
maxsd %xmm0, %xmm1
movq 0x40(%rax), %rax
movapd %xmm1, %xmm0
testq %rax, %rax
jne 0xab8e
jmp 0xabb6
xorl %r14d, %r14d
xorb $0x1, %bpl
testq %r14, %r14
jne 0xab57
movq 0x542a(%rip), %rdi      # 0xfff0
leaq 0xa57(%rip), %rsi       # 0xb624
movl $0x1, %edx
callq 0x31f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xabf3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xac08
jmp 0xac08
jmp 0xac08
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xac27
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3300
nop