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

```asm
<invgammp>:
  endbr64
  push   %rbx
  sub    $0x40,%rsp
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm1,%xmm0
  movsd  %xmm1,(%rsp)
  call   <gammln@plt>
  pxor   %xmm7,%xmm7
  comisd (%rsp),%xmm7
  movsd  %xmm0,0x28(%rsp)
  jae    L37
L24:
  movsd  0x10(%rsp),%xmm6
  comisd D86(%rip),%xmm6
  jae    L94
  pxor   %xmm5,%xmm5
  comisd 0x10(%rsp),%xmm5
  jae    L140
  movsd  (%rsp),%xmm6
  comisd D86(%rip),%xmm6
  movapd %xmm6,%xmm5
  subsd  D86(%rip),%xmm5
  movsd  %xmm5,0x8(%rsp)
  ja     L83
  movsd  D206(%rip),%xmm0
  movsd  D86(%rip),%xmm1
  movapd %xmm6,%xmm5
  mulsd  %xmm6,%xmm0
  addsd  D161(%rip),%xmm0
  mulsd  %xmm6,%xmm0
  movsd  0x10(%rsp),%xmm6
  subsd  %xmm0,%xmm1
  comisd %xmm6,%xmm1
  ja     L139
  movsd  D86(%rip),%xmm2
  movapd %xmm6,%xmm0
  subsd  %xmm1,%xmm0
  subsd  %xmm1,%xmm2
  movsd  D86(%rip),%xmm1
  divsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  call   <log@plt>
  movsd  D86(%rip),%xmm1
  movq   $0x0,0x38(%rsp)
  movq   $0x0,0x30(%rsp)
  subsd  %xmm0,%xmm1
L166:
  mov    $0xc,%ebx
  jmp    L18
  nopl   0x0(%rax,%rax,1)
L34:
  call   <log@plt>
  subsd  0x38(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm1
  mulsd  %xmm4,%xmm0
  movapd %xmm1,%xmm3
  subsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm0
  call   <exp@plt>
  mulsd  0x30(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm2
L125:
  divsd  %xmm0,%xmm2
  movsd  0x8(%rsp),%xmm0
  mov    $0x1,%edi
  movsd  %xmm1,0x20(%rsp)
  divsd  %xmm1,%xmm0
  movsd  %xmm2,0x18(%rsp)
  subsd  D86(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  call   <dmin@plt>
  movsd  0x18(%rsp),%xmm2
  pxor   %xmm7,%xmm7
  movsd  D86(%rip),%xmm3
  mulsd  D304(%rip),%xmm0
  movsd  0x20(%rsp),%xmm1
  subsd  %xmm0,%xmm3
  divsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  movapd %xmm2,%xmm0
  comisd %xmm1,%xmm7
  jb     L4
  addsd  %xmm2,%xmm1
  mulsd  D304(%rip),%xmm1
L4:
  movsd  D22(%rip),%xmm2
  andpd  D264(%rip),%xmm0
  mulsd  %xmm1,%xmm2
  comisd %xmm0,%xmm2
  ja     L85
  sub    $0x1,%ebx
  je     L85
L18:
  pxor   %xmm5,%xmm5
  comisd %xmm1,%xmm5
  jae    L140
  movsd  (%rsp),%xmm0
  movsd  %xmm1,0x18(%rsp)
  call   <gammp@plt>
  movsd  (%rsp),%xmm4
  movsd  0x18(%rsp),%xmm1
  movapd %xmm0,%xmm2
  comisd D86(%rip),%xmm4
  subsd  0x10(%rsp),%xmm2
  movapd %xmm1,%xmm0
  movsd  %xmm2,0x20(%rsp)
  ja     L34
  movsd  %xmm1,0x18(%rsp)
  call   <log@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm1
  subsd  %xmm1,%xmm0
  subsd  0x28(%rsp),%xmm0
  call   <exp@plt>
  movsd  0x20(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm1
  jmp    L125
  nopl   0x0(%rax)
L83:
  movapd %xmm5,%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm7
  subsd  D86(%rip),%xmm7
  movsd  %xmm0,0x38(%rsp)
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm7,%xmm0
  subsd  0x28(%rsp),%xmm0
  call   <exp@plt>
  movsd  0x10(%rsp),%xmm6
  movsd  %xmm0,0x30(%rsp)
  movsd  D304(%rip),%xmm0
  comisd %xmm6,%xmm0
  ja     L122
  movsd  D86(%rip),%xmm0
  subsd  %xmm6,%xmm0
  call   <log@plt>
  mulsd  D92(%rip),%xmm0
  call   <sqrt@plt>
  pxor   %xmm2,%xmm2
  movsd  D123(%rip),%xmm0
  movsd  D48(%rip),%xmm1
  cvtsi2sd %eax,%xmm2
  mulsd  %xmm2,%xmm0
  addsd  D215(%rip),%xmm0
  mulsd  %xmm2,%xmm1
  addsd  D267(%rip),%xmm1
  mulsd  %xmm2,%xmm0
  addsd  D86(%rip),%xmm0
  divsd  %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movq   %xmm1,%rbx
L115:
  movsd  (%rsp),%xmm0
  call   <sqrt@plt>
  movsd  (%rsp),%xmm0
  mulsd  D349(%rip),%xmm0
  pxor   %xmm2,%xmm2
  movsd  D86(%rip),%xmm1
  cvtsi2sd %eax,%xmm2
  mov    $0x3,%edi
  movsd  D86(%rip),%xmm5
  mulsd  D21(%rip),%xmm2
  divsd  %xmm0,%xmm1
  subsd  %xmm1,%xmm5
  movq   %rbx,%xmm1
  divsd  %xmm2,%xmm1
  movapd %xmm5,%xmm0
  subsd  %xmm1,%xmm0
  call   <pow@plt>
  movsd  (%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D310(%rip),%xmm0
  call   <dmax@plt>
  movapd %xmm0,%xmm1
  jmp    L166
  xchg   %ax,%ax
L140:
  pxor   %xmm1,%xmm1
L85:
  add    $0x40,%rsp
  movapd %xmm1,%xmm0
  pop    %rbx
  ret
  xchg   %ax,%ax
L94:
  movsd  (%rsp),%xmm0
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  movsd  D30(%rip),%xmm0
  cvtsi2sd %eax,%xmm1
  mulsd  %xmm0,%xmm1
  addsd  (%rsp),%xmm1
  add    $0x40,%rsp
  pop    %rbx
  jmp    1100 <dmax@plt>
  nopl   (%rax)
L37:
  lea    D76(%rip),%rdi
  call   <error@plt>
  jmp    L24
  nopl   0x0(%rax)
L139:
  movsd  D86(%rip),%xmm0
  divsd  %xmm1,%xmm6
  divsd  %xmm5,%xmm0
  cvttsd2si %xmm0,%edi
  movapd %xmm6,%xmm0
  call   <pow@plt>
  movq   $0x0,0x38(%rsp)
  movq   $0x0,0x30(%rsp)
  movapd %xmm0,%xmm1
  jmp    L166
L122:
  movapd %xmm6,%xmm0
  call   <log@plt>
  mulsd  D92(%rip),%xmm0
  call   <sqrt@plt>
  pxor   %xmm2,%xmm2
  movsd  D123(%rip),%xmm0
  movsd  D48(%rip),%xmm1
  cvtsi2sd %eax,%xmm2
  mulsd  %xmm2,%xmm0
  addsd  D215(%rip),%xmm0
  mulsd  %xmm2,%xmm1
  addsd  D267(%rip),%xmm1
  mulsd  %xmm2,%xmm0
  addsd  D86(%rip),%xmm0
  divsd  %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  xorpd  D268(%rip),%xmm1
  movq   %xmm1,%rbx
  jmp    L115
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D86
type_guessed: f64[2]
name: extract_symbolic_data
arguments: data_tag: D206
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D161
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D304
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D22
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_tag: D264
type_guessed: qword[2]
name: extract_symbolic_data
arguments: data_tag: D92
type_guessed: f32[2]
name: extract_symbolic_data
arguments: data_tag: D123
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D48
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D215
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D267
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D349
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D21
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D310
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_tag: D30
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D76
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D268
type_guessed: f32[4]

tool: {"D86": [1.0,100.0]}

tool: D206: 0.12

tool: D161: 0.253

tool: D304: 0.5

tool: {"D22": [0x3a,0x8c,0x30,0xe2,0x8e,0x79,0x45,0x3e]}

tool: {"D264": [0x7fffffffffffffff,0x0000000000000000]}

tool: {"D92": [0.0,-2.0]}

tool: D123: 0.04481

tool: D48: 0.27061

tool: D215: 0.99229

tool: D267: 2.30753

tool: D349: 9

tool: D21: 3

tool: {"D310": [0xfc,0xa9,0xf1,0xd2,0x4d,0x62,0x50,0x3f]}

tool: D30: 100

tool: D76: a must be pos in invgammap

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

assistant: ```c
double invgammp(const double p, const double a) {
  int j;
  double x, err, t, u, pp, a1 = a - 1;
  double afac = 0;
  double lna1 = 0;
  double eps = 1.e-8;
  double gln = gammln(a);
  if (a <= 0.)
    error("a must be pos in invgammap");
  if (p >= 1.)
    return dmax(100., a + 100. * sqrt(a));
  if (p <= 0.)
    return 0.0;
  if (a > 1.) {
    lna1 = log(a1);
    afac = exp(a1 * (lna1 - 1.) - gln);
    pp = (p < 0.5) ? p : 1. - p;
    t = sqrt(-2. * log(pp));
    x = (2.30753 + t * 0.27061) / (1. + t * (0.99229 + t * 0.04481)) - t;
    if (p < 0.5)
      x = -x;
    x = dmax(1.e-3, a * pow(1. - 1. / (9. * a) - x / (3. * sqrt(a)), 3));
  } else {
    t = 1.0 - a * (0.253 + a * 0.12);
    if (p < t)
      x = pow(p / t, 1. / a);
    else
      x = 1. - log(1. - (p - t) / (1. - t));
  }
  for (j = 0; j < 12; j++) {
    if (x <= 0.0)
      return 0.0;
    err = gammp(a, x) - p;
    if (a > 1.)
      t = afac * exp(-(x - a1) + a1 * (log(x) - lna1));
    else
      t = exp(-x + a1 * log(x) - gln);
    u = err / t;
    x -= (t = u / (1. - 0.5 * dmin(1., u * ((a - 1.) / x - 1))));
    if (x <= 0.)
      x = 0.5 * (x + t);
    if (fabs(t) < eps * x)
      break;
  }
  return x;
}
```