user: Translate the below assembly code into C programming language:

```asm
<KDE>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x140,%rsp
  mov    %rdi,-0x138(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x40000,%edi
  call   <MemAlloc@plt>
  mov    %rax,-0x110(%rbp)
  movsd  D4(%rip),%xmm0
  movsd  %xmm0,-0x118(%rbp)
  movl   $0x0,-0x124(%rbp)
  jmp    L42
L93:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x124(%rbp),%xmm0
  movsd  D26(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  -0x108(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  -0x108(%rbp),%xmm0
  movq   D12(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  divsd  -0x118(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    -0x124(%rbp),%edx
  movslq %edx,%rdx
  mov    %rax,-0x100(%rbp,%rdx,8)
  addl   $0x1,-0x124(%rbp)
L42:
  cmpl   $0x1e,-0x124(%rbp)
  jle    L93
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x118(%rbp)
  movl   $0x0,-0x124(%rbp)
  jmp    L44
L64:
  mov    -0x124(%rbp),%eax
  cltq
  movsd  -0x100(%rbp,%rax,8),%xmm0
  movsd  -0x118(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x118(%rbp)
  addl   $0x1,-0x124(%rbp)
L44:
  cmpl   $0x1e,-0x124(%rbp)
  jle    L64
  movl   $0x0,-0x124(%rbp)
  jmp    L45
L125:
  mov    -0x124(%rbp),%eax
  cltq
  movsd  -0x100(%rbp,%rax,8),%xmm0
  divsd  -0x118(%rbp),%xmm0
  mov    -0x124(%rbp),%eax
  cltq
  movsd  %xmm0,-0x100(%rbp,%rax,8)
  addl   $0x1,-0x124(%rbp)
L45:
  cmpl   $0x1e,-0x124(%rbp)
  jle    L125
  movl   $0x0,-0x124(%rbp)
  jmp    L110
L122:
  mov    -0x124(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x110(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x120(%rbp)
  jmp    L106
L29:
  mov    -0x124(%rbp),%edx
  mov    -0x120(%rbp),%eax
  add    %edx,%eax
  sub    $0xf,%eax
  mov    %eax,-0x11c(%rbp)
  cmpl   $0x0,-0x11c(%rbp)
  jns    L56
  movl   $0x0,-0x11c(%rbp)
L56:
  cmpl   $0x7fff,-0x11c(%rbp)
  jle    L85
  movl   $0x7fff,-0x11c(%rbp)
L85:
  mov    -0x124(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x110(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x120(%rbp),%eax
  cltq
  movsd  -0x100(%rbp,%rax,8),%xmm2
  mov    -0x11c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x138(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x124(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x110(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x120(%rbp)
L106:
  cmpl   $0x1e,-0x120(%rbp)
  jle    L29
  addl   $0x1,-0x124(%rbp)
L110:
  cmpl   $0x7fff,-0x124(%rbp)
  jle    L122
  mov    -0x110(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L121
  call   <__stack_chk_fail@plt>
L121:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D4
datatype: f32[2]
name: parse_data
arguments: label: D26
datatype: f64
name: parse_data
arguments: label: D12
datatype: f32[2]

tool: {"D4": [0.0,3.3828125]}

tool: D26: 15.5

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

assistant: ```c
double *KDE(double *h16) {
  double *tmp;
  int i, j, k;
  double kernel[31];
  double b, c;
  tmp = (double *)MemAlloc(32768 * sizeof(double));
  c = 2 * (7.0 * 7.0);
  for (i = 0; i < 31; i++) {
    b = i - 15.5;
    b *= b;
    kernel[i] = exp(-b / c);
  }
  c = 0.0;
  for (i = 0; i < 31; i++)
    c += kernel[i];
  for (i = 0; i < 31; i++)
    kernel[i] /= c;
  for (i = 0; i < 32768; i++) {
    tmp[i] = 0.0;
    for (j = 0; j < 31; j++) {
      k = i + j - 15;
      if (k < 0)
        k = 0;
      if (k > 32767)
        k = 32767;
      tmp[i] += kernel[j] * h16[k];
    }
  }
  return tmp;
}
```