// File: /workspace/github_cpp_makefile_star2_O1/angelapwen[P]text-based-game/basicSatchel.cpp
// Function: BasicSatchel::addWeapon(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void BasicSatchel::addWeapon(std::string weapon) {
	if (numUniqueWeapons >= capacity) {
		cout << "You have come across a " << weapon << ", but your Bronze "
		"Satchel\nis full and you cannot pick up any more weapons." << endl;
		cout << "You should focus on finding the room in which you will commit "
			 << "your murder." << endl;
		cout << "Hydra has destroyed the spare " << weapon << "." << endl;
	}

	// If user picks up weapon successfully, increment number of unique weapons
	else {
		if ((weapon == "knife")) {
			if (!knife) {
				cout << "Congratulations! You have added a knife to your Bronze "
				"Satchel."	<< endl;
				knife = true;
				numUniqueWeapons++;
			}
			// Else user already had a knife
			else {
				cout << "You have picked up a knife, but your satchel already "
				        "contained one." << endl;
				cout << "Hydra has destroyed the spare knife." << endl;
			}
		}
		else if ((weapon == "rope")) {
			if (!rope) {
				cout << "Congratulations! You have added a rope to your Bronze "
				"Satchel."	<< endl;
				rope = true;
				numUniqueWeapons++;
			}
				// Else user already had rope
			else {
				cout << "You have picked up a rope, but your satchel already "
				        "contained one." << endl;
				cout << "Hydra has destroyed the spare rope." << endl;
			}
		}
		else if ((weapon == "wrench")) {
			if (!wrench) {
				cout << "Congratulations! You have added a wrench to your Bronze "
				"Satchel."	<< endl;
				wrench = true;
				numUniqueWeapons++;
			}
			// Else user already had a wrench
			else {
				cout << "You have picked up a wrench, but your satchel already "
				        "contained one." << endl;
				cout << "Hydra has destroyed the spare wrench." << endl;
			}
		}
		else if ((weapon == "revolver")) {
			if (!revolver) {
				cout << "Congratulations! You have added a revolver to your "
				"Bronze Satchel."	<< endl;
				revolver = true;
				numUniqueWeapons++;
			}
			// Else user already had a revolver
			else {
				cout << "You have picked up a revolver, but your satchel already "
				        "contained one." << endl;
				cout << "Hydra has destroyed the spare revolver." << endl;
			}
		}
		else if ((weapon == "candlestick")) {
			if (!candlestick) {
				cout << "Congratulations! You have added a candlestick to your "
				"Bronze Satchel."
				     << endl;
				candlestick = true;
				numUniqueWeapons++;
			}
			// Else user already had a candlestick
			else {
				cout << "You have picked up a candlestick, but your satchel already "
						   "contained one." << endl;
				cout << "Hydra has destroyed the spare candlestick." << endl;
			}
		}
		else if ((weapon == "pipe")) {
			if (!pipe) {
				cout << "Congratulations! You have added a lead pipe to your "
				"Bronze Satchel." << endl;
				pipe = true;
				numUniqueWeapons++;
			}
				// Else user already had a pipe
			else {
				cout << "You have picked up a lead pipe, but your satchel already "
				        "contained one." << endl;
				cout << "Hydra has destroyed the spare lead pipe." << endl;
			}
		}

		// Print count and weapon list
		cout << "Your total weapon count is: " << numUniqueWeapons << "." <<
		     endl;
		cout << "Your Bronze Satchel currently contains:" << endl;
		printWeapons();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movl 0xc(%rdi), %eax
cmpl 0x8(%rdi), %eax
jae 0x2769
movq %rdi, %rbx
leaq 0xae9c(%rip), %rsi      # 0xd544
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2886
leaq 0xae98(%rip), %rsi      # 0xd557
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x28e3
leaq 0xae88(%rip), %rsi      # 0xd55e
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x298b
leaq 0xae5f(%rip), %rsi      # 0xd54c
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2a62
leaq 0xae32(%rip), %rsi      # 0xd536
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2aeb
leaq 0xae4c(%rip), %rsi      # 0xd567
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2bae
cmpb $0x0, 0x15(%rbx)
je 0x2b84
movq 0x12894(%rip), %r14     # 0x14fd0
leaq 0xad3b(%rip), %rsi      # 0xd47e
movl $0x47, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
leaq 0xad67(%rip), %rsi      # 0xd4c6
movl $0x28, %edx
jmp 0x2b20
movq 0x12860(%rip), %rbx     # 0x14fd0
leaq 0xa88d(%rip), %rsi      # 0xd004
movl $0x17, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0xa87f(%rip), %rsi      # 0xd01c
movl $0x4a, %edx
movq %rax, %rdi
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
leaq 0xa88f(%rip), %rsi      # 0xd067
movl $0x3e, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0xa8ba(%rip), %rsi      # 0xd0a6
movl $0xc, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq 0xa88c(%rip), %rsi      # 0xd0b3
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rbx
leaq 0xb827(%rip), %rsi      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2100
cmpb $0x0, 0x10(%rbx)
je 0x2940
movq 0x12739(%rip), %r14     # 0x14fd0
leaq 0xa874(%rip), %rsi      # 0xd112
movl $0x43, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq 0xa87d(%rip), %rsi      # 0xd156
movl $0x24, %edx
jmp 0x29e3
cmpb $0x0, 0x11(%rbx)
je 0x2a17
movq 0x126dc(%rip), %r14     # 0x14fd0
leaq 0xa8bf(%rip), %rsi      # 0xd1ba
movl $0x42, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq 0xa8c7(%rip), %rsi      # 0xd1fd
movl $0x23, %edx
jmp 0x29e3
movq 0x12689(%rip), %r14     # 0x14fd0
leaq 0xa784(%rip), %rsi      # 0xd0d2
movl $0x3f, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movb $0x1, 0x10(%rbx)
jmp 0x2bab
cmpb $0x0, 0x13(%rbx)
je 0x2aa0
movq 0x12634(%rip), %r14     # 0x14fd0
leaq 0xa8bf(%rip), %rsi      # 0xd262
movl $0x44, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq 0xa8c9(%rip), %rsi      # 0xd2a7
movl $0x25, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
jmp 0x2bae
movq 0x125b2(%rip), %r14     # 0x14fd0
leaq 0xa756(%rip), %rsi      # 0xd17b
movl $0x3e, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movb $0x1, 0x11(%rbx)
jmp 0x2bab
cmpb $0x0, 0x12(%rbx)
je 0x2b32
movq 0x1255d(%rip), %r14     # 0x14fd0
leaq 0xa896(%rip), %rsi      # 0xd310
movl $0x46, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
leaq 0xa8c1(%rip), %rsi      # 0xd357
movl $0x27, %edx
jmp 0x2b20
movq 0x12529(%rip), %r14     # 0x14fd0
leaq 0xa773(%rip), %rsi      # 0xd221
movl $0x40, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movb $0x1, 0x13(%rbx)
jmp 0x2bab
cmpb $0x0, 0x14(%rbx)
je 0x2b5b
movq 0x124d8(%rip), %r14     # 0x14fd0
leaq 0xa8c6(%rip), %rsi      # 0xd3c5
movl $0x49, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
leaq 0xa8f4(%rip), %rsi      # 0xd40f
movl $0x2a, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
jmp 0x2bae
movq 0x12497(%rip), %r14     # 0x14fd0
leaq 0xa78d(%rip), %rsi      # 0xd2cd
movl $0x42, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
movb $0x1, 0x12(%rbx)
jmp 0x2bab
movq 0x1246e(%rip), %r14     # 0x14fd0
leaq 0xa816(%rip), %rsi      # 0xd37f
movl $0x45, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
movb $0x1, 0x14(%rbx)
jmp 0x2bab
movq 0x12445(%rip), %r14     # 0x14fd0
leaq 0xa8a8(%rip), %rsi      # 0xd43a
movl $0x43, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
movb $0x1, 0x15(%rbx)
incl 0xc(%rbx)
movq 0x1241b(%rip), %r14     # 0x14fd0
leaq 0xa933(%rip), %rsi      # 0xd4ef
movl $0x1c, %edx
movq %r14, %rdi
callq 0x21c0
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0x20f0
movq %rax, %r15
leaq 0xb496(%rip), %rsi      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
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
leaq 0xa8f3(%rip), %rsi      # 0xd50c
movl $0x27, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x8(%rax)
nop