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

```asm
<laplacian>:
  endbr64
  push   %r15
  lea    -0x1(%rcx),%r15d
  push   %r14
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  movslq %edx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  cmp    $0x1,%r15d
  jle    L10
  movslq %ebp,%r9
  lea    -0x3(%rbp),%eax
  mov    %r12d,0xc(%rsp)
  mov    %rdi,%r11
  mov    %r9,%r8
  mov    %rax,(%rsp)
  xor    %ecx,%ecx
  mov    $0x1,%r14d
  neg    %r8
  movsd  D25(%rip),%xmm4
  lea    0x4(%rdi),%r13
  movsd  D24(%rip),%xmm3
  movsd  D7(%rip),%xmm2
  shl    $0x2,%r8
  nopl   0x0(%rax)
L60:
  add    $0x1,%r14d
  lea    0x0(%rbp,%rcx,1),%r12d
  cmp    $0x2,%ebp
  jle    L70
  mov    (%rsp),%rdi
  movslq %r12d,%r10
  lea    (%r12,%rbp,1),%esi
  lea    0x0(,%r10,4),%rdx
  movslq %esi,%rsi
  sub    %r10,%rcx
  add    %r10,%rdi
  lea    (%r11,%rdx,1),%rax
  sub    %r10,%rsi
  add    %rbx,%rdx
  lea    0x0(%r13,%rdi,4),%rdi
  nopl   (%rax)
L67:
  movss  0x8(%rax),%xmm0
  addss  0x4(%rax,%r9,4),%xmm0
  add    $0x4,%rdx
  addss  (%rax),%xmm0
  addss  0x4(%rax,%r8,1),%xmm0
  movss  (%rax,%rcx,4),%xmm1
  addss  0x8(%rax,%rcx,4),%xmm1
  addss  0x8(%rax,%rsi,4),%xmm1
  addss  (%rax,%rsi,4),%xmm1
  add    $0x4,%rax
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm4,%xmm0
  cvtss2sd %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd (%rax),%xmm1
  mulsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm0
  divsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rdx)
  cmp    %rax,%rdi
  jne    L67
L70:
  movslq %r12d,%rcx
  cmp    %r14d,%r15d
  jne    L60
  mov    0xc(%rsp),%r12d
L10:
  test   %ebp,%ebp
  jle    L52
  imul   %ebp,%r15d
  mov    %ebp,%edx
  lea    -0x1(%rbp),%esi
  lea    0x0(,%rdx,4),%r13
  movslq %r15d,%rax
  add    %rax,%rdx
  lea    0x0(,%rax,4),%rcx
  shl    $0x2,%rdx
  test   %rdx,%rdx
  jle    L86
  cmp    %r13,%rcx
  jl     L91
L86:
  lea    (%rbx,%rcx,1),%rdi
  mov    %r13,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %r13,%rdx
  xor    %esi,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
L52:
  test   %r12d,%r12d
  jle    L54
  lea    0x0(,%rbp,4),%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L92:
  add    $0x1,%eax
  movl   $0x0,-0x4(%rbx,%rbp,4)
  movl   $0x0,(%rbx)
  add    %rdx,%rbx
  cmp    %eax,%r12d
  jne    L92
L54:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L91:
  add    %rax,%rsi
  lea    (%rbx,%rcx,1),%rdx
  neg    %rcx
  lea    0x4(%rbx,%rsi,4),%rax
  nop
L38:
  movl   $0x0,(%rdx)
  add    $0x4,%rdx
  movl   $0x0,-0x4(%rdx,%rcx,1)
  cmp    %rax,%rdx
  jne    L38
  jmp    L52
```

tool_calls: name: read_data
arguments: data_label: D25
data_type: f64
name: read_data
arguments: data_label: D24
data_type: f32[2]
name: read_data
arguments: data_label: D7
data_type: f64

tool: D25: 4

tool: {"D24": [0.0,-2.8125]}

tool: D7: 6

assistant: ```c
void laplacian(image, lap, nx, ny) float *lap, *image;
int nx, ny;
{
  int index, i, j;
  for (i = 1; i < ny - 1; i++) {
    for (j = 1; j < nx - 1; j++) {
      index = (i * nx) + j;
      lap[index] = (image[(i - 1) * nx + (j - 1)] + image[(i - 1) * nx + (j + 1)] + image[(i + 1) * nx + (j + 1)] + image[(i + 1) * nx + (j - 1)] + (4.0 * (image[index + 1] + image[index + nx] + image[index - 1] + image[index - nx])) + (-20.0 * image[index])) / 6.0;
    }
  }
  for (j = 0; j < nx; j++) {
    lap[(ny - 1) * nx + j] = 0.0;
    lap[j] = 0.0;
  }
  for (i = 0; i < ny; i++) {
    lap[(i * nx) + nx - 1] = 0.0;
    lap[i * nx] = 0.0;
  }
}
```