// File: /workspace/github_cpp_makefile_star2_O2/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, %r15
testl %esi, %esi
je 0x18406
movl %esi, %ebp
movl 0x192c(%r15), %ebx
leaq 0x58(%rsp), %r14
movl $0x1940, %edx           # imm = 0x1940
movq %r14, %rdi
movq %r15, %rsi
callq 0x5310
movq 0x1938(%r14), %rsi
leaq 0x18d0(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
callq 0x5310
movq %r14, 0xc0(%r14)
andq $0x0, 0x98(%r14)
movl %ebx, 0xb4(%r14)
andq $0x0, 0xb8(%r14)
movl %ebp, %eax
shrl $0x4, %eax
andl $0xfc, %eax
movl (%r15,%rax), %eax
andl $-0x8, %eax
cmpl $0x8, %eax
leaq 0x11d5b(%rip), %rax     # 0x2a0f2
leaq 0xde96(%rip), %rsi      # 0x26234
cmoveq %rax, %rsi
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x9c42
movq 0x1cbe8(%rip), %rdi     # 0x34fa0
leaq 0x11d36(%rip), %rsi     # 0x2a0f5
callq 0x53b0
leaq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x5340
movq %rax, %r14
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl %ebp, %edx
callq 0x136d4
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x5340
leaq 0x18(%rsp), %rdi
callq 0x5858
leaq 0x38(%rsp), %rdi
callq 0x5858
movq %r15, 0x8(%rsp)
addq $0xe0, %r15
pushq $0x7
popq %rbx
pushq $0x70
popq %r14
movq 0x1cb80(%rip), %rdi     # 0x34fa0
leaq 0x11ca7(%rip), %rsi     # 0x2a0ce
callq 0x53b0
testq %rbx, %rbx
js 0x184d3
movq %rbx, 0x10(%rsp)
movq %rax, %rdi
pushq $0x7c
popq %rsi
callq 0x5450
movl %r14d, 0x4(%rsp)
xorl %ebp, %ebp
cmpq $0x8, %rbp
je 0x184b9
movl (%r15,%rbp,4), %eax
movl %r14d, %r12d
andl $0x10, %r12d
cmpl $0x10, %eax
cmovnel %eax, %r12d
andl $-0x8, %eax
cmpl $0x8, %eax
pushq $0x20
popq %r13
pushq $0x3d
popq %rax
cmovel %eax, %r13d
movq 0x1cb24(%rip), %rdi     # 0x34fa0
movl %r13d, %esi
callq 0x5450
movq %rax, %rbx
movl %r12d, %edi
callq 0x182d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5450
movq %rax, %rdi
movl %r13d, %esi
callq 0x5450
movq %rax, %rdi
pushq $0x7c
popq %rsi
callq 0x5450
incq %rbp
addl $0x10, %r14d
jmp 0x1844c
movq 0x10(%rsp), %rbx
decq %rbx
addq $-0x20, %r15
movl 0x4(%rsp), %r14d
addl $-0x10, %r14d
jmp 0x18419
leaq 0x11c26(%rip), %rsi     # 0x2a100
movq %rax, %rdi
callq 0x53b0
movq %rax, %r14
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x1806c
movq %r14, %rdi
movq %r15, %rsi
callq 0x5340
leaq 0x11c00(%rip), %rsi     # 0x2a109
movq %rax, %rdi
callq 0x53b0
movq 0x8(%rsp), %rcx
movq 0x1938(%rcx), %rcx
movq 0x38(%rcx), %rsi
movq %rax, %rdi
callq 0x5260
movq %rax, %rdi
callq 0x51d0
leaq 0x58(%rsp), %rdi
callq 0x5858
addq $0x1998, %rsp           # imm = 0x1998
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5858
jmp 0x18566
jmp 0x18563
movq %rax, %rbx
jmp 0x1857a
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x18575
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x5858
movq %rbx, %rdi
callq 0x5780