// File: sanket143[P]2048-Terminal-Game/./src/board.h
// Function: gb::Board::move(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void move(std::string direction) {
        flag |= shift(direction);
        if(direction == "R") {
          for(int row = 0; row < 4; row++) {
            for(int col = 3; col > 0; col--) {
              if(tiles[row][col] == 0) {
                break;
              }

              if(tiles[row][col] == tiles[row][col - 1]) {
                tiles[row][col] += tiles[row][col - 1];
                tiles[row][col - 1] = 0;
                flag |= true;
                shift(direction);
              }
            }
          }
        }
        else if(direction == "D") {
          for(int col = 0; col < 4; col++) {
            for(int row = 3; row > 0; row--) {
              if(tiles[row][col] == 0) {
                break;
              }

              if(tiles[row][col] == tiles[row - 1][col]) {
                tiles[row][col] += tiles[row - 1][col];
                tiles[row - 1][col] = 0;
                flag |= true;
                shift(direction);
              }
            }
          } 
        }
        else if(direction == "L") {
          for(int row = 0; row < 4; row++) {
            for(int col = 0; col < 3; col++) {
              if(tiles[row][col] == 0) {
                break;
              }

              if(tiles[row][col] == tiles[row][col + 1]) {
                tiles[row][col] += tiles[row][col + 1];
                tiles[row][col + 1] = 0;
                flag |= true;
                shift(direction);
              }
            }
          }
        }
        else if(direction == "U") {
          for(int col = 0; col < 4; col++) {
            for(int row = 0; row < 3; row++) {
              if(tiles[row][col] == 0) {
                break;
              }

              if(tiles[row][col] == tiles[row + 1][col]) {
                tiles[row][col] += tiles[row + 1][col];
                tiles[row + 1][col] = 0;
                flag |= true;
                shift(direction);
              }
            }
          }
        }
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rsi, -0x100(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x20a0
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
callq 0x3800
movb %al, -0xe1(%rbp)
jmp 0x2c00
movb -0xe1(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movb 0x5571(%rip), %al       # 0x8182
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x555c(%rip)       # 0x8182
leaq -0x30(%rbp), %rdi
callq 0x20f0
movq -0x100(%rbp), %rdi
leaq 0x241d(%rip), %rsi      # 0x505a
callq 0x3bc0
testb $0x1, %al
jne 0x2c4b
jmp 0x2da5
movl $0x0, -0x40(%rbp)
cmpl $0x4, -0x40(%rbp)
jge 0x2da0
movl $0x3, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jle 0x2d90
movq -0xf8(%rbp), %rax
movslq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x2ca8
jmp 0x2d90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x20f0
jmp 0x3241
movq -0xf8(%rbp), %rcx
movslq -0x40(%rbp), %rdx
shlq $0x4, %rdx
movq %rcx, %rax
addq %rdx, %rax
movslq -0x44(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movslq -0x40(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movl -0x44(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x2d80
movq -0xf8(%rbp), %rax
movq -0x100(%rbp), %rsi
movslq -0x40(%rbp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movslq -0x44(%rbp), %rdx
movl %edx, %edi
decl %edi
movslq %edi, %rdi
movl (%rcx,%rdi,4), %r8d
movl (%rcx,%rdx,4), %edi
addl %r8d, %edi
movl %edi, (%rcx,%rdx,4)
movslq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl -0x44(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
movl $0x0, (%rax,%rcx,4)
movb $0x1, 0x544c(%rip)      # 0x8182
leaq -0x68(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x20a0
movq -0xf8(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x3800
jmp 0x2d5b
leaq -0x68(%rbp), %rdi
callq 0x20f0
jmp 0x2d80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x20f0
jmp 0x3241
jmp 0x2d82
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x2c63
jmp 0x2d92
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x2c52
jmp 0x3238
movq -0x100(%rbp), %rdi
leaq 0x22a9(%rip), %rsi      # 0x505c
callq 0x3bc0
testb $0x1, %al
jne 0x2dc1
jmp 0x2f14
movl $0x0, -0x6c(%rbp)
cmpl $0x4, -0x6c(%rbp)
jge 0x2f0f
movl $0x3, -0x70(%rbp)
cmpl $0x0, -0x70(%rbp)
jle 0x2eff
movq -0xf8(%rbp), %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x2e04
jmp 0x2eff
movq -0xf8(%rbp), %rcx
movslq -0x70(%rbp), %rdx
shlq $0x4, %rdx
movq %rcx, %rax
addq %rdx, %rax
movslq -0x6c(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movl -0x70(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x6c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x2eef
movq -0xf8(%rbp), %rax
movq -0x100(%rbp), %rsi
movslq -0x70(%rbp), %rdi
movl %edi, %ecx
decl %ecx
movslq %ecx, %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movslq -0x6c(%rbp), %rdx
movl (%rcx,%rdx,4), %r8d
shlq $0x4, %rdi
movq %rax, %rcx
addq %rdi, %rcx
movl (%rcx,%rdx,4), %edi
addl %r8d, %edi
movl %edi, (%rcx,%rdx,4)
movl -0x70(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x6c(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movb $0x1, 0x52e6(%rip)      # 0x8182
leaq -0x90(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x20a0
movq -0xf8(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x3800
jmp 0x2ec4
leaq -0x90(%rbp), %rdi
callq 0x20f0
jmp 0x2eef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x20f0
jmp 0x3241
jmp 0x2ef1
movl -0x70(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x2dd9
jmp 0x2f01
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x2dc8
jmp 0x3236
movq -0x100(%rbp), %rdi
leaq 0x213c(%rip), %rsi      # 0x505e
callq 0x3bc0
testb $0x1, %al
jne 0x2f30
jmp 0x30a6
movl $0x0, -0x94(%rbp)
cmpl $0x4, -0x94(%rbp)
jge 0x30a1
movl $0x0, -0x98(%rbp)
cmpl $0x3, -0x98(%rbp)
jge 0x308b
movq -0xf8(%rbp), %rax
movslq -0x94(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x98(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x2f85
jmp 0x308b
movq -0xf8(%rbp), %rcx
movslq -0x94(%rbp), %rdx
shlq $0x4, %rdx
movq %rcx, %rax
addq %rdx, %rax
movslq -0x98(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movslq -0x94(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movl -0x98(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x3075
movq -0xf8(%rbp), %rax
movq -0x100(%rbp), %rsi
movslq -0x94(%rbp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movslq -0x98(%rbp), %rdx
movl (%rcx,%rdx,4), %edi
movl 0x4(%rcx,%rdx,4), %r8d
addl %r8d, %edi
movl %edi, (%rcx,%rdx,4)
movslq -0x94(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x98(%rbp), %rcx
movl $0x0, 0x4(%rax,%rcx,4)
movb $0x1, 0x5160(%rip)      # 0x8182
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x20a0
movq -0xf8(%rbp), %rdi
movq -0x118(%rbp), %rsi
callq 0x3800
jmp 0x304a
leaq -0xb8(%rbp), %rdi
callq 0x20f0
jmp 0x3075
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x20f0
jmp 0x3241
jmp 0x3077
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x2f51
jmp 0x308d
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x2f3a
jmp 0x3234
movq -0x100(%rbp), %rdi
leaq 0x1fac(%rip), %rsi      # 0x5060
callq 0x3bc0
testb $0x1, %al
jne 0x30c2
jmp 0x3232
movl $0x0, -0xbc(%rbp)
cmpl $0x4, -0xbc(%rbp)
jge 0x3230
movl $0x0, -0xc0(%rbp)
cmpl $0x3, -0xc0(%rbp)
jge 0x321a
movq -0xf8(%rbp), %rax
movslq -0xc0(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x3117
jmp 0x321a
movq -0xf8(%rbp), %rcx
movslq -0xc0(%rbp), %rdx
shlq $0x4, %rdx
movq %rcx, %rax
addq %rdx, %rax
movslq -0xbc(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movl -0xc0(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0xbc(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x3204
movq -0xf8(%rbp), %rcx
movq -0x100(%rbp), %rsi
movslq -0xc0(%rbp), %rdi
movslq -0xbc(%rbp), %rdx
shlq $0x4, %rdi
movq %rcx, %rax
addq %rdi, %rax
movl (%rax,%rdx,4), %edi
movl 0x10(%rax,%rdx,4), %r8d
addl %r8d, %edi
movl %edi, (%rax,%rdx,4)
movslq -0xc0(%rbp), %rax
shlq $0x4, %rax
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movl $0x0, 0x10(%rax,%rcx,4)
movb $0x1, 0x4fce(%rip)      # 0x8182
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x20a0
movq -0xf8(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0x3800
jmp 0x31dc
leaq -0xe0(%rbp), %rdi
callq 0x20f0
jmp 0x3204
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x20f0
jmp 0x3241
jmp 0x3206
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x30e3
jmp 0x321c
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x30cc
jmp 0x3232
jmp 0x3234
jmp 0x3236
jmp 0x3238
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2290
nopw (%rax,%rax)