// File: /workspace/github_cpp_makefile_star2_O3/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 0x5e2b(%rip), %rsi      # 0x162fc
callq 0x2200
movl $0x3c, %edx
movq %r15, %rdi
leaq 0x5e53(%rip), %rsi      # 0x16338
callq 0x2200
movl $0x10, %edx
movq %r15, %rdi
leaq 0x5e7c(%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 0x88c2
movq %r13, %rsi
callq 0x10664
movl %eax, %ebx
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x10557
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21b0
leal -0x1(%rbx), %eax
cmpl $0xc, %eax
ja 0x10583
leaq 0x5d4e(%rip), %rcx      # 0x162b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10ab0
jmp 0x1060f
movl $0xf, %edx
movq %r15, %rdi
leaq 0x5df4(%rip), %rsi      # 0x16386
callq 0x2200
jmp 0x1060f
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x108fc
jmp 0x1060f
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x10c66
jmp 0x1060f
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10b8c
jmp 0x1060f
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1080e
jmp 0x1060f
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x109d4
jmp 0x1060f
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10d40
jmp 0x1060f
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq -0x58(%rbp), %rcx
callq 0x10e74
cmpl $0xd, %ebx
jne 0x104c2
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x10631
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 0x1065c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0