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

```asm
<shallowWater_2D_Evaluate>:
  endbr64
  push   %r15
  movslq %edi,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm2,(%rsp)
  movsd  %xmm3,0x68(%rsp)
  test   %eax,%eax
  jle    L1
  movsd  D104(%rip),%xmm7
  mov    %rdx,%r14
  mov    %rcx,%r13
  xor    %ebx,%ebx
  mulsd  %xmm1,%xmm2
  lea    0x10(%rsi),%rdx
  movapd %xmm1,%xmm5
  mov    %r8,%r12
  mulsd  %xmm1,%xmm7
  mov    %rdx,0x18(%rsp)
  mov    %r9,%rbp
  xor    %r15d,%r15d
  xorpd  D49(%rip),%xmm3
  mov    %rax,0x88(%rsp)
  movsd  D39(%rip),%xmm6
  movsd  %xmm3,0x78(%rsp)
  subsd  D5(%rip),%xmm3
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm7,0x70(%rsp)
  movsd  %xmm3,0x80(%rsp)
  jmp    L37
  nop
L44:
  movapd %xmm2,%xmm9
  movsd  (%r12),%xmm1
  movsd  0x0(%rbp),%xmm0
  movapd %xmm6,%xmm3
  mulsd  %xmm2,%xmm9
  divsd  %xmm2,%xmm3
  movapd %xmm1,%xmm8
  movapd %xmm0,%xmm7
  xorpd  D49(%rip),%xmm1
  xorpd  D49(%rip),%xmm0
  divsd  %xmm2,%xmm8
  divsd  %xmm9,%xmm1
  divsd  %xmm2,%xmm7
  divsd  %xmm9,%xmm0
L42:
  mov    0x18(%rsp),%rax
  movsd  0x70(%rsp),%xmm12
  addsd  (%rax),%xmm2
  mov    0xd0(%rsp),%rax
  movapd %xmm12,%xmm9
  movsd  %xmm2,(%rax,%r15,8)
  mov    0xd8(%rsp),%rax
  movsd  0x0(%r13),%xmm2
  movsd  %xmm2,(%rax,%r15,8)
  mov    0xe0(%rsp),%rax
  movsd  %xmm6,(%rax,%r15,8)
  mov    0x108(%rsp),%rax
  movsd  (%r12),%xmm2
  movsd  %xmm2,(%rax,%rbx,1)
  mov    0x110(%rsp),%rax
  movsd  %xmm6,(%rax,%rbx,1)
  mov    0x108(%rsp),%rax
  movsd  0x0(%rbp),%xmm2
  movsd  %xmm2,0x8(%rax,%rbx,1)
  mov    0x118(%rsp),%rax
  movsd  %xmm6,0x8(%rax,%rbx,1)
  mov    0xe8(%rsp),%rax
  movsd  (%r12),%xmm2
  movsd  %xmm2,(%rax,%r15,8)
  mov    0xf0(%rsp),%rax
  movsd  %xmm6,(%rax,%r15,8)
  movsd  0x0(%r13),%xmm10
  movsd  (%r12),%xmm2
  mov    0x120(%rsp),%rax
  mulsd  %xmm10,%xmm9
  mulsd  %xmm8,%xmm2
  mulsd  %xmm10,%xmm9
  addsd  %xmm9,%xmm2
  movsd  %xmm2,(%rax,%rbx,1)
  movsd  (%r12),%xmm2
  movsd  0x0(%r13),%xmm9
  mov    0x128(%rsp),%rax
  mulsd  %xmm5,%xmm9
  mulsd  %xmm1,%xmm2
  addsd  %xmm9,%xmm2
  movsd  %xmm2,(%rax,%rbx,1)
  movsd  (%r12),%xmm2
  mov    0x130(%rsp),%rax
  mulsd  %xmm3,%xmm2
  addsd  %xmm8,%xmm2
  movsd  %xmm2,(%rax,%rbx,1)
  movsd  (%r12),%xmm2
  mov    0x120(%rsp),%rax
  mulsd  %xmm7,%xmm2
  movsd  %xmm2,0x8(%rax,%rbx,1)
  movsd  (%r12),%xmm2
  mov    0x128(%rsp),%rax
  mulsd  %xmm0,%xmm2
  movsd  %xmm2,0x8(%rax,%rbx,1)
  mov    0x130(%rsp),%rax
  movsd  %xmm7,0x8(%rax,%rbx,1)
  movsd  (%r12),%xmm2
  mov    0x138(%rsp),%rax
  mulsd  %xmm3,%xmm2
  movsd  %xmm2,0x8(%rax,%rbx,1)
  mov    0x160(%rsp),%rax
  movsd  %xmm4,(%rax,%rbx,1)
  movsd  %xmm4,0x8(%rax,%rbx,1)
  mov    0xf8(%rsp),%rax
  movsd  0x0(%rbp),%xmm2
  movsd  %xmm2,(%rax,%r15,8)
  mov    0x100(%rsp),%rax
  movsd  %xmm6,(%rax,%r15,8)
  movsd  0x0(%rbp),%xmm2
  mov    0x140(%rsp),%rax
  mulsd  %xmm8,%xmm2
  movsd  %xmm2,(%rax,%rbx,1)
  mulsd  0x0(%rbp),%xmm1
  movapd %xmm12,%xmm2
  mov    0x148(%rsp),%rax
  movsd  %xmm1,(%rax,%rbx,1)
  movsd  0x0(%rbp),%xmm1
  mov    0x150(%rsp),%rax
  mulsd  %xmm3,%xmm1
  movsd  %xmm1,(%rax,%rbx,1)
  mov    0x158(%rsp),%rax
  movsd  %xmm8,(%rax,%rbx,1)
  movsd  0x0(%r13),%xmm8
  movsd  0x0(%rbp),%xmm1
  mov    0x140(%rsp),%rax
  movsd  %xmm4,0x30(%rsp)
  mulsd  %xmm8,%xmm2
  movsd  %xmm5,0x28(%rsp)
  mulsd  %xmm7,%xmm1
  mulsd  %xmm8,%xmm2
  addsd  %xmm2,%xmm1
  movsd  %xmm1,0x8(%rax,%rbx,1)
  movsd  0x0(%rbp),%xmm1
  mov    0x148(%rsp),%rax
  mulsd  %xmm0,%xmm1
  movsd  0x0(%r13),%xmm0
  mulsd  %xmm5,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rax,%rbx,1)
  mulsd  0x0(%rbp),%xmm3
  mov    0x158(%rsp),%rax
  movapd %xmm3,%xmm0
  addsd  %xmm7,%xmm0
  movsd  %xmm0,0x8(%rax,%rbx,1)
  mov    0x168(%rsp),%rax
  movsd  %xmm4,(%rax,%rbx,1)
  movsd  %xmm4,0x8(%rax,%rbx,1)
  movsd  0x0(%r13),%xmm0
  mov    0x170(%rsp),%rax
  mulsd  %xmm5,%xmm0
  mulsd  (%r14,%rbx,1),%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  movsd  (%r14,%rbx,1),%xmm0
  mov    0x178(%rsp),%rax
  mulsd  %xmm5,%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  movsd  0x0(%r13),%xmm0
  mov    0x190(%rsp),%rax
  mulsd  %xmm5,%xmm0
  mulsd  0x8(%r14,%rbx,1),%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  movapd %xmm5,%xmm0
  mov    0x198(%rsp),%rax
  mulsd  0x8(%r14,%rbx,1),%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  mov    D20(%rip),%rax
  movsd  0x0(%r13),%xmm1
  movq   %rax,%xmm0
  call   <fmax@plt>
  movsd  0x80(%rsp),%xmm1
  movsd  %xmm0,0x20(%rsp)
  call   <pow@plt>
  movsd  (%r12),%xmm1
  pxor   %xmm5,%xmm5
  movsd  0x20(%rsp),%xmm9
  movapd %xmm0,%xmm7
  movsd  0x0(%rbp),%xmm0
  movsd  0x30(%rsp),%xmm4
  movapd %xmm1,%xmm2
  mulsd  %xmm1,%xmm2
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm2
  ucomisd %xmm2,%xmm5
  movsd  0x28(%rsp),%xmm5
  ja     L13
  sqrtsd %xmm2,%xmm2
L64:
  mulsd  %xmm5,%xmm1
  movsd  (%rsp),%xmm6
  movsd  D5(%rip),%xmm3
  movsd  %xmm4,0x60(%rsp)
  addsd  0x68(%rsp),%xmm3
  movsd  %xmm7,0x38(%rsp)
  add    $0x8,%r13
  xorpd  D49(%rip),%xmm3
  mov    0x170(%rsp),%rax
  add    $0x8,%r12
  add    $0x8,%rbp
  movsd  %xmm5,0x30(%rsp)
  mulsd  %xmm5,%xmm3
  movsd  %xmm2,0x28(%rsp)
  add    $0x10,%rbx
  movsd  %xmm9,0x48(%rsp)
  mulsd  %xmm6,%xmm1
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x58(%rsp)
  mulsd  %xmm2,%xmm1
  mulsd  %xmm7,%xmm1
  addsd  (%rax,%r15,8),%xmm1
  movsd  %xmm1,(%rax,%r15,8)
  mulsd  -0x8(%r12),%xmm0
  movsd  0x78(%rsp),%xmm1
  subsd  D108(%rip),%xmm1
  movsd  %xmm1,0x50(%rsp)
  mulsd  %xmm6,%xmm0
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm9,%xmm0
  call   <pow@plt>
  mulsd  0x20(%rsp),%xmm0
  movsd  (%rsp),%xmm6
  mov    0x178(%rsp),%rax
  movsd  0x8(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm2
  addsd  (%rax,%r15,8),%xmm0
  movsd  0x10(%rsp),%xmm10
  movapd %xmm4,%xmm8
  mulsd  %xmm2,%xmm8
  movsd  0x30(%rsp),%xmm5
  movsd  0x48(%rsp),%xmm9
  movsd  %xmm7,0x28(%rsp)
  addsd  %xmm2,%xmm10
  movsd  0x50(%rsp),%xmm1
  movsd  %xmm0,(%rax,%r15,8)
  movsd  -0x8(%r12),%xmm11
  movapd %xmm4,%xmm0
  mov    0x180(%rsp),%rax
  mulsd  %xmm11,%xmm0
  movsd  %xmm10,0x40(%rsp)
  mulsd  %xmm7,%xmm8
  mulsd  %xmm11,%xmm0
  movsd  %xmm8,0x38(%rsp)
  mulsd  %xmm7,%xmm0
  divsd  %xmm10,%xmm0
  addsd  %xmm8,%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  movsd  -0x8(%r12),%xmm0
  mov    0x188(%rsp),%rax
  mulsd  %xmm4,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mulsd  %xmm7,%xmm0
  divsd  %xmm10,%xmm0
  addsd  %xmm8,%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  movsd  -0x8(%rbp),%xmm3
  mov    0x190(%rsp),%rax
  mulsd  %xmm5,%xmm3
  movapd %xmm3,%xmm0
  movsd  0x58(%rsp),%xmm3
  mulsd  %xmm6,%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm7,%xmm0
  addsd  (%rax,%r15,8),%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  mulsd  -0x8(%rbp),%xmm3
  movapd %xmm9,%xmm0
  mulsd  %xmm6,%xmm3
  mulsd  %xmm2,%xmm3
  movsd  %xmm3,0x20(%rsp)
  call   <pow@plt>
  mov    0x198(%rsp),%rax
  mulsd  0x20(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm4
  movsd  0x28(%rsp),%xmm7
  addsd  (%rax,%r15,8),%xmm0
  movsd  0x40(%rsp),%xmm10
  movsd  0x38(%rsp),%xmm8
  addq   $0x18,0x18(%rsp)
  movsd  0x30(%rsp),%xmm5
  movsd  %xmm0,(%rax,%r15,8)
  movsd  -0x8(%r12),%xmm0
  mov    0x1a0(%rsp),%rax
  mulsd  %xmm4,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mulsd  %xmm7,%xmm0
  divsd  %xmm10,%xmm0
  addsd  %xmm8,%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  movsd  -0x8(%rbp),%xmm0
  mov    0x1a8(%rsp),%rax
  mulsd  %xmm0,%xmm4
  movapd %xmm4,%xmm1
  movsd  0x60(%rsp),%xmm4
  mulsd  %xmm0,%xmm1
  mulsd  %xmm7,%xmm1
  movapd %xmm1,%xmm0
  divsd  %xmm10,%xmm0
  addsd  %xmm8,%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  mov    D39(%rip),%rax
  add    $0x1,%r15
  cmp    0x88(%rsp),%r15
  movq   %rax,%xmm6
  je     L1
L37:
  movsd  0x0(%r13),%xmm2
  movsd  0x10(%rsp),%xmm7
  comisd %xmm2,%xmm7
  jbe    L44
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm7
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm8
  jmp    L42
L1:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  movapd %xmm2,%xmm0
  movsd  %xmm4,0x40(%rsp)
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm7,0x30(%rsp)
  movsd  %xmm9,0x28(%rsp)
  movsd  %xmm1,0x20(%rsp)
  call   <sqrt@plt>
  movsd  0x40(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm9
  movapd %xmm0,%xmm2
  movsd  0x20(%rsp),%xmm1
  jmp    L64
```

