// File: IncredibleHannes[P]QMUL-ChessGame/src/View/View.cpp
// Function: View::printChessman(Chessman const*) const
void View::printChessman(Chessman const *chessman) const {
  if (chessman == nullptr) {
    std::cout << " ";
    return;
  }
  if (chessman->getColour() != Chessman::White) {
    switch (chessman->getType()) {
      case Chessman::Bishop :
        std::cout << "♗";
        break;
      case Chessman::King :
        std::cout << "♔";
        break;
      case Chessman::Knight :
        std::cout << "♘";
        break;
      case Chessman::Pawn :
        std::cout << "♙";
        break;
      case Chessman::Queen :
        std::cout << "♕";
        break;
      case Chessman::Rook :
        std::cout << "♖";
        break;
    }
  } else {
    switch (chessman->getType()) {
      case Chessman::Bishop :
        std::cout << "♝";
        break;
      case Chessman::King :
        std::cout << "♚";
        break;
      case Chessman::Knight :
        std::cout << "♞";
        break;
      case Chessman::Pawn :
        std::cout << "♟";
        break;
      case Chessman::Queen :
        std::cout << "♛";
        break;
      case Chessman::Rook :
        std::cout << "♜";
        break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xacef
movq 0x72f2(%rip), %rdi      # 0x11fd0
leaq 0x169b(%rip), %rsi      # 0xc380
callq 0x2150
jmp 0xae5d
movq -0x10(%rbp), %rdi
callq 0x5790
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0xadb3
movq -0x10(%rbp), %rdi
callq 0x58f0
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x5, %eax
ja 0xadae
movq -0x18(%rbp), %rax
leaq 0x1363(%rip), %rcx      # 0xc08c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x7297(%rip), %rdi      # 0x11fd0
leaq 0x152a(%rip), %rsi      # 0xc26a
callq 0x2150
jmp 0xadae
movq 0x7282(%rip), %rdi      # 0x11fd0
leaq 0x1519(%rip), %rsi      # 0xc26e
callq 0x2150
jmp 0xadae
movq 0x726d(%rip), %rdi      # 0x11fd0
leaq 0x1508(%rip), %rsi      # 0xc272
callq 0x2150
jmp 0xadae
movq 0x7258(%rip), %rdi      # 0x11fd0
leaq 0x14f7(%rip), %rsi      # 0xc276
callq 0x2150
jmp 0xadae
movq 0x7243(%rip), %rdi      # 0x11fd0
leaq 0x14e6(%rip), %rsi      # 0xc27a
callq 0x2150
jmp 0xadae
movq 0x722e(%rip), %rdi      # 0x11fd0
leaq 0x14d5(%rip), %rsi      # 0xc27e
callq 0x2150
jmp 0xae5d
movq -0x10(%rbp), %rdi
callq 0x58f0
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x5, %eax
ja 0xae5b
movq -0x20(%rbp), %rax
leaq 0x129e(%rip), %rcx      # 0xc074
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x71ea(%rip), %rdi      # 0x11fd0
leaq 0x1495(%rip), %rsi      # 0xc282
callq 0x2150
jmp 0xae5b
movq 0x71d5(%rip), %rdi      # 0x11fd0
leaq 0x1484(%rip), %rsi      # 0xc286
callq 0x2150
jmp 0xae5b
movq 0x71c0(%rip), %rdi      # 0x11fd0
leaq 0x1473(%rip), %rsi      # 0xc28a
callq 0x2150
jmp 0xae5b
movq 0x71ab(%rip), %rdi      # 0x11fd0
leaq 0x1462(%rip), %rsi      # 0xc28e
callq 0x2150
jmp 0xae5b
movq 0x7196(%rip), %rdi      # 0x11fd0
leaq 0x1451(%rip), %rsi      # 0xc292
callq 0x2150
jmp 0xae5b
movq 0x7181(%rip), %rdi      # 0x11fd0
leaq 0x1440(%rip), %rsi      # 0xc296
callq 0x2150
jmp 0xae5d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)