// File: /workspace/github_cpp_makefile_star2_O3/malcolmyeh[P]CC3K/floor.cc
// Function: Floor::movePlayer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string Floor::movePlayer(std::string direction) {
	
	Posn p = this->player->getPosition().getNew(direction);
	std::string dir[8] = {"ea", "we", "no", "so", "ne", "nw", "sw", "se"};
	std::string dir2[8] = {"East", "West", "North", "South", "Northeast", "Northwest", "Southwest", "Southeast"};
	std::string log;
	if (validMove(p)){
		std::string gold;
		bool g;
		if (displayGrid[p.y][p.x] == 'G') {
			gold = pickGold(p);
			if (gold == "invalid") {
				return gold;
			}
			g = true;
		}
		std::string barrier;
		bool b;
		if (displayGrid[p.y][p.x] == 'B') {
			if (this->suit->isGuarded()) {
				return "invalid";
			}
			b = true;
			this->setSpawned(true);
			this->player->setBarrier(true);
			barrier = "You have acquired a Barrier Suit. ";
		}
		
		if (p == this->stair->getPosition()){
			return "newfloor";
		}
		log += "You move ";
		for (int i = 0; i < 8; i++) {
			if (dir[i] == direction) {
				log += dir2[i] + ". ";
				break;
			}
		}
		if (g) {
			log += gold;
		}
		if (b){
			log += barrier;
		}
		std::string potion;
		potion = seePotion(p);
		if (potion != "invalid") {
			log += potion;
		}
		displayGrid[this->player->getPosition().y][this->player->getPosition().x] = defaultGrid[this->player->getPosition().y][this->player->getPosition().x];
		displayGrid[p.y][p.x] = this->player->getSymbol();
		this->player->move(p);
		return log;
	}
	return "invalid";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rdx, %r15
