// File: /workspace/github_cpp_makefile_star2_O3/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 0xe9f(%rip), %rsi       # 0xb4f4
leaq 0xe9a(%rip), %rdx       # 0xb4f6
leaq 0x8(%rsp), %rdi
callq 0x7138
movq 0x5983(%rip), %rdi      # 0xfff0
leaq 0x1220(%rip), %rsi      # 0xb894
movl $0xd, %edx
callq 0x31f0
movl 0x1c(%rbx), %esi
movq 0x5968(%rip), %rdi      # 0xfff0
callq 0x32f0
movq %rax, %r14
leaq 0xe5e(%rip), %rsi       # 0xb4f5
movl $0x1, %edx
movq %rax, %rdi
callq 0x31f0
movslq 0x1c(%rbx), %rax
movl 0x10(%rbx,%rax,4), %esi
movq %r14, %rdi
callq 0x32f0
leaq 0x11e7(%rip), %rsi      # 0xb8a2
movl $0x8, %edx
movq %rax, %rdi
callq 0x31f0
movsd (%rsp), %xmm0
divsd 0x1183(%rip), %xmm0     # 0xb858
cvttsd2si %xmm0, %edx
movslq 0x1c(%rbx), %rax
movq (%rbx,%rax,8), %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xa4e8
movslq 0x1c(%rbx), %rax
movq (%rbx,%rax,8), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0xa728
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 0xa703
jmp 0xa72b
xorl %r14d, %r14d
movq 0x58be(%rip), %rdi      # 0xfff0
leaq 0x1172(%rip), %rsi      # 0xb8ab
movl $0xb, %edx
callq 0x31f0
movsd 0x8d5(%rip), %xmm0      # 0xb020
movq %r14, %rdi
callq 0x9bbe
movq 0x5896(%rip), %rdi      # 0xfff0
callq 0x32a0
movq %rax, %r15
leaq 0x114e(%rip), %rsi      # 0xb8b7
movl $0x9, %edx
movq %rax, %rdi
callq 0x31f0
movsd 0x8(%r14), %xmm0
movq %r15, %rdi
callq 0x32a0
leaq 0x1136(%rip), %rsi      # 0xb8c1
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 0xa85b
movq 0x20(%rbx), %rcx
movb (%rcx), %bpl
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 0xa7bb
testq %r14, %r14
je 0xa85b
leaq 0x10df(%rip), %r13      # 0xb8c9
leaq 0x10d6(%rip), %r12      # 0xb8c7
movq 0x57f8(%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 0x9d3a
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xa85b
xorb $0x1, %bpl
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 0xa833
testq %r14, %r14
jne 0xa7f8
movq 0x578e(%rip), %rdi      # 0xfff0
leaq 0xe1b(%rip), %rsi       # 0xb684
movl $0x1, %edx
callq 0x31f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa88f
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 0xa8a4
jmp 0xa8a4
jmp 0xa8a4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa8c3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3300
nop