user: Converte this assembly snippet into its equivalent C code:

```asm
<checkAvailable>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %dil,0x2f(%rsp)
  lea    0x60(%rdx),%eax
  mov    %eax,0x20(%rsp)
  movb   $0x61,0x2e(%rsp)
  movl   $0x0,0x28(%rsp)
  cmp    $0x60,%eax
  jle    L137
  mov    $0x61,%r13d
  mov    %r13d,%r15d
  mov    %rsi,%r13
  mov    %edx,%r12d
  jmp    L153
L14:
  movl   $0x1,0x28(%rsp)
L31:
  add    $0x1,%ebx
  movsbl %bl,%r14d
  cmp    0x20(%rsp),%r14d
  jg     L64
L151:
  sub    $0x8,%rsp
  push   $0xffffffffffffffff
  mov    $0xffffffff,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <checkLegalInDirection@plt>
  mov    %eax,0x18(%rsp)
  movl   $0x0,(%rsp)
  mov    $0xffffffff,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <checkLegalInDirection@plt>
  mov    %eax,0x1c(%rsp)
  movl   $0x1,(%rsp)
  mov    $0xffffffff,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <checkLegalInDirection@plt>
  mov    %eax,0x20(%rsp)
  movl   $0x1,(%rsp)
  mov    $0x0,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <checkLegalInDirection@plt>
  mov    %eax,0x24(%rsp)
  movl   $0x1,(%rsp)
  mov    $0x1,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <checkLegalInDirection@plt>
  mov    %eax,0x28(%rsp)
  movl   $0x0,(%rsp)
  mov    $0x1,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <checkLegalInDirection@plt>
  mov    %eax,0x2c(%rsp)
  movl   $0xffffffff,(%rsp)
  mov    $0x1,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <checkLegalInDirection@plt>
  mov    %eax,0x34(%rsp)
  movl   $0xffffffff,(%rsp)
  mov    $0x0,%r9d
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <checkLegalInDirection@plt>
  add    $0x10,%rsp
  cmpl   $0x1,0x8(%rsp)
  je     L14
  cmpl   $0x1,0xc(%rsp)
  je     L14
  cmpl   $0x1,0x10(%rsp)
  je     L82
  cmpl   $0x1,0x14(%rsp)
  je     L82
  cmpl   $0x1,0x18(%rsp)
  je     L93
  cmpl   $0x1,0x1c(%rsp)
  je     L93
  cmpl   $0x1,0x24(%rsp)
  je     L115
  cmp    $0x1,%eax
  jne    L31
L115:
  movl   $0x1,0x28(%rsp)
  jmp    L31
L82:
  movl   $0x1,0x28(%rsp)
  jmp    L31
L93:
  movl   $0x1,0x28(%rsp)
  jmp    L31
L64:
  addb   $0x1,0x2e(%rsp)
  movzbl 0x2e(%rsp),%eax
  movsbl %al,%r15d
  cmp    0x20(%rsp),%r15d
  jg     L137
L153:
  mov    $0x61,%ebx
  mov    $0x61,%r14d
  movsbl 0x2f(%rsp),%ebp
  jmp    L151
L137:
  mov    0x28(%rsp),%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
bool checkAvailable(char color, char board[][26], int n) {
  bool g, h, i, j, k, l, m, q;
  bool check = false;
  for (char row = 'a'; row <= 'a' + n - 1; row++) {
    for (char col = 'a'; col <= 'a' + n - 1; col++) {
      g = checkLegalInDirection(board, n, row, col, color, -1, -1);
      h = checkLegalInDirection(board, n, row, col, color, -1, 0);
      i = checkLegalInDirection(board, n, row, col, color, -1, 1);
      j = checkLegalInDirection(board, n, row, col, color, 0, 1);
      k = checkLegalInDirection(board, n, row, col, color, 1, 1);
      l = checkLegalInDirection(board, n, row, col, color, 1, 0);
      m = checkLegalInDirection(board, n, row, col, color, 1, -1);
      q = checkLegalInDirection(board, n, row, col, color, 0, -1);
      if (g == true || h == true || i == true || j == true || k == true || l == true || m == true || q == true)
        check = true;
    }
  }
  return (check);
}
```