// File: /workspace/github_cpp_makefile_star2_O1/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 0xa11e(%rip), %rbx      # 0x14fd0
leaq 0x5241(%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 0x3195(%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 0xb001
movq 0xa098(%rip), %r13      # 0x14fd0
leaq 0x5788(%rip), %rsi      # 0x106c7
movl $0x2f, %edx
movq %r13, %rdi
callq 0x21c0
movl 0x8(%r14), %esi
movq %r13, %rdi
callq 0x20f0
movq %rax, %rbp
leaq 0x42a8(%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 0x51ae(%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 0x5733(%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 0xb224
movq %r12, %rdi
movq %r15, %rsi
callq 0xb4fe
leaq 0x2531(%rip), %rsi      # 0xd544
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb085
leaq 0x2538(%rip), %rsi      # 0xd55e
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb08c
leaq 0x251e(%rip), %rsi      # 0xd557
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb093
leaq 0x251b(%rip), %rsi      # 0xd567
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb09a
leaq 0x24ed(%rip), %rsi      # 0xd54c
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0xb0a1
leaq 0x24c4(%rip), %rsi      # 0xd536
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0xb0a6
movb $0x1, 0x14(%r14)
jmp 0xb0a6
movb $0x1, 0x10(%r14)
jmp 0xb0a6
movb $0x1, 0x13(%r14)
jmp 0xb0a6
movb $0x1, 0x11(%r14)
jmp 0xb0a6
movb $0x1, 0x15(%r14)
jmp 0xb0a6
movb $0x1, 0x12(%r14)
leaq 0x512f(%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 0x5663(%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 0x23e1(%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 0x2f3b(%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 0x5047(%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 0x55a1(%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