// File: 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
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x170(%rbp)
movq 0x84cb(%rip), %rdi      # 0xcfd0
leaq 0x4843(%rip), %rsi      # 0x934f
callq 0x21a0
movq -0x170(%rbp), %rsi
movq %rax, -0x168(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x7ee0
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rsi
callq 0x2190
movq %rax, -0x158(%rbp)
jmp 0x4b4b
movq -0x158(%rbp), %rdi
leaq 0x4bf6(%rip), %rsi      # 0x974f
callq 0x21a0
movq %rax, -0x178(%rbp)
jmp 0x4b67
movq -0x178(%rbp), %rdi
movq 0x844b(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x4b7c
leaq -0x30(%rbp), %rdi
callq 0x2100
movq 0x8444(%rip), %rdi      # 0xcfd0
leaq 0x45e7(%rip), %rsi      # 0x917a
callq 0x21a0
movq -0x170(%rbp), %rsi
movq %rax, -0x190(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x7ee0
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rsi
callq 0x2190
movq %rax, -0x180(%rbp)
jmp 0x4bd2
movq -0x180(%rbp), %rdi
leaq 0x45b1(%rip), %rsi      # 0x9191
callq 0x21a0
jmp 0x4be7
leaq -0x60(%rbp), %rdi
callq 0x2100
movq 0x83d9(%rip), %rdi      # 0xcfd0
movq %rdi, -0x1a0(%rbp)
leaq 0x45a0(%rip), %rsi      # 0x91a5
callq 0x21a0
movq -0x1a0(%rbp), %rdi
leaq 0x4742(%rip), %rsi      # 0x935a
callq 0x21a0
movq -0x1a0(%rbp), %rdi
leaq 0x4418(%rip), %rsi      # 0x9043
callq 0x21a0
movq %rax, %rdi
movq 0x8386(%rip), %rsi      # 0xcfc0
callq 0x21d0
movl $0x1, %edi
movl $0x2, %esi
callq 0x7f10
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x194(%rbp)
subl $0x1, %eax
je 0x4ca9
jmp 0x4c61
movl -0x194(%rbp), %eax
subl $0x2, %eax
je 0x51e8
jmp 0x5291
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2100
jmp 0x529a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2100
jmp 0x529a
movq -0x10(%rbp), %rdi
callq 0x3340
cmpq $0x3, %rax
jne 0x50c9
movq 0x830d(%rip), %rdi      # 0xcfd0
leaq 0x44e5(%rip), %rsi      # 0x91af
callq 0x21a0
movq %rax, %rdi
movq 0x82e7(%rip), %rsi      # 0xcfc0
callq 0x21d0
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
movq %rax, -0x1a8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3340
movq %rax, %rcx
movq -0x1a8(%rbp), %rax
cmpq %rcx, %rax
jae 0x4d78
movq 0x82c2(%rip), %rdi      # 0xcfd0
leaq 0x44ae(%rip), %rsi      # 0x91c3
callq 0x21a0
movq %rax, %rdi
movl -0x68(%rbp), %esi
addl $0x1, %esi
callq 0x2250
movq %rax, %rdi
leaq 0x4497(%rip), %rsi      # 0x91c9
callq 0x21a0
movq %rax, -0x1b0(%rbp)
movq -0x10(%rbp), %rdi
movl -0x68(%rbp), %eax
movl %eax, %esi
callq 0x3360
movq -0x1b0(%rbp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, %rdi
movq 0x825b(%rip), %rsi      # 0xcfc0
callq 0x21d0
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x4ce5
movq 0x8251(%rip), %rdi      # 0xcfd0
movq %rdi, -0x1c8(%rbp)
leaq 0x4440(%rip), %rsi      # 0x91cd
callq 0x21a0
movq %rax, %rdi
movq 0x8224(%rip), %rsi      # 0xcfc0
movq %rsi, -0x1c0(%rbp)
callq 0x21d0
movq -0x1c8(%rbp), %rdi
leaq 0x45ac(%rip), %rsi      # 0x9362
callq 0x21a0
movq -0x1c0(%rbp), %rsi
movq %rax, %rdi
callq 0x21d0
movq -0x1c8(%rbp), %rdi
leaq 0x43cd(%rip), %rsi      # 0x91a5
callq 0x21a0
movq -0x1c8(%rbp), %rdi
leaq 0x456f(%rip), %rsi      # 0x935a
callq 0x21a0
movq -0x1c8(%rbp), %rdi
leaq 0x4245(%rip), %rsi      # 0x9043
callq 0x21a0
movq -0x1c0(%rbp), %rsi
movq %rax, %rdi
callq 0x21d0
movl $0x1, %edi
movl $0x2, %esi
callq 0x7f10
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x1b4(%rbp)
subl $0x1, %eax
je 0x4e48
jmp 0x4e34
movl -0x1b4(%rbp), %eax
subl $0x2, %eax
je 0x5018
jmp 0x50c4
movq -0x10(%rbp), %rdi
callq 0x3380
movq 0x8178(%rip), %rdi      # 0xcfd0
leaq 0x452a(%rip), %rsi      # 0x9389
callq 0x21a0
movq -0x170(%rbp), %rsi
movq %rax, -0x1e0(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x7ee0
movq -0x1e0(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x2190
movq %rax, -0x1d0(%rbp)
jmp 0x4ea1
movq -0x1d0(%rbp), %rdi
leaq 0x4423(%rip), %rsi      # 0x92d2
callq 0x21a0
movq %rax, -0x1e8(%rbp)
jmp 0x4ebd
movq -0x1e8(%rbp), %rdi
movq 0x80f5(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x4ed2
leaq -0x90(%rbp), %rdi
callq 0x2100
movq -0x170(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x7ee0
movq -0x1f8(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
callq 0x33b0
jmp 0x4f18
leaq -0xb0(%rbp), %rdi
callq 0x2100
movq 0x80a5(%rip), %rdi      # 0xcfd0
leaq 0x42fd(%rip), %rsi      # 0x922f
callq 0x21a0
movq -0x170(%rbp), %rsi
movq %rax, -0x210(%rbp)
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x7ee0
movq -0x210(%rbp), %rdi
movq -0x208(%rbp), %rsi
callq 0x2190
movq %rax, -0x200(%rbp)
jmp 0x4f74
movq -0x200(%rbp), %rdi
leaq 0x42b8(%rip), %rsi      # 0x923a
callq 0x21a0
movq %rax, -0x218(%rbp)
jmp 0x4f90
movq -0x218(%rbp), %rdi
movq 0x8022(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x4fa5
leaq -0xd0(%rbp), %rdi
callq 0x2100
movq -0x170(%rbp), %rax
movb $0x1, 0x29(%rax)
jmp 0x50c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x2100
jmp 0x529a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x2100
jmp 0x529a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2100
jmp 0x529a
movq 0x7fb1(%rip), %rdi      # 0xcfd0
leaq 0x439e(%rip), %rsi      # 0x93c4
callq 0x21a0
movq -0x170(%rbp), %rsi
movq %rax, -0x230(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x7ee0
movq -0x230(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0x2190
movq %rax, -0x220(%rbp)
jmp 0x5068
movq -0x220(%rbp), %rdi
leaq 0x4364(%rip), %rsi      # 0x93da
callq 0x21a0
movq %rax, -0x238(%rbp)
jmp 0x5084
movq -0x238(%rbp), %rdi
movq 0x7f2e(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x5099
leaq -0xf0(%rbp), %rdi
callq 0x2100
jmp 0x50c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x2100
jmp 0x529a
jmp 0x51e3
movq -0x170(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x110(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x7ee0
movq -0x248(%rbp), %rdi
movq -0x240(%rbp), %rsi
callq 0x33b0
jmp 0x5103
leaq -0x110(%rbp), %rdi
callq 0x2100
movq 0x7eba(%rip), %rdi      # 0xcfd0
leaq 0x4112(%rip), %rsi      # 0x922f
callq 0x21a0
movq -0x170(%rbp), %rsi
movq %rax, -0x260(%rbp)
leaq -0x130(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x7ee0
movq -0x260(%rbp), %rdi
movq -0x258(%rbp), %rsi
callq 0x2190
movq %rax, -0x250(%rbp)
jmp 0x515f
movq -0x250(%rbp), %rdi
leaq 0x40cd(%rip), %rsi      # 0x923a
callq 0x21a0
movq %rax, -0x268(%rbp)
jmp 0x517b
movq -0x268(%rbp), %rdi
movq 0x7e37(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x5190
leaq -0x130(%rbp), %rdi
callq 0x2100
movq -0x170(%rbp), %rax
movb $0x1, 0x29(%rax)
jmp 0x51e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x2100
jmp 0x529a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x2100
jmp 0x529a
jmp 0x5291
movq 0x7de1(%rip), %rdi      # 0xcfd0
leaq 0x41ce(%rip), %rsi      # 0x93c4
callq 0x21a0
movq -0x170(%rbp), %rsi
movq %rax, -0x280(%rbp)
leaq -0x150(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x7ee0
movq -0x280(%rbp), %rdi
movq -0x278(%rbp), %rsi
callq 0x2190
movq %rax, -0x270(%rbp)
jmp 0x5238
movq -0x270(%rbp), %rdi
leaq 0x4194(%rip), %rsi      # 0x93da
callq 0x21a0
movq %rax, -0x288(%rbp)
jmp 0x5254
movq -0x288(%rbp), %rdi
movq 0x7d5e(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x5269
leaq -0x150(%rbp), %rdi
callq 0x2100
jmp 0x5291
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x2100
jmp 0x529a
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x22c0
nopw %cs:(%rax,%rax)
nopl (%rax)