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

```asm
<interpolateZ>:
  endbr64
  movaps %xmm2,%xmm3
  movaps %xmm1,%xmm2
  push   %r15
  subss  %xmm0,%xmm1
  push   %r14
  subss  %xmm3,%xmm2
  push   %r13
  push   %r12
  push   %rbp
  divss  %xmm1,%xmm2
  push   %rbx
  mov    %ecx,-0x34(%rsp)
  test   %ecx,%ecx
  jle    L106
  mov    %edx,%ebp
  test   %edx,%edx
  jle    L106
  movslq %edx,%r15
  mov    %edx,%r14d
  movaps %xmm2,%xmm7
  xor    %r12d,%r12d
  movaps %xmm2,%xmm5
  and    $0xfffffffc,%r14d
  xor    %r11d,%r11d
  xor    %r13d,%r13d
  lea    0x0(,%r15,4),%rax
  movss  D8(%rip),%xmm3
  shufps $0xe0,%xmm7,%xmm7
  shufps $0x0,%xmm5,%xmm5
  mov    %rax,-0x30(%rsp)
  lea    -0x1(%rdx),%eax
  mov    %eax,-0x18(%rsp)
  mov    %edx,%eax
  subss  %xmm2,%xmm3
  xor    %edx,%edx
  shr    $0x2,%eax
  lea    -0x1(%rax),%ebx
  lea    0x4(%rsi),%rax
  mov    %rax,-0x20(%rsp)
  lea    0x4(%rdi),%rax
  add    $0x1,%rbx
  movaps %xmm3,%xmm6
  mov    %rax,-0x28(%rsp)
  mov    %ebp,%eax
  movaps %xmm3,%xmm4
  shl    $0x4,%rbx
  and    $0x3,%eax
  shufps $0xe0,%xmm6,%xmm6
  shufps $0x0,%xmm4,%xmm4
  mov    %eax,-0x14(%rsp)
  mov    %ebp,%eax
  shl    $0x2,%rax
  mov    %rax,-0x10(%rsp)
  nopl   (%rax)
L52:
  mov    %r8,%rax
  sub    -0x20(%rsp),%rax
  lea    (%r8,%r11,1),%rcx
  cmp    $0x8,%rax
  mov    %r8,%rax
  seta   %r9b
  sub    -0x28(%rsp),%rax
  cmp    $0x8,%rax
  seta   %al
  test   %al,%r9b
  je     L74
  cmp    $0x1,%ebp
  je     L74
  cmpl   $0x2,-0x18(%rsp)
  jbe    L47
  lea    (%r11,%rdi,1),%r10
  lea    (%r11,%rsi,1),%r9
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L11:
  movups (%r10,%rax,1),%xmm0
  movups (%r9,%rax,1),%xmm1
  mulps  %xmm5,%xmm0
  mulps  %xmm4,%xmm1
  addps  %xmm1,%xmm0
  movups %xmm0,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %rbx,%rax
  jne    L11
  cmp    %ebp,%r14d
  je     L84
  mov    -0x14(%rsp),%eax
  mov    %eax,%r9d
  cmp    $0x1,%eax
  je     L34
  mov    %r14d,%ecx
  mov    %r14d,%eax
L120:
  add    %r12,%rcx
  movq   (%rdi,%rcx,4),%xmm0
  movq   (%rsi,%rcx,4),%xmm1
  mulps  %xmm7,%xmm0
  mulps  %xmm6,%xmm1
  addps  %xmm1,%xmm0
  movlps %xmm0,(%r8,%rcx,4)
  mov    %r9d,%ecx
  and    $0xfffffffe,%ecx
  add    %ecx,%eax
  cmp    %ecx,%r9d
  je     L84
L85:
  add    %edx,%eax
  cltq
  movss  (%rdi,%rax,4),%xmm0
  movss  (%rsi,%rax,4),%xmm1
  mulss  %xmm2,%xmm0
  mulss  %xmm3,%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,(%r8,%rax,4)
L84:
  add    $0x1,%r13d
  add    -0x30(%rsp),%r11
  add    %ebp,%edx
  add    %r15,%r12
  cmp    %r13d,-0x34(%rsp)
  jne    L52
L106:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L74:
  mov    -0x10(%rsp),%rax
  lea    (%rax,%r11,1),%rcx
  mov    %r11,%rax
  nopl   0x0(%rax)
L101:
  movss  (%rdi,%rax,1),%xmm0
  movss  (%rsi,%rax,1),%xmm1
  mulss  %xmm2,%xmm0
  mulss  %xmm3,%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,(%r8,%rax,1)
  add    $0x4,%rax
  cmp    %rax,%rcx
  jne    L101
  jmp    L84
L47:
  mov    %ebp,%r9d
  xor    %ecx,%ecx
  xor    %eax,%eax
  jmp    L120
L34:
  mov    %r14d,%eax
  jmp    L85
```

tool_calls: name: parse_data
arguments: label: D8
datatype: byte[4]

tool: {"D8": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void interpolateZ(float *zin0, float *zin1, int nx, int ny, float z0, float z1, float depth, float *zout) {
  float dz;
  float dxo, dyo, dzo, idxv, idyv, xo, yo, xt, yt, zt;
  int sxy, iw, sign, ixv, iyv, pos, ix, iy;
  dz = z1 - z0;
  zt = (z1 - depth) / dz;
  for (iy = 0; iy < ny; iy++) {
    for (ix = 0; ix < nx; ix++) {
      pos = iy * nx + ix;
      zout[pos] = zt * zin0[pos] + (1 - zt) * zin1[pos];
    }
  }
}
```