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

```asm
<IncompleteGamma>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xd0,%rsp
  movsd  %xmm0,-0xb8(%rbp)
  movsd  %xmm1,-0xc0(%rbp)
  movsd  %xmm2,-0xc8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movsd  -0xc0(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0xc8(%rbp),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  D136(%rip),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  D36(%rip),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0xb8(%rbp),%xmm0
  jp     L51
  pxor   %xmm0,%xmm0
  ucomisd -0xb8(%rbp),%xmm0
  jne    L51
  pxor   %xmm0,%xmm0
  jmp    L226
L51:
  pxor   %xmm0,%xmm0
  comisd -0xb8(%rbp),%xmm0
  ja     L258
  pxor   %xmm0,%xmm0
  comisd -0x78(%rbp),%xmm0
  jb     L84
L258:
  movsd  D42(%rip),%xmm0
  jmp    L226
L84:
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x78(%rbp),%xmm0
  subsd  -0xb8(%rbp),%xmm0
  subsd  -0x70(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x48(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  movsd  D154(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L231
  movsd  -0xb8(%rbp),%xmm0
  comisd -0x78(%rbp),%xmm0
  jae    L181
L231:
  movsd  D154(%rip),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  D154(%rip),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x98(%rbp)
L158:
  movsd  -0x98(%rbp),%xmm1
  movsd  D154(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  divsd  -0x98(%rbp),%xmm0
  movsd  -0x80(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  addsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0x80(%rbp),%xmm0
  comisd -0x68(%rbp),%xmm0
  jbe    L16
  jmp    L158
L16:
  movsd  -0x48(%rbp),%xmm0
  divsd  -0x78(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  jmp    L22
L181:
  nop
  movsd  D154(%rip),%xmm0
  subsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x90(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0xb8(%rbp),%xmm1
  movsd  D154(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  D154(%rip),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0xb8(%rbp),%xmm1
  movsd  D154(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  mulsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  -0x28(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
L121:
  movsd  -0x90(%rbp),%xmm1
  movsd  D154(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x88(%rbp),%xmm1
  movsd  D166(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x80(%rbp),%xmm1
  movsd  D154(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0x90(%rbp),%xmm0
  mulsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movl   $0x0,-0xa4(%rbp)
  jmp    L222
L99:
  mov    -0xa4(%rbp),%eax
  add    $0x2,%eax
  cltq
  movsd  -0x40(%rbp,%rax,8),%xmm0
  mulsd  -0x88(%rbp),%xmm0
  mov    -0xa4(%rbp),%eax
  cltq
  movsd  -0x40(%rbp,%rax,8),%xmm1
  mulsd  -0x58(%rbp),%xmm1
  mov    -0xa4(%rbp),%eax
  add    $0x4,%eax
  subsd  %xmm1,%xmm0
  cltq
  movsd  %xmm0,-0x40(%rbp,%rax,8)
  addl   $0x1,-0xa4(%rbp)
L222:
  cmpl   $0x1,-0xa4(%rbp)
  jle    L99
  movsd  -0x18(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L199
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L256
L199:
  movsd  -0x20(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  subsd  -0x98(%rbp),%xmm0
  movq   D15(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x50(%rbp),%xmm0
  comisd -0x68(%rbp),%xmm0
  ja     L183
  movsd  -0x68(%rbp),%xmm0
  mulsd  -0x98(%rbp),%xmm0
  comisd -0x50(%rbp),%xmm0
  jae    L122
  jmp    L210
L183:
  nop
L210:
  movsd  -0x98(%rbp),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  jmp    L147
L256:
  nop
L147:
  movl   $0x0,-0xa4(%rbp)
  jmp    L265
L227:
  mov    -0xa4(%rbp),%eax
  add    $0x2,%eax
  cltq
  movsd  -0x40(%rbp,%rax,8),%xmm0
  mov    -0xa4(%rbp),%eax
  cltq
  movsd  %xmm0,-0x40(%rbp,%rax,8)
  addl   $0x1,-0xa4(%rbp)
L265:
  cmpl   $0x3,-0xa4(%rbp)
  jle    L227
  movsd  -0x20(%rbp),%xmm0
  movq   D15(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x60(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L102
  jmp    L121
L102:
  movl   $0x0,-0xa4(%rbp)
  jmp    L34
L59:
  mov    -0xa4(%rbp),%eax
  cltq
  movsd  -0x40(%rbp,%rax,8),%xmm0
  divsd  -0x60(%rbp),%xmm0
  mov    -0xa4(%rbp),%eax
  cltq
  movsd  %xmm0,-0x40(%rbp,%rax,8)
  addl   $0x1,-0xa4(%rbp)
L34:
  cmpl   $0x3,-0xa4(%rbp)
  jle    L59
  jmp    L121
L122:
  nop
  movsd  -0x48(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0xa0(%rbp),%xmm1
  movsd  D154(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
L22:
  movsd  -0xa0(%rbp),%xmm0
L226:
  movq   %xmm0,%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L247
  call   <__stack_chk_fail@plt>
L247:
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D136
data_type: byte[8]
name: read_data
arguments: data_label: D36
data_type: f64
name: read_data
arguments: data_label: D42
data_type: f32[2]
name: read_data
arguments: data_label: D154
data_type: f32[2]
name: read_data
arguments: data_label: D166
data_type: f32[2]
name: read_data
arguments: data_label: D15
data_type: qword

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

tool: D36: 1e+30

tool: {"D42": [0.0,-1.875]}

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

tool: {"D166": [0.0,2.0]}

tool: D15: 9223372036854775807

assistant: ```c
double IncompleteGamma(double x, double alpha, double ln_gamma_alpha) {
  int i;
  double p = alpha, g = ln_gamma_alpha;
  double accurate = 1e-8, overflow = 1e30;
  double factor, gin = 0, rn = 0, a = 0, b = 0, an = 0, dif = 0, term = 0, pn[6];
  if (x == 0)
    return (0);
  if (x < 0 || p <= 0)
    return (-1);
  factor = exp(p * log(x) - x - g);
  if (x > 1 && x >= p)
    goto l30;
  gin = 1;
  term = 1;
  rn = p;
l20:
  rn++;
  term *= x / rn;
  gin += term;
  if (term > accurate)
    goto l20;
  gin *= factor / p;
  goto l50;
l30:
  a = 1 - p;
  b = a + x + 1;
  term = 0;
  pn[0] = 1;
  pn[1] = x;
  pn[2] = x + 1;
  pn[3] = x * b;
  gin = pn[2] / pn[3];
l32:
  a++;
  b += 2;
  term++;
  an = a * term;
  for (i = 0; i < 2; i++)
    pn[i + 4] = b * pn[i + 2] - an * pn[i];
  if (pn[5] == 0)
    goto l35;
  rn = pn[4] / pn[5];
  dif = fabs(gin - rn);
  if (dif > accurate)
    goto l34;
  if (dif <= accurate * rn)
    goto l42;
l34:
  gin = rn;
l35:
  for (i = 0; i < 4; i++)
    pn[i] = pn[i + 2];
  if (fabs(pn[4]) < overflow)
    goto l32;
  for (i = 0; i < 4; i++)
    pn[i] /= overflow;
  goto l32;
l42:
  gin = 1 - factor * gin;
l50:
  return (gin);
}
```