// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r12
movq 0x57d9(%rip), %rbx      # 0x9fd0
leaq 0x2b41(%rip), %rsi      # 0x733f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x6606
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x2f0d(%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 0x4881
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x5748(%rip), %r13      # 0x9fd0
leaq 0x28db(%rip), %rsi      # 0x716a
movl $0x16, %edx
movq %r13, %rdi
callq 0x2160
movq %rsp, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6606
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r13, %rdi
callq 0x2160
leaq 0x28c1(%rip), %rsi      # 0x7181
movl $0x13, %edx
movq %rax, %rdi
callq 0x2160
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48e3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0x28ab(%rip), %rsi      # 0x7195
movl $0x8, %edx
movq %r13, %rdi
callq 0x2160
leaq 0x2a4c(%rip), %rsi      # 0x734a
movl $0x7, %edx
movq %r13, %rdi
callq 0x2160
leaq 0x2731(%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 0x662c
cmpl $0x1, %eax
je 0x49fd
cmpl $0x2, %eax
jne 0x4eab
movq 0x5661(%rip), %rbx      # 0x9fd0
leaq 0x2a3e(%rip), %rsi      # 0x73b4
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x6606
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x2a20(%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 0x4eab
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x4eab
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq $0x60, %rax
jne 0x4c86
movq %r12, 0x20(%rsp)
leaq 0x2785(%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 0x4b00
movl $0x1, %r15d
xorl %ebx, %ebx
movq 0x5565(%rip), %r12      # 0x9fd0
movl $0x5, %edx
movq %r12, %rdi
leaq 0x2739(%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 0x271a(%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 0x4a6b
leaq 0x26b6(%rip), %rsi      # 0x71bd
movl $0x3a, %edx
movq 0x54bd(%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 0x26af(%rip), %rsi      # 0x71f8
movl $0x25, %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 0x2611(%rip), %rsi      # 0x7195
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x27b2(%rip), %rsi      # 0x734a
movl $0x7, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x2497(%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 0x662c
cmpl $0x1, %eax
je 0x4d30
cmpl $0x2, %eax
leaq 0x10(%rsp), %r15
movq 0x20(%rsp), %r12
jne 0x4eab
movq 0x53be(%rip), %rbx      # 0x9fd0
leaq 0x279b(%rip), %rsi      # 0x73b4
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x6606
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x277d(%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 0x49de
movq %rsp, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6606
movq %r14, %rdi
movq %rbx, %rsi
callq 0x325c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4cb5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x5314(%rip), %rbx      # 0x9fd0
leaq 0x255c(%rip), %rsi      # 0x721f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x6606
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x2533(%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 0x4e8f
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 0x4d59
movq (%rax), %rsi
incq %rsi
callq 0x2140
movq 0x5270(%rip), %rbx      # 0x9fd0
leaq 0x2612(%rip), %rsi      # 0x7379
movl $0x3a, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x6606
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x2527(%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 0x4dea
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rsp, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6606
movq %r14, %rdi
movq %rbx, %rsi
callq 0x325c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4e19
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x51b0(%rip), %rbx      # 0x9fd0
leaq 0x23f8(%rip), %rsi      # 0x721f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2160
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x6606
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x23cf(%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 0x4ea5
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 0x4ed4
jmp 0x4ed4
jmp 0x4ed4
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0x4eee
jmp 0x4ed4
jmp 0x4ed4
jmp 0x4ed4
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x4ef3
jmp 0x4f00
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f00
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21a0