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

```asm
<invgamma>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %edi,%ebx
  movsd  %xmm0,0x48(%rsp)
  movq   %xmm1,%rbp
  mov    %rsi,0x50(%rsp)
  mov    %rdx,%r15
  mov    $0x13880,%edi
  call   <malloc@plt>
  mov    %rax,0x40(%rsp)
  mov    $0x13880,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %rax,0x58(%rsp)
  movq   %rbp,%xmm7
  mulsd  D41(%rip),%xmm7
  movapd %xmm7,%xmm0
  movsd  0x48(%rsp),%xmm4
  addsd  %xmm4,%xmm0
  movq   %rbp,%xmm1
  mulsd  D17(%rip),%xmm1
  movapd %xmm4,%xmm7
  subsd  %xmm1,%xmm7
  movapd %xmm4,%xmm1
  mulsd  D10(%rip),%xmm1
  maxsd  %xmm7,%xmm1
  movsd  %xmm1,0x30(%rsp)
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm2
  divsd  D44(%rip),%xmm2
  movsd  %xmm2,0x38(%rsp)
  movapd %xmm4,%xmm0
  subsd  %xmm1,%xmm0
  divsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%ebp
  lea    0x1(%rbp),%r13d
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  mulsd  %xmm2,%xmm0
  movapd %xmm0,%xmm6
  addsd  %xmm1,%xmm6
  movsd  %xmm6,0x20(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  mulsd  %xmm2,%xmm0
  movapd %xmm0,%xmm5
  addsd  %xmm1,%xmm5
  movsd  %xmm5,0x10(%rsp)
  neg    %ebx
  mov    %ebx,%r14d
  mov    %ebx,0x2c(%rsp)
  mov    %ebx,%edi
  movapd %xmm6,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rbx
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14d,%xmm0
  movsd  0x48(%rsp),%xmm4
  mulsd  %xmm4,%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm4,%xmm2
  movsd  0x20(%rsp),%xmm5
  movapd %xmm5,%xmm4
  addsd  %xmm5,%xmm4
  movapd %xmm4,%xmm0
  mulsd  %xmm5,%xmm0
  movsd  %xmm2,0x18(%rsp)
  movapd %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%edi
  call   <exp@plt>
  movq   %rbx,%xmm7
  mulsd  %xmm0,%xmm7
  movsd  %xmm7,0x60(%rsp)
  mov    %r14d,%edi
  movsd  0x10(%rsp),%xmm0
  call   <pow@plt>
  movq   %xmm0,%rbx
  movsd  0x10(%rsp),%xmm4
  movapd %xmm4,%xmm0
  addsd  %xmm4,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  0x18(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%edi
  call   <exp@plt>
  movq   %rbx,%xmm4
  mulsd  %xmm0,%xmm4
  movsd  %xmm4,0x8(%rsp)
  cmp    $0x270e,%ebp
  ja     L54
  mov    0x40(%rsp),%r14
  pxor   %xmm6,%xmm6
  movsd  %xmm6,(%rsp)
  mov    $0x0,%ebx
  mov    %r15,0x68(%rsp)
  mov    0x60(%rsp),%r15
  jmp    L88
L206:
  movsd  0x8(%rsp),%xmm4
  movsd  %xmm4,(%r12)
  movsd  0x10(%rsp),%xmm7
  movsd  %xmm7,(%r14)
  add    $0x1,%r13d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  mulsd  0x38(%rsp),%xmm0
  addsd  0x30(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  mov    0x2c(%rsp),%edi
  call   <pow@plt>
  movsd  %xmm0,0x8(%rsp)
  movsd  0x10(%rsp),%xmm6
  movapd %xmm6,%xmm0
  addsd  %xmm6,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  0x18(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%edi
  call   <exp@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
L90:
  movsd  (%rsp),%xmm4
  addsd  (%r12),%xmm4
  movsd  %xmm4,(%rsp)
  add    $0x1,%ebx
  cmp    $0x2710,%ebx
  je     L160
  add    $0x8,%r12
  add    $0x8,%r14
  test   %ebp,%ebp
  js     L194
  cmp    $0x270f,%r13d
  jg     L37
L88:
  movq   %r15,%xmm7
  comisd 0x8(%rsp),%xmm7
  jbe    L206
  mov    %r15,(%r12)
  movsd  0x20(%rsp),%xmm2
  movsd  %xmm2,(%r14)
  sub    $0x1,%ebp
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  mulsd  0x38(%rsp),%xmm0
  addsd  0x30(%rsp),%xmm0
  movsd  %xmm0,0x20(%rsp)
  mov    0x2c(%rsp),%edi
  call   <pow@plt>
  movq   %xmm0,%r15
  movsd  0x20(%rsp),%xmm5
  movapd %xmm5,%xmm0
  addsd  %xmm5,%xmm0
  mulsd  %xmm5,%xmm0
  movsd  0x18(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%edi
  call   <exp@plt>
  movq   %r15,%xmm4
  mulsd  %xmm0,%xmm4
  movq   %xmm4,%r15
  jmp    L90
L160:
  mov    0x68(%rsp),%r15
  jmp    L11
L184:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  mulsd  0x38(%rsp),%xmm0
  addsd  0x30(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  lea    0x1(%r13),%r13d
L112:
  mov    0x2c(%rsp),%edi
  movsd  (%r12),%xmm0
  call   <pow@plt>
  movq   %xmm0,%r15
  movsd  (%r12),%xmm1
  movapd %xmm1,%xmm0
  addsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  0x18(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%edi
  call   <exp@plt>
  movq   %r15,%xmm7
  mulsd  %xmm0,%xmm7
  movsd  %xmm7,(%r14,%r12,1)
  add    $0x1,%ebx
  add    $0x8,%r12
  cmp    $0x270f,%ebx
  jg     L44
L156:
  test   %ebp,%ebp
  js     L184
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  mulsd  0x38(%rsp),%xmm0
  addsd  0x30(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  lea    -0x1(%rbp),%ebp
  jmp    L112
L44:
  mov    0x8(%rsp),%r15
L11:
  mov    0x58(%rsp),%rax
  mov    %rax,%rcx
  lea    0x13880(%rax),%rdx
L199:
  movsd  (%rax),%xmm0
  divsd  (%rsp),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L199
  pxor   %xmm0,%xmm0
  mov    $0x0,%eax
  movsd  D13(%rip),%xmm1
L198:
  mov    %eax,%edx
  add    $0x1,%eax
  addsd  (%rcx),%xmm0
  add    $0x8,%rcx
  comisd %xmm0,%xmm1
  ja     L198
  cltq
  mov    0x40(%rsp),%rcx
  movsd  (%rcx,%rax,8),%xmm0
  mov    0x50(%rsp),%rsi
  movsd  %xmm0,(%rsi)
  movslq %edx,%rdx
  movsd  -0x8(%rcx,%rax,8),%xmm0
  movsd  %xmm0,(%r15)
  movsd  (%rsi),%xmm1
  comisd %xmm0,%xmm1
  jbe    L131
  movsd  %xmm1,(%r15)
  movsd  %xmm0,(%rsi)
L131:
  mov    0x40(%rsp),%rax
  lea    -0x8(%rax,%rdx,8),%rax
  mov    0x50(%rsp),%rdx
  jmp    L66
L136:
  comisd %xmm0,%xmm1
  jbe    L104
  movsd  %xmm0,(%rdx)
L183:
  sub    $0x8,%rax
L66:
  movsd  (%rax),%xmm0
  movsd  (%rdx),%xmm1
  comisd %xmm1,%xmm0
  jbe    L136
  movsd  (%r15),%xmm2
  comisd %xmm0,%xmm2
  jbe    L136
  movsd  0x48(%rsp),%xmm6
  movapd %xmm6,%xmm0
  subsd  %xmm1,%xmm0
  mov    0x50(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  (%r15),%xmm0
  subsd  %xmm6,%xmm0
  movsd  %xmm0,(%r15)
  mov    0x40(%rsp),%rdi
  call   <free@plt>
  mov    0x58(%rsp),%rdi
  call   <free@plt>
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L104:
  movsd  %xmm0,(%r15)
  jmp    L183
L54:
  pxor   %xmm4,%xmm4
  movsd  %xmm4,(%rsp)
  mov    $0x0,%ebx
  jmp    L110
L194:
  mov    0x68(%rsp),%r15
L110:
  movslq %ebx,%rax
  mov    0x40(%rsp),%rsi
  lea    (%rsi,%rax,8),%r12
  mov    0x58(%rsp),%r14
  sub    %rsi,%r14
  mov    %r15,0x8(%rsp)
  jmp    L156
L37:
  mov    0x68(%rsp),%r15
  jmp    L110
```

