// File: /workspace/github_cpp_makefile_star2_O1/IncredibleHannes[P]QMUL-ChessGame/src/Model/Board.cpp
// Function: Board::createStartBoard()
Chessman*** Board::createStartBoard() {
  Chessman *** array2d = new Chessman **[8];

  for (int i = 0; i < 8; i++) {
    array2d[i] = new Chessman*[8];
    for (int j = 0; j < 8; j++) {
      array2d[i][j] = nullptr;
    }
  }
  for (int i = 0; i < 8; i++) {
    array2d[1][i] = new Pawn(Chessman::Colour::White, Position(1, i));
    array2d[6][i] = new Pawn(Chessman::Colour::Black, Position(6, i));
  }

  array2d[0][0] = new Rook(Chessman::Colour::White, Position(0, 0));
  array2d[0][7] = new Rook(Chessman::Colour::White, Position(0, 7));
  array2d[7][0] = new Rook(Chessman::Colour::Black, Position(7, 0));
  array2d[7][7] = new Rook(Chessman::Colour::Black, Position(7, 7));
  array2d[0][1] = new Knight(Chessman::Colour::White, Position(0, 1));
  array2d[0][6] = new Knight(Chessman::Colour::White, Position(0, 6));
  array2d[7][1] = new Knight(Chessman::Colour::Black, Position(7, 1));
  array2d[7][6] = new Knight(Chessman::Colour::Black, Position(7, 6));
  array2d[0][2] = new Bishop(Chessman::Colour::White, Position(0, 2));
  array2d[0][5] = new Bishop(Chessman::Colour::White, Position(0, 5));
  array2d[7][2] = new Bishop(Chessman::Colour::Black, Position(7, 2));
  array2d[7][5] = new Bishop(Chessman::Colour::Black, Position(7, 5));
  array2d[0][3] = new Queen(Chessman::Colour::White, Position(0, 3));
  array2d[0][4] = new King(Chessman::Colour::White, Position(0, 4));
  array2d[7][3] = new Queen(Chessman::Colour::Black, Position(7, 3));
  array2d[7][4] = new King(Chessman::Colour::Black, Position(7, 4));
  return array2d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl $0x40, %edi
callq 0x2030
movq %rax, %rbx
xorl %r14d, %r14d
movl $0x40, %edi
callq 0x2030
movq %rax, (%rbx,%r14,8)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
incq %r14
cmpq $0x8, %r14
jne 0x4230
xorl %r15d, %r15d
leaq -0xb8(%rbp), %r12
leaq -0xb0(%rbp), %r13
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
movq %r12, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x291e
movq -0xb8(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x3058
movq 0x8(%rbx), %rax
movq %r14, (%rax,%r15,8)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
movq %r13, %rdi
movl $0x6, %esi
movl %r15d, %edx
callq 0x291e
movq -0xb0(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3058
movq 0x30(%rbx), %rax
movq %r14, (%rax,%r15,8)
incq %r15
cmpq $0x8, %r15
jne 0x426a
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x291e
movq -0xa8(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x362c
movq (%rbx), %r15
movq %r14, (%r15)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x7, %edx
callq 0x291e
movq -0xa0(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x362c
movq %r14, 0x38(%r15)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x98(%rbp), %rdi
movl $0x7, %esi
xorl %edx, %edx
callq 0x291e
movq -0x98(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x362c
movq 0x38(%rbx), %r12
movq %r14, (%r12)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x90(%rbp), %rdi
movl $0x7, %esi
movl $0x7, %edx
callq 0x291e
movq -0x90(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x362c
movq %r14, 0x38(%r12)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x88(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x291e
movq -0x88(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x2b3c
movq %r14, 0x8(%r15)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x6, %edx
callq 0x291e
movq -0x80(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x2b3c
movq %r14, 0x30(%r15)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x78(%rbp), %rdi
movl $0x7, %esi
movl $0x1, %edx
callq 0x291e
movq -0x78(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2b3c
movq %r14, 0x8(%r12)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x70(%rbp), %rdi
movl $0x7, %esi
movl $0x6, %edx
callq 0x291e
movq -0x70(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2b3c
movq %r14, 0x30(%r12)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x291e
movq -0x68(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x2994
movq %r14, 0x10(%r15)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x5, %edx
callq 0x291e
movq -0x60(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x2994
movq %r14, 0x28(%r15)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x58(%rbp), %rdi
movl $0x7, %esi
movl $0x2, %edx
callq 0x291e
movq -0x58(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2994
movq %r14, 0x10(%r12)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x50(%rbp), %rdi
movl $0x7, %esi
movl $0x5, %edx
callq 0x291e
movq -0x50(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2994
movq %r14, 0x28(%r12)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x291e
movq -0x48(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x3e60
movq %r14, 0x18(%r15)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x291e
movq -0x40(%rbp), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq 0x3880
movq %r14, 0x20(%r15)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x38(%rbp), %rdi
movl $0x7, %esi
movl $0x3, %edx
callq 0x291e
movq -0x38(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3e60
movq %r14, 0x18(%r12)
movl $0x18, %edi
callq 0x2120
movq %rax, %r14
leaq -0x30(%rbp), %rdi
movl $0x7, %esi
movl $0x4, %edx
callq 0x291e
movq -0x30(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3880
movq %r14, 0x20(%r12)
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
jmp 0x465e
movq %rax, %rbx
movq %r14, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x21d0
nop