// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, 0x8(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x6560
cmpb $0x1, 0x58355(%rip)     # 0x75430
jne 0x1d4ab
leaq 0x3ff62(%rip), %rsi     # 0x5d04a
leaq 0x40(%rsp), %rdi
movl $0x12, %edx
callq 0x64a0
movq 0x8(%rsp), %rax
movl 0x43b8(%rax), %esi
leaq 0x40(%rsp), %rdi
callq 0x6740
leaq 0x43432(%rip), %rsi     # 0x60545
movl $0x1, %edx
movq %rax, %rdi
callq 0x64a0
leaq 0x3ff36(%rip), %rsi     # 0x5d05d
leaq 0x40(%rsp), %rdi
movl $0x12, %edx
callq 0x64a0
movq 0x8(%rsp), %rax
movl 0x43bc(%rax), %esi
leaq 0x40(%rsp), %rdi
callq 0x6740
leaq 0x433f3(%rip), %rsi     # 0x60545
movl $0x1, %edx
movq %rax, %rdi
callq 0x64a0
leaq 0x3ff0a(%rip), %rsi     # 0x5d070
leaq 0x40(%rsp), %rdi
movl $0x7, %edx
callq 0x64a0
movq 0x8(%rsp), %rax
movl 0x43b0(%rax), %esi
leaq 0x40(%rsp), %rdi
callq 0x6740
leaq 0x433b4(%rip), %rsi     # 0x60545
movl $0x1, %edx
movq %rax, %rdi
callq 0x64a0
leaq 0x40458(%rip), %rsi     # 0x5d5fd
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x64a0
leaq 0x58705(%rip), %rax     # 0x758c0
movl (%rax), %ebp
leaq 0x58700(%rip), %rax     # 0x758c4
cmpl (%rax), %ebp
jg 0x1d21a
decl %ebp
leaq 0x401d0(%rip), %r12     # 0x5d3a1
leaq 0x40428(%rip), %rbx     # 0x5d600
leaq 0x40(%rsp), %r14
leaq 0x20(%rsp), %r15
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x64a0
movb (%r12), %al
movb %al, 0x20(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x64a0
incq %r12
incl %ebp
leaq 0x586ae(%rip), %rax     # 0x758c4
cmpl (%rax), %ebp
jl 0x1d1e2
leaq 0x43324(%rip), %rsi     # 0x60545
leaq 0x40(%rsp), %rdi
movl $0x1, %edx
callq 0x64a0
leaq 0x3fe41(%rip), %rsi     # 0x5d078
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x64a0
leaq 0x58667(%rip), %r15     # 0x758b4
cmpl $0x0, (%r15)
js 0x1d27f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x3fe9c(%rip), %rbx     # 0x5d0fb
leaq 0x40(%rsp), %r14
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x64a0
movl (%r15), %eax
addl %eax, %eax
incl %ebp
cmpl %eax, %ebp
jl 0x1d264
leaq 0x3fdf5(%rip), %rsi     # 0x5d07b
leaq 0x40(%rsp), %rdi
movl $0x1, %edx
callq 0x64a0
leaq 0x432a9(%rip), %rsi     # 0x60545
leaq 0x40(%rsp), %rdi
movl $0x1, %edx
callq 0x64a0
leaq 0x5860e(%rip), %rax     # 0x758c0
movl (%rax), %ecx
leaq 0x58609(%rip), %rax     # 0x758c4
movq %rcx, 0x10(%rsp)
cmpl (%rax), %ecx
jg 0x1d3e6
addq $0x43f8, 0x8(%rsp)      # imm = 0x43F8
movl $0x1, %edi
leaq 0x40(%rsp), %r14
leaq 0x3fd62(%rip), %r13     # 0x5d044
leaq 0x20(%rsp), %rbx
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x50(%rsp,%rax)
movl (%r15), %esi
movl %edi, 0x1c(%rsp)
subl %edi, %esi
incl %esi
movq %r14, %rdi
callq 0x6740
movl $0x2, %edx
movq %rax, %rdi
leaq 0x3fd62(%rip), %rsi     # 0x5d07d
callq 0x64a0
leaq 0x58599(%rip), %rax     # 0x758c0
movslq (%rax), %r15
leaq 0x58593(%rip), %rax     # 0x758c4
cmpl (%rax), %r15d
jg 0x1d395
leal -0x1(%r15), %r12d
addq 0x8(%rsp), %r15
movslq 0x10(%rsp), %rbp
movl $0x1, %edx
movq %r14, %rdi
leaq 0x402ad(%rip), %rsi     # 0x5d600
callq 0x64a0
leaq 0x5855d(%rip), %rax     # 0x758bc
movslq (%rax), %rax
imulq %rbp, %rax
movsbq (%r15,%rax), %rax
movb (%rax,%r13), %al
movb %al, 0x20(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x64a0
incl %r12d
incq %r15
leaq 0x58534(%rip), %rax     # 0x758c4
cmpl (%rax), %r12d
jl 0x1d344
movl $0x2, %edx
movq %r14, %rdi
leaq 0x3fcdc(%rip), %rsi     # 0x5d080
callq 0x64a0
movl $0x1, %edx
movq %r14, %rdi
leaq 0x4318d(%rip), %rsi     # 0x60545
callq 0x64a0
movq 0x10(%rsp), %rdx
leal 0x1(%rdx), %eax
movl 0x1c(%rsp), %edi
incl %edi
leaq 0x584f2(%rip), %rcx     # 0x758c4
cmpl (%rcx), %edx
movq %rax, 0x10(%rsp)
leaq 0x584d4(%rip), %r15     # 0x758b4
jl 0x1d2e7
leaq 0x3fc8b(%rip), %rsi     # 0x5d078
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x64a0
cmpl $0x0, (%r15)
js 0x1d42b
xorl %ebp, %ebp
leaq 0x3fcf0(%rip), %rbx     # 0x5d0fb
leaq 0x40(%rsp), %r14
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x64a0
movl (%r15), %eax
addl %eax, %eax
incl %ebp
cmpl %eax, %ebp
jle 0x1d410
leaq 0x3fc49(%rip), %rsi     # 0x5d07b
leaq 0x40(%rsp), %rdi
movl $0x1, %edx
callq 0x64a0
leaq 0x48(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x6680
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x57b87(%rip), %rdi     # 0x74fe8
callq 0x64a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d4ab
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6420
movq 0x57ae6(%rip), %rsi     # 0x74f98
leaq 0x40(%rsp), %rdi
callq 0x61f0
leaq 0xb0(%rsp), %rdi
callq 0x60f0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1d507
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d50a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6420
jmp 0x1d50a
jmp 0x1d507
jmp 0x1d507
jmp 0x1d507
jmp 0x1d507
jmp 0x1d507
movq %rax, %rbx
movq 0x57a87(%rip), %rsi     # 0x74f98
leaq 0x40(%rsp), %rdi
callq 0x61f0
leaq 0xb0(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x6770