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

```asm
<JacobiOmpLoopV4err>:
  endbr64
  push   %r15
  mov    %edx,%eax
  push   %r14
  imul   %ecx,%eax
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  movsd  D29(%rip),%xmm1
  movsd  D17(%rip),%xmm2
  mov    %r8d,(%rsp)
  mov    0x50(%rsp),%r15
  mulsd  %xmm0,%xmm1
  mov    %eax,0x4(%rsp)
  movsd  %xmm0,0x8(%rsp)
  comisd %xmm0,%xmm1
  jb     L107
  mov    (%r15),%r9d
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %edx,%ebx
  mov    %ecx,%r14d
  lea    -0x1(%rcx),%r13d
  cmp    (%rsp),%r9d
  jge    L107
  nopl   0x0(%rax)
L69:
  cmp    $0x2,%ebx
  jle    L109
  lea    -0x3(%rbx),%r8d
  lea    -0x3(%r14),%r10d
  mov    $0x1,%r11d
  add    $0x2,%r8
  add    $0x2,%r10
  nopw   0x0(%rax,%rax,1)
L90:
  cmp    $0x1,%r13d
  jle    L19
  mov    -0x8(%r12,%r11,8),%rdi
  mov    0x8(%r12,%r11,8),%rsi
  mov    $0x1,%eax
  mov    (%r12,%r11,8),%rdx
  mov    0x0(%rbp,%r11,8),%rcx
  xchg   %ax,%ax
L86:
  movsd  (%rdi,%rax,8),%xmm0
  addsd  (%rsi,%rax,8),%xmm0
  addsd  -0x8(%rdx,%rax,8),%xmm0
  addsd  0x8(%rdx,%rax,8),%xmm0
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r10
  jne    L86
L19:
  add    $0x1,%r11
  cmp    %r11,%r8
  jne    L90
  lea    -0x3(%r14),%r10d
  mov    $0x1,%r11d
  add    $0x2,%r10
  nop
L42:
  cmp    $0x1,%r13d
  jle    L38
  mov    -0x8(%rbp,%r11,8),%rdi
  mov    0x8(%rbp,%r11,8),%rsi
  mov    $0x1,%eax
  mov    0x0(%rbp,%r11,8),%rdx
  mov    (%r12,%r11,8),%rcx
  xchg   %ax,%ax
L97:
  movsd  (%rdi,%rax,8),%xmm0
  addsd  (%rsi,%rax,8),%xmm0
  addsd  -0x8(%rdx,%rax,8),%xmm0
  addsd  0x8(%rdx,%rax,8),%xmm0
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  subsd  (%rdx,%rax,8),%xmm0
  add    $0x1,%rax
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rax,%r10
  jne    L97
L38:
  add    $0x1,%r11
  cmp    %r11,%r8
  jne    L42
L109:
  add    $0x2,%r9d
  movapd %xmm1,%xmm0
  mov    %r9d,(%r15)
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  cltd
  idivl  0x4(%rsp)
  cvtsi2sd %eax,%xmm1
  comisd 0x8(%rsp),%xmm1
  jb     L107
  movsd  D17(%rip),%xmm2
  mov    (%r15),%r9d
  cmp    (%rsp),%r9d
  jl     L69
L107:
  add    $0x18,%rsp
  movapd %xmm1,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: label: D29
type_infered: f64
name: read_data
arguments: label: D17
type_infered: byte[8]

tool: D29: 10

tool: {"D17": [0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x3f]}

assistant: ```c
double JacobiOmpLoopV4err(double **up, double **wp, int m, int n, double eps, int maxit, int iterations_print, int *iterations) {
  int i;
  int j;
  double error = 10.0 * eps;
  while (error >= eps && *iterations < maxit) {
#pragma omp parallel private(j)
    {
#pragma omp for schedule(OMP_SCHED)
      for (i = 1; i < m - 1; i++) {
        for (j = 1; j < n - 1; j++) {
          wp[i][j] = (up[i - 1][j] + up[i + 1][j] + up[i][j - 1] + up[i][j + 1]) / 4.0;
        }
      }
#pragma omp for schedule(OMP_SCHED) reduction(+ : error) nowait
      for (i = 1; i < m - 1; i++) {
        for (j = 1; j < n - 1; j++) {
          up[i][j] = (wp[i - 1][j] + wp[i + 1][j] + wp[i][j - 1] + wp[i][j + 1]) / 4.0;
          error += (up[i][j] - wp[i][j]) * (up[i][j] - wp[i][j]);
        }
      }
    }
    *iterations += 2;
    error = sqrt(error) / (m * n);
  }
  return error;
}
```