// File: /workspace/github_cpp_makefile_star2_O1/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)
xorl %r14d, %r14d
movq 0xd908(%rip), %r15      # 0x14fd0
movq 0xd911(%rip), %r13      # 0x14fe0
leaq 0x5e6e(%rip), %rbp      # 0xd544
movl $0x13, %edx
movq %r15, %rdi
leaq 0x829c(%rip), %rsi      # 0xf981
callq 0x21c0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x21e0
leaq 0x8299(%rip), %r12      # 0xf995
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2070
testl %eax, %eax
je 0x77fd
movq %rbx, %rdi
leaq 0x5e33(%rip), %rsi      # 0xd54c
callq 0x2070
testl %eax, %eax
je 0x77fd
movq %rbx, %rdi
leaq 0x5e27(%rip), %rsi      # 0xd557
callq 0x2070
testl %eax, %eax
je 0x77fd
movq %rbx, %rdi
leaq 0x5e17(%rip), %rsi      # 0xd55e
callq 0x2070
testl %eax, %eax
je 0x77fd
movq %rbx, %rdi
leaq 0x5dd8(%rip), %rsi      # 0xd536
callq 0x2070
testl %eax, %eax
je 0x77fd
movq %rbx, %rdi
leaq 0x5df2(%rip), %rsi      # 0xd567
callq 0x2070
testl %eax, %eax
je 0x77fd
movl $0x22, %edx
movq %r15, %rdi
movq %r12, %rsi
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 0x7f0f(%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 0x76fc
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 0x7852
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xa002
movl $0x34, %edx
leaq 0x816e(%rip), %rsi      # 0xf9b8
testb %al, %al
je 0x7952
movq %rbx, %rdi
leaq 0x5cf0(%rip), %rsi      # 0xd54c
callq 0x2070
testl %eax, %eax
jne 0x7887
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9ffa
movl $0x37, %edx
leaq 0x816e(%rip), %rsi      # 0xf9ed
testb %al, %al
je 0x7952
movq %rbx, %rdi
leaq 0x5cc6(%rip), %rsi      # 0xd557
callq 0x2070
testl %eax, %eax
jne 0x78bc
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9ff6
movl $0x33, %edx
leaq 0x8171(%rip), %rsi      # 0xfa25
testb %al, %al
je 0x7952
movq %rbx, %rdi
leaq 0x5c98(%rip), %rsi      # 0xd55e
callq 0x2070
testl %eax, %eax
jne 0x78ed
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xa006
movl $0x35, %edx
leaq 0x8170(%rip), %rsi      # 0xfa59
testb %al, %al
je 0x7952
movq %rbx, %rdi
leaq 0x5c3f(%rip), %rsi      # 0xd536
callq 0x2070
testl %eax, %eax
jne 0x791e
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9ff2
movl $0x34, %edx
leaq 0x809e(%rip), %rsi      # 0xf9b8
testb %al, %al
je 0x7952
movq %rbx, %rdi
leaq 0x5c3f(%rip), %rsi      # 0xd567
callq 0x2070
movb $0x1, %r12b
testl %eax, %eax
jne 0x795d
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9ffe
movl $0x38, %edx
leaq 0x8141(%rip), %rsi      # 0xfa8f
testb %al, %al
jne 0x795d
movq %r15, %rdi
callq 0x21c0
movl %r14d, %r12d
movl %r12d, %r14d
testb $0x1, %r12b
je 0x76d6
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x797e
movq %rax, %r14
movq (%rbx), %rdi
movq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7999
movq (%rax), %rsi
incq %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x2270
nop