user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<cdflib_cdft>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdx,%r13
  mov    %rcx,0x8(%rsp)
  mov    %r9,%rbx
  mov    0xc0(%rsp),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  mov    D214(%rip),%rax
  mov    %rax,0x20(%rsp)
  mov    D191(%rip),%rax
  mov    %rax,0x28(%rsp)
  movl   $0x0,(%r9)
  movq   $0x0,(%r15)
  mov    (%rdi),%eax
  lea    -0x1(%rax),%edx
  cmp    $0x2,%edx
  jbe    L28
  movsd  D7(%rip),%xmm0
  test   %eax,%eax
  jle    L148
L245:
  movsd  %xmm0,(%r15)
  movl   $0xffffffff,(%rbx)
L330:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L28:
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %r8,%r14
  cmp    $0x1,%eax
  je     L364
  movsd  (%rsi),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  jae    L291
  comisd D8(%rip),%xmm0
  jbe    L113
  comisd %xmm0,%xmm1
  jae    L115
  movsd  D8(%rip),%xmm0
L48:
  movsd  %xmm0,(%r15)
  movl   $0xfffffffe,(%rbx)
  jmp    L330
L148:
  movsd  D8(%rip),%xmm0
  jmp    L245
L291:
  pxor   %xmm0,%xmm0
  jmp    L48
L115:
  pxor   %xmm0,%xmm0
  jmp    L48
L113:
  movsd  0x0(%r13),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  jae    L131
  comisd D8(%rip),%xmm0
  jbe    L8
  comisd %xmm0,%xmm1
  jae    L117
  movsd  D8(%rip),%xmm0
L142:
  movsd  %xmm0,(%r15)
  movl   $0xfffffffd,(%rbx)
  jmp    L330
L131:
  pxor   %xmm0,%xmm0
  jmp    L142
L117:
  pxor   %xmm0,%xmm0
  jmp    L142
L8:
  cmp    $0x3,%eax
  jne    L101
