user: 请将以下的汇编代码转换成C语言代码：

```asm
<getJstet>:
  endbr64
  push   %r15
  push   %r14
  mov    %r8,%r14
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %r9,%r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x68,%rsp
  mov    0xa0(%rsp),%rax
  mov    %rsi,0x40(%rsp)
  movsd  %xmm0,(%rsp)
  mov    %rax,0x8(%rsp)
  mov    0xa8(%rsp),%rax
  movsd  %xmm1,0x18(%rsp)
  mov    %rax,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  mov    %edi,%eax
  shl    $0x4,%eax
  mov    %eax,%edi
  mov    %eax,0x10(%rsp)
  call   <malloc@plt>
  mov    %rax,%r15
  test   %r13d,%r13d
  jle    L244
  mov    %r13d,%edx
  movsd  D17(%rip),%xmm0
  lea    (%rax,%rdx,8),%rdx
L165:
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L165
L244:
  mov    %r14,%r8
  mov    %r15,%rcx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r13d,%edi
  call   <w_ave@plt>
  lea    0x50(%rsp),%r8
  mov    %r12,0x28(%rsp)
  mov    %r14,%r12
  mov    %r8,%r14
  nopl   0x0(%rax)
L78:
  mov    %r14,%r8
  mov    %r15,%rcx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r13d,%edi
  call   <w_ave@plt>
  movsd  0x50(%rsp),%xmm1
  movsd  (%r12),%xmm0
  pxor   %xmm3,%xmm3
  subsd  %xmm1,%xmm0
  comisd %xmm3,%xmm0
  ja     L214
  xorpd  D86(%rip),%xmm0
L214:
  comisd D75(%rip),%xmm0
  movsd  %xmm1,(%r12)
  ja     L78
  mov    %r15,%rdi
  mov    %r12,%r14
  mov    0x28(%rsp),%r12
  call   <free@plt>
  pxor   %xmm4,%xmm4
  lea    -0x1(%r13),%r10d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r13d,%xmm4
  pxor   %xmm3,%xmm3
  cvtsi2sd %r10d,%xmm1
  movapd %xmm4,%xmm0
  divsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm3
  ja     L229
  sqrtsd %xmm0,%xmm0
L114:
  mov    0x10(%rsp),%r15d
  mov    %r10d,0x38(%rsp)
  movsd  %xmm4,0x30(%rsp)
  mov    %r15d,%edi
  movsd  %xmm0,0x48(%rsp)
  call   <malloc@plt>
  mov    %r15d,%edi
  mov    %rax,0x28(%rsp)
  call   <malloc@plt>
  mov    %r15d,%edi
  mov    %rax,0x10(%rsp)
  call   <malloc@plt>
  test   %r13d,%r13d
  mov    0x10(%rsp),%r8
  mov    0x28(%rsp),%r9
  movsd  0x30(%rsp),%xmm4
  mov    0x38(%rsp),%r10d
  mov    %rax,%r15
  pxor   %xmm3,%xmm3
  jle    L169
  mov    %r13d,%edx
  mov    %r9,%rsi
  mov    %rbx,%rcx
  mov    %rbp,%r11
  movsd  0x48(%rsp),%xmm0
  lea    (%r9,%rdx,8),%rdi
  mov    %r9,%rax
  mov    %r9,%rdx
  neg    %rsi
  sub    %r9,%rcx
  sub    %r9,%r11
L349:
  movsd  (%rcx,%rdx,1),%xmm1
  ucomisd %xmm1,%xmm1
  jp     L332
  movsd  (%r11,%rdx,1),%xmm2
  ucomisd %xmm2,%xmm2
  jp     L332
  subsd  (%r14),%xmm1
  mulsd  %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  %xmm1,(%rdx)
L332:
  add    $0x8,%rdx
  cmp    %rdi,%rdx
  jne    L349
  mov    0x8(%rsp),%r11
  movq   D86(%rip),%xmm5
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm0
  lea    0x0(%rbp,%rsi,1),%rdx
  movq   $0x0,(%r11)
  mov    %r11,%rsi
  nopl   (%rax)
L302:
  movsd  (%rcx,%rax,1),%xmm1
  ucomisd %xmm1,%xmm1
  jp     L260
  movsd  (%rdx,%rax,1),%xmm1
  ucomisd %xmm1,%xmm1
  jp     L260
  movsd  (%rax),%xmm1
  comisd %xmm3,%xmm1
  ja     L131
  xorpd  %xmm5,%xmm1
L131:
  addsd  %xmm1,%xmm2
  movsd  %xmm2,(%rsi)
  movsd  (%rax),%xmm1
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
L260:
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L302
L125:
  divsd  %xmm4,%xmm0
  divsd  %xmm4,%xmm2
  ucomisd %xmm0,%xmm3
  ja     L51
  sqrtsd %xmm0,%xmm0
L179:
  mulsd  D15(%rip),%xmm0
  mov    0x8(%rsp),%rax
  divsd  %xmm0,%xmm2
  movsd  %xmm2,(%rax)
  test   %r10d,%r10d
  jle    L253
  mov    0x40(%rsp),%rdi
  lea    -0x2(%r13),%eax
  xor    %edx,%edx
  xor    %ecx,%ecx
  movsd  D17(%rip),%xmm2
  lea    0x8(%r9,%rax,8),%rsi
  sub    %r9,%rbx
  mov    %r9,%rax
  movsd  D87(%rip),%xmm5
  movq   D86(%rip),%xmm4
  sub    %r9,%rbp
  sub    %r9,%rdi
  nopl   0x0(%rax,%rax,1)
L191:
  movsd  (%rbx,%rax,1),%xmm0
  ucomisd %xmm0,%xmm0
  jp     L228
  movsd  0x8(%rbx,%rax,1),%xmm0
  ucomisd %xmm0,%xmm0
  jp     L228
  movsd  0x0(%rbp,%rax,1),%xmm0
  ucomisd %xmm0,%xmm0
  jp     L228
  movsd  0x8(%rbp,%rax,1),%xmm0
  ucomisd %xmm0,%xmm0
  jp     L228
  movsd  0x8(%rdi,%rax,1),%xmm0
  subsd  (%rdi,%rax,1),%xmm0
  comisd %xmm3,%xmm0
  ja     L88
  xorpd  %xmm4,%xmm0
L88:
  comisd (%rsp),%xmm0
  jbe    L132
  test   %ecx,%ecx
  jne    L339
  movsd  (%rax),%xmm1
  movslq %edx,%rcx
  add    $0x1,%edx
  mulsd  %xmm1,%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%r8,%rcx,8)
  movsd  %xmm5,(%r15,%rcx,8)
L339:
  xor    %ecx,%ecx
L132:
  movsd  (%rsp),%xmm7
  comisd %xmm0,%xmm7
  jb     L228
  movsd  0x8(%rax),%xmm0
  mulsd  (%rax),%xmm0
  movslq %edx,%rcx
  add    $0x1,%edx
  movsd  %xmm0,(%r8,%rcx,8)
  movsd  %xmm2,(%r15,%rcx,8)
  mov    $0x1,%ecx
L228:
  add    $0x8,%rax
  cmp    %rax,%rsi
  jne    L191
  test   %ecx,%ecx
  je     L267
  movq   $0x0,(%r12)
  test   %edx,%edx
  je     L93
L352:
  movq   D86(%rip),%xmm5
  mov    %r8,%rbx
  xor    %ebp,%ebp
  mov    %r9,%r13
  movapd %xmm3,%xmm4
  mov    %r8,%r14
  cs nopw 0x0(%rax,%rax,1)
L137:
  movsd  (%rbx),%xmm1
  comisd %xmm3,%xmm1
  movapd %xmm1,%xmm2
  ja     L336
  xorpd  %xmm5,%xmm2
L336:
  divsd  %xmm2,%xmm1
  ucomisd %xmm2,%xmm3
  ja     L201
  sqrtsd %xmm2,%xmm2
L66:
  mulsd  %xmm2,%xmm1
  mov    %r15,%rax
  add    $0x1,%ebp
  sub    %r14,%rax
  add    %rbx,%rax
  add    $0x8,%rbx
  mulsd  (%rax),%xmm1
  addsd  (%r12),%xmm1
  movsd  %xmm1,(%r12)
  addsd  (%rax),%xmm4
  cmp    %edx,%ebp
  jl     L137
  mov    %r13,%r9
  mov    %r14,%r8
  movapd %xmm1,%xmm0
L205:
  mov    0x8(%rsp),%rax
  movsd  0x18(%rsp),%xmm5
  mov    %r9,%rdi
  mov    %r8,(%rsp)
  divsd  %xmm4,%xmm0
  movsd  %xmm0,(%r12)
  mulsd  (%rax),%xmm0
  mov    0x20(%rsp),%rax
  mulsd  %xmm4,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,(%rax)
  mulsd  (%r12),%xmm4
  divsd  %xmm5,%xmm4
  movsd  %xmm4,(%r12)
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L289
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L267:
  movslq %edx,%rax
  add    $0x1,%edx
  shl    $0x3,%rax
  lea    (%r8,%rax,1),%rcx
  add    %r15,%rax
L333:
  movslq %r13d,%r13
  mov    D87(%rip),%rsi
  movsd  -0x8(%r9,%r13,8),%xmm0
  mulsd  %xmm0,%xmm0
  subsd  D17(%rip),%xmm0
  movsd  %xmm0,(%rcx)
  mov    %rsi,(%rax)
  movq   $0x0,(%r12)
  jmp    L352
  nopw   0x0(%rax,%rax,1)
L93:
  movapd %xmm3,%xmm0
  movapd %xmm3,%xmm4
  jmp    L205
  nopl   (%rax)
L169:
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm0
  jmp    L125
  nopl   (%rax)
L253:
  mov    %r15,%rax
  mov    %r8,%rcx
  mov    $0x1,%edx
  jmp    L333
L201:
  movapd %xmm2,%xmm0
  mov    %edx,0x28(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm1,(%rsp)
  call   <sqrt@plt>
  mov    0x28(%rsp),%edx
  movsd  0x10(%rsp),%xmm4
  pxor   %xmm3,%xmm3
  movq   D86(%rip),%xmm5
  movsd  (%rsp),%xmm1
  movapd %xmm0,%xmm2
  jmp    L66
L229:
  mov    %r10d,0x30(%rsp)
  movsd  %xmm4,0x28(%rsp)
  call   <sqrt@plt>
  mov    0x30(%rsp),%r10d
  movsd  0x28(%rsp),%xmm4
  jmp    L114
L51:
  mov    %r8,0x30(%rsp)
  mov    %r9,0x28(%rsp)
  mov    %r10d,0x10(%rsp)
  movsd  %xmm2,0x38(%rsp)
  call   <sqrt@plt>
  movsd  0x38(%rsp),%xmm2
  mov    0x30(%rsp),%r8
  pxor   %xmm3,%xmm3
  mov    0x28(%rsp),%r9
  mov    0x10(%rsp),%r10d
  jmp    L179
L289:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D17
type_infered: f64
name: parse_data
arguments: label: D86
type_infered: f32[4]
name: parse_data
arguments: label: D75
type_infered: f64[2]
name: parse_data
arguments: label: D15
type_infered: f64
name: parse_data
arguments: label: D87
type_infered: f64

tool: D17: 1

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

tool: {"D75": [0.00001,0.798]}

tool: D15: 0.798

tool: D87: 0.1

assistant: ```c
void getJstet(int ngood, double tmin, double wkmax, double *time, double *mag, double *sig, double *wtave, double *jst, double *kur, double *lst) {
  int i, j, flag = 0, npair = 0;
  double dt, wave = 0.0, sigma = 0.0, *ws, wtave1, delta, *delt, *pk, *wk, dumval, s = 0.0, weight;
  for (i = 0; i < ngood; i++) {
    if (!isnan(mag[i]) && !isnan(sig[i])) {
      sigma += 1.0 / (sig[i] * sig[i]);
      wave += mag[i] / (sig[i] * sig[i]);
    }
  }
  wave /= sigma;
  ws = (double *)malloc(2 * ngood * sizeof(double));
  for (i = 0; i < ngood; i++)
    ws[i] = 1.0;
  w_ave(ngood, mag, sig, ws, wtave);
  do {
    w_ave(ngood, mag, sig, ws, &wtave1);
    delta = ((*wtave - wtave1) > 0 ? (*wtave - wtave1) : -(*wtave - wtave1));
    *wtave = wtave1;
  } while (delta > 0.00001);
  free(ws);
  dumval = sqrt((double)ngood / (double)(ngood - 1));
  delt = (double *)malloc(2 * ngood * sizeof(double));
  pk = (double *)malloc(2 * ngood * sizeof(double));
  wk = (double *)malloc(2 * ngood * sizeof(double));
  for (j = 0; j < ngood; j++)
    if (!isnan(mag[j]) && !isnan(sig[j]))
      delt[j] = dumval * (mag[j] - *wtave) / sig[j];
  *kur = 0.0;
  for (j = 0; j < ngood; j++) {
    if (!isnan(mag[j]) && !isnan(sig[j])) {
      *kur += ((delt[j]) > 0 ? (delt[j]) : -(delt[j]));
      s += (delt[j] * delt[j]);
    }
  }
  *kur /= (double)ngood;
  s = 0.798 * sqrt(s / (double)ngood);
  *kur /= s;
  flag = 0;
  for (j = 0; j < ngood - 1; j++) {
    if (!isnan(mag[j]) && !isnan(mag[j + 1]) && !isnan(sig[j]) && !isnan(sig[j + 1])) {
      dt = ((time[j + 1] - time[j]) > 0 ? (time[j + 1] - time[j]) : -(time[j + 1] - time[j]));
      if (dt > tmin && !flag) {
        pk[npair] = (delt[j] * delt[j]) - 1.0;
        wk[npair] = 0.1;
        npair++;
        flag = 0;
      }
      if (dt > tmin && flag)
        flag = 0;
      if (dt <= tmin) {
        pk[npair] = delt[j + 1] * delt[j];
        wk[npair] = 1.0;
        npair++;
        flag = 1;
      }
    }
  }
  if (!flag) {
    pk[npair] = (delt[ngood - 1] * delt[ngood - 1]) - 1.0;
    wk[npair] = 0.1;
    npair++;
  }
  weight = 0.0;
  *jst = 0.0;
  for (j = 0; j < npair; j++) {
    s = pk[j] / ((pk[j]) > 0 ? (pk[j]) : -(pk[j])) * sqrt(((pk[j]) > 0 ? (pk[j]) : -(pk[j])));
    *jst += wk[j] * s;
    weight += wk[j];
  }
  *jst /= weight;
  *lst = (*jst) * (*kur) * weight / wkmax;
  *jst = (*jst) * weight / wkmax;
  free(delt);
  free(pk);
  free(wk);
}
```