user: 请从给定的汇编指令推导出C源代码:

```asm
<BlastKarlinLHtoK>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xe8,%rsp
  mov    %rdi,-0xc8(%rbp)
  mov    %esi,-0xcc(%rbp)
  mov    %edx,-0xd0(%rbp)
  movsd  %xmm0,-0xd8(%rbp)
  movsd  %xmm1,-0xe0(%rbp)
  movq   $0x0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0xd8(%rbp),%xmm0
  jae    L171
  pxor   %xmm0,%xmm0
  comisd -0xe0(%rbp),%xmm0
  jb     L284
L171:
  movsd  D38(%rip),%xmm0
  jmp    L4
L284:
  mov    -0xcc(%rbp),%eax
  mov    %eax,-0xa0(%rbp)
  mov    -0xd0(%rbp),%eax
  mov    %eax,-0x9c(%rbp)
  mov    -0x9c(%rbp),%eax
  sub    -0xa0(%rbp),%eax
  mov    %eax,-0x98(%rbp)
  movsd  -0xe0(%rbp),%xmm0
  divsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <exp@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  cmpl   $0xffffffff,-0xa0(%rbp)
  je     L206
  cmpl   $0x1,-0x9c(%rbp)
  jne    L327
L206:
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  D90(%rip),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x38(%rbp),%xmm1
  movsd  D90(%rip),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x90(%rbp),%xmm0
  jmp    L4
L327:
  movsd  D71(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x64,-0x94(%rbp)
  mov    -0x94(%rbp),%eax
  imul   -0x98(%rbp),%eax
  cmp    $0x10c8e0,%eax
  jle    L248
  movsd  D38(%rip),%xmm0
  jmp    L4
L248:
  mov    -0x94(%rbp),%eax
  imul   -0x98(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x48(%rbp)
  cmpq   $0x0,-0x48(%rbp)
  jne    L345
  movsd  D38(%rip),%xmm0
  jmp    L4
L345:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movl   $0x0,-0xac(%rbp)
  mov    -0xac(%rbp),%eax
  mov    %eax,-0xb0(%rbp)
  mov    -0xa0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xc8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  movsd  D90(%rip),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x48(%rbp),%rax
  movsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0xb4(%rbp)
  jmp    L260
L285:
  mov    -0x98(%rbp),%eax
  mov    %eax,-0xa4(%rbp)
  mov    -0xa4(%rbp),%eax
  mov    %eax,-0xa8(%rbp)
  mov    -0xa0(%rbp),%eax
  add    %eax,-0xb0(%rbp)
  mov    -0x9c(%rbp),%eax
  add    %eax,-0xac(%rbp)
  mov    -0xac(%rbp),%eax
  sub    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x68(%rbp)
  jmp    L188
L30:
  mov    -0xa8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0xa4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0xa8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x58(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  jmp    L257
L140:
  mov    -0x60(%rbp),%rax
  lea    -0x8(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  movsd  (%rax),%xmm1
  mov    -0x58(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
L257:
  mov    -0x60(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jae    L140
  cmpl   $0x0,-0xa8(%rbp)
  je     L220
  subl   $0x1,-0xa8(%rbp)
L220:
  mov    -0x68(%rbp),%rax
  sub    -0x48(%rbp),%rax
  sar    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x98(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  jg     L153
  subl   $0x1,-0xa4(%rbp)
L153:
  mov    -0x68(%rbp),%rax
  lea    -0x8(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L188:
  mov    -0x68(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jae    L30
  mov    -0xb0(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x50(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  mov    -0xb0(%rbp),%eax
  mov    %eax,-0xb8(%rbp)
  jmp    L334
L230:
  movsd  -0x50(%rbp),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  addq   $0x8,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x50(%rbp),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  addl   $0x1,-0xb8(%rbp)
L334:
  cmpl   $0x0,-0xb8(%rbp)
  jne    L230
  jmp    L164
L287:
  addq   $0x8,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  addl   $0x1,-0xb8(%rbp)
L164:
  mov    -0xb8(%rbp),%eax
  cmp    -0xac(%rbp),%eax
  jle    L287
  movsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  addl   $0x1,-0xb4(%rbp)
  mov    -0xb4(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x88(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movsd  -0x80(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
L260:
  mov    -0xb4(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jge    L298
  movsd  -0x88(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  ja     L285
L298:
  movsd  -0x78(%rbp),%xmm0
  divsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x30(%rbp),%xmm1
  movsd  D101(%rip),%xmm0
  movapd %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  D90(%rip),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x18(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L249
  movsd  D38(%rip),%xmm0
  movsd  %xmm0,-0x90(%rbp)
  jmp    L308
L249:
  movsd  -0x30(%rbp),%xmm1
  movsd  D71(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  jmp    L97
L22:
  movsd  -0x78(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  addl   $0x1,-0xb4(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0xb4(%rbp),%xmm1
  movsd  -0x78(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movsd  -0x80(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
L97:
  movsd  -0x88(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  ja     L22
  movl   $0x1,-0xb8(%rbp)
  mov    -0xa0(%rbp),%eax
  neg    %eax
  mov    %eax,-0xb4(%rbp)
  jmp    L192
L50:
  mov    -0xb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L58
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L45
L58:
  mov    -0xb8(%rbp),%edx
  mov    -0xb4(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <gcd@plt>
  mov    %eax,-0xb4(%rbp)
L45:
  addl   $0x1,-0xb8(%rbp)
L192:
  mov    -0xb8(%rbp),%eax
  cmp    -0x98(%rbp),%eax
  jg     L28
  cmpl   $0x1,-0xb4(%rbp)
  jg     L50
L28:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0xb4(%rbp),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  comisd D33(%rip),%xmm0
  jbe    L247
  mov    -0xb4(%rbp),%eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x50(%rbp)
  movsd  -0x80(%rbp),%xmm1
  movsd  D59(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <exp@plt>
  imul   -0xb4(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D90(%rip),%xmm1
  subsd  -0x50(%rbp),%xmm1
  mulsd  -0x40(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  jmp    L308
L247:
  mov    -0xb4(%rbp),%eax
  neg    %eax
  mov    %eax,%ebx
  movsd  -0x80(%rbp),%xmm1
  movsd  D59(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <exp@plt>
  imul   %ebx,%eax
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  movsd  %xmm3,-0xe8(%rbp)
  mov    -0xb4(%rbp),%eax
  neg    %eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0xd8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <exp@plt>
  sub    $0x1,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x40(%rbp),%xmm1
  movsd  -0xe8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
L308:
  cmpq   $0x0,-0x48(%rbp)
  je     L104
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L104:
  movsd  -0x90(%rbp),%xmm0
L4:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D38
data_type: f32[2]
name: extract_symbolic_data
arguments: tag: D90
data_type: f64
name: extract_symbolic_data
arguments: tag: D71
data_type: f64
name: extract_symbolic_data
arguments: tag: D101
data_type: f64
name: extract_symbolic_data
arguments: tag: D33
data_type: f64[2]
name: extract_symbolic_data
arguments: tag: D59
data_type: f32[2]

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

tool: D90: 1

tool: D71: 0.01

tool: D101: 0.001

tool: {"D33": [0.05,-2.0]}

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

assistant: ```c
double BlastKarlinLHtoK(double *sfp, int32_t min, int32_t max, double lambda, double H) {
  double *P0 = NULL;
  int32_t low;
  int32_t high;
  double K;
  double ratio;
  int32_t i, j;
  int32_t range, lo, hi, first, last;
  double sum;
  double Sum, av, oldsum, oldsum2;
  int32_t iter;
  double sumlimit;
  double *p, *ptrP, *ptr1, *ptr2, *ptr1e;
  double etolami, etolam;
  if (lambda <= 0. || H <= 0.) {
    return -1.;
  }
  low = min;
  high = max;
  range = high - low;
  av = H / lambda;
  etolam = exp((double)lambda);
  if (low == -1 || high == 1) {
    K = av;
    return K * (1.0 - 1. / etolam);
  }
  sumlimit = 0.01;
  iter = 100;
  if ((iter * range + 1) > (100 * ((1000) - (-10000)) + 1)) {
    return -1.;
  }
  P0 = (double *)malloc((iter * range + 1) * sizeof(*P0));
  if (P0 == NULL)
    return -1.;
  Sum = 0.;
  lo = hi = 0;
  p = &sfp[low];
  P0[0] = sum = oldsum = oldsum2 = 1.;
  for (j = 0; j < iter && sum > sumlimit; Sum += sum /= ++j) {
    first = last = range;
    lo += low;
    hi += high;
    for (ptrP = P0 + (hi - lo); ptrP >= P0; *ptrP-- = sum) {
      ptr1 = ptrP - first;
      ptr1e = ptrP - last;
      ptr2 = p + first;
      for (sum = 0.; ptr1 >= ptr1e;)
        sum += *ptr1-- * *ptr2++;
      if (first)
        --first;
      if (ptrP - P0 <= range)
        --last;
    }
    etolami = pow((double)etolam, lo - 1);
    for (sum = 0., i = lo; i != 0; ++i) {
      etolami *= etolam;
      sum += *++ptrP * etolami;
    }
    for (; i <= hi; ++i)
      sum += *++ptrP;
    oldsum2 = oldsum;
    oldsum = sum;
  }
  ratio = oldsum / oldsum2;
  if (ratio >= (1.0 - sumlimit * 0.001)) {
    K = -1.;
    goto CleanUp;
  }
  sumlimit *= 0.01;
  while (sum > sumlimit) {
    oldsum *= ratio;
    Sum += sum = oldsum / ++j;
  }
  for (i = 1, j = -low; i <= range && j > 1; ++i)
    if (p[i])
      j = gcd(j, i);
  if (j * etolam > 0.05) {
    etolami = pow((double)etolam, -j);
    K = j * exp((double)-2.0 * Sum) / (av * (1.0 - etolami));
  } else
    K = -j * exp((double)-2.0 * Sum) / (av * (exp(-j * (double)lambda) - 1));
CleanUp:
  if (P0 != NULL)
    free(P0);
  return K;
}
```