user: What would the C source look like for the assembly code provided here?

```asm
<checkChip>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8d,%eax
  mov    %al,-0x2c(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L54
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  addl   $0x1,-0x4(%rbp)
L54:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L49
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x2,(%rax)
  addl   $0x1,-0x4(%rbp)
L49:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L35
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x3,(%rax)
  addl   $0x1,-0x4(%rbp)
L35:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L34
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x4,(%rax)
  addl   $0x1,-0x4(%rbp)
L34:
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L36
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x5,(%rax)
  addl   $0x1,-0x4(%rbp)
L36:
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  lea    -0x9(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L17
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x6,(%rax)
  addl   $0x1,-0x4(%rbp)
L17:
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  lea    -0x9(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L40
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x7,(%rax)
  addl   $0x1,-0x4(%rbp)
L40:
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  lea    -0x9(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L74
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x8,(%rax)
  addl   $0x1,-0x4(%rbp)
L74:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void checkChip(char grid[9][9], int directs[8], int x, int y, char chip) {
  int i = 0;
  if (grid[x][y - 1] == chip) {
    directs[i] = 1;
    i++;
  }
  if (grid[x + 1][y - 1] == chip) {
    directs[i] = 2;
    i++;
  }
  if (grid[x + 1][y] == chip) {
    directs[i] = 3;
    i++;
  }
  if (grid[x + 1][y + 1] == chip) {
    directs[i] = 4;
    i++;
  }
  if (grid[x][y + 1] == chip) {
    directs[i] = 5;
    i++;
  }
  if (grid[x - 1][y + 1] == chip) {
    directs[i] = 6;
    i++;
  }
  if (grid[x - 1][y] == chip) {
    directs[i] = 7;
    i++;
  }
  if (grid[x - 1][y - 1] == chip) {
    directs[i] = 8;
    i++;
  }
}
```