// File: /workspace/github_cpp_makefile_star2_O1/angelapwen[P]text-based-game/space.cpp
// Function: Space::makeMove() const
char Space::makeMove() const {
	cout << "Your options are: " << endl;

	// Print the options available in the current room
	if (this->top != nullptr) {
		cout << "- up: " ;
		cout << "This would lead to the " << this->top->name << "." << endl;
	}
	if (this->bottom != nullptr) {
		cout << "- down: ";
		cout << "This would lead to the " << this->bottom->name << "." << endl;
	}
	if (this->left != nullptr) {
		cout << "- left: ";
		cout << "This would lead to the " << this->left->name << "." << endl;
	}
	if (this->right != nullptr) {
		cout << "- right: ";
		cout << "This would lead to the " << this->right->name << "." << endl;
	}

	// Display corner option only if the bool is true
	if (cornerAccess) {
		if (this->corner != nullptr) {
			cout << "- corner: ";
			cout << "This would lead to the " << this->corner->name << "." << endl;
		}
	}

	cout << "- exit: ";
	cout << "You may choose the Emergency Exit and leave your mission "
			"incomplete." << endl;

	cout << "Enter only up, down, left, right, corner, or exit." << endl;

	string choice = moveValidation();

	// Return the char value of the validated move
	if (choice == "up") {
		return 't';
	}

	else if (choice == "down") {
		return 'b';
	}

	else if (choice == "left") {
		return 'l';
	}

	else if (choice == "right") {
		return 'r';
	}

	// Else user picked corner
	else if (choice == "corner") {
		return 'c';
	}

	// Else user chose to exit
	else {
		return 'e';
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0xab1b(%rip), %r14      # 0x14fd0
leaq 0x5fd2(%rip), %rsi      # 0x1048e
movl $0x12, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
cmpq $0x0, 0x48(%rbx)
je 0xa57c
movq 0xaace(%rip), %r15      # 0x14fd0
leaq 0x5f98(%rip), %rsi      # 0x104a1
movl $0x6, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5f8b(%rip), %rsi      # 0x104a8
movl $0x17, %edx
movq %r15, %rdi
callq 0x21c0
movq 0x48(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x3b2c(%rip), %rsi      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
cmpq $0x0, 0x60(%rbx)
je 0xa608
movq 0xaa42(%rip), %r15      # 0x14fd0
leaq 0x5f2b(%rip), %rsi      # 0x104c0
movl $0x8, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5eff(%rip), %rsi      # 0x104a8
movl $0x17, %edx
movq %r15, %rdi
callq 0x21c0
movq 0x60(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x3aa0(%rip), %rsi      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
cmpq $0x0, 0x58(%rbx)
je 0xa694
movq 0xa9b6(%rip), %r15      # 0x14fd0
leaq 0x5ea8(%rip), %rsi      # 0x104c9
movl $0x8, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5e73(%rip), %rsi      # 0x104a8
movl $0x17, %edx
movq %r15, %rdi
callq 0x21c0
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x3a14(%rip), %rsi      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
cmpq $0x0, 0x50(%rbx)
je 0xa720
movq 0xa92a(%rip), %r15      # 0x14fd0
leaq 0x5e25(%rip), %rsi      # 0x104d2
movl $0x9, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5de7(%rip), %rsi      # 0x104a8
movl $0x17, %edx
movq %r15, %rdi
callq 0x21c0
movq 0x50(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x3988(%rip), %rsi      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
cmpb $0x1, 0x78(%rbx)
jne 0xa7b6
cmpq $0x0, 0x68(%rbx)
je 0xa7b6
movq 0xa894(%rip), %r15      # 0x14fd0
leaq 0x5d99(%rip), %rsi      # 0x104dc
movl $0xa, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5d51(%rip), %rsi      # 0x104a8
movl $0x17, %edx
movq %r15, %rdi
callq 0x21c0
movq 0x68(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x38f2(%rip), %rsi      # 0xe074
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq 0x5d2a(%rip), %rsi      # 0x104e7
movl $0x8, %edx
movq %r14, %rdi
callq 0x21c0
leaq 0x5d1f(%rip), %rsi      # 0x104f0
movl $0x44, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq 0x5d29(%rip), %rsi      # 0x10535
movl $0x32, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa8ea
leaq 0x5d13(%rip), %rsi      # 0x10568
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0xa8b5
leaq 0x5d03(%rip), %rsi      # 0x1056b
movq %rsp, %rdi
callq 0x2070
testl %eax, %eax
je 0xa8b9
leaq 0x5cf5(%rip), %rsi      # 0x10570
movq %rsp, %rdi
callq 0x2070
testl %eax, %eax
je 0xa8bd
leaq 0x5ce7(%rip), %rsi      # 0x10575
movq %rsp, %rdi
callq 0x2070
testl %eax, %eax
je 0xa8c1
leaq 0x5cda(%rip), %rsi      # 0x1057b
movq %rsp, %rdi
callq 0x2070
testl %eax, %eax
setne %bl
addb %bl, %bl
addb $0x63, %bl
jmp 0xa8c3
movb $0x74, %bl
jmp 0xa8c3
movb $0x62, %bl
jmp 0xa8c3
movb $0x6c, %bl
jmp 0xa8c3
movb $0x72, %bl
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa8de
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21a0
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq