// File: /workspace/github_cpp_makefile_star2_O1/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 0x1dc15
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 $0xa0, %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 0x14698(%rip), %rax     # 0x32202
leaq 0x106c3(%rip), %rsi     # 0x2e234
cmoveq %rax, %rsi
sete %cl
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq (%rsi,%rcx,2), %rdx
leaq 0x18(%rsp), %rdi
callq 0xa7de
movq 0x1e40a(%rip), %rdi     # 0x3bfa0
leaq 0x14668(%rip), %rsi     # 0x32205
movl $0xa, %edx
callq 0x5460
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x1e3e8(%rip), %rdi     # 0x3bfa0
callq 0x5460
movq %rax, %r14
leaq 0x38(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl %ebp, %edx
callq 0x17895
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 0x1dbfe
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x1dc15
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5400
movl $0x7, %r15d
leaq 0x58(%rsp), %r13
leaq 0x39d6c9(%rip), %rbx    # 0x3bb2f0
movl $0x23, %edx
movq 0x1e36d(%rip), %r14     # 0x3bfa0
movq %r14, %rdi
leaq 0x145a1(%rip), %rsi     # 0x321de
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 0x1e2ef(%rip), %rdi     # 0x3bfa0
movq %r13, %r12
movq %r13, %rsi
callq 0x5460
movq %rax, %r13
movq 0x39d63a(%rip), %rax    # 0x3bb300
cmpq %rbx, %rax
je 0x1dcdb
cmpl %r15d, 0x24(%rax)
je 0x1dcdf
movq %rax, %rdi
callq 0x5470
jmp 0x1dcc6
xorl %eax, %eax
jmp 0x1dce2
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 0x1dc6c
subq $0x1, %r15
jae 0x1dc27
movq 0x1e25a(%rip), %r14     # 0x3bfa0
leaq 0x14491(%rip), %rsi     # 0x321de
movl $0x23, %edx
movq %r14, %rdi
callq 0x5460
leaq 0x144af(%rip), %rsi     # 0x32210
movl $0x8, %edx
movq %r14, %rdi
callq 0x5460
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x1d75a
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x5460
movq %rax, %r14
leaq 0x14481(%rip), %rsi     # 0x32219
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 0x1de01
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 0x1de3d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x1de3d
jmp 0x1de3a
movq %rax, %rbx
jmp 0x1de6c
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x1de6c
movq 0x28(%rsp), %rsi
jmp 0x1de64
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1de6c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5400
movq %rbx, %rdi
callq 0x5790