// File: angelapwen[P]text-based-game/vectorSatchel.cpp
// Function: VectorSatchel::addWeapon(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void VectorSatchel::addWeapon(std::string weapon) {
	cout << "\nCongratulations! You have found a " << weapon << "." << endl;

	// If vector is at capacity, call randomDrop
	if (satchel.size() == capacity) {
		cout << "Oops! Your Silver Satchel is already full with " << capacity <<
		     " weapons." << endl;
		cout << "Before adding your new " << weapon << ", you will have to "
				 "randomly drop one of your existing weapons." << endl;
		randomDrop();
	}

	// Now vector should have maximum four weapons
	satchel.push_back(weapon);

	// Update bool variables to true if the new weapon was not a repeat
	if (weapon == "knife") {
		knife = true;
	}
	else if (weapon == "wrench") {
		wrench = true;
	}
	else if (weapon == "rope") {
		rope = true;
	}
	else if (weapon == "pipe") {
		pipe = true;
	}
	else if (weapon == "revolver") {
		revolver = true;
	}
	else if (weapon == "candlestick") {
		candlestick = true;
	}

	cout << "\nYour new " << weapon << " has been added to the Silver Satchel."
												<< endl;

	// Print total weapons, list, and number of unique weapons
	cout << "Your total weapon count is: " << satchel.size() << "." <<
	     endl;
	cout << "Your current weapon list is:" << endl;
	printWeapons();
	cout << "The number of unique weapons in your Silver Satchel is: " <<
	     getNumUniqueWeapons() << "." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0xca5d(%rip), %rdi      # 0x1afd0
leaq 0x6b82(%rip), %rsi      # 0x150fc
callq 0x3200
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0x4ab7(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0xca1c(%rip), %rsi      # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0xebf0
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
jne 0xe64c
movq 0xca03(%rip), %rdi      # 0x1afd0
leaq 0x70f5(%rip), %rsi      # 0x156c9
callq 0x3200
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x5bf0(%rip), %rsi      # 0x141e2
callq 0x3200
movq %rax, %rdi
movq 0xc9bf(%rip), %rsi      # 0x1afc0
callq 0x3230
movq 0xc9c3(%rip), %rdi      # 0x1afd0
leaq 0x6b3a(%rip), %rsi      # 0x1514e
callq 0x3200
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0x70ca(%rip), %rsi      # 0x156f9
callq 0x3200
movq %rax, %rdi
movq 0xc982(%rip), %rsi      # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rdi
callq 0xe840
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0xec10
movq -0x20(%rbp), %rdi
leaq 0x3edc(%rip), %rsi      # 0x12544
callq 0x3f80
testb $0x1, %al
jne 0xe673
jmp 0xe680
movq -0x18(%rbp), %rax
movb $0x1, 0x10(%rax)
jmp 0xe72b
movq -0x20(%rbp), %rdi
leaq 0x3ed3(%rip), %rsi      # 0x1255e
callq 0x3f80
testb $0x1, %al
jne 0xe696
jmp 0xe6a3
movq -0x18(%rbp), %rax
movb $0x1, 0x13(%rax)
jmp 0xe729
movq -0x20(%rbp), %rdi
leaq 0x3ea9(%rip), %rsi      # 0x12557
callq 0x3f80
testb $0x1, %al
jne 0xe6b9
jmp 0xe6c3
movq -0x18(%rbp), %rax
movb $0x1, 0x11(%rax)
jmp 0xe727
movq -0x20(%rbp), %rdi
leaq 0x3e99(%rip), %rsi      # 0x12567
callq 0x3f80
testb $0x1, %al
jne 0xe6d9
jmp 0xe6e3
movq -0x18(%rbp), %rax
movb $0x1, 0x15(%rax)
jmp 0xe725
movq -0x20(%rbp), %rdi
leaq 0x3e5e(%rip), %rsi      # 0x1254c
callq 0x3f80
testb $0x1, %al
jne 0xe6f9
jmp 0xe703
movq -0x18(%rbp), %rax
movb $0x1, 0x12(%rax)
jmp 0xe723
movq -0x20(%rbp), %rdi
leaq 0x3e28(%rip), %rsi      # 0x12536
callq 0x3f80
testb $0x1, %al
jne 0xe719
jmp 0xe721
movq -0x18(%rbp), %rax
movb $0x1, 0x14(%rax)
jmp 0xe723
jmp 0xe725
jmp 0xe727
jmp 0xe729
jmp 0xe72b
movq 0xc89e(%rip), %rdi      # 0x1afd0
leaq 0x6aa5(%rip), %rsi      # 0x151de
callq 0x3200
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0x6fe4(%rip), %rsi      # 0x15738
callq 0x3200
movq %rax, %rdi
movq 0xc85d(%rip), %rsi      # 0x1afc0
callq 0x3230
movq 0xc861(%rip), %rdi      # 0x1afd0
leaq 0x3d79(%rip), %rsi      # 0x124ef
callq 0x3200
movq -0x18(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x18, %rdi
callq 0xebf0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x3070
movq %rax, %rdi
leaq 0x48aa(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0xc80f(%rip), %rsi      # 0x1afc0
callq 0x3230
movq 0xc813(%rip), %rdi      # 0x1afd0
leaq 0x69fd(%rip), %rsi      # 0x151c1
callq 0x3200
movq %rax, %rdi
movq 0xc7ed(%rip), %rsi      # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xc7e7(%rip), %rdi      # 0x1afd0
leaq 0x6f6f(%rip), %rsi      # 0x1575f
callq 0x3200
movq -0x18(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x28(%rbp), %rdi
movl %eax, %esi
callq 0x3360
movq %rax, %rdi
leaq 0x4834(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0xc799(%rip), %rsi      # 0x1afc0
callq 0x3230
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)