// File: /workspace/github_cpp_makefile_star2_O3/isimplyexcel[P]text-based-game/Fire.cpp
// Function: Fire::findItem(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void Fire::findItem(std::vector<std::string>& container){
	     //	You find an item
    std::cout << "You found " << this->getItemName() << "!" << std::endl;
    std::cout << "Would you like to add " << this->getItemName() <<  " to your backpack?\n";
    std::cout << "1) Yes.\n";
    std::cout << "2) No.\n";

    std::cout << "Enter your choice: " << std::endl;
    int choice = validate(1,2);

	switch(choice){
		//	add item
		case 1:
		{
			if(container.size() == 3){
                //	print backpack content
                std::cout << "Backpack contents: " << std::endl;

                for(unsigned int i = 0; i < container.size(); i++) {
                    std::cout << "item " << i + 1 << " - " << container[i] << std::endl;
                }

				std::cout << "\nYou already have 3 items. You cannot carry anymore items." << std::endl;
				std::cout << "Would you like to drop the last item?\n" << std::endl;
				std::cout << "1) Yes.\n";
				std::cout << "2) No.\n";

				std::cout << "Enter your choice: " << std::endl;

				int dropItem = validate(1,2);

				switch(dropItem){
					//	You chose to drop the item
					case 1:
					{
						//	container should now have two items
						container.pop_back();
						std::cout << "You dropped the last item and now have enough room to add " << this->getItemName()
						          << "." << std::endl;

						container.push_back(this->getItemName());
						std::cout << "You added " << this->getItemName() << " to your backpack!" << std::endl;
						this->itemTaken = true;
						break;
					}
					//	Do not drop last item
					case 2:
					{
						std::cout << "You chose not to add " << this->getItemName() << " to your backpack." << std::endl;
						break;
					}
				}
			}
			else{
				//	add the item to the backpack
				container.push_back(this->getItemName());
				std::cout << "You added " << this->getItemName() << " to your backpack!" << std::endl;
				this->itemTaken = true;
			}
			break;
		}
		//	do not add item
		case 2:
		{
			std::cout << "You chose not to add " << this->getItemName() << " to your backpack." << std::endl;
			break;
		}	
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r12
movq 0x6475(%rip), %rbx      # 0x9fd0
leaq 0x37dd(%rip), %rsi      # 0x733f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x661e
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x3ba9(%rip), %rsi      # 0x773f
movl $0x1, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0x10(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x3be5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x63e4(%rip), %r13      # 0x9fd0
leaq 0x3577(%rip), %rsi      # 0x716a
movl $0x16, %edx
movq %r13, %rdi
callq 0x2160
movq %rsp, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x661e
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r13, %rdi
callq 0x2160
leaq 0x355d(%rip), %rsi      # 0x7181
movl $0x13, %edx
movq %rax, %rdi
callq 0x2160
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3c47
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0x3547(%rip), %rsi      # 0x7195
movl $0x8, %edx
movq %r13, %rdi
callq 0x2160
leaq 0x36e8(%rip), %rsi      # 0x734a
movl $0x7, %edx
movq %r13, %rdi
callq 0x2160
leaq 0x33cd(%rip), %rsi      # 0x7043
movl $0x13, %edx
movq %r13, %rdi
callq 0x2160
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl $0x1, %edi
movl $0x2, %esi
callq 0x6644
cmpl $0x1, %eax
je 0x3d61
cmpl $0x2, %eax
jne 0x420f
movq 0x62fd(%rip), %rbx      # 0x9fd0
leaq 0x36da(%rip), %rsi      # 0x73b4
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x661e
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x36bc(%rip), %rsi      # 0x73ca
movl $0x12, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x420f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x420f
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq $0x60, %rax
jne 0x3fea
movq %r12, 0x20(%rsp)
leaq 0x3421(%rip), %rsi      # 0x719f
movl $0x13, %edx
movq %r13, %rdi
callq 0x2160
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x3e64
movl $0x1, %r15d
xorl %ebx, %ebx
movq 0x6201(%rip), %r12      # 0x9fd0
movl $0x5, %edx
movq %r12, %rdi
leaq 0x33d5(%rip), %rsi      # 0x71b3
callq 0x2160
movl %r15d, %ebp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x20c0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0x33b6(%rip), %rsi      # 0x71b9
callq 0x2160
movq (%r14), %rax
shlq $0x5, %rbx
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
movq %r13, %rdi
callq 0x2160
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x5, %rax
incl %r15d
movq %rbp, %rbx
cmpq %rbp, %rax
ja 0x3dcf
leaq 0x3352(%rip), %rsi      # 0x71bd
movl $0x3a, %edx
movq 0x6159(%rip), %rbx      # 0x9fd0
movq %rbx, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0x34a5(%rip), %rsi      # 0x7352
movl $0x26, %edx
movq %rbx, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0x32ad(%rip), %rsi      # 0x7195
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x344e(%rip), %rsi      # 0x734a
movl $0x7, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x3133(%rip), %rsi      # 0x7043
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl $0x1, %edi
movl $0x2, %esi
callq 0x6644
cmpl $0x1, %eax
je 0x4094
cmpl $0x2, %eax
leaq 0x10(%rsp), %r15
movq 0x20(%rsp), %r12
jne 0x420f
movq 0x605a(%rip), %rbx      # 0x9fd0
leaq 0x3437(%rip), %rsi      # 0x73b4
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x661e
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x3419(%rip), %rsi      # 0x73ca
movl $0x12, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
jmp 0x3d42
movq %rsp, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x661e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3268
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4019
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x5fb0(%rip), %rbx      # 0x9fd0
leaq 0x31f8(%rip), %rsi      # 0x721f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x661e
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x31cf(%rip), %rsi      # 0x722a
movl $0x12, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
jmp 0x41f3
movq 0x8(%r14), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%r14)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
cmpq %rax, %rdi
movq 0x20(%rsp), %r12
je 0x40bd
movq (%rax), %rsi
incq %rsi
callq 0x2140
movq 0x5f0c(%rip), %rbx      # 0x9fd0
leaq 0x32ae(%rip), %rsi      # 0x7379
movl $0x3a, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x661e
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x31c3(%rip), %rsi      # 0x72c2
movl $0x1, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq (%rsp), %rdi
leaq 0x10(%rsp), %r15
cmpq %r15, %rdi
je 0x414e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rsp, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x661e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3268
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x417d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x5e4c(%rip), %rbx      # 0x9fd0
leaq 0x3094(%rip), %rsi      # 0x721f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x661e
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x306b(%rip), %rsi      # 0x722a
movl $0x12, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4209
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movb $0x1, 0x29(%r12)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4238
jmp 0x4238
jmp 0x4238
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0x4252
jmp 0x4238
jmp 0x4238
jmp 0x4238
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x4257
jmp 0x4264
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4264
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21a0