// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x40
popq %rbx
movq %rbx, %rdi
callq 0x2030
movq %rax, -0x30(%rbp)
xorl %r14d, %r14d
cmpq $0x8, %r14
je 0x41ed
movq %rbx, %rdi
callq 0x2030
movq -0x30(%rbp), %rcx
movq %rax, (%rcx,%r14,8)
xorl %ecx, %ecx
cmpq $0x8, %rcx
je 0x41e8
andq $0x0, (%rax,%rcx,8)
incq %rcx
jmp 0x41d8
incq %r14
jmp 0x41c0
xorl %r15d, %r15d
pushq $0x18
popq %r12
pushq $0x1
popq %rbx
pushq $0x6
popq %r13
movq %r12, %rdi
callq 0x2110
movq %rax, %r14
cmpq $0x8, %r15
je 0x4279
leaq -0xc0(%rbp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x286e
movq -0xc0(%rbp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x30dc
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %r14, (%rax,%r15,8)
movq %r12, %rdi
callq 0x2110
movq %rax, %r14
leaq -0xb8(%rbp), %rdi
movl %r13d, %esi
movl %r15d, %edx
callq 0x286e
movq -0xb8(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x30dc
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq %r14, (%rax,%r15,8)
incq %r15
jmp 0x41fb
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x286e
movq -0xb0(%rbp), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3624
movq -0x30(%rbp), %rax
movq (%rax), %rbx
movq %r14, (%rbx)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0xa8(%rbp), %rdi
pushq $0x7
popq %rdx
xorl %esi, %esi
callq 0x286e
movq -0xa8(%rbp), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3624
movq %r14, 0x38(%rbx)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0xa0(%rbp), %rdi
pushq $0x7
popq %rsi
xorl %edx, %edx
callq 0x286e
movq -0xa0(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3624
movq -0x30(%rbp), %rax
movq 0x38(%rax), %r15
movq %r14, (%r15)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x98(%rbp), %rdi
pushq $0x7
popq %rdx
movl %edx, %esi
callq 0x286e
movq -0x98(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3624
movq %r14, 0x38(%r15)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x90(%rbp), %rdi
pushq $0x1
popq %rdx
xorl %esi, %esi
callq 0x286e
movq -0x90(%rbp), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2a7c
movq %r14, 0x8(%rbx)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x88(%rbp), %rdi
pushq $0x6
popq %rdx
xorl %esi, %esi
callq 0x286e
movq -0x88(%rbp), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2a7c
movq %r14, 0x30(%rbx)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x80(%rbp), %rdi
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x286e
movq -0x80(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2a7c
movq %r14, 0x8(%r15)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x78(%rbp), %rdi
pushq $0x7
popq %rsi
pushq $0x6
popq %rdx
callq 0x286e
movq -0x78(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2a7c
movq %r14, 0x30(%r15)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x70(%rbp), %rdi
pushq $0x2
popq %rdx
xorl %esi, %esi
callq 0x286e
movq -0x70(%rbp), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x28e4
movq %r14, 0x10(%rbx)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x68(%rbp), %rdi
pushq $0x5
popq %rdx
xorl %esi, %esi
callq 0x286e
movq -0x68(%rbp), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x28e4
movq %r14, 0x28(%rbx)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x60(%rbp), %rdi
pushq $0x7
popq %rsi
pushq $0x2
popq %rdx
callq 0x286e
movq -0x60(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x28e4
movq %r14, 0x10(%r15)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x58(%rbp), %rdi
pushq $0x7
popq %rsi
pushq $0x5
popq %rdx
callq 0x286e
movq -0x58(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x28e4
movq %r14, 0x28(%r15)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x50(%rbp), %rdi
pushq $0x3
popq %rdx
xorl %esi, %esi
callq 0x286e
movq -0x50(%rbp), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3e14
movq %r14, 0x18(%rbx)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x48(%rbp), %rdi
pushq $0x4
popq %rdx
xorl %esi, %esi
callq 0x286e
movq -0x48(%rbp), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x386c
movq %r14, 0x20(%rbx)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x40(%rbp), %rdi
pushq $0x7
popq %rsi
pushq $0x3
popq %rdx
callq 0x286e
movq -0x40(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3e14
movq %r14, 0x18(%r15)
pushq $0x18
popq %rdi
callq 0x2110
movq %rax, %r14
leaq -0x38(%rbp), %rdi
pushq $0x7
popq %rsi
pushq $0x4
popq %rdx
callq 0x286e
movq -0x38(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x386c
movq %r14, 0x20(%r15)
movq -0x30(%rbp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
jmp 0x4594
movq %rax, %rbx
movq %r14, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x21d0
nop