tool_calls: name: parse_data
arguments: label: D104
type_guessed: f64
name: parse_data
arguments: label: D49
type_guessed: f32[4]
name: parse_data
arguments: label: D39
type_guessed: f64
name: parse_data
arguments: label: D5
type_guessed: f64
name: parse_data
arguments: label: D20
type_guessed: byte[8]
name: parse_data
arguments: label: D108
type_guessed: f64

tool: D104: 0.5

tool: {"D49": [0.0,-0.0,0.0,0.0]}

tool: D39: 1

tool: D5: 2

tool: {"D20": [0xfc,0xa9,0xf1,0xd2,0x4d,0x62,0x50,0x3f]}

tool: D108: 3

assistant: ```c
void shallowWater_2D_Evaluate(const int nPoints, const double h_eps, const double g, const double bedFrictionCoefficient, const double bedFrictionPower, const double eddyViscosity, const double *x, const double *grad_b, const double *h, const double *hu, const double *hv, double *H, double *mass_acc, double *dmass_acc_dh, double *mom_u_acc, double *dmom_u_acc_dhu, double *mom_v_acc, double *dmom_v_acc_dhv, double *mass_adv, double *dmass_adv_dhu, double *dmass_adv_dhv, double *mom_u_adv, double *dmom_u_adv_dh, double *dmom_u_adv_dhu, double *dmom_u_adv_dhv, double *mom_v_adv, double *dmom_v_adv_dh, double *dmom_v_adv_dhu, double *dmom_v_adv_dhv, double *mom_u_diff, double *mom_v_diff, double *mom_u_source, double *dmom_u_source_dh, double *dmom_u_source_dhu, double *dmom_u_source_dhv, double *mom_v_source, double *dmom_v_source_dh, double *dmom_v_source_dhu, double *dmom_v_source_dhv) {
  int k;
  double u, du_dh, du_dhu, v, dv_dh, dv_dhv, heval, unorm, hpow;
  for (k = 0; k < nPoints; k++) {
    if (h[k] < h_eps) {
      u = 0.0;
      du_dh = 0.0;
      du_dhu = 0.0;
      v = 0.0;
      dv_dh = 0.0;
      dv_dhv = 0.0;
    } else {
      u = hu[k] / h[k];
      du_dh = -hu[k] / (h[k] * h[k]);
      du_dhu = 1.0 / h[k];
      v = hv[k] / h[k];
      dv_dh = -hv[k] / (h[k] * h[k]);
      dv_dhv = 1.0 / h[k];
    }
    H[k] = h[k] + x[k * 3 + 2];
    mass_acc[k] = h[k];
    dmass_acc_dh[k] = 1.0;
    mass_adv[2 * k + 0] = hu[k];
    dmass_adv_dhu[2 * k + 0] = 1.0;
    mass_adv[2 * k + 1] = hv[k];
    dmass_adv_dhv[2 * k + 1] = 1.0;
    mom_u_acc[k] = hu[k];
    dmom_u_acc_dhu[k] = 1.0;
    mom_u_adv[2 * k + 0] = hu[k] * u + 0.5 * g * h[k] * h[k];
    dmom_u_adv_dh[2 * k + 0] = hu[k] * du_dh + g * h[k];
    dmom_u_adv_dhu[2 * k + 0] = u + hu[k] * du_dhu;
    mom_u_adv[2 * k + 1] = hu[k] * v;
    dmom_u_adv_dh[2 * k + 1] = hu[k] * dv_dh;
    dmom_u_adv_dhu[2 * k + 1] = v;
    dmom_u_adv_dhv[2 * k + 1] = hu[k] * dv_dhv;
    mom_u_diff[2 * k + 0] = eddyViscosity;
    mom_u_diff[2 * k + 1] = eddyViscosity;
    mom_v_acc[k] = hv[k];
    dmom_v_acc_dhv[k] = 1.0;
    mom_v_adv[2 * k + 0] = hv[k] * u;
    dmom_v_adv_dh[2 * k + 0] = hv[k] * du_dh;
    dmom_v_adv_dhu[2 * k + 0] = hv[k] * du_dhu;
    dmom_v_adv_dhv[2 * k + 0] = u;
    mom_v_adv[2 * k + 1] = hv[k] * v + 0.5 * g * h[k] * h[k];
    dmom_v_adv_dh[2 * k + 1] = hv[k] * dv_dh + g * h[k];
    dmom_v_adv_dhv[2 * k + 1] = v + hv[k] * dv_dhv;
    mom_v_diff[2 * k + 0] = eddyViscosity;
    mom_v_diff[2 * k + 1] = eddyViscosity;
    mom_u_source[k] = g * h[k] * grad_b[k * 2 + 0];
    dmom_u_source_dh[k] = g * grad_b[k * 2 + 0];
    mom_v_source[k] = g * h[k] * grad_b[k * 2 + 1];
    dmom_v_source_dh[k] = g * grad_b[k * 2 + 1];
    heval = fmax(1.0e-3, h[k]);
    hpow = pow(heval, -bedFrictionPower - 2.0);
    unorm = sqrt(hu[k] * hu[k] + hv[k] * hv[k]);
    mom_u_source[k] += g * hu[k] * bedFrictionCoefficient * unorm * hpow;
    dmom_u_source_dh[k] += -(bedFrictionPower + 2.0) * g * hu[k] * bedFrictionCoefficient * unorm * pow(heval, -bedFrictionPower - 3.0);
    dmom_u_source_dhu[k] = g * bedFrictionCoefficient * unorm * hpow + g * bedFrictionCoefficient * hu[k] * hu[k] * hpow / (unorm + h_eps);
    dmom_u_source_dhv[k] = g * bedFrictionCoefficient * unorm * hpow + g * bedFrictionCoefficient * hu[k] * hv[k] * hpow / (unorm + h_eps);
    mom_v_source[k] += g * hv[k] * bedFrictionCoefficient * unorm * hpow;
    dmom_v_source_dh[k] += -(bedFrictionPower + 2.0) * g * hv[k] * bedFrictionCoefficient * unorm * pow(heval, -bedFrictionPower - 3.0);
    dmom_v_source_dhu[k] = g * bedFrictionCoefficient * unorm * hpow + g * bedFrictionCoefficient * hu[k] * hv[k] * hpow / (unorm + h_eps);
    dmom_v_source_dhv[k] = g * bedFrictionCoefficient * unorm * hpow + g * bedFrictionCoefficient * hv[k] * hv[k] * hpow / (unorm + h_eps);
  }
}
```