movq %rdi, -0xa8(%rbp)
movq %rsi, -0x38(%rbp)
movq 0xfe0(%rsi), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
leaq -0x210(%rbp), %r12
movq %rax, (%r12)
leaq -0xd8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %r13
movq %r13, %rdi
callq 0xa4be
movq %r12, %rdi
movq %r13, %rsi
callq 0x50b8
movq %rax, -0x30(%rbp)
movq -0xe8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x73b2
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x4170
leaq -0x200(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15e09(%rip), %rsi     # 0x1d1cd
leaq 0x15e04(%rip), %rdx     # 0x1d1cf
movq %r12, %rdi
callq 0x501a
leaq -0x1f0(%rbp), %r13
leaq -0x1e0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15de4(%rip), %rsi     # 0x1d1d0
leaq 0x15ddf(%rip), %rdx     # 0x1d1d2
movq %r13, %rdi
callq 0x501a
leaq -0x1d0(%rbp), %r13
leaq -0x1c0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15dbf(%rip), %rsi     # 0x1d1d3
leaq 0x15dba(%rip), %rdx     # 0x1d1d5
movq %r13, %rdi
callq 0x501a
leaq -0x1b0(%rbp), %r13
leaq -0x1a0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d9a(%rip), %rsi     # 0x1d1d6
leaq 0x15d95(%rip), %rdx     # 0x1d1d8
movq %r13, %rdi
callq 0x501a
leaq -0x190(%rbp), %r13
leaq -0x180(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d75(%rip), %rsi     # 0x1d1d9
leaq 0x15d70(%rip), %rdx     # 0x1d1db
movq %r13, %rdi
callq 0x501a
leaq -0x170(%rbp), %r13
leaq -0x160(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d50(%rip), %rsi     # 0x1d1dc
leaq 0x15d4b(%rip), %rdx     # 0x1d1de
movq %r13, %rdi
callq 0x501a
leaq -0x150(%rbp), %r13
leaq -0x140(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d2e(%rip), %rsi     # 0x1d1e2
leaq 0x15d29(%rip), %rdx     # 0x1d1e4
movq %r13, %rdi
callq 0x501a
leaq -0x130(%rbp), %r13
leaq -0x120(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x15d03(%rip), %rsi     # 0x1d1df
leaq 0x15cfe(%rip), %rdx     # 0x1d1e1
movq %r13, %rdi
callq 0x501a
leaq -0x300(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15ddd(%rip), %rsi     # 0x1d2da
leaq 0x15dda(%rip), %rdx     # 0x1d2de
leaq -0x310(%rbp), %r12
movq %r12, %rdi
callq 0x501a
leaq -0x2f0(%rbp), %r13
leaq -0x2e0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15db3(%rip), %rsi     # 0x1d2df
leaq 0x15db0(%rip), %rdx     # 0x1d2e3
movq %r13, %rdi
callq 0x501a
leaq -0x2d0(%rbp), %r13
leaq -0x2c0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d90(%rip), %rsi     # 0x1d2e4
leaq 0x15d8e(%rip), %rdx     # 0x1d2e9
movq %r13, %rdi
callq 0x501a
leaq -0x2b0(%rbp), %r13
leaq -0x2a0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d6e(%rip), %rsi     # 0x1d2ea
leaq 0x15d6c(%rip), %rdx     # 0x1d2ef
movq %r13, %rdi
callq 0x501a
leaq -0x290(%rbp), %r13
leaq -0x280(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d4c(%rip), %rsi     # 0x1d2f0
leaq 0x15d4e(%rip), %rdx     # 0x1d2f9
movq %r13, %rdi
callq 0x501a
leaq -0x270(%rbp), %r13
leaq -0x260(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d2e(%rip), %rsi     # 0x1d2fa
leaq 0x15d30(%rip), %rdx     # 0x1d303
movq %r13, %rdi
callq 0x501a
leaq -0x250(%rbp), %r13
leaq -0x240(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d10(%rip), %rsi     # 0x1d304
leaq 0x15d12(%rip), %rdx     # 0x1d30d
movq %r13, %rdi
callq 0x501a
leaq -0x230(%rbp), %r13
leaq -0x220(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x15cf2(%rip), %rsi     # 0x1d30e
leaq 0x15cf4(%rip), %rdx     # 0x1d317
movq %r13, %rdi
callq 0x501a
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq -0x30(%rbp), %rdx
movq %rdx, %rax
sarq $0x20, %rax
movslq %edx, %rcx
imulq $0x4f, %rax, %rax
movq -0x38(%rbp), %r12
leaq (%r12,%rax), %rsi
addq $0x820, %rsi            # imm = 0x820
movzbl (%rcx,%rsi), %ecx
addl $-0x23, %ecx
cmpl $0x24, %ecx
ja 0x7892
movabsq $0x1080001901, %rsi     # imm = 0x1080001901
btq %rcx, %rsi
jae 0x7892
leaq 0x820(%r12), %rsi
leaq -0x88(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
movslq %edx, %rcx
movq %rsi, -0xa0(%rbp)
addq %rsi, %rax
movb (%rcx,%rax), %al
cmpb $0x47, %al
movq -0xa8(%rbp), %r13
jne 0x7735
leaq -0xc8(%rbp), %rdi
movq %r12, %rsi
callq 0x7da2
leaq -0x98(%rbp), %rdi
leaq -0xc8(%rbp), %r12
movq %r12, %rsi
callq 0x41c0
movq (%r12), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x7700
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x4170
leaq 0x15c11(%rip), %rsi     # 0x1d318
leaq -0x98(%rbp), %rdi
callq 0x4070
testl %eax, %eax
je 0x785f
movslq -0x2c(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x4f, %rax, %rax
addq -0xa0(%rbp), %rax
movb (%rcx,%rax), %al
movq -0x38(%rbp), %r12
leaq -0xb8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
cmpb $0x42, %al
jne 0x77c1
movq 0xfe8(%r12), %rdi
callq 0x1610a
testb %al, %al
je 0x778a
leaq 0x10(%r13), %rax
movq %rax, (%r13)
leaq 0x15ba9(%rip), %rsi     # 0x1d318
leaq 0x15ba9(%rip), %rdx     # 0x1d31f
movq %r13, %rdi
leaq -0x88(%rbp), %r15
callq 0x501a
jmp 0x7ad2
movb $0x1, 0x5(%r12)
movq 0xfe0(%r12), %rdi
movl $0x1, %esi
callq 0xb582
leaq -0xc8(%rbp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x15b6c(%rip), %rcx     # 0x1d320
movl $0x22, %r8d
xorl %esi, %esi
callq 0x4200
movq 0xfd8(%r12), %rdi
callq 0x522a
leaq -0x58(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x30(%rbp), %rdi
callq 0x51ba
testb %al, %al
je 0x780c
leaq 0x10(%r13), %rax
movq %rax, (%r13)
leaq 0x15b52(%rip), %rsi     # 0x1d343
leaq 0x15b53(%rip), %rdx     # 0x1d34b
movq %r13, %rdi
leaq -0x88(%rbp), %r15
callq 0x501a
jmp 0x7ad2
leaq 0x15b39(%rip), %rsi     # 0x1d34c
leaq -0x78(%rbp), %rdi
callq 0x4280
movq 0x8(%r15), %r12
xorl %r13d, %r13d
cmpq %r12, -0x208(%rbp,%r13)
jne 0x784d
testq %r12, %r12
je 0x78bc
movq (%r15), %rsi
movq -0x210(%rbp,%r13), %rdi
movq %r12, %rdx
callq 0x4180
testl %eax, %eax
je 0x78bc
addq $0x20, %r13
cmpq $0x100, %r13            # imm = 0x100
jne 0x7823
jmp 0x7917
leaq 0x10(%r13), %rax
movq %rax, (%r13)
movq -0x98(%rbp), %rcx
leaq -0x88(%rbp), %rdx
cmpq %rdx, %rcx
je 0x7b11
movq %rcx, (%r13)
movq -0x88(%rbp), %rax
movq %rax, 0x10(%r13)
jmp 0x7b17
movq -0xa8(%rbp), %r13
leaq 0x10(%r13), %rax
movq %rax, (%r13)
leaq 0x15a70(%rip), %rsi     # 0x1d318
leaq 0x15a70(%rip), %rdx     # 0x1d31f
movq %r13, %rdi
callq 0x501a
jmp 0x7b22
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x310(%rbp,%r13), %rsi
movq -0x308(%rbp,%r13), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0xa4be
leaq 0x1630e(%rip), %rsi     # 0x1dbf6
leaq -0x58(%rbp), %rdi
callq 0x4280
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x4080
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x7917
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x4080
movq -0x38(%rbp), %r15
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x4080
movq %r15, %rsi
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq -0x30(%rbp), %rdx
leaq -0x108(%rbp), %rdi
callq 0x80d4
leaq -0x58(%rbp), %rdi
leaq -0x108(%rbp), %r15
movq %r15, %rsi
callq 0x41c0
movq (%r15), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x79a0
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x4170
leaq 0x15971(%rip), %rsi     # 0x1d318
leaq -0x58(%rbp), %rdi
callq 0x4070
testl %eax, %eax
je 0x79c5
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x4080
movq -0x38(%rbp), %r12
movq 0xfe0(%r12), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, %r15
movq 0xfe0(%r12), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
sarq $0x20, %r15
imulq $0x4f, %r15, %rcx
addq %r12, %rcx
cltq
movb 0x6(%rax,%rcx), %r13b
movq 0xfe0(%r12), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, %r15
movq 0xfe0(%r12), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
sarq $0x20, %r15
cltq
imulq $0x4f, %r15, %rcx
addq -0xa0(%rbp), %rcx
movb %r13b, (%rax,%rcx)
movq 0xfe0(%r12), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq -0xa8(%rbp), %r13
movslq -0x2c(%rbp), %rcx
movslq -0x30(%rbp), %rdx
imulq $0x4f, %rcx, %rcx
movq -0xa0(%rbp), %rsi
addq %rcx, %rsi
movb %al, (%rdx,%rsi)
movq -0x38(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq -0x30(%rbp), %rsi
movq (%rdi), %rax
callq *0x40(%rax)
leaq 0x10(%r13), %rax
movq %rax, (%r13)
movq -0x78(%rbp), %rcx
leaq -0x68(%rbp), %rdx
cmpq %rdx, %rcx
leaq -0x88(%rbp), %r15
je 0x7a9b
movq %rcx, (%r13)
movq -0x68(%rbp), %rax
movq %rax, 0x10(%r13)
jmp 0x7aa1
movups (%rdx), %xmm0
movups %xmm0, (%rax)
movq -0x70(%rbp), %rax
movq %rax, 0x8(%r13)
movq %rdx, -0x78(%rbp)
movq $0x0, -0x70(%rbp)
movb $0x0, -0x68(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x7ad2
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x7af4
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x98(%rbp), %rdi
cmpq %r15, %rdi
je 0x7b22
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x7b22
movups (%rdx), %xmm0
movups %xmm0, (%rax)
movq -0x90(%rbp), %rax
movq %rax, 0x8(%r13)
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x7b3b
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x4170
movq $-0x100, %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x7b56
movq (%r14), %rsi
incq %rsi
callq 0x4170
addq $-0x20, %r14
addq $0x20, %r15
jne 0x7b42
movq $-0x100, %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x7b7b
movq (%rbx), %rsi
incq %rsi
callq 0x4170
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x7b67
movq %r13, %rax
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7b9c
movq %rax, %r15
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
jne 0x7bea
jmp 0x7cb1
jmp 0x7cae
movq %rax, %r15
jmp 0x7cf5
jmp 0x7cae
jmp 0x7bd6
jmp 0x7bd6
jmp 0x7bd6
jmp 0x7bd6
jmp 0x7bd6
jmp 0x7cae
movq %rax, %r15
jmp 0x7cd3
movq %rax, %r15
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x7cb1
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x7cb1
jmp 0x7c07
jmp 0x7c07
jmp 0x7c07
jmp 0x7c07
jmp 0x7c07
jmp 0x7c07
movq %rax, %r15
addq $-0x10, %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x7c23
movq (%r13), %rsi
incq %rsi
callq 0x4170
leaq -0x20(%r13), %rax
addq $-0x10, %r13
cmpq %r12, %r13
movq %rax, %r13
jne 0x7c0e
jmp 0x7d3a
movq %rax, %r15
jmp 0x7d3a
jmp 0x7c4c
jmp 0x7c4c
jmp 0x7c4c
jmp 0x7c4c
jmp 0x7c4c
jmp 0x7c4c
movq %rax, %r15
addq $-0x10, %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x7c68
movq (%r13), %rsi
incq %rsi
callq 0x4170
leaq -0x20(%r13), %rax
addq $-0x10, %r13
cmpq %r12, %r13
movq %rax, %r13
jne 0x7c53
jmp 0x7d66
movq %rax, %r15
jmp 0x7d66
movq %rax, %r15
movq -0xe8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x7d66
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x7d66
jmp 0x7cae
movq %rax, %r15
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x7cd3
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x7cf5
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x7d0e
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x4170
xorl %r12d, %r12d
movq -0x230(%rbp,%r12), %rdi
leaq (%r14,%r12), %rax
cmpq %rdi, %rax
je 0x7d2d
movq (%rax), %rsi
incq %rsi
callq 0x4170
addq $-0x20, %r12
cmpq $-0x100, %r12
jne 0x7d11
xorl %r14d, %r14d
movq -0x130(%rbp,%r14), %rdi
leaq (%rbx,%r14), %rax
cmpq %rdi, %rax
je 0x7d59
movq (%rax), %rsi
incq %rsi
callq 0x4170
addq $-0x20, %r14
cmpq $-0x100, %r14
jne 0x7d3d
movq %r15, %rdi
callq 0x4250