// File: malcolmyeh[P]CC3K/game.cc
// Function: validDirection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool validDirection(std::string s){
	std::string dir[8] = {"ea", "we", "no", "so", "ne", "nw", "se", "sw"};
	for (int i = 0; i < 8; ++i){
		if (s == dir[i]){
			return true;
		}
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x158(%rbp)
movq %rdi, -0x10(%rbp)
movb $0x1, -0x134(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x150(%rbp)
movq %rax, -0x118(%rbp)
leaq -0x119(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x4300
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rdx
leaq 0x3d39(%rip), %rsi      # 0x1e1a3
callq 0x4270
jmp 0x1a471
leaq -0xf0(%rbp), %rax
movq %rax, -0x168(%rbp)
movq %rax, -0x118(%rbp)
leaq -0x12d(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x4300
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rdx
leaq 0x3cf8(%rip), %rsi      # 0x1e1a6
callq 0x4270
jmp 0x1a4b5
leaq -0xd0(%rbp), %rax
movq %rax, -0x178(%rbp)
movq %rax, -0x118(%rbp)
leaq -0x12e(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x4300
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rdx
leaq 0x3cb7(%rip), %rsi      # 0x1e1a9
callq 0x4270
jmp 0x1a4f9
leaq -0xb0(%rbp), %rax
movq %rax, -0x188(%rbp)
movq %rax, -0x118(%rbp)
leaq -0x12f(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x4300
movq -0x188(%rbp), %rdi
movq -0x180(%rbp), %rdx
leaq 0x3c76(%rip), %rsi      # 0x1e1ac
callq 0x4270
jmp 0x1a53d
leaq -0x90(%rbp), %rax
movq %rax, -0x198(%rbp)
movq %rax, -0x118(%rbp)
leaq -0x130(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x4300
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rdx
leaq 0x3c35(%rip), %rsi      # 0x1e1af
callq 0x4270
jmp 0x1a581
leaq -0x70(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq %rax, -0x118(%rbp)
leaq -0x131(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x4300
movq -0x1a8(%rbp), %rdi
movq -0x1a0(%rbp), %rdx
leaq 0x3bf7(%rip), %rsi      # 0x1e1b2
callq 0x4270
jmp 0x1a5c2
leaq -0x50(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq %rax, -0x118(%rbp)
leaq -0x132(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x4300
movq -0x1b8(%rbp), %rdi
movq -0x1b0(%rbp), %rdx
leaq 0x3bb9(%rip), %rsi      # 0x1e1b5
callq 0x4270
jmp 0x1a603
leaq -0x30(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq %rax, -0x118(%rbp)
leaq -0x133(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x4300
movq -0x1c8(%rbp), %rdi
movq -0x1c0(%rbp), %rdx
leaq 0x3b7b(%rip), %rsi      # 0x1e1b8
callq 0x4270
jmp 0x1a644
movb $0x0, -0x134(%rbp)
leaq -0x133(%rbp), %rdi
callq 0x4200
leaq -0x132(%rbp), %rdi
callq 0x4200
leaq -0x131(%rbp), %rdi
callq 0x4200
leaq -0x130(%rbp), %rdi
callq 0x4200
leaq -0x12f(%rbp), %rdi
callq 0x4200
leaq -0x12e(%rbp), %rdi
callq 0x4200
leaq -0x12d(%rbp), %rdi
callq 0x4200
leaq -0x119(%rbp), %rdi
callq 0x4200
movl $0x0, -0x138(%rbp)
cmpl $0x8, -0x138(%rbp)
jge 0x1a876
movq -0x158(%rbp), %rdi
movslq -0x138(%rbp), %rax
leaq -0x110(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
callq 0xda30
testb $0x1, %al
jne 0x1a6ec
jmp 0x1a860
movb $0x1, -0x1(%rbp)
movl $0x1, -0x13c(%rbp)
jmp 0x1a884
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x1a7fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x1a7ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x1a7e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x1a7d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x1a7ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x1a7be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x1a7b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x133(%rbp), %rdi
callq 0x4200
leaq -0x132(%rbp), %rdi
callq 0x4200
leaq -0x131(%rbp), %rdi
callq 0x4200
leaq -0x130(%rbp), %rdi
callq 0x4200
leaq -0x12f(%rbp), %rdi
callq 0x4200
leaq -0x12e(%rbp), %rdi
callq 0x4200
leaq -0x12d(%rbp), %rdi
callq 0x4200
leaq -0x119(%rbp), %rdi
callq 0x4200
testb $0x1, -0x134(%rbp)
jne 0x1a811
jmp 0x1a85e
movq -0x118(%rbp), %rax
leaq -0x110(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1d0(%rbp)
je 0x1a85c
movq -0x1d0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x4130
movq -0x1d8(%rbp), %rax
leaq -0x110(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1d0(%rbp)
jne 0x1a82b
jmp 0x1a85e
jmp 0x1a8de
jmp 0x1a862
movl -0x138(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x138(%rbp)
jmp 0x1a6b5
movb $0x0, -0x1(%rbp)
movl $0x1, -0x13c(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x1e8(%rbp)
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x4130
movq -0x1e8(%rbp), %rcx
movq -0x1f0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1e0(%rbp)
jne 0x1a89f
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x128(%rbp), %rdi
callq 0x42f0
nopw (%rax,%rax)