// File: /workspace/github_cpp_makefile_star2_O3/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 0x57d1(%rip), %rbx      # 0x9fd0
leaq 0x2b39(%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 0x2f05(%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 0x4889
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x5740(%rip), %r13      # 0x9fd0
leaq 0x28d3(%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 0x28b9(%rip), %rsi      # 0x7181
movl $0x13, %edx
movq %rax, %rdi
callq 0x2160
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48eb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0x28a3(%rip), %rsi      # 0x7195
movl $0x8, %edx
movq %r13, %rdi
callq 0x2160
leaq 0x2a44(%rip), %rsi      # 0x734a
movl $0x7, %edx
movq %r13, %rdi
callq 0x2160
leaq 0x2729(%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 0x4a05
cmpl $0x2, %eax
jne 0x4eb3
movq 0x5659(%rip), %rbx      # 0x9fd0
leaq 0x2a36(%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 0x2a18(%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 0x4eb3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x4eb3
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq $0x60, %rax
jne 0x4c8e
movq %r12, 0x20(%rsp)
leaq 0x277d(%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 0x4b08
movl $0x1, %r15d
xorl %ebx, %ebx
movq 0x555d(%rip), %r12      # 0x9fd0
movl $0x5, %edx
movq %r12, %rdi
leaq 0x2731(%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 0x2712(%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 0x4a73
leaq 0x26ae(%rip), %rsi      # 0x71bd
movl $0x3a, %edx
movq 0x54b5(%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 0x26a7(%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 0x2609(%rip), %rsi      # 0x7195
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x27aa(%rip), %rsi      # 0x734a
movl $0x7, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x248f(%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 0x4d38
cmpl $0x2, %eax
leaq 0x10(%rsp), %r15
movq 0x20(%rsp), %r12
jne 0x4eb3
movq 0x53b6(%rip), %rbx      # 0x9fd0
leaq 0x2793(%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 0x2775(%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 0x49e6
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 0x4cbd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x530c(%rip), %rbx      # 0x9fd0
leaq 0x2554(%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 0x252b(%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 0x4e97
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 0x4d61
movq (%rax), %rsi
incq %rsi
callq 0x2140
movq 0x5268(%rip), %rbx      # 0x9fd0
leaq 0x260a(%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 0x251f(%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 0x4df2
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 0x4e21
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x51a8(%rip), %rbx      # 0x9fd0
leaq 0x23f0(%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 0x23c7(%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 0x4ead
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 0x4edc
jmp 0x4edc
jmp 0x4edc
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0x4ef6
jmp 0x4edc
jmp 0x4edc
jmp 0x4edc
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x4efb
jmp 0x4f08
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f08
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21a0