user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<smooth>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x30(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L105
L6:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L73
L119:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
  addl   $0x1,-0x10(%rbp)
L73:
  mov    -0x14(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x10(%rbp)
  jl     L119
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L105:
  mov    -0x14(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L6
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L118
L8:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  sub    -0x30(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L11
L90:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
  addl   $0x1,-0x10(%rbp)
L11:
  mov    -0x14(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x10(%rbp)
  jl     L90
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L118:
  mov    -0x2c(%rbp),%eax
  sub    -0x30(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jl     L8
  mov    -0x2c(%rbp),%eax
  sub    -0x30(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L62
L7:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  sub    -0x30(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L61
L111:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
  addl   $0x1,-0x10(%rbp)
L61:
  mov    -0x10(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L111
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L62:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L7
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void smooth(double *indata, int nmzs, double *outdata, int w) {
  int j, k, n;
  double av;
  for (j = 0; j < w; j++) {
    av = 0.0;
    n = 0;
    for (k = 0; k < j + w; k++) {
      av += indata[k];
      n++;
    }
    outdata[j] = av / (float)n;
  }
  for (j = w; j < nmzs - w - 1; j++) {
    av = 0.0;
    n = 0;
    for (k = j - w; k < j + w; k++) {
      av += indata[k];
      n++;
    }
    outdata[j] = av / (float)n;
  }
  for (j = nmzs - w - 1; j < nmzs; j++) {
    av = 0.0;
    n = 0;
    for (k = j - w; k < nmzs; k++) {
      av += indata[k];
      n++;
    }
    outdata[j] = av / (float)n;
  }
}
```