user: What is the c source code of the assembly code below:

```asm
<distestim>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,-0xa8(%rbp)
  mov    %rsi,-0xb0(%rbp)
  mov    %rdx,-0xb8(%rbp)
  mov    %rcx,-0xc0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0x0,-0x94(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x78(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L14:
  cmp    %rdx,%rsp
  je     L140
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L14
L140:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L124
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L124:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x70(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x68(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L71:
  cmp    %rdx,%rsp
  je     L219
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L71
L219:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L58
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L58:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L175
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L175
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%edx
  mov    D21(%rip),%rcx
  mov    -0xa8(%rbp),%rax
  movq   %rcx,%xmm0
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <quantile@plt>
  movq   %xmm0,%rax
  mov    -0xb8(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%edx
  mov    D35(%rip),%rcx
  mov    -0xa8(%rbp),%rax
  movq   %rcx,%xmm0
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <quantile@plt>
  movapd %xmm0,%xmm1
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movq   %xmm2,%rax
  mov    $0x0,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  divsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  %xmm0,(%rax)
L175:
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D41(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x0,-0xa0(%rbp)
  jmp    L195
L203:
  mov    -0xa0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0xa0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movl   $0x0,-0x98(%rbp)
  movl   $0x0,-0x9c(%rbp)
  jmp    L103
L87:
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x50(%rbp),%xmm1
  comisd %xmm1,%xmm0
  setae  %dl
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0xa8(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x48(%rbp),%xmm0
  comisd %xmm1,%xmm0
  setae  %al
  and    %edx,%eax
  test   %al,%al
  je     L37
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x60(%rbp),%rax
  mov    -0x98(%rbp),%edx
  movslq %edx,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xa0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    $0x2,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    -0x70(%rbp),%rdx
  mov    -0x98(%rbp),%ecx
  movslq %ecx,%rcx
  mov    %rax,(%rdx,%rcx,8)
  mov    -0x70(%rbp),%rax
  mov    -0x98(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L76
  mov    -0x70(%rbp),%rax
  mov    -0x98(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  movq   D44(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x70(%rbp),%rax
  mov    -0x98(%rbp),%edx
  movslq %edx,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
L76:
  mov    -0x70(%rbp),%rax
  mov    -0x98(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  movsd  -0x80(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  addl   $0x1,-0x98(%rbp)
L37:
  addl   $0x1,-0x9c(%rbp)
L103:
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x9c(%rbp)
  jl     L87
  mov    -0x98(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jl     L4
  movsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movl   $0x0,-0x9c(%rbp)
  jmp    L132
L198:
  mov    -0x70(%rbp),%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x80(%rbp),%xmm1
  movsd  D9(%rip),%xmm0
  subsd  %xmm1,%xmm0
  mov    -0x70(%rbp),%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  addl   $0x1,-0x9c(%rbp)
L132:
  mov    -0x9c(%rbp),%eax
  cmp    -0x98(%rbp),%eax
  jl     L198
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movl   $0x0,-0x9c(%rbp)
  jmp    L110
L137:
  mov    -0x60(%rbp),%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm1
  mov    -0x70(%rbp),%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x70(%rbp),%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  movsd  -0x80(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  addl   $0x1,-0x9c(%rbp)
L110:
  mov    -0x9c(%rbp),%eax
  cmp    -0x98(%rbp),%eax
  jl     L137
  movsd  -0x88(%rbp),%xmm0
  divsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x98(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jg     L49
  movsd  -0x90(%rbp),%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L4
L49:
  mov    -0xc0(%rbp),%rax
  movsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x98(%rbp),%eax
  mov    %eax,-0x94(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x90(%rbp)
L4:
  addl   $0x1,-0xa0(%rbp)
L195:
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0xa0(%rbp)
  jl     L203
  mov    %rbx,%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L85
  call   <__stack_chk_fail@plt>
L85:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: label: D21
datatype: f64
name: unpack_data
arguments: label: D35
datatype: f64
name: unpack_data
arguments: label: D41
datatype: f64
name: unpack_data
arguments: label: D44
datatype: f32[2]
name: unpack_data
arguments: label: D9
datatype: f32[2]

tool: D21: 0.975

tool: D35: 0.025

tool: D41: 0.5

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

tool: {"D9": [0.0,1.875]}

assistant: ```c
void distestim(double *x, int *n, double *smoothing, double *value) {
  int i, j;
  int count;
  int peakCount = 0;
  double lim[2];
  double range;
  double peakRange = 0;
  double M;
  double D[*n];
  double sumD = 0;
  double xBin[*n];
  if (*smoothing == 0) {
    *smoothing = quantile(x, *n, 0.975);
    *smoothing -= quantile(x, *n, 0.025);
    *smoothing /= pow(*n, 0.5);
  }
  *smoothing *= 0.5;
  for (i = 0; i < *n; i++) {
    lim[0] = x[i] - (*smoothing);
    lim[1] = x[i] + (*smoothing);
    sumD = 0;
    count = 0;
    for (j = 0; j < *n; j++) {
      if ((x[j] >= lim[0]) & (x[j] <= lim[1])) {
        xBin[count] = x[j];
        D[count] = pow(x[j] - x[i], 2);
        if (D[count] < 0)
          D[count] *= -1;
        sumD += D[count];
        count++;
      }
    }
    if (count >= peakCount) {
      range = sumD;
      for (j = 0; j < count; j++)
        D[j] = 1 - D[j] / sumD;
      sumD = 0;
      M = 0;
      for (j = 0; j < count; j++) {
        M += xBin[j] * D[j];
        sumD += D[j];
      }
      M /= sumD;
      if ((count > peakCount) || (range < peakRange)) {
        *value = M;
        peakCount = count;
        peakRange = range;
      }
    }
  }
}
```