// File: /workspace/github_cpp_makefile_star2_O2/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 0x4d07(%rip), %rdi      # 0x7fd0
leaq 0x206f(%rip), %rsi      # 0x533f
callq 0x2150
movq %rax, %rbx
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x4d3c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2140
leaq 0x2447(%rip), %rsi      # 0x573f
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
movq %rsp, %rdi
callq 0x2090
movq 0x4cb9(%rip), %rdi      # 0x7fd0
leaq 0x1e4c(%rip), %rsi      # 0x516a
callq 0x2150
movq %rax, %rbx
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x4d3c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2140
leaq 0x1e3b(%rip), %rsi      # 0x5181
movq %rax, %rdi
callq 0x2150
movq %rsp, %rdi
callq 0x2090
movq 0x4c73(%rip), %rbx      # 0x7fd0
leaq 0x1e31(%rip), %rsi      # 0x5195
movq %rbx, %rdi
callq 0x2150
leaq 0x1fd7(%rip), %rsi      # 0x534a
movq %rbx, %rdi
callq 0x2150
leaq 0x1cc1(%rip), %rsi      # 0x5043
movq %rbx, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
pushq $0x1
popq %r15
pushq $0x2
popq %rsi
movl %r15d, %edi
callq 0x4d50
cmpl $0x1, %eax
je 0x3402
cmpl $0x2, %eax
jne 0x36a3
movq 0x4c1a(%rip), %rdi      # 0x7fd0
leaq 0x1ff7(%rip), %rsi      # 0x53b4
callq 0x2150
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x4d3c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
leaq 0x1fe5(%rip), %rsi      # 0x53ca
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
movq %rsp, %rdi
callq 0x2090
jmp 0x36a3
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq $0x60, %rax
jne 0x3567
movq %r12, 0x20(%rsp)
movq 0x4bb1(%rip), %r12      # 0x7fd0
leaq 0x1d79(%rip), %rsi      # 0x519f
movq %r12, %rdi
callq 0x2150
leaq 0x1d7e(%rip), %r13      # 0x51b3
leaq 0x1d7d(%rip), %rbp      # 0x51b9
leal -0x1(%r15), %ebx
movq %rax, %rdi
callq 0x20a0
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x5, %rax
cmpq %rbx, %rax
jbe 0x3490
movq %r12, %rdi
movq %r13, %rsi
callq 0x2150
movl %r15d, %esi
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2150
shlq $0x5, %rbx
addq (%r14), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2140
incl %r15d
jmp 0x343c
movq 0x4b39(%rip), %rbx      # 0x7fd0
leaq 0x1d1f(%rip), %rsi      # 0x51bd
movq %rbx, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
leaq 0x1e9d(%rip), %rsi      # 0x5352
movq %rbx, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
leaq 0x1cc9(%rip), %rsi      # 0x5195
movq %rbx, %rdi
callq 0x2150
leaq 0x1e6f(%rip), %rsi      # 0x534a
movq %rbx, %rdi
callq 0x2150
leaq 0x1b59(%rip), %rsi      # 0x5043
movq %rbx, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
pushq $0x1
popq %rdi
pushq $0x2
popq %rsi
callq 0x4d50
cmpl $0x1, %eax
je 0x35d3
cmpl $0x2, %eax
movq 0x20(%rsp), %r15
jne 0x36a3
movq 0x4aad(%rip), %rdi      # 0x7fd0
leaq 0x1e8a(%rip), %rsi      # 0x53b4
callq 0x2150
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x4d3c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
leaq 0x1e78(%rip), %rsi      # 0x53ca
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
jmp 0x33f5
movq %rsp, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4d3c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ca2
movq %rsp, %rdi
callq 0x2090
movq 0x4a41(%rip), %rdi      # 0x7fd0
leaq 0x1c89(%rip), %rsi      # 0x521f
callq 0x2150
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x4d3c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
leaq 0x1c6c(%rip), %rsi      # 0x522a
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
jmp 0x3695
movq %r14, %rdi
callq 0x2ba4
movq 0x49ee(%rip), %rdi      # 0x7fd0
leaq 0x1d90(%rip), %rsi      # 0x5379
callq 0x2150
movq %rax, %rbx
movq %rsp, %r15
movq %r15, %rdi
movq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0x4d3c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2140
leaq 0x1cac(%rip), %rsi      # 0x52c2
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
movq %rsp, %rdi
callq 0x2090
movq %rsp, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4d3c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ca2
movq %rsp, %rdi
callq 0x2090
movq 0x497a(%rip), %rdi      # 0x7fd0
leaq 0x1bc2(%rip), %rsi      # 0x521f
callq 0x2150
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x4d3c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
leaq 0x1ba5(%rip), %rsi      # 0x522a
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20a0
movq %rsp, %rdi
callq 0x2090
movb $0x1, 0x29(%r12)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36c2
jmp 0x36c2
jmp 0x36c2
jmp 0x36c2
jmp 0x36c2
jmp 0x36c2
jmp 0x36c2
jmp 0x36c2
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x21e0
nop