// File: isimplyexcel[P]text-based-game/Flick.cpp
// Function: Flick::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 Flick::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?" << 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) {
                    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 0x774b(%rip), %rdi      # 0xcfd0
leaq 0x3ac3(%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 0x58cb
movq -0x158(%rbp), %rdi
leaq 0x3e76(%rip), %rsi      # 0x974f
callq 0x21a0
movq %rax, -0x178(%rbp)
jmp 0x58e7
movq -0x178(%rbp), %rdi
movq 0x76cb(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x58fc
leaq -0x30(%rbp), %rdi
callq 0x2100
movq 0x76c4(%rip), %rdi      # 0xcfd0
leaq 0x3867(%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 0x5952
movq -0x180(%rbp), %rdi
leaq 0x3831(%rip), %rsi      # 0x9191
callq 0x21a0
jmp 0x5967
leaq -0x60(%rbp), %rdi
callq 0x2100
movq 0x7659(%rip), %rdi      # 0xcfd0
movq %rdi, -0x1a0(%rbp)
leaq 0x3820(%rip), %rsi      # 0x91a5
callq 0x21a0
movq -0x1a0(%rbp), %rdi
leaq 0x39c2(%rip), %rsi      # 0x935a
callq 0x21a0
movq -0x1a0(%rbp), %rdi
leaq 0x3698(%rip), %rsi      # 0x9043
callq 0x21a0
movq %rax, %rdi
movq 0x7606(%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 0x5a29
jmp 0x59e1
movl -0x194(%rbp), %eax
subl $0x2, %eax
je 0x5f68
jmp 0x6011
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2100
jmp 0x601a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2100
jmp 0x601a
movq -0x10(%rbp), %rdi
callq 0x3340
cmpq $0x3, %rax
jne 0x5e49
movq 0x758d(%rip), %rdi      # 0xcfd0
leaq 0x3765(%rip), %rsi      # 0x91af
callq 0x21a0
movq %rax, %rdi
movq 0x7567(%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 0x5af8
movq 0x7542(%rip), %rdi      # 0xcfd0
leaq 0x372e(%rip), %rsi      # 0x91c3
callq 0x21a0
movq %rax, %rdi
movl -0x68(%rbp), %esi
addl $0x1, %esi
callq 0x2250
movq %rax, %rdi
leaq 0x3717(%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 0x74db(%rip), %rsi      # 0xcfc0
callq 0x21d0
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x5a65
movq 0x74d1(%rip), %rdi      # 0xcfd0
movq %rdi, -0x1c8(%rbp)
leaq 0x36c0(%rip), %rsi      # 0x91cd
callq 0x21a0
movq %rax, %rdi
movq 0x74a4(%rip), %rsi      # 0xcfc0
movq %rsi, -0x1c0(%rbp)
callq 0x21d0
movq -0x1c8(%rbp), %rdi
leaq 0x36d2(%rip), %rsi      # 0x9208
callq 0x21a0
movq -0x1c0(%rbp), %rsi
movq %rax, %rdi
callq 0x21d0
movq -0x1c8(%rbp), %rdi
leaq 0x364d(%rip), %rsi      # 0x91a5
callq 0x21a0
movq -0x1c8(%rbp), %rdi
leaq 0x37ef(%rip), %rsi      # 0x935a
callq 0x21a0
movq -0x1c8(%rbp), %rdi
leaq 0x34c5(%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 0x5bc8
jmp 0x5bb4
movl -0x1b4(%rbp), %eax
subl $0x2, %eax
je 0x5d98
jmp 0x5e44
movq -0x10(%rbp), %rdi
callq 0x3380
movq 0x73f8(%rip), %rdi      # 0xcfd0
leaq 0x37aa(%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 0x5c21
movq -0x1d0(%rbp), %rdi
leaq 0x36a3(%rip), %rsi      # 0x92d2
callq 0x21a0
movq %rax, -0x1e8(%rbp)
jmp 0x5c3d
movq -0x1e8(%rbp), %rdi
movq 0x7375(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x5c52
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 0x5c98
leaq -0xb0(%rbp), %rdi
callq 0x2100
movq 0x7325(%rip), %rdi      # 0xcfd0
leaq 0x357d(%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 0x5cf4
movq -0x200(%rbp), %rdi
leaq 0x3538(%rip), %rsi      # 0x923a
callq 0x21a0
movq %rax, -0x218(%rbp)
jmp 0x5d10
movq -0x218(%rbp), %rdi
movq 0x72a2(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x5d25
leaq -0xd0(%rbp), %rdi
callq 0x2100
movq -0x170(%rbp), %rax
movb $0x1, 0x29(%rax)
jmp 0x5e44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x2100
jmp 0x601a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x2100
jmp 0x601a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2100
jmp 0x601a
movq 0x7231(%rip), %rdi      # 0xcfd0
leaq 0x361e(%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 0x5de8
movq -0x220(%rbp), %rdi
leaq 0x35e4(%rip), %rsi      # 0x93da
callq 0x21a0
movq %rax, -0x238(%rbp)
jmp 0x5e04
movq -0x238(%rbp), %rdi
movq 0x71ae(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x5e19
leaq -0xf0(%rbp), %rdi
callq 0x2100
jmp 0x5e44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x2100
jmp 0x601a
jmp 0x5f63
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 0x5e83
leaq -0x110(%rbp), %rdi
callq 0x2100
movq 0x713a(%rip), %rdi      # 0xcfd0
leaq 0x3392(%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 0x5edf
movq -0x250(%rbp), %rdi
leaq 0x334d(%rip), %rsi      # 0x923a
callq 0x21a0
movq %rax, -0x268(%rbp)
jmp 0x5efb
movq -0x268(%rbp), %rdi
movq 0x70b7(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x5f10
leaq -0x130(%rbp), %rdi
callq 0x2100
movq -0x170(%rbp), %rax
movb $0x1, 0x29(%rax)
jmp 0x5f63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x2100
jmp 0x601a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x2100
jmp 0x601a
jmp 0x6011
movq 0x7061(%rip), %rdi      # 0xcfd0
leaq 0x344e(%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 0x5fb8
movq -0x270(%rbp), %rdi
leaq 0x3414(%rip), %rsi      # 0x93da
callq 0x21a0
movq %rax, -0x288(%rbp)
jmp 0x5fd4
movq -0x288(%rbp), %rdi
movq 0x6fde(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x5fe9
leaq -0x150(%rbp), %rdi
callq 0x2100
jmp 0x6011
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x2100
jmp 0x601a
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x22c0
nopw %cs:(%rax,%rax)
nopl (%rax)