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

```asm
<sliceGaussianKernel>:
  endbr64
  push   %r15
  lea    -0x1(%rsi),%eax
  pxor   %xmm1,%xmm1
  push   %r14
  cvtsi2sd %eax,%xmm1
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mulsd  D15(%rip),%xmm1
  mov    %rdi,0x28(%rsp)
  mov    %eax,0x24(%rsp)
  movsd  %xmm1,(%rsp)
  test   %esi,%esi
  jle    L23
  mulss  %xmm0,%xmm0
  movslq %esi,%rax
  pxor   %xmm7,%xmm7
  mov    %esi,%r13d
  shl    $0x2,%rax
  mov    %rdi,%rbx
  mov    %rdi,%r14
  xor    %r12d,%r12d
  mov    %rax,0x18(%rsp)
  pxor   %xmm1,%xmm1
  mov    %esi,%ebp
  cvtss2sd %xmm0,%xmm7
  movsd  %xmm7,0x10(%rsp)
  nopl   0x0(%rax,%rax,1)
L14:
  pxor   %xmm0,%xmm0
  xor    %r15d,%r15d
  cvtsi2sd %r12d,%xmm0
  subsd  (%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,0x8(%rsp)
  nopl   0x0(%rax,%rax,1)
L43:
  pxor   %xmm0,%xmm0
  movss  %xmm1,0x20(%rsp)
  cvtsi2sd %r15d,%xmm0
  subsd  (%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  0x8(%rsp),%xmm0
  xorpd  D8(%rip),%xmm0
  divsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%edi
  call   <exp@plt>
  pxor   %xmm0,%xmm0
  movss  0x20(%rsp),%xmm1
  cvtsi2ss %rax,%xmm0
  movss  %xmm0,(%rbx,%r15,4)
  add    $0x1,%r15
  addss  %xmm0,%xmm1
  cmp    %rbp,%r15
  jne    L43
  lea    0x1(%r12),%ecx
  add    0x18(%rsp),%rbx
  cmp    %ecx,%r13d
  je     L58
  mov    %ecx,%r12d
  jmp    L14
  xchg   %ax,%ax
L23:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L58:
  mov    %r13d,%eax
  mov    %r13d,%edi
  xor    %edx,%edx
  xor    %esi,%esi
  shr    $0x2,%eax
  and    $0xfffffffc,%edi
  movaps %xmm1,%xmm2
  lea    -0x1(%rax),%r8d
  shufps $0x0,%xmm2,%xmm2
  add    $0x1,%r8
  shl    $0x4,%r8
  cmpl   $0x2,0x24(%rsp)
  jbe    L3
  xchg   %ax,%ax
L76:
  lea    (%r8,%r14,1),%r9
  mov    %r14,%rax
  nopw   0x0(%rax,%rax,1)
L87:
  movups (%rax),%xmm0
  add    $0x10,%rax
  divps  %xmm2,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%r9
  jne    L87
  mov    %edi,%eax
  cmp    %r13d,%edi
  je     L15
L99:
  mov    0x28(%rsp),%rbx
  lea    (%rdx,%rax,1),%r9d
  movslq %r9d,%r9
  lea    (%rbx,%r9,4),%r9
  movss  (%r9),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%r9)
  lea    0x1(%rax),%r9d
  cmp    %eax,%r12d
  jle    L15
  add    %edx,%r9d
  add    $0x2,%eax
  movslq %r9d,%r9
  lea    (%rbx,%r9,4),%r9
  movss  (%r9),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%r9)
  cmp    %ecx,%eax
  jge    L15
  add    %edx,%eax
  cltq
  lea    (%rbx,%rax,4),%rax
  movss  (%rax),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
L15:
  lea    0x1(%rsi),%eax
  add    %r13d,%edx
  add    0x18(%rsp),%r14
  cmp    %esi,%r12d
  je     L23
  cmpl   $0x2,0x24(%rsp)
  mov    %eax,%esi
  ja     L76
L3:
  xor    %eax,%eax
  jmp    L99
```

tool_calls: name: disassemble_data
arguments: data_label: D15
data_type: f32[2]
name: disassemble_data
arguments: data_label: D8
data_type: f32[4]

tool: {"D15": [0.0,1.75]}

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

assistant: ```c
void sliceGaussianKernel(float *mat, int dim, float sigma) {
  float sum = 0.;
  int i, j;
  double mid = (dim - 1) / 2.;
  for (j = 0; j < dim; j++) {
    for (i = 0; i < dim; i++) {
      mat[i + j * dim] = (float)exp(-((i - mid) * (i - mid) + (j - mid) * (j - mid)) / (sigma * sigma));
      sum += mat[i + j * dim];
    }
  }
  for (j = 0; j < dim; j++)
    for (i = 0; i < dim; i++)
      mat[i + j * dim] /= sum;
}
```