// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movq 0x5ca4(%rip), %r14      # 0xafc8
leaq 0x1f30(%rip), %r13      # 0x725b
leaq 0x1f44(%rip), %rbp      # 0x7276
movq 0x5c9f(%rip), %r15      # 0xafd8
leaq 0x4(%rsp), %r12
movl $0x11, %edx
movq %r14, %rdi
leaq 0x1ed9(%rip), %rsi      # 0x7226
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl $0x22, %edx
movq %r14, %rdi
leaq 0x1eb0(%rip), %rsi      # 0x7238
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl $0x1a, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl $0x7, %edx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %r15, %rdi
movq %r12, %rsi
callq 0x2100
movl 0x4(%rsp), %eax
cmpl $0x2, %eax
je 0x54dd
cmpl $0x1, %eax
je 0x54fc
cmpl $0x3, %eax
je 0x559f
movq %r14, %rdi
leaq 0x1cb0(%rip), %rsi      # 0x7106
xorl %edx, %edx
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl $0x1a, %edx
movq %r14, %rdi
leaq 0x1e37(%rip), %rsi      # 0x72ca
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
xorl %esi, %esi
callq 0x22e0
movq %r15, %rdi
callq 0x2320
jmp 0x533e
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x2, %rax
movslq %eax, %rsi
andq $-0x2, %rsi
movq %rbx, %rdi
callq 0x5974
jmp 0x533e
cmpb $0x1, 0x78(%rbx)
jne 0x5588
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
movq 0x5ab3(%rip), %rdi      # 0xafc8
callq 0x2200
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x5aec
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ed0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x5590
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x5590
movq %rbx, %rdi
callq 0x4fe0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5a22(%rip), %rdi      # 0xafc8
leaq 0x1d15(%rip), %rsi      # 0x72c2
callq 0x21b0
movq %rax, %rdi
callq 0x20c0
xorl %edi, %edi
callq 0x2220
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x55e0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x55e0
movq %rax, %rbx
movq %rbx, %rdi
callq 0x20a0
movq 0x5a01(%rip), %rdi      # 0xaff0
leaq 0x1c88(%rip), %rsi      # 0x727e
movl $0x43, %edx
callq 0x2200
movq 0x59e9(%rip), %rdi      # 0xaff0
callq 0x20c0
callq 0x22c0
jmp 0x5590
movq %rax, %rbx
callq 0x22c0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0x5a1b