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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x130,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x114(%rbp)
  movl   $0x0,-0x11c(%rbp)
  jmp    L129
L69:
  movl   $0x0,-0x118(%rbp)
  jmp    L12
L141:
  mov    -0x118(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movl   $0x0,-0x110(%rbp,%rax,4)
  addl   $0x1,-0x118(%rbp)
L12:
  cmpl   $0x7,-0x118(%rbp)
  jle    L141
  addl   $0x1,-0x11c(%rbp)
L129:
  cmpl   $0x7,-0x11c(%rbp)
  jle    L69
  lea    -0x128(%rbp),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x1,-0x11c(%rbp)
  jmp    L149
L68:
  lea    -0x120(%rbp),%rdx
  lea    -0x124(%rbp),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x124(%rbp),%eax
  mov    -0x120(%rbp),%edx
  movslq %edx,%rdx
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movl   $0x1,-0x110(%rbp,%rax,4)
  addl   $0x1,-0x11c(%rbp)
L149:
  mov    -0x128(%rbp),%eax
  cmp    %eax,-0x11c(%rbp)
  jle    L68
  movl   $0x0,-0x11c(%rbp)
  jmp    L39
L71:
  movl   $0x0,-0x118(%rbp)
  jmp    L122
L132:
  mov    -0x118(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    -0x110(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L50
  lea    -0x110(%rbp),%rdx
  mov    -0x118(%rbp),%ecx
  mov    -0x11c(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <checkrow@plt>
  test   %rax,%rax
  je     L80
  lea    -0x110(%rbp),%rdx
  mov    -0x118(%rbp),%ecx
  mov    -0x11c(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <checkcolumn@plt>
  test   %rax,%rax
  je     L80
  lea    -0x110(%rbp),%rdx
  mov    -0x118(%rbp),%ecx
  mov    -0x11c(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <checkdiagonal@plt>
  test   %rax,%rax
  jne    L50
L80:
  addl   $0x1,-0x114(%rbp)
L50:
  addl   $0x1,-0x118(%rbp)
L122:
  cmpl   $0x7,-0x118(%rbp)
  jle    L132
  addl   $0x1,-0x11c(%rbp)
L39:
  cmpl   $0x7,-0x11c(%rbp)
  jle    L71
  mov    -0x128(%rbp),%eax
  cmp    %eax,-0x114(%rbp)
  jne    L160
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L124
L160:
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L124:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L96
  call   <__stack_chk_fail@plt>
L96:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D18
type_guessed: string
name: unpack_data
arguments: tag: D15
type_guessed: string
name: unpack_data
arguments: tag: D38
type_guessed: string
name: unpack_data
arguments: tag: D7
type_guessed: string

tool: D18: %d


tool: D15: %d%d


tool: D38: yes

tool: D7: no

assistant: ```c
int main() {
  int chess[8][8];
  int i, j, N, R, C, count = 0;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      chess[i][j] = 0;
    }
  }
  scanf("%d\n", &N);
  for (i = 1; i <= N; i++) {
    scanf("%d%d\n", &R, &C);
    chess[R][C] = 1;
  }
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (chess[i][j] == 1) {
        if (!(checkrow(i, j, chess) && checkcolumn(i, j, chess) && checkdiagonal(i, j, chess))) {
          count++;
        }
      }
    }
  }
  if (count == N) {
    printf("yes");
  } else {
    printf("no");
  }
  return 0;
}
```