// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0xc296(%rip), %rbx      # 0x14fd0
leaq 0x73b9(%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 0x530d(%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
leaq 0x18(%r14), %r12
movq 0x60(%r14), %rax
movq %rax, %rcx
subq 0x40(%r14), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x4, %rcx
movq 0x48(%r14), %rax
subq 0x50(%r14), %rax
sarq $0x5, %rax
movq 0x38(%r14), %rdx
subq 0x28(%r14), %rdx
sarq $0x5, %rdx
addq %rax, %rdx
addq %rcx, %rdx
movl 0x8(%r14), %eax
cmpq %rax, %rdx
jne 0x8f61
leaq 0x7331(%rip), %rsi      # 0x1011e
movl $0x2d, %edx
movq %rbx, %rdi
callq 0x21c0
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x20f0
movq %rax, %r13
leaq 0x63fa(%rip), %rsi      # 0xf20a
movl $0x9, %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
leaq 0x7300(%rip), %rsi      # 0x1014c
movl $0x17, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %r13
leaq 0x72f2(%rip), %rsi      # 0x10164
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
leaq 0x72f5(%rip), %rsi      # 0x101a3
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x21c0
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %r13
leaq 0x519c(%rip), %rsi      # 0xe074
movl $0x1, %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 %r12, %rdi
callq 0x94a4
movq %r14, %rdi
callq 0x91ac
leaq 0x729b(%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)
movq %r12, %rdi
movq %r15, %rsi
callq 0x94e8
leaq 0x45d1(%rip), %rsi      # 0xd544
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0x8fe5
leaq 0x45d8(%rip), %rsi      # 0xd55e
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0x8fec
leaq 0x45be(%rip), %rsi      # 0xd557
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0x8ff3
leaq 0x45bb(%rip), %rsi      # 0xd567
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0x8ffa
leaq 0x458d(%rip), %rsi      # 0xd54c
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
je 0x9001
leaq 0x4564(%rip), %rsi      # 0xd536
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x9006
movb $0x1, 0x14(%r14)
jmp 0x9006
movb $0x1, 0x10(%r14)
jmp 0x9006
movb $0x1, 0x13(%r14)
jmp 0x9006
movb $0x1, 0x11(%r14)
jmp 0x9006
movb $0x1, 0x15(%r14)
jmp 0x9006
movb $0x1, 0x12(%r14)
leaq 0x71cf(%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 0x71b4(%rip), %rsi      # 0x101e7
movl $0x25, %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 0x4481(%rip), %rsi      # 0xd4ef
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x21c0
movq 0x60(%r14), %rax
movq %rax, %rcx
subq 0x40(%r14), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x4, %rcx
movq 0x38(%r14), %rsi
movq 0x48(%r14), %rax
subq 0x50(%r14), %rax
subq 0x28(%r14), %rsi
sarq $0x5, %rax
sarq $0x5, %rsi
addq %rax, %rsi
addq %rcx, %rsi
movq %rbx, %rdi
callq 0x20f0
movq %rax, %r12
leaq 0x4fae(%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 0x70ba(%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 0x70c4(%rip), %rsi      # 0x1020d
movl $0x36, %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
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2100