// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::menu()
void ManchesterBaby::menu() {
  int choice;
  bool isValid;
  do{
  	isValid = true;
  cout << "Manchester Baby:\n" << endl;
  cout << "1. Run Manchester Baby Simulation\n" << endl;
  cout << "2. Double memory capacity\n" << endl;
  cout << "3. Exit" <<endl;
  cin >> choice;
  if(choice == 1) {
  	try { 
      //if there is an error while running the baby catch it
      //it will most likely be because there's not enough memory
	  	if (hasParam) {
	  		cout <<paramfile<<endl;
	  		runBaby(paramfile); //if a filename was provided run the baby with this file
	  	} else {
	    	runBaby();
	  	}	
  	} catch (...) {
  		cerr <<"Some error occured. The Manchester Baby may have run out of memory." <<endl;
  	}
  } 
  else if(choice == 2) {
    extHWare();
    isValid = false; //it is still valid but I want it to go to the loop again
  }else if(choice ==3){
    cout << "Exiting" <<endl;
    exit(0);
  }else {
    cout<< "" <<endl;
    cout << "Please enter a valid value" << endl;
    cin.clear();
    cin.ignore();
    isValid=false;
  }
  }while(isValid==false);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r12
movq 0x567c(%rip), %r14      # 0x8fc8
leaq 0x1908(%rip), %r13      # 0x525b
leaq 0x191c(%rip), %rbp      # 0x5276
movq 0x5677(%rip), %rbx      # 0x8fd8
leaq 0x4(%rsp), %r15
movq %r14, %rdi
leaq 0x18b6(%rip), %rsi      # 0x5226
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq %r14, %rdi
leaq 0x18b1(%rip), %rsi      # 0x5238
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq %r14, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2120
movl 0x4(%rsp), %eax
cmpl $0x2, %eax
je 0x3a28
cmpl $0x1, %eax
je 0x3a35
cmpl $0x3, %eax
je 0x3a96
movq %r14, %rdi
leaq 0x1720(%rip), %rsi      # 0x5106
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq %r14, %rdi
leaq 0x18cd(%rip), %rsi      # 0x52ca
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2300
movq %rbx, %rdi
callq 0x2340
jmp 0x3966
movq %r12, %rdi
callq 0x2ffc
jmp 0x3966
cmpb $0x1, 0x78(%r12)
jne 0x3a7f
leaq 0x58(%r12), %rbx
movq 0x557f(%rip), %rdi      # 0x8fc8
movq %rbx, %rsi
callq 0x21b0
movq %rax, %rdi
callq 0x20e0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2270
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x3654
leaq 0x8(%rsp), %rdi
callq 0x20d0
jmp 0x3a87
movq %r12, %rdi
callq 0x372c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x552b(%rip), %rdi      # 0x8fc8
leaq 0x181e(%rip), %rsi      # 0x52c2
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
xorl %edi, %edi
callq 0x2230
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d0
jmp 0x3aca
movq %rax, %rbx
movq %rbx, %rdi
callq 0x20b0
movq 0x5517(%rip), %rdi      # 0x8ff0
leaq 0x179e(%rip), %rsi      # 0x527e
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
callq 0x22e0
jmp 0x3a87
movq %rax, %rbx
callq 0x22e0
movq %rbx, %rdi
callq 0x2320
movq %rax, %rdi
callq 0x3d8d