// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl 0xc(%rdi), %eax
cmpl 0x8(%rdi), %eax
jae 0x26a5
movq %rdi, %rbx
leaq 0x6ee3(%rip), %rsi      # 0x9544
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x273b
cmpb $0x0, 0x10(%rbx)
je 0x2782
movq 0xe94e(%rip), %r14      # 0x10fd0
leaq 0x6a89(%rip), %rsi      # 0x9112
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6ab6(%rip), %rsi      # 0x9156
jmp 0x2926
movq 0xe924(%rip), %rbx      # 0x10fd0
leaq 0x6951(%rip), %rsi      # 0x9004
movq %rbx, %rdi
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
leaq 0x694f(%rip), %rsi      # 0x901c
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6983(%rip), %rsi      # 0x9067
movq %rbx, %rdi
callq 0x21a0
leaq 0x69b3(%rip), %rsi      # 0x90a6
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x69a9(%rip), %rsi      # 0x90b3
movq %rbx, %rdi
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
leaq 0x78dc(%rip), %rsi      # 0xa000
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20c0
leaq 0x6e15(%rip), %rsi      # 0x9557
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x27a6
cmpb $0x0, 0x11(%rbx)
je 0x27ed
movq 0xe871(%rip), %r14      # 0x10fd0
leaq 0x6a54(%rip), %rsi      # 0x91ba
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6a80(%rip), %rsi      # 0x91fd
jmp 0x2926
movq 0xe847(%rip), %rdi      # 0x10fd0
leaq 0x6942(%rip), %rsi      # 0x90d2
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movb $0x1, 0x10(%rbx)
jmp 0x2978
leaq 0x6db1(%rip), %rsi      # 0x955e
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x2811
cmpb $0x0, 0x13(%rbx)
je 0x2858
movq 0xe806(%rip), %r14      # 0x10fd0
leaq 0x6a91(%rip), %rsi      # 0x9262
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6abf(%rip), %rsi      # 0x92a7
jmp 0x2926
movq 0xe7dc(%rip), %rdi      # 0x10fd0
leaq 0x6980(%rip), %rsi      # 0x917b
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movb $0x1, 0x11(%rbx)
jmp 0x2978
leaq 0x6d34(%rip), %rsi      # 0x954c
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x287c
cmpb $0x0, 0x12(%rbx)
je 0x28c0
movq 0xe79b(%rip), %r14      # 0x10fd0
leaq 0x6ad4(%rip), %rsi      # 0x9310
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6b04(%rip), %rsi      # 0x9357
jmp 0x2926
movq 0xe771(%rip), %rdi      # 0x10fd0
leaq 0x69bb(%rip), %rsi      # 0x9221
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movb $0x1, 0x13(%rbx)
jmp 0x2978
leaq 0x6cb3(%rip), %rsi      # 0x9536
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x28e4
cmpb $0x0, 0x14(%rbx)
je 0x2938
movq 0xe730(%rip), %r14      # 0x10fd0
leaq 0x6b1e(%rip), %rsi      # 0x93c5
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6b51(%rip), %rsi      # 0x940f
jmp 0x2926
movq 0xe709(%rip), %rdi      # 0x10fd0
leaq 0x69ff(%rip), %rsi      # 0x92cd
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movb $0x1, 0x12(%rbx)
jmp 0x2978
leaq 0x6c7c(%rip), %rsi      # 0x9567
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x297b
cmpb $0x0, 0x15(%rbx)
je 0x2959
movq 0xe6c8(%rip), %r14      # 0x10fd0
leaq 0x6b6f(%rip), %rsi      # 0x947e
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6ba0(%rip), %rsi      # 0x94c6
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
jmp 0x297b
movq 0xe691(%rip), %rdi      # 0x10fd0
leaq 0x6a39(%rip), %rsi      # 0x937f
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movb $0x1, 0x14(%rbx)
jmp 0x2978
movq 0xe670(%rip), %rdi      # 0x10fd0
leaq 0x6ad3(%rip), %rsi      # 0x943a
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movb $0x1, 0x15(%rbx)
incl 0xc(%rbx)
movq 0xe64e(%rip), %r14      # 0x10fd0
leaq 0x6b66(%rip), %rsi      # 0x94ef
movq %r14, %rdi
callq 0x21a0
movl 0xc(%rbx), %esi
movq %rax, %rdi
callq 0x2110
leaq 0x765d(%rip), %rsi      # 0xa000
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6b52(%rip), %rsi      # 0x950c
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x8(%rax)