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

```asm
<moment>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    0x70(%rsp),%rbp
  mov    0x78(%rsp),%rbx
  mov    %esi,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  mov    %r8,0x20(%rsp)
  cmp    $0x1,%esi
  jle    L19
  pxor   %xmm7,%xmm7
  cvtsi2ssl 0x18(%rsp),%xmm7
  movss  %xmm7,0x1c(%rsp)
L41:
  mov    0x18(%rsp),%ecx
  pxor   %xmm4,%xmm4
  lea    0x4(%r14),%rax
  movss  %xmm4,0x28(%rsp)
  movaps %xmm4,%xmm0
  lea    -0x1(%rcx),%edi
  mov    %edi,0x2c(%rsp)
  lea    0x8(%r14,%rdi,4),%rdi
  nopl   (%rax)
L67:
  addss  (%rax),%xmm0
  add    $0x4,%rax
  cmp    %rax,%rdi
  jne    L67
  mov    0x10(%rsp),%rax
  divss  0x1c(%rsp),%xmm0
  mov    $0x1,%r15d
  movss  %xmm0,(%rax)
  movl   $0x0,(%rbx)
  movl   $0x0,0x0(%rbp)
  movl   $0x0,0x0(%r13)
  movl   $0x0,(%r12)
  nop
L28:
  mov    0x10(%rsp),%rax
  movss  (%r14,%r15,4),%xmm0
  add    $0x1,%r15
  subss  (%rax),%xmm0
  movss  %xmm0,0xc(%rsp)
  call   <fabs@plt>
  pxor   %xmm1,%xmm1
  movss  0xc(%rsp),%xmm0
  cvtsi2ss %rax,%xmm1
  addss  (%r12),%xmm1
  movss  %xmm1,(%r12)
  movaps %xmm0,%xmm1
  movss  0x0(%r13),%xmm2
  mulss  %xmm0,%xmm1
  addss  %xmm1,%xmm2
  mulss  %xmm0,%xmm1
  movss  %xmm2,0x0(%r13)
  movss  0x0(%rbp),%xmm2
  addss  %xmm1,%xmm2
  mulss  %xmm1,%xmm0
  movss  %xmm2,0x0(%rbp)
  addss  (%rbx),%xmm0
  movss  %xmm0,(%rbx)
  cmp    %r15d,0x18(%rsp)
  jge    L28
  movss  0x1c(%rsp),%xmm5
  movss  (%r12),%xmm0
  movss  0x28(%rsp),%xmm1
  divss  %xmm5,%xmm0
  divss  %xmm5,%xmm1
L38:
  movss  %xmm0,(%r12)
  movss  0x0(%r13),%xmm0
  subss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ssl 0x2c(%rsp),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,0x0(%r13)
  call   <sqrt@plt>
  mov    0x20(%rsp),%rax
  movss  %xmm0,(%rax)
  movss  0x0(%r13),%xmm1
  ucomiss 0x28(%rsp),%xmm1
  jp     L43
  je     L27
L43:
  movss  0x1c(%rsp),%xmm3
  mulss  %xmm3,%xmm1
  mulss  %xmm0,%xmm1
  movss  0x0(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,0x0(%rbp)
  movss  0x0(%r13),%xmm0
  mulss  %xmm0,%xmm3
  movaps %xmm3,%xmm1
  mulss  %xmm0,%xmm1
  movss  (%rbx),%xmm0
  divss  %xmm1,%xmm0
  subss  D22(%rip),%xmm0
  movss  %xmm0,(%rbx)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L27:
  add    $0x38,%rsp
  lea    D13(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <nrerror@plt>
  nopw   0x0(%rax,%rax,1)
L19:
  lea    D14(%rip),%rdi
  call   <nrerror@plt>
  mov    0x18(%rsp),%eax
  pxor   %xmm6,%xmm6
  cvtsi2ss %eax,%xmm6
  movss  %xmm6,0x1c(%rsp)
  test   %eax,%eax
  jg     L41
  mov    0x10(%rsp),%rax
  pxor   %xmm6,%xmm6
  movaps %xmm6,%xmm0
  divss  0x1c(%rsp),%xmm0
  movss  %xmm6,0x28(%rsp)
  movaps %xmm0,%xmm1
  movss  %xmm0,(%rax)
  mov    0x18(%rsp),%eax
  movl   $0x0,(%rbx)
  sub    $0x1,%eax
  movl   $0x0,0x0(%rbp)
  mov    %eax,0x2c(%rsp)
  movl   $0x0,0x0(%r13)
  jmp    L38
```

tool_calls: name: extract_symbolic_data
arguments: tag: D22
data_type: f32
name: extract_symbolic_data
arguments: tag: D13
data_type: string
name: extract_symbolic_data
arguments: tag: D14
data_type: string

tool: D22: 3

tool: D13: No skew/kurtosis when variance = 0 (in moment)

tool: D14: n must be at least 2 in moment

assistant: ```c
void moment(float data[], int n, float *ave, float *adev, float *sdev, float *var, float *skew, float *curt) {
  void nrerror(char error_text[]);
  int j;
  float ep = 0.0, s, p;
  if (n <= 1)
    nrerror("n must be at least 2 in moment");
  s = 0.0;
  for (j = 1; j <= n; j++)
    s += data[j];
  *ave = s / n;
  *adev = (*var) = (*skew) = (*curt) = 0.0;
  for (j = 1; j <= n; j++) {
    *adev += fabs(s = data[j] - (*ave));
    *var += (p = s * s);
    *skew += (p *= s);
    *curt += (p *= s);
  }
  *adev /= n;
  *var = (*var - ep * ep / n) / (n - 1);
  *sdev = sqrt(*var);
  if (*var) {
    *skew /= (n * (*var) * (*sdev));
    *curt = (*curt) / (n * (*var) * (*var)) - 3.0;
  } else
    nrerror("No skew/kurtosis when variance = 0 (in moment)");
}
```