// File: /workspace/github_cpp_makefile_star2_O1/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 0xdc2(%rip), %rsi       # 0x73f7
leaq -0x2a0(%rbp), %rdi
movl $0x8, %edx
callq 0x21f0
leaq -0x228(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x6779
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x98(%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 0x67cd
cmpq $0x5, -0x40(%rbp)
jne 0x6674
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 0x292a
leaq -0x78(%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 0x292a
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r12, %rdi
callq 0x4058
xorl %r13d, %r13d
movl $0x18, %edi
callq 0x2120
movq %r12, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq 0x10(%rbx)
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x6755
callq 0x2100
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
movq %r14, %r13
je 0x6674
callq 0x2100
jmp 0x6674
movq 0x4850(%rip), %r14      # 0xafd0
leaq 0xc7f(%rip), %rsi       # 0x7406
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 0x481e(%rip), %rdi      # 0xafd0
callq 0x2040
movq %rax, %rdi
callq 0x20b0
leaq -0x2a0(%rbp), %rdi
callq 0x2060
jmp 0x67eb
leaq -0x2a0(%rbp), %rdi
callq 0x2060
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x67eb
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 0x6866
movq %rax, %r14
jmp 0x6887
movq %rax, %r14
jmp 0x687b
jmp 0x6866
movq %rax, %r14
movb $0x1, %r13b
jmp 0x6857
movq %rax, %r14
movb $0x1, %r13b
jmp 0x683f
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x683f
callq 0x2100
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x6857
callq 0x2100
testb %r13b, %r13b
je 0x6869
movq %r12, %rdi
callq 0x2100
jmp 0x6869
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x687b
callq 0x2100
leaq -0x2a0(%rbp), %rdi
callq 0x2080
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x689f
movq (%rdi), %r15
callq 0x2100
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x688f
movq %r14, %rdi
callq 0x21d0
nop