// File: kobanium[P]Ray/src/common/Message.cpp
// Function: PrintString(game_info_t const*)
void
PrintString( const game_info_t *game )
{
  const string_t *string = game->string;
  int pos, neighbor;

  if (!debug_message) return;

  std::cerr << "  :: :: String :: ::" << std::endl;

  for (int i = 0; i < MAX_STRING; i++){
    if (string[i].flag) {
      if (game->board[string[i].origin] == S_BLACK) {
        std::cerr << "Black String   ";
      } else {
        std::cerr << "White String   ";
      }
      std::cerr << "ID : " << i << " (libs : " << string[i].libs << ", size : " << string[i].size << ")" << std::endl;
      pos = string[i].lib[0];

      std::cerr << "  Liberty : " << std::endl;
      std::cerr << "  ";
      while (pos != STRING_END) {
        std::cerr << GOGUI_X(pos) << GOGUI_Y(pos) << " ";
        pos = string[i].lib[pos];
      }
      std::cerr << std::endl;

      pos = string[i].origin;
      std::cerr << "  Stone : " << std::endl;
      std::cerr << "    ";
      while (pos != STRING_END) {
        std::cerr << GOGUI_X(pos) << GOGUI_Y(pos) << " ";
        pos = game->string_next[pos];
        if (pos == game->string_next[pos]) getchar();
      }
      std::cerr << std::endl;

      neighbor = string[i].neighbor[0];
      if (neighbor == 0) getchar();
      std::cerr << "  Neighbor : " << std::endl;
      std::cerr << "    ";
      while (neighbor < NEIGHBOR_END) {
        std::cerr << neighbor << " ";
        neighbor = string[i].neighbor[neighbor];
      }
      std::cerr << std::endl;
    }
  }

  std::cerr << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x9620, %rax           # imm = 0x9620
movq %rax, -0x10(%rbp)
testb $0x1, 0xc6bff(%rip)     # 0xe7580
jne 0x20988
jmp 0x20da1
movq 0xc6661(%rip), %rdi     # 0xe6ff0
leaq 0x8b6ed(%rip), %rsi     # 0xac083
callq 0x7530
movq %rax, %rdi
movq 0xc65c3(%rip), %rsi     # 0xe6f68
callq 0x75b0
movl $0x0, -0x1c(%rbp)
cmpl $0x120, -0x1c(%rbp)     # imm = 0x120
jge 0x20d8e
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
testb $0x1, 0x7c4(%rax)
je 0x20d7e
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
imulq $0x7c8, %rdx, %rdx      # imm = 0x7C8
addq %rdx, %rcx
movslq 0x7bc(%rcx), %rcx
movsbl 0x43f8(%rax,%rcx), %eax
cmpl $0x1, %eax
jne 0x20a1c
movq 0xc65e2(%rip), %rdi     # 0xe6ff0
leaq 0x8b683(%rip), %rsi     # 0xac098
callq 0x7530
jmp 0x20a2f
movq 0xc65cd(%rip), %rdi     # 0xe6ff0
leaq 0x8b67e(%rip), %rsi     # 0xac0a8
callq 0x7530
movq 0xc65ba(%rip), %rdi     # 0xe6ff0
leaq 0x8b67b(%rip), %rsi     # 0xac0b8
callq 0x7530
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x7980
movq %rax, %rdi
leaq 0x8b667(%rip), %rsi     # 0xac0be
callq 0x7530
movq %rax, %rdi
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movl 0x4(%rax), %esi
callq 0x7980
movq %rax, %rdi
leaq 0x8b645(%rip), %rsi     # 0xac0c8
callq 0x7530
movq %rax, %rdi
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movl 0x7c0(%rax), %esi
callq 0x7980
movq %rax, %rdi
leaq 0x8cef4(%rip), %rsi     # 0xad9a6
callq 0x7530
movq %rax, %rdi
movq 0xc64a7(%rip), %rsi     # 0xe6f68
callq 0x75b0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movswl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
movq 0xc650a(%rip), %rdi     # 0xe6ff0
leaq 0x8b5e5(%rip), %rsi     # 0xac0d2
callq 0x7530
movq %rax, %rdi
movq 0xc646c(%rip), %rsi     # 0xe6f68
callq 0x75b0
movq 0xc64e8(%rip), %rdi     # 0xe6ff0
leaq 0x8b936(%rip), %rsi     # 0xac445
callq 0x7530
cmpl $0x2b7, -0x14(%rbp)     # imm = 0x2B7
je 0x20bab
movl -0x14(%rbp), %eax
leaq 0xc6f21(%rip), %rcx     # 0xe7a4c
cltd
idivl (%rcx)
movl %edx, %eax
subl $0x5, %eax
addl $0x1, %eax
movslq %eax, %rcx
movq 0xc64b0(%rip), %rdi     # 0xe6ff0
leaq 0x8b859(%rip), %rax     # 0xac3a0
movsbl (%rax,%rcx), %esi
callq 0x7660
movq %rax, %rdi
leaq 0xc6eea(%rip), %rax     # 0xe7a44
movl (%rax), %esi
addl $0x1, %esi
movl -0x14(%rbp), %eax
leaq 0xc6ee3(%rip), %rcx     # 0xe7a4c
cltd
idivl (%rcx)
subl $0x5, %eax
addl $0x1, %eax
subl %eax, %esi
callq 0x7980
movq %rax, %rdi
leaq 0x8b8c3(%rip), %rsi     # 0xac446
callq 0x7530
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movswl 0x8(%rax,%rcx,2), %eax
movl %eax, -0x14(%rbp)
jmp 0x20b14
movq 0xc643e(%rip), %rdi     # 0xe6ff0
movq 0xc63af(%rip), %rsi     # 0xe6f68
callq 0x75b0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x14(%rbp)
movq 0xc6410(%rip), %rdi     # 0xe6ff0
leaq 0x8b4f8(%rip), %rsi     # 0xac0df
callq 0x7530
movq %rax, %rdi
movq 0xc6372(%rip), %rsi     # 0xe6f68
callq 0x75b0
movq 0xc63ee(%rip), %rdi     # 0xe6ff0
leaq 0x8b83a(%rip), %rsi     # 0xac443
callq 0x7530
cmpl $0x2b7, -0x14(%rbp)     # imm = 0x2B7
je 0x20cb2
movl -0x14(%rbp), %eax
leaq 0xc6e27(%rip), %rcx     # 0xe7a4c
cltd
idivl (%rcx)
movl %edx, %eax
subl $0x5, %eax
addl $0x1, %eax
movslq %eax, %rcx
movq 0xc63b6(%rip), %rdi     # 0xe6ff0
leaq 0x8b75f(%rip), %rax     # 0xac3a0
movsbl (%rax,%rcx), %esi
callq 0x7660
movq %rax, %rdi
leaq 0xc6df0(%rip), %rax     # 0xe7a44
movl (%rax), %esi
addl $0x1, %esi
movl -0x14(%rbp), %eax
leaq 0xc6de9(%rip), %rcx     # 0xe7a4c
cltd
idivl (%rcx)
subl $0x5, %eax
addl $0x1, %eax
subl %eax, %esi
callq 0x7980
movq %rax, %rdi
leaq 0x8b7c9(%rip), %rsi     # 0xac446
callq 0x7530
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x96200(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movslq -0x14(%rbp), %rdx
cmpl 0x96200(%rcx,%rdx,4), %eax
jne 0x20cad
callq 0x7790
jmp 0x20c0e
movq 0xc6337(%rip), %rdi     # 0xe6ff0
movq 0xc62a8(%rip), %rsi     # 0xe6f68
callq 0x75b0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movswl 0x57c(%rax), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x20cec
callq 0x7790
movq 0xc62fd(%rip), %rdi     # 0xe6ff0
leaq 0x8b3f0(%rip), %rsi     # 0xac0ea
callq 0x7530
movq %rax, %rdi
movq 0xc625f(%rip), %rsi     # 0xe6f68
callq 0x75b0
movq 0xc62db(%rip), %rdi     # 0xe6ff0
leaq 0x8b727(%rip), %rsi     # 0xac443
callq 0x7530
cmpl $0x11f, -0x18(%rbp)     # imm = 0x11F
jge 0x20d6b
movl -0x18(%rbp), %esi
movq 0xc62bc(%rip), %rdi     # 0xe6ff0
callq 0x7980
movq %rax, %rdi
leaq 0x8b703(%rip), %rsi     # 0xac446
callq 0x7530
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
movswl 0x57c(%rax,%rcx,2), %eax
movl %eax, -0x18(%rbp)
jmp 0x20d21
movq 0xc627e(%rip), %rdi     # 0xe6ff0
movq 0xc61ef(%rip), %rsi     # 0xe6f68
callq 0x75b0
jmp 0x20d80
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x209b1
movq 0xc625b(%rip), %rdi     # 0xe6ff0
movq 0xc61cc(%rip), %rsi     # 0xe6f68
callq 0x75b0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)