L167:
  movsd  (%r12),%xmm0
  addsd  0x0(%r13),%xmm0
  movsd  %xmm0,0x10(%rsp)
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <dpmpar@plt>
  movsd  D214(%rip),%xmm1
  movsd  0x10(%rsp),%xmm2
  movapd %xmm2,%xmm0
  subsd  %xmm1,%xmm0
  subsd  %xmm1,%xmm0
  andpd  D168(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mulsd  D7(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L246
  pxor   %xmm0,%xmm0
  comisd %xmm2,%xmm0
  ja     L259
  movsd  D8(%rip),%xmm0
L259:
  movsd  %xmm0,(%r15)
  movl   $0x3,(%rbx)
  jmp    L330
L246:
  mov    0x0(%rbp),%eax
  cmp    $0x1,%eax
  je     L254
  movsd  (%r12),%xmm3
  movsd  %xmm3,0x10(%rsp)
  movsd  0x0(%r13),%xmm4
  movsd  %xmm4,0x18(%rsp)
  cmp    $0x2,%eax
  je     L35
  cmp    $0x3,%eax
  jne    L330
  mov    D191(%rip),%rax
  mov    %rax,(%r14)
  mov    D226(%rip),%rax
  mov    %rax,0x58(%rsp)
  mov    D99(%rip),%rax
  mov    %rax,0x60(%rsp)
  mov    D125(%rip),%rax
  mov    %rax,0x68(%rsp)
  mov    D167(%rip),%rax
  mov    %rax,0x70(%rsp)
  lea    0x20(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  lea    0x58(%rsp),%rdi
  sub    $0x8,%rsp
  lea    0x78(%rsp),%rax
  push   %rax
  lea    0x78(%rsp),%r9
  lea    0x38(%rsp),%r8
  mov    %rdx,%rcx
  mov    $0x0,%eax
  call   <cdflib_dstinv@plt>
  movl   $0x0,(%rbx)
  lea    0x60(%rsp),%rcx
  lea    0x40(%rsp),%rdx
  lea    0x58(%rsp),%r8
  mov    %r14,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <cdflib_dinvr@plt>
  mov    (%rbx),%eax
  add    $0x10,%rsp
  lea    0x40(%rsp),%rbp
  cmp    $0x1,%eax
  je     L204
L280:
  cmp    $0xffffffff,%eax
  jne    L330
  cmpq   $0x0,0x50(%rsp)
  jne    L441
  movl   $0x2,(%rbx)
  mov    D99(%rip),%rax
  mov    %rax,(%r15)
  jmp    L330
L35:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <cdflib_dt1@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    0x8(%rsp),%rbp
  movsd  %xmm0,0x0(%rbp)
  mov    D136(%rip),%rax
  mov    %rax,0x58(%rsp)
  mov    D21(%rip),%rax
  mov    %rax,0x60(%rsp)
  mov    D125(%rip),%rax
  mov    %rax,0x68(%rsp)
  mov    D167(%rip),%rax
  mov    %rax,0x70(%rsp)
  lea    0x20(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  lea    0x58(%rsp),%rdi
  sub    $0x8,%rsp
  lea    0x78(%rsp),%rax
  push   %rax
  lea    0x78(%rsp),%r9
  lea    0x38(%rsp),%r8
  mov    %rdx,%rcx
  mov    $0x0,%eax
  call   <cdflib_dstinv@plt>
  movl   $0x0,(%rbx)
  lea    0x60(%rsp),%rcx
  lea    0x40(%rsp),%rdx
  lea    0x58(%rsp),%r8
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <cdflib_dinvr@plt>
  mov    (%rbx),%eax
  add    $0x10,%rsp
  lea    0x40(%rsp),%rbp
  cmp    $0x1,%eax
  je     L196
L336:
  cmp    $0xffffffff,%eax
  jne    L330
  cmpq   $0x0,0x50(%rsp)
  jne    L57
  movl   $0x2,(%rbx)
  mov    D21(%rip),%rax
  mov    %rax,(%r15)
  jmp    L330
L228:
  movsd  0x38(%rsp),%xmm0
  subsd  (%r12),%xmm0
L434:
  movsd  %xmm0,0x30(%rsp)
  lea    0x50(%rsp),%rcx
  lea    0x30(%rsp),%rdx
  lea    0x48(%rsp),%r8
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <cdflib_dinvr@plt>
  mov    (%rbx),%eax
  cmp    $0x1,%eax
  jne    L336
L196:
  lea    0x38(%rsp),%rdx
  mov    %rbp,%rcx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cdflib_cumt@plt>
  movsd  0x18(%rsp),%xmm5
  comisd 0x10(%rsp),%xmm5
  jae    L228
  movsd  0x40(%rsp),%xmm0
  subsd  0x0(%r13),%xmm0
  jmp    L434
L57:
  movl   $0x1,(%rbx)
  mov    D136(%rip),%rax
  mov    %rax,(%r15)
  jmp    L330
L61:
  movsd  0x38(%rsp),%xmm0
  subsd  (%r12),%xmm0
L127:
  movsd  %xmm0,0x30(%rsp)
  lea    0x50(%rsp),%rcx
  lea    0x30(%rsp),%rdx
  lea    0x48(%rsp),%r8
  mov    %r14,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <cdflib_dinvr@plt>
  mov    (%rbx),%eax
  cmp    $0x1,%eax
  jne    L280
L204:
  lea    0x38(%rsp),%rdx
  mov    %rbp,%rcx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cdflib_cumt@plt>
  movsd  0x18(%rsp),%xmm7
  comisd 0x10(%rsp),%xmm7
  jae    L61
  movsd  0x40(%rsp),%xmm0
  subsd  0x0(%r13),%xmm0
  jmp    L127
L441:
  movl   $0x1,(%rbx)
  mov    D226(%rip),%rax
  mov    %rax,(%r15)
  jmp    L330
L254:
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cdflib_cumt@plt>
  movl   $0x0,(%rbx)
  jmp    L330
L101:
  pxor   %xmm0,%xmm0
  comisd (%r8),%xmm0
  jae    L67
  jmp    L167
L364:
  pxor   %xmm0,%xmm0
  comisd (%r8),%xmm0
  jb     L254
L67:
  movl   $0xfffffffb,(%rbx)
  jmp    L330
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D214
datatype: f64
name: retrieve_data
arguments: data_label: D191
datatype: f64
name: retrieve_data
arguments: data_label: D7
datatype: f64
name: retrieve_data
arguments: data_label: D8
datatype: f64[2]
name: retrieve_data
arguments: data_label: D168
datatype: qword[2]
name: retrieve_data
arguments: data_label: D226
datatype: byte[8]
name: retrieve_data
arguments: data_label: D99
datatype: f64
name: retrieve_data
arguments: data_label: D125
datatype: byte[8]
name: retrieve_data
arguments: data_label: D167
datatype: byte[8]
name: retrieve_data
arguments: data_label: D136
datatype: byte[8]
name: retrieve_data
arguments: data_label: D21
datatype: f64

tool: D214: 0.5

tool: D191: 5

tool: D7: 3

tool: {"D8": [1.0,3.0]}

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

tool: {"D226": [0x59,0xf3,0xf8,0xc2,0x1f,0x6e,0xa5,0x01]}

tool: D99: 10000000000

tool: {"D125": [0x1f,0xb8,0xd4,0x4a,0x7a,0xee,0x8d,0x35]}

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

tool: {"D136": [0xea,0x8c,0xa0,0x39,0x59,0x3e,0x29,0xc6]}

tool: D21: 1e+30

assistant: ```c
void cdflib_cdft(const int *which, double *p, double *q, double *t, double *df, int *status, double *bound) {
  static const double tol = 1.0e-8;
  static const double atol = 1.0e-50;
  static const double zero = 1.0e-300;
  static const double inf = 1.0e30;
  static const double maxdf = 1.0e10;
  static const int K1 = 1;
  double K4 = 0.5e0;
  double K5 = 5.0e0;
  double fx, cum, ccum, pq;
  unsigned long qhi, qleft, qporq;
  double T2, T3, T6, T7, T8, T9, T10, T11;
  *status = 0;
  *bound = 0.0;
  if (!(*which < 1 || *which > 3)) {
    goto S30;
  }
  if (!(*which < 1)) {
    goto S10;
  }
  *bound = 1.0e0;
  goto S20;
S10:
  *bound = 3.0e0;
S20:
  *status = -1;
  return;
S30:
  if (*which == 1) {
    goto S70;
  }
  if (!(*p <= 0.0e0 || *p > 1.0e0)) {
    goto S60;
  }
  if (!(*p <= 0.0e0)) {
    goto S40;
  }
  *bound = 0.0e0;
  goto S50;
S40:
  *bound = 1.0e0;
S50:
  *status = -2;
  return;
S70:
S60:
  if (*which == 1) {
    goto S110;
  }
  if (!(*q <= 0.0e0 || *q > 1.0e0)) {
    goto S100;
  }
  if (!(*q <= 0.0e0)) {
    goto S80;
  }
  *bound = 0.0e0;
  goto S90;
S80:
  *bound = 1.0e0;
S90:
  *status = -3;
  return;
S110:
S100:
  if (*which == 3) {
    goto S130;
  }
  if (!(*df <= 0.0e0)) {
    goto S120;
  }
  *bound = 0.0e0;
  *status = -5;
  return;
S130:
S120:
  if (*which == 1) {
    goto S170;
  }
  pq = *p + *q;
  if (!(fabs(pq - 0.5e0 - 0.5e0) > 3.0e0 * dpmpar(K1))) {
    goto S160;
  }
  if (!(pq < 0.0e0)) {
    goto S140;
  }
  *bound = 0.0e0;
  goto S150;
S140:
  *bound = 1.0e0;
S150:
  *status = 3;
  return;
S170:
S160:
  if (!(*which == 1)) {
    qporq = *p <= *q;
  }
  if (1 == *which) {
    cdflib_cumt(t, df, p, q);
    *status = 0;
  } else if (2 == *which) {
    *t = cdflib_dt1(p, q, df);
    T2 = -inf;
    T3 = inf;
    T6 = atol;
    T7 = tol;
    cdflib_dstinv(&T2, &T3, &K4, &K4, &K5, &T6, &T7);
    *status = 0;
    cdflib_dinvr(status, t, &fx, &qleft, &qhi);
  S180:
    if (!(*status == 1)) {
      goto S210;
    }
    cdflib_cumt(t, df, &cum, &ccum);
    if (!qporq) {
      goto S190;
    }
    fx = cum - *p;
    goto S200;
  S190:
    fx = ccum - *q;
  S200:
    cdflib_dinvr(status, t, &fx, &qleft, &qhi);
    goto S180;
  S210:
    if (!(*status == -1)) {
      goto S240;
    }
    if (!qleft) {
      goto S220;
    }
    *status = 1;
    *bound = -inf;
    goto S230;
  S220:
    *status = 2;
    *bound = inf;
  S240:
  S230:;
  } else if (3 == *which) {
    *df = 5.0e0;
    T8 = zero;
    T9 = maxdf;
    T10 = atol;
    T11 = tol;
    cdflib_dstinv(&T8, &T9, &K4, &K4, &K5, &T10, &T11);
    *status = 0;
    cdflib_dinvr(status, df, &fx, &qleft, &qhi);
  S250:
    if (!(*status == 1)) {
      goto S280;
    }
    cdflib_cumt(t, df, &cum, &ccum);
    if (!qporq) {
      goto S260;
    }
    fx = cum - *p;
    goto S270;
  S260:
    fx = ccum - *q;
  S270:
    cdflib_dinvr(status, df, &fx, &qleft, &qhi);
    goto S250;
  S280:
    if (!(*status == -1)) {
      goto S310;
    }
    if (!qleft) {
      goto S290;
    }
    *status = 1;
    *bound = zero;
    goto S300;
  S290:
    *status = 2;
    *bound = maxdf;
  S300:;
  }
S310:
  return;
}
```