// File: kobanium[P]Ray/src/common/Message.cpp
// Function: PrintBoard(game_info_t const*)
void
PrintBoard( const game_info_t *game )
{
  const char stone[S_MAX] = { '+', 'B', 'W', '#' };
  std::ostringstream oss;

  if (!debug_message) return;

  oss << "Prisoner(Black) : " << game->prisoner[S_BLACK] << "\n";
  oss << "Prisoner(White) : " << game->prisoner[S_WHITE] << "\n";
  oss << "Move : " << game->moves << "\n";

  oss << "    ";
  for (int i = 1, y = board_start; y <= board_end; y++, i++) {
    oss << " " << gogui_x[i];
  }
  oss << "\n";

  oss << "   +";
  for (int i = 0; i < pure_board_size * 2 + 1; i++) {
    oss << "-";
  }
  oss << "+" << "\n";

  for (int i = 1, y = board_start; y <= board_end; y++, i++) {
    oss << std::setw(2) << (pure_board_size + 1 - i) << ":|";
    for (int x = board_start; x <= board_end; x++) {
      oss << " " << stone[static_cast<int>(game->board[POS(x, y)])];
    }
    oss << " |" << "\n";
  }

  oss << "   +";
  for (int i = 1; i <= pure_board_size * 2 + 1; i++) {
    oss << "-";
  }
  oss << "+";

  std::cerr << oss.str() << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x8(%rbp)
movl 0x8bbff(%rip), %eax     # 0xac044
movl %eax, -0xc(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x7750
testb $0x1, 0xc7125(%rip)     # 0xe7580
jne 0x2046c
movl $0x1, -0x18c(%rbp)
jmp 0x2090b
leaq 0x8bbd7(%rip), %rsi     # 0xac04a
leaq -0x188(%rbp), %rdi
callq 0x7530
movq %rax, -0x1e8(%rbp)
jmp 0x20488
movq -0x1e8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x43b8(%rax), %esi
callq 0x7980
movq %rax, -0x1f0(%rbp)
jmp 0x204a7
movq -0x1f0(%rbp), %rdi
leaq 0x8f250(%rip), %rsi     # 0xaf705
callq 0x7530
jmp 0x204bc
leaq 0x8bb9a(%rip), %rsi     # 0xac05d
leaq -0x188(%rbp), %rdi
callq 0x7530
movq %rax, -0x1f8(%rbp)
jmp 0x204d8
movq -0x1f8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x43bc(%rax), %esi
callq 0x7980
movq %rax, -0x200(%rbp)
jmp 0x204f7
movq -0x200(%rbp), %rdi
leaq 0x8f200(%rip), %rsi     # 0xaf705
callq 0x7530
jmp 0x2050c
leaq 0x8bb5d(%rip), %rsi     # 0xac070
leaq -0x188(%rbp), %rdi
callq 0x7530
movq %rax, -0x208(%rbp)
jmp 0x20528
movq -0x208(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x43b0(%rax), %esi
callq 0x7980
movq %rax, -0x210(%rbp)
jmp 0x20547
movq -0x210(%rbp), %rdi
leaq 0x8f1b0(%rip), %rsi     # 0xaf705
callq 0x7530
jmp 0x2055c
leaq 0x8bee0(%rip), %rsi     # 0xac443
leaq -0x188(%rbp), %rdi
callq 0x7530
jmp 0x20571
movl $0x1, -0x1a0(%rbp)
leaq 0xc74ce(%rip), %rax     # 0xe7a50
movl (%rax), %eax
movl %eax, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
leaq 0xc74bd(%rip), %rcx     # 0xe7a54
cmpl (%rcx), %eax
jg 0x20610
leaq 0x8bea4(%rip), %rsi     # 0xac446
leaq -0x188(%rbp), %rdi
callq 0x7530
movq %rax, -0x218(%rbp)
jmp 0x205b7
movq -0x218(%rbp), %rdi
movslq -0x1a0(%rbp), %rax
leaq 0x8bdd4(%rip), %rcx     # 0xac3a0
movsbl (%rax,%rcx), %esi
callq 0x7660
jmp 0x205d7
jmp 0x205d9
movl -0x1a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a4(%rbp)
movl -0x1a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a0(%rbp)
jmp 0x2058a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0x2093e
leaq 0x8f0ee(%rip), %rsi     # 0xaf705
leaq -0x188(%rbp), %rdi
callq 0x7530
jmp 0x20625
leaq 0x8ba4c(%rip), %rsi     # 0xac078
leaq -0x188(%rbp), %rdi
callq 0x7530
jmp 0x2063a
movl $0x0, -0x1a8(%rbp)
movl -0x1a8(%rbp), %eax
leaq 0xc73f3(%rip), %rcx     # 0xe7a44
movl (%rcx), %ecx
shll %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x20684
leaq 0x8ba98(%rip), %rsi     # 0xac0fb
leaq -0x188(%rbp), %rdi
callq 0x7530
jmp 0x20671
jmp 0x20673
movl -0x1a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a8(%rbp)
jmp 0x20644
leaq 0x8b9f0(%rip), %rsi     # 0xac07b
leaq -0x188(%rbp), %rdi
callq 0x7530
movq %rax, -0x220(%rbp)
jmp 0x206a0
movq -0x220(%rbp), %rdi
leaq 0x8f057(%rip), %rsi     # 0xaf705
callq 0x7530
jmp 0x206b5
movl $0x1, -0x1ac(%rbp)
leaq 0xc738a(%rip), %rax     # 0xe7a50
movl (%rax), %eax
movl %eax, -0x1b0(%rbp)
movl -0x1b0(%rbp), %eax
leaq 0xc7379(%rip), %rcx     # 0xe7a54
cmpl (%rcx), %eax
jg 0x2083b
movl $0x2, %edi
callq 0x25760
movl %eax, -0x224(%rbp)
jmp 0x206f5
movl -0x224(%rbp), %eax
movl %eax, -0x1b4(%rbp)
movl -0x1b4(%rbp), %esi
leaq -0x188(%rbp), %rdi
callq 0x7640
movq %rax, -0x230(%rbp)
jmp 0x2071c
movq -0x230(%rbp), %rdi
leaq 0xc731a(%rip), %rax     # 0xe7a44
movl (%rax), %esi
movl -0x1ac(%rbp), %eax
subl %eax, %esi
incl %esi
callq 0x7980
movq %rax, -0x238(%rbp)
jmp 0x20744
movq -0x238(%rbp), %rdi
leaq 0x8b92b(%rip), %rsi     # 0xac07d
callq 0x7530
jmp 0x20759
leaq 0xc72f0(%rip), %rax     # 0xe7a50
movl (%rax), %eax
movl %eax, -0x1b8(%rbp)
movl -0x1b8(%rbp), %eax
leaq 0xc72df(%rip), %rcx     # 0xe7a54
cmpl (%rcx), %eax
jg 0x207e5
leaq 0x8bcc6(%rip), %rsi     # 0xac446
leaq -0x188(%rbp), %rdi
callq 0x7530
movq %rax, -0x240(%rbp)
jmp 0x20795
movq -0x240(%rbp), %rdi
movq -0x8(%rbp), %rax
movl -0x1b8(%rbp), %ecx
movl -0x1b0(%rbp), %edx
leaq 0xc7299(%rip), %rsi     # 0xe7a4c
movl (%rsi), %esi
imull %esi, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movsbq 0x43f8(%rax,%rcx), %rax
movsbl -0xc(%rbp,%rax), %esi
callq 0x7660
jmp 0x207d2
jmp 0x207d4
movl -0x1b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b8(%rbp)
jmp 0x20768
leaq 0x8b894(%rip), %rsi     # 0xac080
leaq -0x188(%rbp), %rdi
callq 0x7530
movq %rax, -0x248(%rbp)
jmp 0x20801
movq -0x248(%rbp), %rdi
leaq 0x8eef6(%rip), %rsi     # 0xaf705
callq 0x7530
jmp 0x20816
jmp 0x20818
movl -0x1b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b0(%rbp)
movl -0x1ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ac(%rbp)
jmp 0x206ce
leaq 0x8b836(%rip), %rsi     # 0xac078
leaq -0x188(%rbp), %rdi
callq 0x7530
jmp 0x20850
movl $0x1, -0x1bc(%rbp)
movl -0x1bc(%rbp), %eax
leaq 0xc71dd(%rip), %rcx     # 0xe7a44
movl (%rcx), %ecx
shll %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x2089a
leaq 0x8b882(%rip), %rsi     # 0xac0fb
leaq -0x188(%rbp), %rdi
callq 0x7530
jmp 0x20887
jmp 0x20889
movl -0x1bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1bc(%rbp)
jmp 0x2085a
leaq 0x8b7da(%rip), %rsi     # 0xac07b
leaq -0x188(%rbp), %rdi
callq 0x7530
jmp 0x208af
leaq -0x1e0(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x7580
jmp 0x208c4
movq 0xc6725(%rip), %rdi     # 0xe6ff0
leaq -0x1e0(%rbp), %rsi
callq 0x7480
movq %rax, -0x250(%rbp)
jmp 0x208e0
movq -0x250(%rbp), %rdi
movq 0xc667a(%rip), %rsi     # 0xe6f68
callq 0x75b0
jmp 0x208f5
leaq -0x1e0(%rbp), %rdi
callq 0x7ae8
movl $0x0, -0x18c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x7110
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x7ae8
leaq -0x188(%rbp), %rdi
callq 0x7110
movq -0x198(%rbp), %rdi
callq 0x79b0
nopw %cs:(%rax,%rax)