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

```asm
<QuantileChi2>:
  endbr64
  movapd %xmm0,%xmm7
  movsd  D683(%rip),%xmm0
  comisd %xmm7,%xmm0
  ja     L101
  push   %r14
  push   %rbx
  sub    $0x58,%rsp
  movq   %xmm1,%rbx
  movsd  D296(%rip),%xmm0
  movsd  %xmm7,0x38(%rsp)
  comisd D7(%rip),%xmm7
  ja     L15
  pxor   %xmm1,%xmm1
  movq   %rbx,%xmm5
  comisd %xmm5,%xmm1
  jae    L15
  movq   %rbx,%xmm4
  mulsd  D563(%rip),%xmm4
  movsd  %xmm4,0x10(%rsp)
  movapd %xmm4,%xmm0
  call   <LnGammaFunction@plt>
  movsd  %xmm0,0x18(%rsp)
  movsd  0x10(%rsp),%xmm4
  subsd  D418(%rip),%xmm4
  movsd  %xmm4,0x20(%rsp)
  movsd  0x38(%rsp),%xmm0
  call   <log@plt>
  mulsd  D692(%rip),%xmm0
  movq   %rbx,%xmm5
  comisd %xmm0,%xmm5
  jb     L2
  comisd D252(%rip),%xmm5
  ja     L17
  movsd  D418(%rip),%xmm0
  subsd  0x38(%rsp),%xmm0
  call   <log@plt>
  movsd  0x20(%rsp),%xmm5
  mulsd  D87(%rip),%xmm5
  movsd  %xmm5,0x40(%rsp)
  movsd  D591(%rip),%xmm5
  movsd  %xmm5,0x8(%rsp)
  addsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x48(%rsp)
L123:
  movsd  D39(%rip),%xmm0
  movsd  0x8(%rsp),%xmm5
  addsd  %xmm5,%xmm0
  mulsd  %xmm5,%xmm0
  addsd  D418(%rip),%xmm0
  movsd  %xmm0,0x28(%rsp)
  movapd %xmm5,%xmm0
  addsd  D715(%rip),%xmm0
  mulsd  %xmm5,%xmm0
  addsd  D351(%rip),%xmm0
  movapd %xmm0,%xmm7
  mulsd  %xmm5,%xmm7
  movsd  %xmm7,0x30(%rsp)
  movsd  D563(%rip),%xmm2
  mulsd  %xmm5,%xmm2
  movapd %xmm2,%xmm0
  addsd  0x48(%rsp),%xmm0
  addsd  0x40(%rsp),%xmm0
  call   <exp@plt>
  movsd  0x30(%rsp),%xmm7
  mulsd  %xmm7,%xmm0
  movsd  0x28(%rsp),%xmm4
  divsd  %xmm4,%xmm0
  movsd  D418(%rip),%xmm2
  subsd  %xmm0,%xmm2
  movsd  0x8(%rsp),%xmm5
  movapd %xmm5,%xmm0
  addsd  %xmm5,%xmm0
  addsd  D39(%rip),%xmm0
  divsd  %xmm4,%xmm0
  subsd  D563(%rip),%xmm0
  movapd %xmm5,%xmm1
  mulsd  D603(%rip),%xmm1
  addsd  D94(%rip),%xmm1
  mulsd  %xmm5,%xmm1
  addsd  D351(%rip),%xmm1
  divsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm0
  divsd  %xmm0,%xmm2
  movapd %xmm5,%xmm0
  subsd  %xmm2,%xmm5
  movsd  %xmm5,0x8(%rsp)
  divsd  %xmm5,%xmm0
  subsd  D418(%rip),%xmm0
  andpd  D416(%rip),%xmm0
  subsd  D107(%rip),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  jb     L123
  jmp    L120
L2:
  movsd  0x10(%rsp),%xmm0
  mulsd  D87(%rip),%xmm0
  addsd  0x18(%rsp),%xmm0
  call   <exp@plt>
  movapd %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm5
  movapd %xmm5,%xmm0
  mulsd  0x38(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D418(%rip),%xmm1
  divsd  %xmm5,%xmm1
  call   <pow@plt>
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm0,%xmm1
  subsd  D645(%rip),%xmm1
  pxor   %xmm2,%xmm2
  comisd %xmm1,%xmm2
  jbe    L120
  jmp    L15
L17:
  movsd  0x38(%rsp),%xmm0
  call   <QuantileNormal@plt>
  movq   %xmm0,%r14
  movsd  D643(%rip),%xmm0
  movq   %rbx,%xmm5
  divsd  %xmm5,%xmm0
  movapd %xmm0,%xmm4
  movsd  %xmm0,0x8(%rsp)
  pxor   %xmm0,%xmm0
  ucomisd %xmm4,%xmm0
  ja     L76
  sqrtsd %xmm4,%xmm4
  movapd %xmm4,%xmm0
L71:
  movq   %r14,%xmm5
  mulsd  %xmm5,%xmm0
  addsd  D418(%rip),%xmm0
  subsd  0x8(%rsp),%xmm0
  movsd  D603(%rip),%xmm1
  call   <pow@plt>
  movapd %xmm0,%xmm4
  movq   %rbx,%xmm5
  mulsd  %xmm5,%xmm4
  movsd  %xmm4,0x8(%rsp)
  movq   %rbx,%xmm0
  mulsd  D207(%rip),%xmm0
  addsd  D367(%rip),%xmm0
  comisd %xmm0,%xmm4
  jbe    L120
  movsd  D418(%rip),%xmm0
  subsd  0x38(%rsp),%xmm0
  call   <log@plt>
  movq   %xmm0,%rbx
  movsd  0x8(%rsp),%xmm0
  mulsd  D563(%rip),%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  mulsd  0x20(%rsp),%xmm1
  movq   %rbx,%xmm0
  subsd  %xmm1,%xmm0
  addsd  0x18(%rsp),%xmm0
  mulsd  D346(%rip),%xmm0
  movsd  %xmm0,0x8(%rsp)
  jmp    L120
L76:
  movsd  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  jmp    L71
L102:
  movsd  %xmm0,0x8(%rsp)
L120:
  movsd  D563(%rip),%xmm4
  mulsd  0x8(%rsp),%xmm4
  movsd  %xmm4,0x28(%rsp)
  movsd  0x18(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
  movapd %xmm4,%xmm0
  call   <IncompleteGamma@plt>
  pxor   %xmm4,%xmm4
  comisd %xmm0,%xmm4
  ja     L26
  movsd  0x38(%rsp),%xmm4
  subsd  %xmm0,%xmm4
  movsd  %xmm4,0x30(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm7
  mulsd  D87(%rip),%xmm7
  movapd %xmm7,%xmm0
  addsd  0x18(%rsp),%xmm0
  addsd  0x28(%rsp),%xmm0
  mulsd  0x20(%rsp),%xmm1
  subsd  %xmm1,%xmm0
  call   <exp@plt>
  movsd  0x30(%rsp),%xmm4
  mulsd  %xmm0,%xmm4
  movapd %xmm4,%xmm5
  divsd  0x8(%rsp),%xmm5
  movapd %xmm4,%xmm0
  mulsd  D563(%rip),%xmm0
  movsd  0x20(%rsp),%xmm2
  movapd %xmm2,%xmm9
  mulsd  %xmm5,%xmm9
  movapd %xmm0,%xmm3
  subsd  %xmm9,%xmm3
  movapd %xmm3,%xmm1
  mulsd  D308(%rip),%xmm1
  addsd  D123(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  movsd  D342(%rip),%xmm15
  addsd  %xmm15,%xmm1
  mulsd  %xmm3,%xmm1
  addsd  D501(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  addsd  D259(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  movsd  D466(%rip),%xmm11
  addsd  %xmm11,%xmm1
  movsd  D287(%rip),%xmm10
  divsd  %xmm10,%xmm1
  mulsd  %xmm1,%xmm0
  movsd  D418(%rip),%xmm8
  addsd  %xmm8,%xmm0
  movapd %xmm3,%xmm6
  mulsd  D636(%rip),%xmm6
  addsd  D634(%rip),%xmm6
  mulsd  %xmm3,%xmm6
  addsd  D419(%rip),%xmm6
  mulsd  %xmm3,%xmm6
  addsd  D247(%rip),%xmm6
  mulsd  %xmm3,%xmm6
  addsd  %xmm10,%xmm6
  movsd  D443(%rip),%xmm14
  divsd  %xmm14,%xmm6
  movapd %xmm6,%xmm10
  movapd %xmm3,%xmm6
  mulsd  D528(%rip),%xmm6
  addsd  D542(%rip),%xmm6
  mulsd  %xmm3,%xmm6
  addsd  D151(%rip),%xmm6
  mulsd  %xmm3,%xmm6
  addsd  %xmm6,%xmm11
  divsd  %xmm14,%xmm11
  movapd %xmm3,%xmm6
  mulsd  D140(%rip),%xmm6
  addsd  D507(%rip),%xmm6
  mulsd  %xmm3,%xmm6
  addsd  D684(%rip),%xmm6
  mulsd  %xmm2,%xmm6
  movapd %xmm3,%xmm12
  mulsd  D544(%rip),%xmm12
  addsd  D242(%rip),%xmm12
  mulsd  %xmm3,%xmm12
  addsd  D485(%rip),%xmm12
  addsd  %xmm12,%xmm6
  movsd  D89(%rip),%xmm12
  divsd  %xmm12,%xmm6
  movapd %xmm3,%xmm13
  mulsd  D341(%rip),%xmm13
  addsd  D627(%rip),%xmm13
  mulsd  %xmm2,%xmm13
  movapd %xmm13,%xmm7
  mulsd  D550(%rip),%xmm3
  addsd  %xmm15,%xmm3
  addsd  %xmm3,%xmm7
  divsd  %xmm14,%xmm7
  movapd %xmm2,%xmm3
  mulsd  D488(%rip),%xmm2
  addsd  D281(%rip),%xmm2
  mulsd  %xmm3,%xmm2
  addsd  D520(%rip),%xmm2
  divsd  %xmm12,%xmm2
  mulsd  %xmm5,%xmm2
  subsd  %xmm2,%xmm7
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm6
  movapd %xmm6,%xmm2
  mulsd  %xmm5,%xmm2
  subsd  %xmm2,%xmm11
  mulsd  %xmm5,%xmm11
  subsd  %xmm11,%xmm10
  mulsd  %xmm5,%xmm10
  subsd  %xmm10,%xmm1
  mulsd  %xmm9,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  0x8(%rsp),%xmm4
  addsd  %xmm4,%xmm0
  divsd  %xmm0,%xmm4
  movapd %xmm4,%xmm1
  subsd  %xmm8,%xmm1
  andpd  D416(%rip),%xmm1
  comisd D645(%rip),%xmm1
  ja     L102
  jmp    L15
L26:
  lea    D495(%rip),%rdi
  call   <printf@plt>
  movsd  D296(%rip),%xmm0
L15:
  add    $0x58,%rsp
  pop    %rbx
  pop    %r14
  ret
L101:
  movsd  D296(%rip),%xmm0
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D683
datatype: byte[8]
name: extract_symbolic_data
arguments: tag: D296
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D7
datatype: byte[16]
name: extract_symbolic_data
arguments: tag: D563
datatype: f64
name: extract_symbolic_data
arguments: tag: D418
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D692
datatype: byte[8]
name: extract_symbolic_data
arguments: tag: D252
datatype: byte[16]
name: extract_symbolic_data
arguments: tag: D87
datatype: byte[8]
name: extract_symbolic_data
arguments: tag: D591
datatype: f64
name: extract_symbolic_data
arguments: tag: D39
datatype: f64
name: extract_symbolic_data
arguments: tag: D715
datatype: f64
name: extract_symbolic_data
arguments: tag: D351
datatype: f64
name: extract_symbolic_data
arguments: tag: D603
datatype: f64
name: extract_symbolic_data
arguments: tag: D94
datatype: f64
name: extract_symbolic_data
arguments: tag: D416
datatype: qword[2]
name: extract_symbolic_data
arguments: tag: D107
datatype: byte[8]
name: extract_symbolic_data
arguments: tag: D645
datatype: byte[16]
name: extract_symbolic_data
arguments: tag: D643
datatype: f64
name: extract_symbolic_data
arguments: tag: D207
datatype: f64
name: extract_symbolic_data
arguments: tag: D367
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D346
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D308
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D123
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D342
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D501
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D259
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D466
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D287
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D636
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D634
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D419
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D247
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D443
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D528
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D542
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D151
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D140
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D507
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D684
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D544
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D242
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D485
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D89
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D341
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D627
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D550
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D488
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D281
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D520
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D495
datatype: string

tool: {"D683": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xc0,0x3e]}

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

tool: {"D7": [0xd3,0x17,0x42,0xce,0xfb,0xff,0xef,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: D563: 0.5

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

tool: {"D692": [0xd7,0xa3,0x70,0x3d,0x0a,0xd7,0xf3,0xbf]}

tool: {"D252": [0x7b,0x14,0xae,0x47,0xe1,0x7a,0xd4,0x3f,0xcc,0xfc,0xf1,0xfe,0x42,0x2e,0xe6,0x3f]}

tool: {"D87": [0xcc,0xfc,0xf1,0xfe,0x42,0x2e,0xe6,0x3f]}

tool: D591: 0.4

tool: D39: 4.67

tool: D715: 6.66

tool: D351: 6.73

tool: D603: 3

tool: D94: 13.32

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

tool: {"D107": [0x7b,0x14,0xae,0x47,0xe1,0x7a,0x84,0x3f]}

tool: {"D645": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xa0,0x3e,0xb3,0xd1,0x39,0x3f,0xc5,0x71,0xcc,0x3f]}

tool: D643: 0.222222

tool: D207: 2.2

tool: {"D367": [0.0,2.375]}

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

tool: {"D308": [0.0,3.21875]}

tool: {"D123": [0.0,3.2734375]}

tool: {"D342": [0.0,3.328125]}

tool: {"D501": [0.0,3.41015625]}

tool: {"D259": [0.0,3.5234375]}

tool: {"D466": [0.0,3.66015625]}

tool: {"D287": [0.0,3.91015625]}

tool: {"D636": [0.0,4.6240234375]}

tool: {"D634": [0.0,4.55712890625]}

tool: {"D419": [0.0,4.443359375]}

tool: {"D247": [0.0,4.2177734375]}

tool: {"D443": [0.0,5.115234375]}

tool: {"D528": [0.0,4.41015625]}

tool: {"D542": [0.0,4.1904296875]}

tool: {"D151": [0.0,3.951171875]}

tool: {"D140": [0.0,4.849609375]}

tool: {"D507": [0.0,4.3681640625]}

tool: {"D684": [0.0,3.787109375]}

tool: {"D544": [0.0,4.5771484375]}

tool: {"D242": [0.0,4.15625]}

tool: {"D485": [0.0,3.7421875]}

tool: {"D89": [0.0,5.615234375]}

tool: {"D341": [0.0,4.091796875]}

tool: {"D627": [0.0,3.591796875]}

tool: {"D550": [0.0,3.7578125]}

tool: {"D488": [0.0,3.49609375]}

tool: {"D281": [0.0,3.837890625]}

tool: {"D520": [0.0,3.46875]}

tool: D495: 
err IncompleteGamma

assistant: ```c
double QuantileChi2(double prob, double v) {
  double e = .5e-6, aa = .6931471805, p = prob, g;
  double xx, c, ch, a = 0, q = 0, p1 = 0, p2 = 0, t = 0, x = 0, b = 0, s1, s2, s3, s4, s5, s6;
  if (p < .000002 || p > .999998 || v <= 0)
    return (-1);
  g = LnGammaFunction(v / 2);
  xx = v / 2;
  c = xx - 1;
  if (v >= -1.24 * log(p))
    goto l1;
  ch = pow((p * xx * exp(g + xx * aa)), 1 / xx);
  if (ch - e < 0)
    return (ch);
  goto l4;
l1:
  if (v > .32)
    goto l3;
  ch = 0.4;
  a = log(1 - p);
l2:
  q = ch;
  p1 = 1 + ch * (4.67 + ch);
  p2 = ch * (6.73 + ch * (6.66 + ch));
  t = -0.5 + (4.67 + 2 * ch) / p1 - (6.73 + ch * (13.32 + 3 * ch)) / p2;
  ch -= (1 - exp(a + g + .5 * ch + c * aa) * p2 / p1) / t;
  if (fabs(q / ch - 1) - .01 <= 0)
    goto l4;
  else
    goto l2;
l3:
  x = QuantileNormal(p);
  p1 = 0.222222 / v;
  ch = v * pow((x * sqrt(p1) + 1 - p1), 3.0);
  if (ch > 2.2 * v + 6)
    ch = -2 * (log(1 - p) - c * log(.5 * ch) + g);
l4:
  q = ch;
  p1 = .5 * ch;
  if ((t = IncompleteGamma(p1, xx, g)) < 0) {
    printf("\nerr IncompleteGamma");
    return (-1);
  }
  p2 = p - t;
  t = p2 * exp(xx * aa + g + p1 - c * log(ch));
  b = t / ch;
  a = 0.5 * t - b * c;
  s1 = (210 + a * (140 + a * (105 + a * (84 + a * (70 + 60 * a))))) / 420;
  s2 = (420 + a * (735 + a * (966 + a * (1141 + 1278 * a)))) / 2520;
  s3 = (210 + a * (462 + a * (707 + 932 * a))) / 2520;
  s4 = (252 + a * (672 + 1182 * a) + c * (294 + a * (889 + 1740 * a))) / 5040;
  s5 = (84 + 264 * a + c * (175 + 606 * a)) / 2520;
  s6 = (120 + c * (346 + 127 * c)) / 5040;
  ch += t * (1 + 0.5 * t * s1 - b * c * (s1 - b * (s2 - b * (s3 - b * (s4 - b * (s5 - b * s6))))));
  if (fabs(q / ch - 1) > e)
    goto l4;
  return (ch);
}
```