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

```asm
<compute_error>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movq   $0x1,-0x48(%rbp)
  jmp    L27
L15:
  movq   $0x1,-0x40(%rbp)
  jmp    L8
L4:
  mov    -0x48(%rbp),%rax
  imul   $0x12c,%rax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x12c,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x38(%rbp),%rax
  sub    $0x12c,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  sub    $0x1,%rax
  imul   $0x12b,%rax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  sub    $0x1,%rax
  imul   $0x12a,%rax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x8(%rbp),%rax
  add    $0x12a,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  addsd  %xmm1,%xmm2
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  addsd  %xmm1,%xmm2
  mov    -0x8(%rbp),%rax
  add    $0x12a,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  addsd  %xmm1,%xmm2
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  addq   $0x1,-0x40(%rbp)
L8:
  cmpq   $0x12a,-0x40(%rbp)
  jle    L4
  addq   $0x1,-0x48(%rbp)
L27:
  cmpq   $0x12a,-0x48(%rbp)
  jle    L15
  movsd  -0x50(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double compute_error(double *a_x, double *a_y, double *P, double *fn) {
  double error = 0.0;
  long indx, indx_rght, indx_frnt, indx_lft, indx_bck, i, j, indx_ax, indx_ay;
  for (i = 1; i < 300 - 1; i++) {
    for (j = 1; j < 300 - 1; j++) {
      indx = i * 300 + j;
      indx_rght = indx + 1;
      indx_frnt = indx + 300;
      indx_lft = indx - 1;
      indx_bck = indx - 300;
      indx_ax = (i - 1) * (300 - 1) + j - 1;
      indx_ay = (i - 1) * (300 - 2) + j - 1;
      error += fabs(a_x[indx_ax] * P[indx_lft] + a_x[indx_ax + 1] * P[indx_rght] + a_y[indx_ay] * P[indx_bck] + a_y[indx_ay + (300 - 2)] * P[indx_frnt] - (a_x[indx_ax] + a_x[indx_ax + 1] + a_y[indx_ay] + a_y[indx_ay + (300 - 2)]) * P[indx] - 1.0 * 1.0 * fn[indx]);
    }
  }
  return (error);
}
```