// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movq 0xa172(%rip), %rbx      # 0x14fd0
leaq 0x5295(%rip), %rsi      # 0x100fa
movl $0x23, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %r12
leaq 0x31e9(%rip), %rsi      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq 0x20(%r14), %rax
subq 0x18(%r14), %rax
leaq 0x18(%r14), %r12
sarq $0x5, %rax
movl 0x8(%r14), %ecx
cmpq %rcx, %rax
jne 0xafad
movq 0xa0ec(%rip), %r13      # 0x14fd0
leaq 0x57dc(%rip), %rsi      # 0x106c7
movl $0x2f, %edx
movq %r13, %rdi
callq 0x21c0
movl 0x8(%r14), %esi
movq %r13, %rdi
callq 0x20f0
movq %rax, %rbp
leaq 0x42fc(%rip), %rsi      # 0xf20a
movl $0x9, %edx
movq %rax, %rdi
callq 0x21c0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq 0x5202(%rip), %rsi      # 0x1014c
movl $0x17, %edx
movq %r13, %rdi
callq 0x21c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r13, %rdi
callq 0x21c0
movq %rax, %r13
leaq 0x5787(%rip), %rsi      # 0x106f7
movl $0x3e, %edx
movq %rax, %rdi
callq 0x21c0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq %r14, %rdi
callq 0xb1d0
movq %r12, %rdi
movq %r15, %rsi
callq 0xb4b0
leaq 0x2585(%rip), %rsi      # 0xd544
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb031
leaq 0x258c(%rip), %rsi      # 0xd55e
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb038
leaq 0x2572(%rip), %rsi      # 0xd557
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb03f
leaq 0x256f(%rip), %rsi      # 0xd567
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb046
leaq 0x2541(%rip), %rsi      # 0xd54c
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb04d
leaq 0x2518(%rip), %rsi      # 0xd536
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0xb052
movb $0x1, 0x14(%r14)
jmp 0xb052
movb $0x1, 0x10(%r14)
jmp 0xb052
movb $0x1, 0x13(%r14)
jmp 0xb052
movb $0x1, 0x11(%r14)
jmp 0xb052
movb $0x1, 0x15(%r14)
jmp 0xb052
movb $0x1, 0x12(%r14)
leaq 0x5183(%rip), %rsi      # 0x101dc
movl $0xa, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x56b7(%rip), %rsi      # 0x10736
movl $0x26, %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 0x2435(%rip), %rsi      # 0xd4ef
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x21c0
movq 0x20(%r14), %rsi
subq 0x18(%r14), %rsi
sarq $0x5, %rsi
movq %rbx, %rdi
callq 0x20f0
movq %rax, %r12
leaq 0x2f8f(%rip), %r15      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq 0x509b(%rip), %rsi      # 0x101bf
movl $0x1c, %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
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
leaq 0x55f5(%rip), %rsi      # 0x1075d
movl $0x38, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq %rbx, %rdi
movl %eax, %esi
callq 0x2260
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
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
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100