// File: /workspace/github_cpp_makefile_star2_O3/angelapwen[P]text-based-game/game.cpp
// Function: Game::weaponValidation[abi:cxx11]() const
string Game::weaponValidation() const {
	string input;
	bool hasWeapon = false;

	while (!hasWeapon) {
		cout << "\nMake your choice: ";
		cin >> input;

		// While input is not a valid weapon name, ask user to try again
		while (input != "knife" && input != "revolver" && input != "rope" && input
		       !="wrench" && input != "candlestick" && input != "pipe") {
			cout << "Input must be a valid weapon name." << endl;
			cout << "Please try again: ";
			cin.clear();
			cin.ignore(256, '\n');
			cin >> input;
		}

		cin.clear();
		cin.ignore(256, '\n');

		// If input is a valid weapon, check to see if satchel contains this weapon
		if (input == "knife" && !satchel->getKnife()) {
			cout << "You do not carry a knife in your satchel. Try again.";
		}
		else if (input == "revolver" && !satchel->getRevolver()) {
			cout << "You do not carry a revolver in your satchel. Try again.";
		}
		else if (input == "rope" && !satchel->getRope()) {
			cout << "You do not carry a rope in your satchel. Try again.";
		}
		else if (input == "wrench" && !satchel->getWrench()) {
			cout << "You do not carry a wrench in your satchel. Try again.";
		}
		else if (input == "candlestick" && !satchel->getCandlestick()) {
			cout << "You do not carry a knife in your satchel. Try again.";
		}
		else if (input == "pipe" && !satchel->getPipe()) {
			cout << "You do not carry a lead pipe in your satchel. Try again.";
		}
			// Else the satchel contains the weapon
		else {
			hasWeapon = true;
		}
	}
	return input;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0xd93d(%rip), %r15      # 0x14fd0
movq 0xd946(%rip), %r13      # 0x14fe0
leaq 0x5ea3(%rip), %rbp      # 0xd544
leaq 0x5ea4(%rip), %r12      # 0xd54c
leaq 0x5ea8(%rip), %r14      # 0xd557
movl $0x13, %edx
movq %r15, %rdi
leaq 0x82c3(%rip), %rsi      # 0xf981
callq 0x21c0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x21e0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2070
testl %eax, %eax
je 0x77cf
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2070
testl %eax, %eax
je 0x77cf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2070
testl %eax, %eax
je 0x77cf
movq %rbx, %rdi
leaq 0x5e4d(%rip), %rsi      # 0xd55e
callq 0x2070
testl %eax, %eax
je 0x77cf
movq %rbx, %rdi
leaq 0x5e0e(%rip), %rsi      # 0xd536
callq 0x2070
testl %eax, %eax
je 0x77cf
movq %rbx, %rdi
leaq 0x5e28(%rip), %rsi      # 0xd567
callq 0x2070
testl %eax, %eax
je 0x77cf
movl $0x22, %edx
movq %r15, %rdi
leaq 0x823a(%rip), %rsi      # 0xf995
callq 0x21c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movl $0x12, %edx
movq %r15, %rdi
leaq 0x7f3d(%rip), %rsi      # 0xf6d3
callq 0x21c0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2250
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
movl $0xa, %edx
callq 0x20e0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x21e0
jmp 0x76ce
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2250
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
movl $0xa, %edx
callq 0x20e0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2070
testl %eax, %eax
jne 0x7824
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9fc2
movl $0x34, %edx
leaq 0x819c(%rip), %rsi      # 0xf9b8
testb %al, %al
je 0x7919
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2070
testl %eax, %eax
jne 0x7855
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9fba
movl $0x37, %edx
leaq 0x81a0(%rip), %rsi      # 0xf9ed
testb %al, %al
je 0x7919
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2070
testl %eax, %eax
jne 0x7886
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9fb6
movl $0x33, %edx
leaq 0x81a7(%rip), %rsi      # 0xfa25
testb %al, %al
je 0x7919
movq %rbx, %rdi
leaq 0x5cce(%rip), %rsi      # 0xd55e
callq 0x2070
testl %eax, %eax
jne 0x78b7
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9fc6
movl $0x35, %edx
leaq 0x81a6(%rip), %rsi      # 0xfa59
testb %al, %al
je 0x7919
movq %rbx, %rdi
leaq 0x5c75(%rip), %rsi      # 0xd536
callq 0x2070
testl %eax, %eax
jne 0x78e8
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9fb2
movl $0x34, %edx
leaq 0x80d4(%rip), %rsi      # 0xf9b8
testb %al, %al
je 0x7919
movq %rbx, %rdi
leaq 0x5c75(%rip), %rsi      # 0xd567
callq 0x2070
testl %eax, %eax
jne 0x7926
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9fbe
movl $0x38, %edx
leaq 0x817a(%rip), %rsi      # 0xfa8f
testb %al, %al
jne 0x7926
movq %r15, %rdi
callq 0x21c0
jmp 0x76af
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x793a
movq %rax, %r14
movq (%rbx), %rdi
movq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7955
movq (%rax), %rsi
incq %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x2270
nop