// File: sanket143[P]2048-Terminal-Game/./src/board.h
// Function: gb::Board::valid(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool valid(std::string direction) {
        std::string valid_directions[4] = {"R", "D", "L", "U"};
        for(int i = 0; i < 4; i++) {
          if(direction == valid_directions[i]) {
            return true;
          }
        }
        return false;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rsi, -0xe0(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x1, -0xc0(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x22a0
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rdx
leaq 0x276c(%rip), %rsi      # 0x505a
callq 0x33a0
jmp 0x28f5
leaq -0x80(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbd(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x22a0
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rdx
leaq 0x272d(%rip), %rsi      # 0x505c
callq 0x33a0
jmp 0x2936
leaq -0x60(%rbp), %rax
movq %rax, -0x100(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbe(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x22a0
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rdx
leaq 0x26ee(%rip), %rsi      # 0x505e
callq 0x33a0
jmp 0x2977
leaq -0x40(%rbp), %rax
movq %rax, -0x110(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbf(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x22a0
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rdx
leaq 0x26af(%rip), %rsi      # 0x5060
callq 0x33a0
jmp 0x29b8
movb $0x0, -0xc0(%rbp)
leaq -0xbf(%rbp), %rdi
callq 0x21c0
leaq -0xbe(%rbp), %rdi
callq 0x21c0
leaq -0xbd(%rbp), %rdi
callq 0x21c0
leaq -0xa9(%rbp), %rdi
callq 0x21c0
movl $0x0, -0xc4(%rbp)
cmpl $0x4, -0xc4(%rbp)
jge 0x2b31
movq -0xe0(%rbp), %rdi
movslq -0xc4(%rbp), %rax
leaq -0xa0(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
callq 0x3450
testb $0x1, %al
jne 0x2a30
jmp 0x2b1b
movb $0x1, -0x1(%rbp)
movl $0x1, -0xc8(%rbp)
jmp 0x2b3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x2ab5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x2aa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x2a9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xbf(%rbp), %rdi
callq 0x21c0
leaq -0xbe(%rbp), %rdi
callq 0x21c0
leaq -0xbd(%rbp), %rdi
callq 0x21c0
leaq -0xa9(%rbp), %rdi
callq 0x21c0
testb $0x1, -0xc0(%rbp)
jne 0x2acc
jmp 0x2b19
movq -0xa8(%rbp), %rax
leaq -0xa0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x118(%rbp)
je 0x2b17
movq -0x118(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x120(%rbp)
callq 0x20f0
movq -0x120(%rbp), %rax
leaq -0xa0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x118(%rbp)
jne 0x2ae6
jmp 0x2b19
jmp 0x2b99
jmp 0x2b1d
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x29f9
movb $0x0, -0x1(%rbp)
movl $0x1, -0xc8(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x130(%rbp)
addq $0x80, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x138(%rbp)
callq 0x20f0
movq -0x130(%rbp), %rcx
movq -0x138(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x128(%rbp)
jne 0x2b5a
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0xb8(%rbp), %rdi
callq 0x2290
nopw %cs:(%rax,%rax)
nop