// File: /workspace/github_cpp_makefile_star2_O3/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 0xab53(%rip), %r14      # 0x14fd0
leaq 0x600a(%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 0xa544
movq 0xab06(%rip), %r15      # 0x14fd0
leaq 0x5fd0(%rip), %rsi      # 0x104a1
movl $0x6, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5fc3(%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 0x3b64(%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 0xa5d0
movq 0xaa7a(%rip), %r15      # 0x14fd0
leaq 0x5f63(%rip), %rsi      # 0x104c0
movl $0x8, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5f37(%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 0x3ad8(%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 0xa65c
movq 0xa9ee(%rip), %r15      # 0x14fd0
leaq 0x5ee0(%rip), %rsi      # 0x104c9
movl $0x8, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5eab(%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 0x3a4c(%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 0xa6e8
movq 0xa962(%rip), %r15      # 0x14fd0
leaq 0x5e5d(%rip), %rsi      # 0x104d2
movl $0x9, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5e1f(%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 0x39c0(%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 0xa77e
cmpq $0x0, 0x68(%rbx)
je 0xa77e
movq 0xa8cc(%rip), %r15      # 0x14fd0
leaq 0x5dd1(%rip), %rsi      # 0x104dc
movl $0xa, %edx
movq %r15, %rdi
callq 0x21c0
leaq 0x5d89(%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 0x392a(%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 0x5d62(%rip), %rsi      # 0x104e7
movl $0x8, %edx
movq %r14, %rdi
callq 0x21c0
leaq 0x5d57(%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 0x5d61(%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 0xa8b2
leaq 0x5d4b(%rip), %rsi      # 0x10568
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0xa87d
leaq 0x5d3b(%rip), %rsi      # 0x1056b
movq %rsp, %rdi
callq 0x2070
testl %eax, %eax
je 0xa881
leaq 0x5d2d(%rip), %rsi      # 0x10570
movq %rsp, %rdi
callq 0x2070
testl %eax, %eax
je 0xa885
leaq 0x5d1f(%rip), %rsi      # 0x10575
movq %rsp, %rdi
callq 0x2070
testl %eax, %eax
je 0xa889
leaq 0x5d12(%rip), %rsi      # 0x1057b
movq %rsp, %rdi
callq 0x2070
testl %eax, %eax
setne %bl
addb %bl, %bl
addb $0x63, %bl
jmp 0xa88b
movb $0x74, %bl
jmp 0xa88b
movb $0x62, %bl
jmp 0xa88b
movb $0x6c, %bl
jmp 0xa88b
movb $0x72, %bl
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa8a6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21a0
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq