// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x1083d(%rip), %rdi     # 0x1afd0
leaq 0xa962(%rip), %rsi      # 0x150fc
callq 0x3200
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0x8897(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0x107fc(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0xae10
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
jne 0xa8f3
movq 0x107e3(%rip), %rdi     # 0x1afd0
leaq 0xa92c(%rip), %rsi      # 0x15120
callq 0x3200
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x99d0(%rip), %rsi      # 0x141e2
callq 0x3200
movq %rax, %rdi
movq 0x1079f(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x107a3(%rip), %rdi     # 0x1afd0
leaq 0xa91a(%rip), %rsi      # 0x1514e
callq 0x3200
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0xa917(%rip), %rsi      # 0x15166
callq 0x3200
movq %rax, %rdi
movq 0x10762(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x10766(%rip), %rdi     # 0x1afd0
leaq 0xa934(%rip), %rsi      # 0x151a5
callq 0x3200
movq -0x18(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x18, %rdi
callq 0xae40
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x31d0
movq %rax, %rdi
leaq 0x87af(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0x10714(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0xae70
movq -0x18(%rbp), %rdi
callq 0xaae0
movq 0x10702(%rip), %rdi     # 0x1afd0
leaq 0xa8ec(%rip), %rsi      # 0x151c1
callq 0x3200
movq %rax, %rdi
movq 0x106dc(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0xaee0
movq -0x20(%rbp), %rdi
leaq 0x7c35(%rip), %rsi      # 0x12544
callq 0x3f80
testb $0x1, %al
jne 0xa91a
jmp 0xa927
movq -0x18(%rbp), %rax
movb $0x1, 0x10(%rax)
jmp 0xa9d2
movq -0x20(%rbp), %rdi
leaq 0x7c2c(%rip), %rsi      # 0x1255e
callq 0x3f80
testb $0x1, %al
jne 0xa93d
jmp 0xa94a
movq -0x18(%rbp), %rax
movb $0x1, 0x13(%rax)
jmp 0xa9d0
movq -0x20(%rbp), %rdi
leaq 0x7c02(%rip), %rsi      # 0x12557
callq 0x3f80
testb $0x1, %al
jne 0xa960
jmp 0xa96a
movq -0x18(%rbp), %rax
movb $0x1, 0x11(%rax)
jmp 0xa9ce
movq -0x20(%rbp), %rdi
leaq 0x7bf2(%rip), %rsi      # 0x12567
callq 0x3f80
testb $0x1, %al
jne 0xa980
jmp 0xa98a
movq -0x18(%rbp), %rax
movb $0x1, 0x15(%rax)
jmp 0xa9cc
movq -0x20(%rbp), %rdi
leaq 0x7bb7(%rip), %rsi      # 0x1254c
callq 0x3f80
testb $0x1, %al
jne 0xa9a0
jmp 0xa9aa
movq -0x18(%rbp), %rax
movb $0x1, 0x12(%rax)
jmp 0xa9ca
movq -0x20(%rbp), %rdi
leaq 0x7b81(%rip), %rsi      # 0x12536
callq 0x3f80
testb $0x1, %al
jne 0xa9c0
jmp 0xa9c8
movq -0x18(%rbp), %rax
movb $0x1, 0x14(%rax)
jmp 0xa9ca
jmp 0xa9cc
jmp 0xa9ce
jmp 0xa9d0
jmp 0xa9d2
movq 0x105f7(%rip), %rdi     # 0x1afd0
leaq 0xa7fe(%rip), %rsi      # 0x151de
callq 0x3200
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0xa7ee(%rip), %rsi      # 0x151e9
callq 0x3200
movq %rax, %rdi
movq 0x105b6(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x105ba(%rip), %rdi     # 0x1afd0
leaq 0x7ad2(%rip), %rsi      # 0x124ef
callq 0x3200
movq -0x18(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0x18, %rdi
callq 0xae10
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x3070
movq %rax, %rdi
leaq 0x8603(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0x10568(%rip), %rsi     # 0x1afc0
callq 0x3230
movq 0x1056c(%rip), %rdi     # 0x1afd0
leaq 0xa756(%rip), %rsi      # 0x151c1
callq 0x3200
movq %rax, %rdi
movq 0x10546(%rip), %rsi     # 0x1afc0
callq 0x3230
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10540(%rip), %rdi     # 0x1afd0
leaq 0xa778(%rip), %rsi      # 0x1520f
callq 0x3200
movq -0x18(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x30(%rbp), %rdi
movl %eax, %esi
callq 0x3360
movq %rax, %rdi
leaq 0x858d(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0x104f2(%rip), %rsi     # 0x1afc0
callq 0x3230
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)