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

```asm
<update>:
  endbr64
  push   %r15
  mov    %rsi,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x28,%rsp
  mov    %rdx,0x10(%rsp)
  mov    %ecx,0x18(%rsp)
  test   %rdx,%rdx
  je     L1
  mov    0x18(%rsp),%edx
  test   %edx,%edx
  jle    L146
  lea    0x8(%rdi),%r12
  mov    %rsi,%r15
  pxor   %xmm1,%xmm1
  mov    $0x1,%r13d
  mov    %r12,%rbp
  nopw   0x0(%rax,%rax,1)
L29:
  xor    %r14d,%r14d
  mov    $0x1,%r12d
  test   %ebx,%ebx
  jle    L113
  nopl   (%rax)
L150:
  mov    0x8(%r15),%rax
  mov    (%r15),%rdi
  mov    %r14,%rcx
  add    $0x4,%r14
  mov    0x10(%r15),%rsi
  movss  %xmm1,0x8(%rsp)
  add    $0x1,%r12d
  movss  (%rdi,%r14,1),%xmm0
  addss  (%rsi,%r14,1),%xmm0
  addss  (%rax,%rcx,1),%xmm0
  addss  0x8(%rax,%rcx,1),%xmm0
  mulss  D22(%rip),%xmm0
  mov    0x0(%rbp),%rcx
  movss  %xmm0,(%rcx,%r14,1)
  subss  (%rax,%r14,1),%xmm0
  call   <fabsf@plt>
  movss  0x8(%rsp),%xmm1
  mov    %eax,%edi
  movaps %xmm1,%xmm0
  call   <fmaxf@plt>
  movaps %xmm0,%xmm1
  cmp    %r12d,%ebx
  jge    L150
L113:
  add    $0x1,%r13d
  add    $0x8,%r15
  add    $0x8,%rbp
  cmp    %r13d,0x18(%rsp)
  jge    L29
L78:
  mov    0x10(%rsp),%rax
  movss  %xmm1,(%rax)
L81:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L1:
  mov    %ecx,%esi
  test   %ecx,%ecx
  jle    L81
  test   %r8d,%r8d
  jle    L81
  add    $0x1,%esi
  mov    %r8d,%r13d
  mov    %r8d,%edx
  movaps D22(%rip),%xmm2
  and    $0xfffffffc,%r13d
  mov    %rsi,0x8(%rsp)
  lea    -0x1(%r8),%esi
  shr    $0x2,%edx
  mov    %esi,0x18(%rsp)
  lea    0x1(%r13),%esi
  lea    -0x1(%rdx),%ebp
  movss  D22(%rip),%xmm1
  mov    %esi,0x10(%rsp)
  mov    %r8d,%esi
  shl    $0x4,%rbp
  movq   D22(%rip),%xmm3
  sub    %r13d,%esi
  add    $0x14,%rbp
  mov    $0x1,%r10d
  mov    %esi,0x1c(%rsp)
  lea    0x1(%r8),%r12d
  nopl   (%rax)
L190:
  mov    (%rdi,%r10,8),%rsi
  mov    (%rax,%r10,8),%rcx
  mov    -0x8(%rax,%r10,8),%r8
  mov    0x8(%rax,%r10,8),%r9
  mov    %rsi,%r11
  lea    0x4(%rsi),%rdx
  sub    %rcx,%r11
  lea    0x8(%r8),%r15
  cmp    $0x10,%r11
  seta   %r11b
  cmp    $0x1,%ebx
  setne  %r14b
  and    %r14d,%r11d
  mov    %rdx,%r14
  sub    %r15,%r14
  cmp    $0x8,%r14
  seta   %r14b
  test   %r14b,%r11b
  je     L85
  lea    0x8(%r9),%r11
  sub    %r11,%rdx
  cmp    $0x8,%rdx
  jbe    L85
  cmpl   $0x2,0x18(%rsp)
  jbe    L98
  mov    $0x4,%edx
  nopw   0x0(%rax,%rax,1)
L44:
  movups (%r9,%rdx,1),%xmm0
  movups (%r8,%rdx,1),%xmm5
  movups -0x4(%rcx,%rdx,1),%xmm6
  movups 0x4(%rcx,%rdx,1),%xmm7
  addps  %xmm5,%xmm0
  addps  %xmm6,%xmm0
  addps  %xmm7,%xmm0
  mulps  %xmm2,%xmm0
  movups %xmm0,(%rsi,%rdx,1)
  add    $0x10,%rdx
  cmp    %rbp,%rdx
  jne    L44
  cmp    %ebx,%r13d
  je     L184
  mov    0x1c(%rsp),%edx
  cmp    $0x1,%edx
  mov    %edx,%r15d
  mov    0x10(%rsp),%edx
  je     L39
  mov    %r13d,%r11d
L64:
  add    $0x1,%r11d
  movq   (%r9,%r11,4),%xmm4
  movq   (%r8,%r11,4),%xmm0
  lea    0x0(,%r11,4),%r14
  addps  %xmm4,%xmm0
  movq   -0x4(%rcx,%r14,1),%xmm4
  addps  %xmm0,%xmm4
  movq   0x4(%rcx,%r14,1),%xmm0
  addps  %xmm0,%xmm4
  mulps  %xmm3,%xmm4
  movlps %xmm4,(%rsi,%r11,4)
  mov    %r15d,%r11d
  and    $0xfffffffe,%r11d
  add    %r11d,%edx
  cmp    %r11d,%r15d
  je     L184
L39:
  movslq %edx,%rdx
  movss  (%r9,%rdx,4),%xmm0
  addss  (%r8,%rdx,4),%xmm0
  addss  -0x4(%rcx,%rdx,4),%xmm0
  addss  0x4(%rcx,%rdx,4),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,(%rsi,%rdx,4)
L184:
  add    $0x1,%r10
  cmp    %r10,0x8(%rsp)
  jne    L190
  jmp    L81
L85:
  mov    $0x1,%edx
  nopl   0x0(%rax,%rax,1)
L83:
  movss  (%r9,%rdx,4),%xmm0
  addss  (%r8,%rdx,4),%xmm0
  addss  -0x4(%rcx,%rdx,4),%xmm0
  addss  0x4(%rcx,%rdx,4),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,(%rsi,%rdx,4)
  add    $0x1,%rdx
  cmp    %rdx,%r12
  jne    L83
  jmp    L184
L98:
  mov    %ebx,%r15d
  mov    $0x1,%edx
  xor    %r11d,%r11d
  jmp    L64
L146:
  pxor   %xmm1,%xmm1
  jmp    L78
```

