// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movq %rsi, -0x40(%rbp)
movq 0xfe0(%rsi), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
leaq -0x310(%rbp), %r12
movq %rax, (%r12)
leaq -0xe0(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %r13
movq %r13, %rdi
callq 0xa582
movq %r12, %rdi
movq %r13, %rsi
callq 0x50b4
movq %rax, -0x38(%rbp)
movq -0xf0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x73f2
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x4170
leaq -0x300(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15dc9(%rip), %rsi     # 0x1d1cd
leaq 0x15dc4(%rip), %rdx     # 0x1d1cf
leaq -0x310(%rbp), %rbx
movq %rbx, %rdi
callq 0x501a
leaq -0x2f0(%rbp), %r12
leaq -0x2e0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d9d(%rip), %rsi     # 0x1d1d0
leaq 0x15d98(%rip), %rdx     # 0x1d1d2
movq %r12, %rdi
callq 0x501a
leaq -0x2d0(%rbp), %r12
leaq -0x2c0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d78(%rip), %rsi     # 0x1d1d3
leaq 0x15d73(%rip), %rdx     # 0x1d1d5
movq %r12, %rdi
callq 0x501a
leaq -0x2b0(%rbp), %r12
leaq -0x2a0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d53(%rip), %rsi     # 0x1d1d6
leaq 0x15d4e(%rip), %rdx     # 0x1d1d8
movq %r12, %rdi
callq 0x501a
leaq -0x290(%rbp), %r12
leaq -0x280(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d2e(%rip), %rsi     # 0x1d1d9
leaq 0x15d29(%rip), %rdx     # 0x1d1db
movq %r12, %rdi
callq 0x501a
leaq -0x270(%rbp), %r12
leaq -0x260(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d09(%rip), %rsi     # 0x1d1dc
leaq 0x15d04(%rip), %rdx     # 0x1d1de
movq %r12, %rdi
callq 0x501a
leaq -0x250(%rbp), %r12
leaq -0x240(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15ce7(%rip), %rsi     # 0x1d1e2
leaq 0x15ce2(%rip), %rdx     # 0x1d1e4
movq %r12, %rdi
callq 0x501a
leaq -0x230(%rbp), %r12
leaq -0x220(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x15cbc(%rip), %rsi     # 0x1d1df
leaq 0x15cb7(%rip), %rdx     # 0x1d1e1
movq %r12, %rdi
callq 0x501a
leaq -0x200(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d96(%rip), %rsi     # 0x1d2da
leaq 0x15d93(%rip), %rdx     # 0x1d2de
leaq -0x210(%rbp), %r12
movq %r12, %rdi
callq 0x501a
leaq -0x1f0(%rbp), %r12
leaq -0x1e0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d6c(%rip), %rsi     # 0x1d2df
leaq 0x15d69(%rip), %rdx     # 0x1d2e3
movq %r12, %rdi
callq 0x501a
leaq -0x1d0(%rbp), %r12
leaq -0x1c0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d49(%rip), %rsi     # 0x1d2e4
leaq 0x15d47(%rip), %rdx     # 0x1d2e9
movq %r12, %rdi
callq 0x501a
leaq -0x1b0(%rbp), %r12
leaq -0x1a0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d27(%rip), %rsi     # 0x1d2ea
leaq 0x15d25(%rip), %rdx     # 0x1d2ef
movq %r12, %rdi
callq 0x501a
leaq -0x190(%rbp), %r12
leaq -0x180(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15d05(%rip), %rsi     # 0x1d2f0
leaq 0x15d07(%rip), %rdx     # 0x1d2f9
movq %r12, %rdi
callq 0x501a
leaq -0x170(%rbp), %r12
leaq -0x160(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15ce7(%rip), %rsi     # 0x1d2fa
leaq 0x15ce9(%rip), %rdx     # 0x1d303
movq %r12, %rdi
callq 0x501a
leaq -0x150(%rbp), %r12
leaq -0x140(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x15cc9(%rip), %rsi     # 0x1d304
leaq 0x15ccb(%rip), %rdx     # 0x1d30d
movq %r12, %rdi
callq 0x501a
leaq -0x130(%rbp), %r12
leaq -0x120(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x15cab(%rip), %rsi     # 0x1d30e
leaq 0x15cad(%rip), %rdx     # 0x1d317
movq %r12, %rdi
callq 0x501a
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq -0x38(%rbp), %rax
movslq %eax, %rcx
sarq $0x20, %rax
imulq $0x4f, %rax, %rax
movq -0x40(%rbp), %rdx
addq %rdx, %rax
addq $0x820, %rax            # imm = 0x820
movzbl (%rcx,%rax), %eax
addl $-0x23, %eax
cmpl $0x24, %eax
ja 0x78d8
movabsq $0x1080001901, %rcx     # imm = 0x1080001901
btq %rax, %rcx
jae 0x78d8
movq -0x40(%rbp), %rax
leaq 0x820(%rax), %rdx
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movslq -0x34(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x4f, %rax, %rax
movq %rdx, -0xa8(%rbp)
addq %rdx, %rax
cmpb $0x47, (%rcx,%rax)
jne 0x776e
movq -0x38(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7e22
leaq -0xa0(%rbp), %rdi
leaq -0xc8(%rbp), %r12
movq %r12, %rsi
callq 0x41c0
movq (%r12), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x774f
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x4170
leaq 0x15bc2(%rip), %rsi     # 0x1d318
leaq -0xa0(%rbp), %rdi
callq 0x4070
testl %eax, %eax
leaq -0x70(%rbp), %r12
je 0x78a7
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movslq -0x34(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x4f, %rax, %rax
addq -0xa8(%rbp), %rax
cmpb $0x42, (%rcx,%rax)
jne 0x780b
movq -0x40(%rbp), %rax
movq 0xfe8(%rax), %rdi
callq 0x1627e
testb %al, %al
je 0x77d3
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x15b59(%rip), %rsi     # 0x1d318
leaq 0x15b59(%rip), %rdx     # 0x1d31f
movq %r14, %rdi
callq 0x501a
jmp 0x7b04
movq -0x40(%rbp), %rax
movb $0x1, 0x5(%rax)
movq 0xfe0(%rax), %rdi
movl $0x1, %esi
callq 0xb644
leaq -0xc8(%rbp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x15b22(%rip), %rcx     # 0x1d320
movl $0x22, %r8d
xorl %esi, %esi
callq 0x4200
movq -0x40(%rbp), %rax
movq 0xfd8(%rax), %rdi
callq 0x5226
leaq -0x60(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x38(%rbp), %rdi
callq 0x51b6
testb %al, %al
je 0x7851
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x15b06(%rip), %rsi     # 0x1d343
leaq 0x15b07(%rip), %rdx     # 0x1d34b
movq %r14, %rdi
callq 0x501a
jmp 0x7b04
leaq 0x15af4(%rip), %rsi     # 0x1d34c
leaq -0x80(%rbp), %rdi
callq 0x4280
movq %r14, -0xd0(%rbp)
movq 0x8(%r15), %r14
xorl %r12d, %r12d
movq -0x308(%rbp,%r12), %rdx
cmpq %r14, %rdx
jne 0x7895
testq %rdx, %rdx
je 0x78fa
movq (%r15), %rsi
movq -0x310(%rbp,%r12), %rdi
callq 0x4180
testl %eax, %eax
je 0x78fa
addq $0x20, %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x786f
jmp 0x7954
leaq 0x10(%r14), %rax
movq %rax, (%r14)
movq -0xa0(%rbp), %rcx
leaq -0x90(%rbp), %rdx
cmpq %rdx, %rcx
je 0x7bc3
movq %rcx, (%r14)
movq -0x90(%rbp), %rax
movq %rax, 0x10(%r14)
jmp 0x7bc9
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x15a32(%rip), %rsi     # 0x1d318
leaq 0x15a32(%rip), %rdx     # 0x1d31f
movq %r14, %rdi
callq 0x501a
jmp 0x7b48
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x210(%rbp,%r12), %rsi
movq -0x208(%rbp,%r12), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0xa582
leaq 0x162d1(%rip), %rsi     # 0x1dbf6
leaq -0x60(%rbp), %rdi
callq 0x4280
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x4080
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x7954
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
leaq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %r12
callq 0x4080
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x4080
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq -0x38(%rbp), %rdx
leaq -0x110(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x815e
leaq -0x60(%rbp), %rdi
leaq -0x110(%rbp), %r15
movq %r15, %rsi
callq 0x41c0
movq (%r15), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x79de
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x4170
leaq 0x15933(%rip), %rsi     # 0x1d318
leaq -0x60(%rbp), %rdi
callq 0x4070
testl %eax, %eax
je 0x7a03
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x4080
movq -0x40(%rbp), %r14
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, %r15
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
sarq $0x20, %r15
imulq $0x4f, %r15, %rcx
addq %r14, %rcx
cltq
movb 0x6(%rax,%rcx), %al
movb %al, -0x29(%rbp)
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, %r15
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
sarq $0x20, %r15
cltq
imulq $0x4f, %r15, %rcx
addq -0xa8(%rbp), %rcx
movb -0x29(%rbp), %dl
movb %dl, (%rax,%rcx)
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq -0xd0(%rbp), %r14
movslq -0x34(%rbp), %rcx
movslq -0x38(%rbp), %rdx
imulq $0x4f, %rcx, %rcx
movq -0xa8(%rbp), %rsi
addq %rcx, %rsi
movb %al, (%rdx,%rsi)
movq -0x40(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq -0x38(%rbp), %rsi
movq (%rdi), %rax
callq *0x40(%rax)
leaq 0x10(%r14), %rax
movq %rax, (%r14)
movq -0x80(%rbp), %rcx
cmpq %r12, %rcx
je 0x7acb
movq %rcx, (%r14)
movq -0x70(%rbp), %rax
movq %rax, 0x10(%r14)
jmp 0x7ad3
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq -0x78(%rbp), %rax
movq %rax, 0x8(%r14)
movq %r12, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movb $0x0, -0x70(%rbp)
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x7b04
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x7b26
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x4170
leaq -0x90(%rbp), %rcx
movq -0xa0(%rbp), %rdi
cmpq %rcx, %rdi
je 0x7b48
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x4170
movq %r14, %r15
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x7b60
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x4170
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 $-0x100, %rbx
movq %r15, %r14
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x7ba4
movq (%r13), %rsi
incq %rsi
callq 0x4170
addq $-0x20, %r13
addq $0x20, %rbx
jne 0x7b8f
movq %r14, %rax
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movups (%rdx), %xmm0
movups %xmm0, (%rax)
movq %rdx, %rcx
movq -0x98(%rbp), %rax
movq %rax, 0x8(%r14)
movq %rdx, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movb $0x0, -0x90(%rbp)
jmp 0x7b2d
jmp 0x7bf7
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
jne 0x7c45
jmp 0x7d31
jmp 0x7d2e
movq %rax, %r14
jmp 0x7d75
jmp 0x7d2e
jmp 0x7c31
jmp 0x7c31
jmp 0x7c31
jmp 0x7c31
jmp 0x7c31
jmp 0x7d2e
movq %rax, %r14
jmp 0x7d53
movq %rax, %r14
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x7d31
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x7d31
jmp 0x7c64
jmp 0x7c64
jmp 0x7c64
jmp 0x7c64
jmp 0x7c64
jmp 0x7c64
jmp 0x7c64
movq %rax, %r14
leaq -0x210(%rbp), %rax
cmpq %r12, %rax
je 0x7dba
addq $-0x10, %r12
leaq -0x210(%rbp), %rbx
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x7c98
movq (%r12), %rsi
incq %rsi
callq 0x4170
leaq -0x20(%r12), %rax
addq $-0x10, %r12
cmpq %rbx, %r12
movq %rax, %r12
jne 0x7c82
jmp 0x7dba
jmp 0x7cba
jmp 0x7cba
jmp 0x7cba
jmp 0x7cba
jmp 0x7cba
jmp 0x7cba
movq %rax, %r14
cmpq %r12, %rbx
je 0x7de5
addq $-0x10, %r12
leaq -0x310(%rbp), %rbx
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x7ce7
movq (%r12), %rsi
incq %rsi
callq 0x4170
leaq -0x20(%r12), %rax
addq $-0x10, %r12
cmpq %rbx, %r12
movq %rax, %r12
jne 0x7cd1
jmp 0x7de5
movq %rax, %r14
movq %rbx, %r12
jmp 0x7cbd
movq %rax, %r14
movq -0xf0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x7de5
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x7de5
jmp 0x7d2e
movq %rax, %r14
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x7d53
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x7d75
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x7d8e
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x4170
xorl %r15d, %r15d
movq -0x130(%rbp,%r15), %rdi
leaq (%rbx,%r15), %rax
cmpq %rdi, %rax
je 0x7dad
movq (%rax), %rsi
incq %rsi
callq 0x4170
addq $-0x20, %r15
cmpq $-0x100, %r15
jne 0x7d91
xorl %ebx, %ebx
movq -0x230(%rbp,%rbx), %rdi
leaq (%rbx,%r13), %rax
cmpq %rdi, %rax
je 0x7dd8
movq (%rax), %rsi
incq %rsi
callq 0x4170
addq $-0x20, %rbx
cmpq $-0x100, %rbx
jne 0x7dbc
movq %r14, %rdi
callq 0x4250
nop