// File: /workspace/github_cpp_makefile_star2_O1/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::Menu(std::ostream&, std::istream&, std::ostream&)
void BattleSim::Menu(ostream &pout, istream &fin, ostream &fout) {
	string option;
	str_code sc = INITCODE;
	while(sc != EXIT) {	
		pout << "Enter Choice: SETCRITERIA,EVALUATECRITERIA,SETPARTICIPANTS\n";
		pout << "PRINTCRITERIA, PRINTCANDIDATES, PRINTPARTICIPANTS, SIMULATE\n";
		pout << "RETRIEVERESULTS\n";
		getline(fin,option);
	
		sc = HashString(option);
		//TODO: EVALUATE CRITERIA OPTION, print results option
		switch(sc) {
			case SETCRITERIA:
				SetCriteria(pout,fin); break;
			case EVALUATECRITERIA:
				EvaluateCriteria(pout,fin); break;
			case SETPARTICIPANTS:
				SetParticipants(pout,fin); break;
			case PRINTCRITERIA:
				PrintCriteria(pout,fin); break;
			case PRINTCANDIDATES:
				PrintCandidates(pout,fin); break;
			case PRINTPARTICIPANTS:
				PrintParticipants(pout); break;
			case SIMULATE:
				Simulate(pout,fin,fout); break;
			case RETRIEVERESULTS:
				RetrieveResults(pout,fin,fout); break; 
			case EXIT: break;
			default:
				pout << "Invalid Choice\n";

		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, -0x58(%rbp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x68(%rbp), %r12
leaq -0x78(%rbp), %r13
movl $0x3b, %edx
movq %r15, %rdi
leaq 0x5d6b(%rip), %rsi      # 0x162fc
callq 0x2200
movl $0x3c, %edx
movq %r15, %rdi
leaq 0x5d93(%rip), %rsi      # 0x16338
callq 0x2200
movl $0x10, %edx
movq %r15, %rdi
leaq 0x5dbc(%rip), %rsi      # 0x16375
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
movq %r14, %rdi
leaq -0x50(%rbp), %rsi
callq 0x2300
movq %r12, -0x78(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x8870
movq %r13, %rsi
callq 0x10724
movl %eax, %ebx
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x10617
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21b0
leal -0x1(%rbx), %eax
cmpl $0xc, %eax
ja 0x10643
leaq 0x5c8e(%rip), %rcx      # 0x162b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10b70
jmp 0x106cf
movl $0xf, %edx
movq %r15, %rdi
leaq 0x5d34(%rip), %rsi      # 0x16386
callq 0x2200
jmp 0x106cf
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x109bc
jmp 0x106cf
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x10d26
jmp 0x106cf
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10c4c
jmp 0x106cf
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x108ce
jmp 0x106cf
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10a94
jmp 0x106cf
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10df8
jmp 0x106cf
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq -0x58(%rbp), %rcx
callq 0x10f2c
cmpl $0xd, %ebx
jne 0x10582
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x106f1
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1071c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0