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

```asm
<sliceGaussianKernel>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  movss  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D5(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L2
L60:
  movl   $0x0,-0x10(%rbp)
  jmp    L9
L20:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x8(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x10(%rbp),%xmm0
  subsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0xc(%rbp),%xmm0
  movapd %xmm0,%xmm2
  subsd  -0x8(%rbp),%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0xc(%rbp),%xmm0
  subsd  -0x8(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movq   D17(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  movss  -0x30(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%eax
  mov    %eax,%edi
  call   <exp@plt>
  mov    %rax,%rdx
  mov    -0xc(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ss %rdx,%xmm0
  movss  %xmm0,(%rax)
  mov    -0xc(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  -0x14(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  addl   $0x1,-0x10(%rbp)
L9:
  mov    -0x10(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L20
  addl   $0x1,-0xc(%rbp)
L2:
  mov    -0xc(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L60
  movl   $0x0,-0xc(%rbp)
  jmp    L77
L22:
  movl   $0x0,-0x10(%rbp)
  jmp    L45
L53:
  mov    -0xc(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0xc(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  divss  -0x14(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x10(%rbp)
L45:
  mov    -0x10(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L53
  addl   $0x1,-0xc(%rbp)
L77:
  mov    -0xc(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L22
  nop
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D5
type: f64
name: read_data
arguments: data_tag: D17
type: f32[2]

tool: D5: 2

tool: {"D17": [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;
}
```