tool_calls: name: parse_data
arguments: tag: D41
datatype: f64
name: parse_data
arguments: tag: D17
datatype: f64
name: parse_data
arguments: tag: D10
datatype: f64
name: parse_data
arguments: tag: D44
datatype: f32[2]
name: parse_data
arguments: tag: D13
datatype: f64

tool: D41: 50

tool: D17: 4

tool: D10: 0.01

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

tool: D13: 0.683

assistant: ```c
void invgamma(int M, double s, double ds, double *low, double *high) {
  int i, ilo, ihi, n = 10000;
  double psum = 0.0, cdf = 0.0;
  double xmin, xmax, dx, xlo, xhi, plo, phi, tmp;
  double *x, *posterior;
  x = (double *)malloc(n * sizeof(double));
  posterior = (double *)malloc(n * sizeof(double));
  xmax = s + 50.0 * ds;
  xmin = s - 4.0 * ds;
  if (xmin < 0.01 * s)
    xmin = 0.01 * s;
  dx = (xmax - xmin) / (n - 1.0);
  ilo = (int)((s - xmin) / dx);
  ihi = ilo + 1;
  xlo = xmin + ilo * dx;
  xhi = xmin + ihi * dx;
  plo = pow(xlo, -M) * exp(-M * s * s / (2 * xlo * xlo));
  phi = pow(xhi, -M) * exp(-M * s * s / (2 * xhi * xhi));
  for (i = 0; i < n; i++) {
    if (ilo < 0 || ihi >= n)
      break;
    if (plo > phi) {
      posterior[i] = plo;
      x[i] = xlo;
      xlo = xmin + (--ilo) * dx;
      plo = pow(xlo, -M) * exp(-M * s * s / (2 * xlo * xlo));
    } else {
      posterior[i] = phi;
      x[i] = xhi;
      xhi = xmin + (++ihi) * dx;
      phi = pow(xhi, -M) * exp(-M * s * s / (2 * xhi * xhi));
    }
    psum += posterior[i];
  }
  for (; i < n; i++) {
    if (ilo < 0)
      x[i] = xmin + (ihi++) * dx;
    else
      x[i] = xmin + (ilo--) * dx;
    posterior[i] = pow(x[i], -M) * exp(-M * s * s / (2 * x[i] * x[i]));
  }
  for (i = 0; i < n; i++) {
    posterior[i] = posterior[i] / psum;
  }
  i = 0;
  while (cdf < 0.683) {
    cdf += posterior[i++];
  }
  *low = x[i];
  *high = tmp = x[--i];
  if (*low > *high) {
    *high = *low;
    *low = tmp;
  }
  while (1) {
    tmp = x[--i];
    if (*low < tmp && tmp < *high)
      break;
    else if (tmp < *low)
      *low = tmp;
    else
      *high = tmp;
  }
  *low = (s - *low);
  *high = (*high - s);
  free(x);
  free(posterior);
}
```