tool_calls: name: retrieve_data
arguments: data_tag: D22
datatype: f32[4]

tool: {"D22": [0.25,0.25,0.25,0.25]}

assistant: ```c
void update(float **newarr, float **oldarr, float *norm, int nx, int ny) {
  int i, j;
  const float factor = 0.25;
  float lnorm;
  if (norm != NULL) {
    lnorm = 0;
#pragma acc parallel loop reduction(max : lnorm) private(i, j) present(newarr, oldarr) collapse(2)
    for (i = 1; i < nx + 1; i++) {
      for (j = 1; j < ny + 1; j++) {
        newarr[i][j] = factor * (oldarr[i - 1][j] + oldarr[i + 1][j] + oldarr[i][j - 1] + oldarr[i][j + 1]);
        lnorm = fmaxf(lnorm, fabsf(newarr[i][j] - oldarr[i][j]));
      }
    }
    *norm = lnorm;
  } else {
#pragma acc parallel loop private(i, j) present(newarr, oldarr) collapse(2)
    for (i = 1; i < nx + 1; i++) {
      for (j = 1; j < ny + 1; j++) {
        newarr[i][j] = factor * (oldarr[i - 1][j] + oldarr[i + 1][j] + oldarr[i][j - 1] + oldarr[i][j + 1]);
      }
    }
  }
}
```