user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    $0x0,%eax
  call   <numa_available@plt>
  test   %rax,%rax
  jns    L4
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L4:
  mov    $0x0,%eax
  call   <numa_num_configured_nodes@plt>
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L69
L48:
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <numa_distance@plt>
  cmp    $0xa,%eax
  je     L59
  mov    -0x14(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <numa_distance@plt>
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L59:
  movl   $0x0,-0x10(%rbp)
  jmp    L31
L33:
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <numa_distance@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <numa_distance@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,%esi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  je     L17
  mov    -0x4(%rbp),%esi
  mov    -0x8(%rbp),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %esi,%r8d
  mov    %eax,%esi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L17:
  addl   $0x1,-0x10(%rbp)
L31:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L33
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x14(%rbp)
L69:
  mov    -0x14(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L48
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D24
data_type: string
name: read_data
arguments: data_tag: D17
data_type: string
name: read_data
arguments: data_tag: D15
data_type: string
name: read_data
arguments: data_tag: D35
data_type: string
name: read_data
arguments: data_tag: D16
data_type: string

tool: D24: no numa support in kernel

tool: D17: %03d: 

tool: D15: %d: self distance is not 10 (%d)


tool: D35: %03d 

tool: D16: 
(%d,%d)->(%d,%d) wrong!


assistant: ```c
int main(void) {
  int numnodes, a, b;
  if (numa_available() < 0) {
    printf("no numa support in kernel\n");
    exit(1);
  }
  numnodes = numa_num_configured_nodes();
  for (a = 0; a < numnodes; a++) {
    printf("%03d: ", a);
    if (numa_distance(a, a) != 10) {
      printf("%d: self distance is not 10 (%d)\n", a, numa_distance(a, a));
      exit(1);
    }
    for (b = 0; b < numnodes; b++) {
      int d1 = numa_distance(a, b);
      int d2 = numa_distance(b, a);
      printf("%03d ", d1);
      if (d1 != d2) {
        printf("\n(%d,%d)->(%d,%d) wrong!\n", a, b, d1, d2);
        exit(1);
      }
    }
    printf("\n");
  }
  return 0;
}
```