// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::getValidFile[abi:cxx11]()
string ManchesterBaby::getValidFile(){
  bool isValid=true;
  //Initalise the variable
  string filename="";
 do{
  //Display the files available to load
  cout << "\nAvailable files to load: \n" << endl;
  
  //Display
  system("ls | grep .txt | cat");
   cout << "\nPlease enter the filename: " << endl;
  
  //Store the file name
  cin >> filename;
   //Initalise variable
  ifstream infile;
  //Open file
  infile.open(filename, ios::in);
   //Open the file to prove that it exists
  if(infile.is_open() == 1)
  {
     // P0W how-to-detect-empty-file-in-c stackoverflow
    // If file is empty 
    if(infile.peek() == ifstream::traits_type::eof())
    {
       cout << "\nFILE IS EMPTY. " << endl;
      isValid=false;
      cin.clear();
      cin.ignore();
    }
     // close file
    infile.close();
   }else{
    cout << "\nError- The file ente does not exist" << endl;
    cout << "Try again: " << endl;
    isValid=false;
    cin.clear();
    cin.ignore();
  }
}while(isValid==false);
 return filename;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
leaq 0x2021(%rip), %rdx      # 0x7106
movq %rdx, %rsi
callq 0x5da2
movb $0x1, %r13b
movq 0x5ed1(%rip), %r15      # 0xafc8
leaq 0x20c9(%rip), %rbp      # 0x71c7
movq 0x5ed3(%rip), %r14      # 0xafd8
leaq 0x10(%rsp), %r12
movl $0x1b, %edx
movq %r15, %rdi
leaq 0x207d(%rip), %rsi      # 0x7196
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x2066(%rip), %rdi      # 0x71b2
callq 0x2160
movl $0x1c, %edx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2240
movq %r12, %rdi
callq 0x21f0
movq %r12, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x2170
leaq 0x88(%rsp), %rdi
callq 0x2050
testb %al, %al
je 0x522d
movq %r12, %rdi
callq 0x2090
cmpl $-0x1, %eax
jne 0x5220
movl $0x10, %edx
movq %r15, %rdi
leaq 0x200c(%rip), %rsi      # 0x71e4
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %esi, %esi
callq 0x22e0
movq %r14, %rdi
callq 0x2320
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x2040
jmp 0x52bf
movl $0x24, %edx
movq %r15, %rdi
leaq 0x1fb9(%rip), %rsi      # 0x71f5
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl $0xb, %edx
movq %r15, %rdi
leaq 0x1fa3(%rip), %rsi      # 0x721a
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %esi, %esi
callq 0x22e0
movq %r14, %rdi
callq 0x2320
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x2060
testb $0x1, %r13b
je 0x510a
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x52f7
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x2060
jmp 0x52fa
movq %rax, %r14
movq (%rbx), %rdi
movq 0x8(%rsp), %rax
cmpq %rax, %rdi
je 0x5312
movq (%rax), %rsi
incq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x2300