// File: /workspace/github_cpp_makefile_star2_O3/ATOMIC-LICHESS[P]ATOMKRAFT/position.cpp
// Function: Position::print(Move) const
void Position::print(Move move) const {

  const char* dottedLine = "\n+---+---+---+---+---+---+---+---+\n";

  if (move)
  {
      Position p(*this, thread());
      string dd = (color_of_piece_on(move_from(move)) == BLACK ? ".." : "");
      cout << "\nMove is: " << dd << move_to_san(p, move);
  }

  for (Rank rank = RANK_8; rank >= RANK_1; rank--)
  {
      cout << dottedLine << '|';
      for (File file = FILE_A; file <= FILE_H; file++)
      {
          Square sq = make_square(file, rank);
          Piece piece = piece_on(sq);

          if (piece == PIECE_NONE && square_color(sq) == DARK)
              piece = PIECE_NONE_DARK_SQ;

          char c = (color_of_piece_on(sq) == BLACK ? '=' : ' ');
          cout << c << pieceLetters.from_piece(piece) << c << '|';
      }
  }
  cout << dottedLine << "Fen is: " << to_fen() << "\nKey is: " << st->key << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1998, %rsp           # imm = 0x1998
movq %rdi, (%rsp)
testl %esi, %esi
je 0x1e137
movl %esi, %ebp
movq (%rsp), %r15
movl 0x192c(%r15), %ebx
leaq 0x58(%rsp), %r14
movl $0x1940, %edx           # imm = 0x1940
movq %r14, %rdi
movq %r15, %rsi
callq 0x5320
movq 0x1938(%r14), %rsi
leaq 0x18d0(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
callq 0x5320
movq %r14, 0xc0(%r14)
xorl %eax, %eax
movq %rax, 0x98(%r14)
movl %ebx, 0xb4(%r14)
movq %rax, 0xb8(%r14)
movl %ebp, %eax
shrl $0x4, %eax
andl $0xfc, %eax
movl (%r15,%rax), %eax
andl $-0x8, %eax
xorl %ecx, %ecx
cmpl $0x8, %eax
leaq 0x151f6(%rip), %rax     # 0x33282
leaq 0x112d1(%rip), %rsi     # 0x2f364
cmoveq %rax, %rsi
sete %cl
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq (%rsi,%rcx,2), %rdx
leaq 0x18(%rsp), %rdi
callq 0xad16
movq 0x1eee8(%rip), %rdi     # 0x3cfa0
leaq 0x151c6(%rip), %rsi     # 0x33285
movl $0xa, %edx
callq 0x5460
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x1eec6(%rip), %rdi     # 0x3cfa0
callq 0x5460
movq %rax, %r14
leaq 0x38(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl %ebp, %edx
callq 0x17df0
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %r14, %rdi
callq 0x5460
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e120
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e137
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5400
movl $0x7, %r15d
leaq 0x58(%rsp), %r13
leaq 0x39e1a7(%rip), %rbx    # 0x3bc2f0
movl $0x23, %edx
movq 0x1ee4b(%rip), %r14     # 0x3cfa0
movq %r14, %rdi
leaq 0x150ff(%rip), %rsi     # 0x3325e
callq 0x5460
movb $0x7c, 0x58(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x5460
leaq (,%r15,8), %rax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
movq %r15, 0x10(%rsp)
movq 0x8(%rsp), %rax
addq %r14, %rax
movq (%rsp), %rcx
movl (%rcx,%rax,4), %eax
addl %r14d, %r15d
shll $0x4, %r15d
andl $0x10, %r15d
cmpl $0x10, %eax
cmovnel %eax, %r15d
andl $-0x8, %eax
cmpl $0x8, %eax
movl $0x20, %ebp
movl $0x3d, %eax
cmovel %eax, %ebp
movb %bpl, 0x58(%rsp)
movl $0x1, %edx
movq 0x1edcd(%rip), %rdi     # 0x3cfa0
movq %r13, %r12
movq %r13, %rsi
callq 0x5460
movq %rax, %r13
movq 0x39e118(%rip), %rax    # 0x3bc300
cmpq %rbx, %rax
je 0x1e1fd
cmpl %r15d, 0x24(%rax)
je 0x1e201
movq %rax, %rdi
callq 0x5470
jmp 0x1e1e8
xorl %eax, %eax
jmp 0x1e204
movb 0x20(%rax), %al
movb %al, 0x58(%rsp)
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %r13
movq %r12, %rsi
callq 0x5460
movb %bpl, 0x58(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x5460
movb $0x7c, 0x58(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x5460
incq %r14
cmpq $0x8, %r14
movq 0x10(%rsp), %r15
jne 0x1e18e
subq $0x1, %r15
jae 0x1e149
movq 0x1ed38(%rip), %r14     # 0x3cfa0
leaq 0x14fef(%rip), %rsi     # 0x3325e
movl $0x23, %edx
movq %r14, %rdi
callq 0x5460
leaq 0x1500d(%rip), %rsi     # 0x33290
movl $0x8, %edx
movq %r14, %rdi
callq 0x5460
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x1dc94
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x5460
movq %rax, %r14
leaq 0x14fdf(%rip), %rsi     # 0x33299
movl $0x9, %edx
movq %rax, %rdi
callq 0x5460
movq (%rsp), %rax
movq 0x1938(%rax), %rax
movq 0x38(%rax), %rsi
movq %r14, %rdi
callq 0x5260
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e323
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5400
addq $0x1998, %rsp           # imm = 0x1998
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e35f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x1e35f
jmp 0x1e35c
movq %rax, %rbx
jmp 0x1e38e
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e38e
movq 0x28(%rsp), %rsi
jmp 0x1e386
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e38e
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5400
movq %rbx, %rdi
callq 0x5790