user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<dsmooth>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%r12
  mov    %esi,0x20(%rsp)
  mov    %edx,0x24(%rsp)
  mov    %rcx,0x48(%rsp)
  pxor   %xmm4,%xmm4
  cvtss2sd %xmm0,%xmm4
  movsd  %xmm4,0x8(%rsp)
  movapd %xmm4,%xmm0
  mulsd  D47(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <ceilf@plt>
  lea    (%rax,%rax,1),%ebp
  lea    0x1(%rbp),%ebx
  mov    %ebp,%eax
  shr    $0x1f,%eax
  add    %ebx,%eax
  sar    %eax
  mov    %eax,0x10(%rsp)
  lea    0x0(,%rbx,4),%edi
  call   <malloc@plt>
  mov    %rax,0x40(%rsp)
  movsd  0x8(%rsp),%xmm4
  movapd %xmm4,%xmm1
  addsd  %xmm4,%xmm1
  mulsd  %xmm4,%xmm1
  movsd  D5(%rip),%xmm0
  divsd  %xmm1,%xmm0
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm0,%xmm5
  movss  %xmm5,0x14(%rsp)
  test   %ebx,%ebx
  jle    L130
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebx,%xmm0
  cvtss2sd %xmm0,%xmm0
  subsd  D17(%rip),%xmm0
  mulsd  D31(%rip),%xmm0
  movsd  %xmm0,0x8(%rsp)
  mov    %ebp,%ebp
  mov    $0x0,%ebx
  mov    %rax,%r13
L214:
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebx,%xmm0
  cvtss2sd %xmm0,%xmm0
  subsd  0x8(%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  mulss  %xmm0,%xmm0
  mulss  0x14(%rsp),%xmm0
  call   <exp@plt>
  movss  %xmm0,0x0(%r13,%rbx,4)
  mov    %rbx,%rax
  add    $0x1,%rbx
  cmp    %rbp,%rax
  jne    L214
  mov    0x40(%rsp),%rdx
  mov    %rdx,%rax
  lea    0x4(%rdx,%rbp,4),%rcx
  pxor   %xmm0,%xmm0
L143:
  addss  (%rdx),%xmm0
  add    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L143
  movss  D46(%rip),%xmm1
  divss  %xmm0,%xmm1
L181:
  movaps %xmm1,%xmm0
  mulss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L181
L130:
  mov    0x24(%rsp),%ebp
  mov    %ebp,%esi
  mov    0x20(%rsp),%ebx
  mov    %ebx,%edi
  call   <MAX@plt>
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,%r14
  movslq 0x10(%rsp),%rax
  mov    0x40(%rsp),%rsi
  lea    (%rsi,%rax,4),%r15
  test   %ebp,%ebp
  jle    L125
  movslq %ebx,%rax
  lea    0x0(,%rbx,4),%edi
  mov    %edi,0x28(%rsp)
  shl    $0x2,%rax
  mov    %rax,0x30(%rsp)
  mov    0x48(%rsp),%rax
  mov    %rax,0x18(%rsp)
  movl   $0x0,0x14(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %eax,0x8(%rsp)
  mov    %r15,0x38(%rsp)
L160:
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  jle    L55
  mov    0x38(%rsp),%rbp
  mov    %eax,%r15d
  mov    $0x0,%r13d
L209:
  mov    %r13d,%edi
  sub    0x10(%rsp),%edi
  mov    $0x0,%esi
  call   <MAX@plt>
  mov    %eax,%ebx
  mov    0x10(%rsp),%eax
  lea    (%rax,%r13,1),%edi
  mov    0x8(%rsp),%esi
  call   <MIN@plt>
  cmp    %eax,%ebx
  jg     L187
  movslq %ebx,%rbx
  pxor   %xmm1,%xmm1
L126:
  movss  (%r12,%rbx,4),%xmm0
  mulss  0x0(%rbp,%rbx,4),%xmm0
  addss  %xmm0,%xmm1
  add    $0x1,%rbx
  cmp    %ebx,%eax
  jge    L126
L176:
  movss  %xmm1,(%r14,%r13,4)
  add    $0x1,%r13
  sub    $0x4,%rbp
  cmp    %r15,%r13
  jne    L209
L55:
  mov    0x28(%rsp),%edx
  mov    %r14,%rsi
  mov    0x18(%rsp),%rbx
  mov    %rbx,%rdi
  call   <memcpy@plt>
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  mov    0x30(%rsp),%rsi
  add    %rsi,%rbx
  mov    %rbx,0x18(%rsp)
  add    %rsi,%r12
  cmp    %eax,0x24(%rsp)
  jne    L160
  mov    0x38(%rsp),%r15
L125:
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  jle    L52
  mov    %eax,%esi
  mov    %rsi,0x28(%rsp)
  movslq %eax,%rbx
  shl    $0x2,%rbx
  mov    0x24(%rsp),%eax
  lea    -0x1(%rax),%eax
  mov    %rax,0x18(%rsp)
  lea    0x4(%r14,%rax,4),%r13
  movq   $0x0,0x8(%rsp)
  mov    %r13,0x30(%rsp)
  mov    0x48(%rsp),%r13
  jmp    L142
L187:
  pxor   %xmm1,%xmm1
  jmp    L176
L40:
  mov    %rax,%rbp
L196:
  mov    %ebp,%edi
  sub    0x10(%rsp),%edi
  mov    $0x0,%esi
  call   <MAX@plt>
  mov    %eax,%r12d
  mov    0x10(%rsp),%eax
  lea    (%rax,%rbp,1),%edi
  mov    0x14(%rsp),%esi
  call   <MIN@plt>
  cmp    %eax,%r12d
  jg     L116
  mov    0x20(%rsp),%edx
  imul   %r12d,%edx
  movslq %edx,%rdx
  add    0x8(%rsp),%rdx
  lea    0x0(%r13,%rdx,4),%rcx
  movslq %r12d,%rsi
  sub    %rbp,%rsi
  lea    (%r15,%rsi,4),%rdx
  sub    %r12d,%eax
  add    %rax,%rsi
  lea    0x4(%r15,%rsi,4),%rax
  pxor   %xmm1,%xmm1
L110:
  movss  (%rcx),%xmm0
  mulss  (%rdx),%xmm0
  addss  %xmm0,%xmm1
  add    %rbx,%rcx
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L110
L27:
  movss  %xmm1,(%r14,%rbp,4)
  lea    0x1(%rbp),%rax
  cmp    %rbp,0x18(%rsp)
  jne    L40
  mov    0x8(%rsp),%rax
  lea    0x0(%r13,%rax,4),%rdx
  mov    %r14,%rax
  mov    0x30(%rsp),%rcx
L174:
  movss  (%rax),%xmm0
  movss  %xmm0,(%rdx)
  add    $0x4,%rax
  add    %rbx,%rdx
  cmp    %rcx,%rax
  jne    L174
L11:
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    0x28(%rsp),%rax
  je     L52
L142:
  mov    0x24(%rsp),%eax
  test   %eax,%eax
  jle    L11
  mov    $0x0,%ebp
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  jmp    L196
L116:
  pxor   %xmm1,%xmm1
  jmp    L27
L52:
  test   %r14,%r14
  je     L107
  mov    %r14,%rdi
  call   <free@plt>
L107:
  mov    0x40(%rsp),%rax
  test   %rax,%rax
  je     L90
  mov    %rax,%rdi
  call   <free@plt>
L90:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: label: D47
type: f64
name: parse_data
arguments: label: D5
type: f32[2]
name: parse_data
arguments: label: D17
type: f64
name: parse_data
arguments: label: D31
type: f64
name: parse_data
arguments: label: D46
type: byte[4]

tool: D47: 3

tool: {"D5": [0.0,-1.875]}

tool: D17: 1

tool: D31: 0.5

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

assistant: ```c
void dsmooth(float *image, int nx, int ny, float sigma, float *smooth) {
  int i, j, npix, half, start, end, sample;
  float neghalfinvvar, total, scale, dx, sum;
  float *kernel1D;
  float *kernel_shifted;
  float *smooth_temp;
  npix = 2 * ((int)ceilf(3. * sigma)) + 1;
  half = npix / 2;
  kernel1D = malloc(npix * sizeof(float));
  neghalfinvvar = -1.0 / (2.0 * sigma * sigma);
  for (i = 0; i < npix; i++) {
    dx = ((float)i - 0.5 * ((float)npix - 1.));
    kernel1D[i] = exp((dx * dx) * neghalfinvvar);
  }
  total = 0.0;
  for (i = 0; i < npix; i++)
    total += kernel1D[i];
  scale = 1. / total;
  for (i = 0; i < npix; i++)
    kernel1D[i] *= scale;
  smooth_temp = malloc(sizeof(float) * MAX(nx, ny));
  kernel_shifted = kernel1D + half;
  for (j = 0; j < ny; j++) {
    float *imagerow = image + j * nx;
    for (i = 0; i < nx; i++) {
      start = i - half;
      start = MAX(start, 0);
      end = i + half;
      end = MIN(end, nx - 1);
      sum = 0.0;
      for (sample = start; sample <= end; sample++)
        sum += imagerow[sample] * kernel_shifted[sample - i];
      smooth_temp[i] = sum;
    }
    memcpy(smooth + j * nx, smooth_temp, nx * sizeof(float));
  }
  for (i = 0; i < nx; i++) {
    float *imagecol = smooth + i;
    for (j = 0; j < ny; j++) {
      start = j - half;
      start = MAX(start, 0);
      end = j + half;
      end = MIN(end, ny - 1);
      sum = 0.0;
      for (sample = start; sample <= end; sample++)
        sum += imagecol[sample * nx] * kernel_shifted[sample - j];
      smooth_temp[j] = sum;
    }
    for (j = 0; j < ny; j++)
      smooth[i + j * nx] = smooth_temp[j];
  }
  {
    if ((smooth_temp) != NULL)
      free((char *)(smooth_temp));
    (smooth_temp) = NULL;
  };
  {
    if ((kernel1D) != NULL)
      free((char *)(kernel1D));
    (kernel1D) = NULL;
  };
}
```