// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl 0xc(%rcx), %eax
cmpl 0x8(%rcx), %eax
jb 0x39f8
movq 0x17681(%rip), %rdi     # 0x1afd0
leaq 0xe6ae(%rip), %rsi      # 0x12004
callq 0x3200
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0xe6ab(%rip), %rsi      # 0x1201c
callq 0x3200
movq %rax, %rdi
movq 0x17640(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x17644(%rip), %rdi     # 0x1afd0
leaq 0xe6d4(%rip), %rsi      # 0x12067
callq 0x3200
movq %rax, %rdi
leaq 0xe704(%rip), %rsi      # 0x120a6
callq 0x3200
movq %rax, %rdi
movq 0x1760f(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x17613(%rip), %rdi     # 0x1afd0
leaq 0xe6ef(%rip), %rsi      # 0x120b3
callq 0x3200
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0xf66d(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0x175d2(%rip), %rsi     # 0x1afc0
callq 0x3230
jmp 0x3e31
movq -0x20(%rbp), %rdi
leaq 0xeb41(%rip), %rsi      # 0x12544
callq 0x3f80
testb $0x1, %al
jne 0x3a11
jmp 0x3a99
movq -0x18(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x3a50
movq 0x175ae(%rip), %rdi     # 0x1afd0
leaq 0xe6a9(%rip), %rsi      # 0x120d2
callq 0x3200
movq %rax, %rdi
movq 0x17588(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rax
movb $0x1, 0x10(%rax)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x3a94
movq 0x17579(%rip), %rdi     # 0x1afd0
leaq 0xe6b4(%rip), %rsi      # 0x12112
callq 0x3200
movq %rax, %rdi
movq 0x17553(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x17557(%rip), %rdi     # 0x1afd0
leaq 0xe6d6(%rip), %rsi      # 0x12156
callq 0x3200
movq %rax, %rdi
movq 0x17531(%rip), %rsi     # 0x1afc0
callq 0x3230
jmp 0x3dc5
movq -0x20(%rbp), %rdi
leaq 0xeab3(%rip), %rsi      # 0x12557
callq 0x3f80
testb $0x1, %al
jne 0x3ab2
jmp 0x3b3a
movq -0x18(%rbp), %rax
testb $0x1, 0x11(%rax)
jne 0x3af1
movq 0x1750d(%rip), %rdi     # 0x1afd0
leaq 0xe6b1(%rip), %rsi      # 0x1217b
callq 0x3200
movq %rax, %rdi
movq 0x174e7(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rax
movb $0x1, 0x11(%rax)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x3b35
movq 0x174d8(%rip), %rdi     # 0x1afd0
leaq 0xe6bb(%rip), %rsi      # 0x121ba
callq 0x3200
movq %rax, %rdi
movq 0x174b2(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x174b6(%rip), %rdi     # 0x1afd0
leaq 0xe6dc(%rip), %rsi      # 0x121fd
callq 0x3200
movq %rax, %rdi
movq 0x17490(%rip), %rsi     # 0x1afc0
callq 0x3230
jmp 0x3dc3
movq -0x20(%rbp), %rdi
leaq 0xea19(%rip), %rsi      # 0x1255e
callq 0x3f80
testb $0x1, %al
jne 0x3b53
jmp 0x3bdb
movq -0x18(%rbp), %rax
testb $0x1, 0x13(%rax)
jne 0x3b92
movq 0x1746c(%rip), %rdi     # 0x1afd0
leaq 0xe6b6(%rip), %rsi      # 0x12221
callq 0x3200
movq %rax, %rdi
movq 0x17446(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rax
movb $0x1, 0x13(%rax)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x3bd6
movq 0x17437(%rip), %rdi     # 0x1afd0
leaq 0xe6c2(%rip), %rsi      # 0x12262
callq 0x3200
movq %rax, %rdi
movq 0x17411(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x17415(%rip), %rdi     # 0x1afd0
leaq 0xe6e5(%rip), %rsi      # 0x122a7
callq 0x3200
movq %rax, %rdi
movq 0x173ef(%rip), %rsi     # 0x1afc0
callq 0x3230
jmp 0x3dc1
movq -0x20(%rbp), %rdi
leaq 0xe966(%rip), %rsi      # 0x1254c
callq 0x3f80
testb $0x1, %al
jne 0x3bf4
jmp 0x3c7c
movq -0x18(%rbp), %rax
testb $0x1, 0x12(%rax)
jne 0x3c33
movq 0x173cb(%rip), %rdi     # 0x1afd0
leaq 0xe6c1(%rip), %rsi      # 0x122cd
callq 0x3200
movq %rax, %rdi
movq 0x173a5(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rax
movb $0x1, 0x12(%rax)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x3c77
movq 0x17396(%rip), %rdi     # 0x1afd0
leaq 0xe6cf(%rip), %rsi      # 0x12310
callq 0x3200
movq %rax, %rdi
movq 0x17370(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x17374(%rip), %rdi     # 0x1afd0
leaq 0xe6f4(%rip), %rsi      # 0x12357
callq 0x3200
movq %rax, %rdi
movq 0x1734e(%rip), %rsi     # 0x1afc0
callq 0x3230
jmp 0x3dbf
movq -0x20(%rbp), %rdi
leaq 0xe8af(%rip), %rsi      # 0x12536
callq 0x3f80
testb $0x1, %al
jne 0x3c95
jmp 0x3d1d
movq -0x18(%rbp), %rax
testb $0x1, 0x14(%rax)
jne 0x3cd4
movq 0x1732a(%rip), %rdi     # 0x1afd0
leaq 0xe6d2(%rip), %rsi      # 0x1237f
callq 0x3200
movq %rax, %rdi
movq 0x17304(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rax
movb $0x1, 0x14(%rax)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x3d18
movq 0x172f5(%rip), %rdi     # 0x1afd0
leaq 0xe6e3(%rip), %rsi      # 0x123c5
callq 0x3200
movq %rax, %rdi
movq 0x172cf(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x172d3(%rip), %rdi     # 0x1afd0
leaq 0xe70b(%rip), %rsi      # 0x1240f
callq 0x3200
movq %rax, %rdi
movq 0x172ad(%rip), %rsi     # 0x1afc0
callq 0x3230
jmp 0x3dbd
movq -0x20(%rbp), %rdi
leaq 0xe83f(%rip), %rsi      # 0x12567
callq 0x3f80
testb $0x1, %al
jne 0x3d36
jmp 0x3dbb
movq -0x18(%rbp), %rax
testb $0x1, 0x15(%rax)
jne 0x3d75
movq 0x17289(%rip), %rdi     # 0x1afd0
leaq 0xe6ec(%rip), %rsi      # 0x1243a
callq 0x3200
movq %rax, %rdi
movq 0x17263(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rax
movb $0x1, 0x15(%rax)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x3db9
movq 0x17254(%rip), %rdi     # 0x1afd0
leaq 0xe6fb(%rip), %rsi      # 0x1247e
callq 0x3200
movq %rax, %rdi
movq 0x1722e(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x17232(%rip), %rdi     # 0x1afd0
leaq 0xe721(%rip), %rsi      # 0x124c6
callq 0x3200
movq %rax, %rdi
movq 0x1720c(%rip), %rsi     # 0x1afc0
callq 0x3230
jmp 0x3dbb
jmp 0x3dbd
jmp 0x3dbf
jmp 0x3dc1
jmp 0x3dc3
jmp 0x3dc5
movq 0x17204(%rip), %rdi     # 0x1afd0
leaq 0xe71c(%rip), %rsi      # 0x124ef
callq 0x3200
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0xf25b(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0x171c0(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x171c4(%rip), %rdi     # 0x1afd0
leaq 0xe6f9(%rip), %rsi      # 0x1250c
callq 0x3200
movq %rax, %rdi
movq 0x1719e(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)