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

	// If satchel size is 4 or greater, first pop front item in queue
	if (satchel.size() == capacity) {
		cout << "Oops! Your Gold Satchel is already full with " << capacity << " "
		        "weapons." << endl;
		cout << "Before adding your new " << weapon << ", you will have to "
		     "drop the first weapon\nin your Gold Satchel." << endl;
		cout << "The weapon you drop is the " << satchel.front() << "." << endl;

		// Delete front weapon
		satchel.pop_front();

		// Update weapon status after one was deleted
		updateWeapons();

		cout << "Your current weapon list is:" << endl;
		printWeapons();
	}

	// Now vector should have maximum 3 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 your Gold 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 Gold Satchel is: " <<
	     getNumUniqueWeapons() << "." << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0xaf61(%rip), %rdi      # 0x10fd0
leaq 0x603a(%rip), %rsi      # 0xc0b0
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
leaq 0x3f73(%rip), %rsi      # 0xa000
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x18(%rbx), %r15
movq %r15, %rdi
callq 0x651e
movl 0x8(%rbx), %ecx
cmpq %rcx, %rax
jne 0x6180
movq 0xaf14(%rip), %r12      # 0x10fd0
leaq 0x6011(%rip), %rsi      # 0xc0d4
movq %r12, %rdi
callq 0x21a0
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x2110
leaq 0x50b9(%rip), %rsi      # 0xb196
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x600e(%rip), %rsi      # 0xc102
movq %r12, %rdi
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
leaq 0x600c(%rip), %rsi      # 0xc11a
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x6034(%rip), %rsi      # 0xc159
movq %r12, %rdi
callq 0x21a0
movq 0x28(%rbx), %rsi
movq %rax, %rdi
callq 0x2170
leaq 0x3ec0(%rip), %rsi      # 0xa000
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movq %r15, %rdi
callq 0x652e
movq %rbx, %rdi
callq 0x62fa
leaq 0x600e(%rip), %rsi      # 0xc175
movq %r12, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6558
leaq 0x33b2(%rip), %rsi      # 0x9544
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x61a4
movb $0x1, 0x10(%rbx)
jmp 0x621f
leaq 0x33b3(%rip), %rsi      # 0x955e
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x61bd
movb $0x1, 0x13(%rbx)
jmp 0x621f
leaq 0x3393(%rip), %rsi      # 0x9557
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x61d6
movb $0x1, 0x11(%rbx)
jmp 0x621f
leaq 0x338a(%rip), %rsi      # 0x9567
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x61ef
movb $0x1, 0x15(%rbx)
jmp 0x621f
leaq 0x3356(%rip), %rsi      # 0x954c
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x6208
movb $0x1, 0x12(%rbx)
jmp 0x621f
leaq 0x3327(%rip), %rsi      # 0x9536
movq %r14, %rdi
callq 0x2aab
testb %al, %al
je 0x621f
movb $0x1, 0x14(%rbx)
movq 0xadaa(%rip), %r12      # 0x10fd0
leaq 0x5f65(%rip), %rsi      # 0xc192
movq %r12, %rdi
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
leaq 0x5f56(%rip), %rsi      # 0xc19d
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x3291(%rip), %rsi      # 0x94ef
movq %r12, %rdi
callq 0x21a0
movq %rax, %r14
movq %r15, %rdi
callq 0x651e
movq %r14, %rdi
movq %rax, %rsi
callq 0x2110
leaq 0x3d7d(%rip), %r14      # 0xa000
movq %rax, %rdi
movq %r14, %rsi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0x5ed8(%rip), %rsi      # 0xc175
movq %r12, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
leaq 0x5f06(%rip), %rsi      # 0xc1c3
movq %r12, %rdi
callq 0x21a0
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %r15, %rdi
movl %eax, %esi
callq 0x2280
movq %rax, %rdi
movq %r14, %rsi
callq 0x21a0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x20c0
nop