// File: /workspace/github_cpp_makefile_star2_O3/IncredibleHannes[P]QMUL-ChessGame/src/View/View.cpp
// Function: View::loadFromFile[abi:cxx11]() const
std::list<Move*> View::loadFromFile() const {
  std::list<Move*> moves;
  std::ifstream myStream("./SaveFile.txt");
  if(!myStream.is_open()) {
    std::cout << "There is no savefile to open" << std::endl;
    myStream.close();
    return moves;
  }
  std::string line;
  while(getline(myStream,line)) {
    if (line.size() == 5) {
      moves.push_back(new Move(Position(line.substr(0, 2)), Position(line.substr(3, 5))));
    }
  }
  myStream.close();
  return moves;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0xe02(%rip), %rsi       # 0x73f3
leaq -0x2a0(%rbp), %rdi
movl $0x8, %edx
callq 0x21f0
leaq -0x228(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x6735
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x78(%rbp), %r13
movq -0x2a0(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x2a0(%rbp), %r14
addq %r14, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %edx
movq %r14, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2200
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6789
cmpq $0x5, -0x40(%rbp)
jne 0x662d
movl $0x20, %edi
callq 0x2120
movq %rax, %r12
movl $0x2, %ecx
movq %r13, %rdi
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x2130
leaq -0x58(%rbp), %rdi
movq %r13, %r14
movq %r13, %rsi
callq 0x2936
leaq -0x98(%rbp), %r15
movl $0x3, %edx
movl $0x5, %ecx
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2130
movb $0x1, %r13b
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x2936
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r12, %rdi
callq 0x4040
xorl %r13d, %r13d
movl $0x18, %edi
callq 0x2120
movq %r12, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq 0x10(%rbx)
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x6717
callq 0x2100
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
movq %r14, %r13
je 0x662d
callq 0x2100
jmp 0x662d
movq 0x4894(%rip), %r14      # 0xafd0
leaq 0xcbf(%rip), %rsi       # 0x7402
movl $0x1c, %edx
movq %r14, %rdi
callq 0x2150
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq 0x4862(%rip), %rdi      # 0xafd0
callq 0x2040
movq %rax, %rdi
callq 0x20b0
leaq -0x2a0(%rbp), %rdi
callq 0x2060
jmp 0x67a7
leaq -0x2a0(%rbp), %rdi
callq 0x2060
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x67a7
callq 0x2100
leaq -0x2a0(%rbp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6831
movq %rax, %r14
jmp 0x6852
movq %rax, %r14
jmp 0x6846
jmp 0x6831
movq %rax, %r14
jmp 0x6827
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x6827
callq 0x2100
jmp 0x6827
movq %rax, %r14
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x6810
callq 0x2100
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x6822
callq 0x2100
testb %r13b, %r13b
je 0x6834
movq %r12, %rdi
callq 0x2100
jmp 0x6834
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6846
callq 0x2100
leaq -0x2a0(%rbp), %rdi
callq 0x2080
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x686a
movq (%rdi), %r15
callq 0x2100
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x685a
movq %r14, %rdi
callq 0x21d0