// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, (%rsp)
movb $0x0, 0x10(%rdi)
movq 0xbe37(%rip), %r15      # 0x10fd0
movq 0xbe40(%rip), %r13      # 0x10fe0
leaq 0x439d(%rip), %rbp      # 0x9544
leaq 0x439e(%rip), %r12      # 0x954c
leaq 0x43a2(%rip), %r14      # 0x9557
movq %r15, %rdi
leaq 0x674e(%rip), %rsi      # 0xb90d
callq 0x21a0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x21f0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5586
testb %al, %al
je 0x5299
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5586
testb %al, %al
je 0x5299
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5586
testb %al, %al
je 0x5299
movq %rbx, %rdi
leaq 0x434c(%rip), %rsi      # 0x955e
callq 0x5586
testb %al, %al
je 0x5299
movq %rbx, %rdi
leaq 0x4311(%rip), %rsi      # 0x9536
callq 0x5586
testb %al, %al
je 0x5299
movq %rbx, %rdi
leaq 0x432f(%rip), %rsi      # 0x9567
callq 0x5586
testb %al, %al
je 0x5299
movq %r15, %rdi
leaq 0x66d6(%rip), %rsi      # 0xb921
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movq %r15, %rdi
leaq 0x63fd(%rip), %rsi      # 0xb65f
callq 0x21a0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2270
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
pushq $0xa
popq %rdx
callq 0x2100
movq %r13, %rdi
movq %rbx, %rsi
callq 0x21f0
jmp 0x51cf
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2270
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
pushq $0xa
popq %rdx
callq 0x2100
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2aab
testb %al, %al
je 0x52e6
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x70ea
leaq 0x6666(%rip), %rsi      # 0xb944
testb %al, %al
je 0x53bd
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2aab
testb %al, %al
je 0x5311
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x70e2
leaq 0x6670(%rip), %rsi      # 0xb979
testb %al, %al
je 0x53bd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2aab
testb %al, %al
je 0x533c
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x70de
leaq 0x667d(%rip), %rsi      # 0xb9b1
testb %al, %al
je 0x53bd
movq %rbx, %rdi
leaq 0x4218(%rip), %rsi      # 0x955e
callq 0x2aab
testb %al, %al
je 0x5367
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x70ee
leaq 0x6682(%rip), %rsi      # 0xb9e5
testb %al, %al
je 0x53bd
movq %rbx, %rdi
leaq 0x41c5(%rip), %rsi      # 0x9536
callq 0x2aab
testb %al, %al
je 0x5392
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x70da
leaq 0x65b6(%rip), %rsi      # 0xb944
testb %al, %al
je 0x53bd
movq %rbx, %rdi
leaq 0x41cb(%rip), %rsi      # 0x9567
callq 0x2aab
testb %al, %al
je 0x53ca
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x70e6
leaq 0x6662(%rip), %rsi      # 0xba1b
testb %al, %al
jne 0x53ca
movq %r15, %rdi
callq 0x21a0
jmp 0x51b5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x53de
movq %rax, %r14
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2290
nop