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

	if(!actionTaken){
		//	Apply the emergency brakes
		std::cout << "The train will derail soon! You must " << this->getActionName() << " in order"
				  << " to stop the train." << std::endl;
	  	std::cout << "1) " << this->getActionName() << "." << std::endl;
	  	std::cout << "Enter your choice: " << std::endl;

	    int stopTrain = validate(1,1);

	    if(this->checkKey(container, "an emergency brake key")){
	    	std::cout << "You used the emergency brake key and stopped the train from derailing!" << std::endl;
	    	actionTaken = true;

	    	//	receive award and win game
	    	this->findItem(container);
	    }
	    else{
	    	std::cout << "You need the emergency brake key in order to stop the train!" << std::endl;
	    }
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x78a3(%rip), %r15      # 0x9fd0
leaq 0x492c(%rip), %rsi      # 0x7060
movl $0xf, %edx
movq %r15, %rdi
callq 0x2160
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x65be
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x2160
movq %rax, %r15
leaq 0x4fd3(%rip), %rsi      # 0x773f
movl $0x1, %edx
movq %rax, %rdi
callq 0x2160
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0x18(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x27bb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
cmpb $0x0, 0x28(%r14)
jne 0x2a1c
movq 0x7803(%rip), %r15      # 0x9fd0
leaq 0x489c(%rip), %rsi      # 0x7070
movl $0x25, %edx
movq %r15, %rdi
callq 0x2160
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x65e2
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x2160
movq %rax, %r15
leaq 0x488a(%rip), %rsi      # 0x7096
movl $0x9, %edx
movq %rax, %rdi
callq 0x2160
leaq 0x4880(%rip), %rsi      # 0x70a0
movl $0x13, %edx
movq %r15, %rdi
callq 0x2160
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x286b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x775e(%rip), %r15      # 0x9fd0
leaq 0x483b(%rip), %rsi      # 0x70b4
movl $0x3, %edx
movq %r15, %rdi
callq 0x2160
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x65e2
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x2160
movq %rax, %r12
leaq 0x4a11(%rip), %rsi      # 0x72c2
movl $0x1, %edx
movq %rax, %rdi
callq 0x2160
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x28fd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0x473f(%rip), %rsi      # 0x7043
movl $0x13, %edx
movq %r15, %rdi
callq 0x2160
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl $0x1, %edi
movl $0x1, %esi
callq 0x662c
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4761(%rip), %rsi      # 0x70b8
leaq 0x4770(%rip), %rdx      # 0x70ce
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x31cc
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2a76
movl %eax, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x298f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
testb %bpl, %bpl
je 0x29e1
leaq 0x4734(%rip), %rsi      # 0x70cf
movl $0x46, %edx
movq %r15, %rdi
callq 0x2160
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movb $0x1, 0x28(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ba6
jmp 0x2a1c
leaq 0x472e(%rip), %rsi      # 0x7116
movl $0x3c, %edx
movq %r15, %rdi
callq 0x2160
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a6e
movq 0x38(%rsp), %rsi
jmp 0x2a66
jmp 0x2a41
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x2a61
jmp 0x2a6e
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a6e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21a0