// File: /workspace/github_cpp_makefile_star2_O1/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 0x5c82(%rip), %r14      # 0xafc8
movq 0x5c8b(%rip), %r15      # 0xafd8
leaq 0x4(%rsp), %r12
movl $0x11, %edx
movq %r14, %rdi
leaq 0x1ec5(%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 0x1e9c(%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
leaq 0x1e84(%rip), %rsi      # 0x725b
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
leaq 0x1e64(%rip), %rsi      # 0x7276
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), %ebp
cmpl $0x1, %ebp
jne 0x54eb
cmpb $0x1, 0x78(%rbx)
jne 0x558b
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
movq %r14, %rdi
callq 0x2200
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x5b04
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x4ef2
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x55af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x55af
cmpl $0x2, %ebp
je 0x5595
cmpl $0x3, %ebp
je 0x5620
movq %r14, %rdi
leaq 0x1bff(%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 0x1d86(%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 0x55af
movq %rbx, %rdi
callq 0x5002
jmp 0x55af
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x2, %rax
movslq %eax, %rsi
andq $-0x2, %rsi
movq %rbx, %rdi
callq 0x598c
cmpl $0x1, %ebp
jne 0x5352
jmp 0x5611
movq %rax, %r13
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x55de
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x55de
movq %rax, %r13
movq %r13, %rdi
callq 0x20a0
movl $0x43, %edx
movq 0x59fe(%rip), %rdi      # 0xaff0
leaq 0x1c85(%rip), %rsi      # 0x727e
callq 0x2200
movq 0x59eb(%rip), %rdi      # 0xaff0
callq 0x20c0
callq 0x22c0
jmp 0x55af
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x59a1(%rip), %rdi      # 0xafc8
leaq 0x1c94(%rip), %rsi      # 0x72c2
callq 0x21b0
movq %rax, %rdi
callq 0x20c0
xorl %edi, %edi
callq 0x2220
movq %rax, %rbx
callq 0x22c0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0x5a33