// File: isimplyexcel[P]text-based-game/Fire.cpp
// Function: Fire::action(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::action(std::vector<std::string>& container){
	//	welcome user to the car
	std::cout << "Welcome to the " << this->getCarName() << "!" << std::endl;

	if(!actionTaken){
		std::cout << "The " << this->getCarName() << " is on fire!" << std::endl;
		std::cout << "You must " << this->getActionName() << " in order"
				  << " to continue." << std::endl;
	  	std::cout << "1) " << this->getActionName() << "." << std::endl;
	  	std::cout << "Enter your choice: " << std::endl;

	    int flickLights = validate(1,1);
	    std::cout << "\nYou " << this->getActionName() << " and extinguished the fire!\n" 
	    		  << "You may now continue to traverse the train!" << std::endl;
	    //	Since the fire is now extinguished, you won't be asked to activate
	    //	sprinklers for this car again
	    actionTaken = true; 
	}
	else{
		std::cout << "You've already taken action in this car, hurry up and make your way to "
		          << "the engine car!" << std::endl;
	}

	if(!itemTaken){
		this->findItem(container);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq 0x891b(%rip), %rdi      # 0xcfd0
leaq 0x49b4(%rip), %rsi      # 0x9070
callq 0x21a0
movq -0xe8(%rbp), %rsi
movq %rax, -0xe0(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x7e80
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x2190
movq %rax, -0xd0(%rbp)
jmp 0x46fb
movq -0xd0(%rbp), %rdi
leaq 0x5046(%rip), %rsi      # 0x974f
callq 0x21a0
movq %rax, -0xf0(%rbp)
jmp 0x4717
movq -0xf0(%rbp), %rdi
movq 0x889b(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x472c
leaq -0x30(%rbp), %rdi
callq 0x2100
movq -0xe8(%rbp), %rax
testb $0x1, 0x28(%rax)
jne 0x4a73
movq 0x8883(%rip), %rdi      # 0xcfd0
leaq 0x4b60(%rip), %rsi      # 0x92b4
callq 0x21a0
movq -0xe8(%rbp), %rsi
movq %rax, -0x108(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x7e80
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rsi
callq 0x2190
movq %rax, -0xf8(%rbp)
jmp 0x4793
movq -0xf8(%rbp), %rdi
leaq 0x4b18(%rip), %rsi      # 0x92b9
callq 0x21a0
movq %rax, -0x110(%rbp)
jmp 0x47af
movq -0x110(%rbp), %rdi
movq 0x8803(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x47c4
leaq -0x60(%rbp), %rdi
callq 0x2100
movq 0x87fc(%rip), %rdi      # 0xcfd0
leaq 0x4c42(%rip), %rsi      # 0x941d
callq 0x21a0
movq -0xe8(%rbp), %rsi
movq %rax, -0x128(%rbp)
leaq -0x80(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x7eb0
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0x2190
movq %rax, -0x118(%rbp)
jmp 0x481a
movq -0x118(%rbp), %rdi
leaq 0x487e(%rip), %rsi      # 0x90a6
callq 0x21a0
movq %rax, -0x130(%rbp)
jmp 0x4836
movq -0x130(%rbp), %rdi
leaq 0x4a82(%rip), %rsi      # 0x92c6
callq 0x21a0
movq %rax, -0x138(%rbp)
jmp 0x4852
movq -0x138(%rbp), %rdi
movq 0x8760(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x4867
leaq -0x80(%rbp), %rdi
callq 0x2100
movq 0x8759(%rip), %rdi      # 0xcfd0
leaq 0x4846(%rip), %rsi      # 0x90c4
callq 0x21a0
movq -0xe8(%rbp), %rsi
movq %rax, -0x150(%rbp)
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x7eb0
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x2190
movq %rax, -0x140(%rbp)
jmp 0x48c0
movq -0x140(%rbp), %rdi
leaq 0x4a04(%rip), %rsi      # 0x92d2
callq 0x21a0
movq %rax, -0x158(%rbp)
jmp 0x48dc
movq -0x158(%rbp), %rdi
movq 0x86d6(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x48f1
leaq -0xa0(%rbp), %rdi
callq 0x2100
movq 0x86cc(%rip), %rdi      # 0xcfd0
movq %rdi, -0x178(%rbp)
leaq 0x4731(%rip), %rsi      # 0x9043
callq 0x21a0
movq %rax, %rdi
movq 0x869f(%rip), %rsi      # 0xcfc0
callq 0x21d0
movl $0x1, %esi
movl %esi, %edi
callq 0x7f10
movq -0x178(%rbp), %rdi
movl %eax, -0xa4(%rbp)
leaq 0x498e(%rip), %rsi      # 0x92d4
callq 0x21a0
movq -0xe8(%rbp), %rsi
movq %rax, -0x170(%rbp)
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x7eb0
movq -0x170(%rbp), %rdi
movq -0x168(%rbp), %rsi
callq 0x2190
movq %rax, -0x160(%rbp)
jmp 0x4988
movq -0x160(%rbp), %rdi
leaq 0x4944(%rip), %rsi      # 0x92da
callq 0x21a0
movq %rax, -0x180(%rbp)
jmp 0x49a4
movq -0x180(%rbp), %rdi
leaq 0x4a93(%rip), %rsi      # 0x9445
callq 0x21a0
movq %rax, -0x188(%rbp)
jmp 0x49c0
movq -0x188(%rbp), %rdi
movq 0x85f2(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x49d5
leaq -0xc8(%rbp), %rdi
callq 0x2100
movq -0xe8(%rbp), %rax
movb $0x1, 0x28(%rax)
jmp 0x4aa4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2100
jmp 0x4aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2100
jmp 0x4aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x2100
jmp 0x4aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x2100
jmp 0x4aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x2100
jmp 0x4aca
movq 0x8556(%rip), %rdi      # 0xcfd0
leaq 0x4876(%rip), %rsi      # 0x92f7
callq 0x21a0
movq %rax, %rdi
leaq 0x48af(%rip), %rsi      # 0x933f
callq 0x21a0
movq %rax, %rdi
movq 0x8521(%rip), %rsi      # 0xcfc0
callq 0x21d0
movq -0xe8(%rbp), %rax
testb $0x1, 0x29(%rax)
jne 0x4ac1
movq -0xe8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4ae0
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x22c0
nopw %cs:(%rax,%rax)