// File: /workspace/github_cpp_makefile_star2_O3/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 0x2771
movq %rdi, %rbx
leaq 0xae94(%rip), %rsi      # 0xd544
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x288e
leaq 0xae90(%rip), %rsi      # 0xd557
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x28eb
leaq 0xae80(%rip), %rsi      # 0xd55e
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2993
leaq 0xae57(%rip), %rsi      # 0xd54c
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2a6a
leaq 0xae2a(%rip), %rsi      # 0xd536
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2af3
leaq 0xae44(%rip), %rsi      # 0xd567
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2bb6
cmpb $0x0, 0x15(%rbx)
je 0x2b8c
movq 0x1288c(%rip), %r14     # 0x14fd0
leaq 0xad33(%rip), %rsi      # 0xd47e
movl $0x47, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
leaq 0xad5f(%rip), %rsi      # 0xd4c6
movl $0x28, %edx
jmp 0x2b28
movq 0x12858(%rip), %rbx     # 0x14fd0
leaq 0xa885(%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 0xa877(%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 0xa887(%rip), %rsi      # 0xd067
movl $0x3e, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0xa8b2(%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 0xa884(%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 0xb81f(%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 0x2948
movq 0x12731(%rip), %r14     # 0x14fd0
leaq 0xa86c(%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 0xa875(%rip), %rsi      # 0xd156
movl $0x24, %edx
jmp 0x29eb
cmpb $0x0, 0x11(%rbx)
je 0x2a1f
movq 0x126d4(%rip), %r14     # 0x14fd0
leaq 0xa8b7(%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 0xa8bf(%rip), %rsi      # 0xd1fd
movl $0x23, %edx
jmp 0x29eb
movq 0x12681(%rip), %r14     # 0x14fd0
leaq 0xa77c(%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 0x2bb3
cmpb $0x0, 0x13(%rbx)
je 0x2aa8
movq 0x1262c(%rip), %r14     # 0x14fd0
leaq 0xa8b7(%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 0xa8c1(%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 0x2bb6
movq 0x125aa(%rip), %r14     # 0x14fd0
leaq 0xa74e(%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 0x2bb3
cmpb $0x0, 0x12(%rbx)
je 0x2b3a
movq 0x12555(%rip), %r14     # 0x14fd0
leaq 0xa88e(%rip), %rsi      # 0xd310
movl $0x46, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
leaq 0xa8b9(%rip), %rsi      # 0xd357
movl $0x27, %edx
jmp 0x2b28
movq 0x12521(%rip), %r14     # 0x14fd0
leaq 0xa76b(%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 0x2bb3
cmpb $0x0, 0x14(%rbx)
je 0x2b63
movq 0x124d0(%rip), %r14     # 0x14fd0
leaq 0xa8be(%rip), %rsi      # 0xd3c5
movl $0x49, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
leaq 0xa8ec(%rip), %rsi      # 0xd40f
movl $0x2a, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
jmp 0x2bb6
movq 0x1248f(%rip), %r14     # 0x14fd0
leaq 0xa785(%rip), %rsi      # 0xd2cd
movl $0x42, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
movb $0x1, 0x12(%rbx)
jmp 0x2bb3
movq 0x12466(%rip), %r14     # 0x14fd0
leaq 0xa80e(%rip), %rsi      # 0xd37f
movl $0x45, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
movb $0x1, 0x14(%rbx)
jmp 0x2bb3
movq 0x1243d(%rip), %r14     # 0x14fd0
leaq 0xa8a0(%rip), %rsi      # 0xd43a
movl $0x43, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
movb $0x1, 0x15(%rbx)
incl 0xc(%rbx)
movq 0x12413(%rip), %r14     # 0x14fd0
leaq 0xa92b(%rip), %rsi      # 0xd4ef
movl $0x1c, %edx
movq %r14, %rdi
callq 0x21c0
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0x20f0
movq %rax, %r15
leaq 0xb48e(%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 0xa8eb(%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