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

```asm
<ks_prob>:
  endbr64
  push   %r12
  movapd %xmm0,%xmm2
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x20,%rsp
  test   %edi,%edi
  jle    L8
L49:
  movsd  D157(%rip),%xmm4
  pxor   %xmm5,%xmm5
  pxor   %xmm3,%xmm3
  cvtsi2sd %ebx,%xmm5
  comisd %xmm2,%xmm4
  ja     L9
  comisd D159(%rip),%xmm2
  movsd  D44(%rip),%xmm3
  jbe    L99
L9:
  comisd %xmm1,%xmm4
  movsd  %xmm3,0x0(%rbp)
  pxor   %xmm2,%xmm2
  ja     L106
  comisd D159(%rip),%xmm1
  movsd  D44(%rip),%xmm2
  jbe    L102
L106:
  movsd  %xmm2,(%r12)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L8:
  lea    D168(%rip),%rdi
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm0,(%rsp)
  call   <printf@plt>
  lea    D104(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm2
  jmp    L49
  nopw   0x0(%rax,%rax,1)
L102:
  movsd  D50(%rip),%xmm2
  movsd  %xmm5,0x8(%rsp)
  mulsd  %xmm1,%xmm2
  mulsd  %xmm2,%xmm1
  movsd  %xmm2,(%rsp)
  movapd %xmm1,%xmm0
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm5
  movsd  (%rsp),%xmm2
  movapd %xmm0,%xmm3
  pxor   %xmm0,%xmm0
  xorpd  D79(%rip),%xmm2
  ucomisd %xmm5,%xmm0
  ja     L71
  sqrtsd %xmm5,%xmm5
  movapd %xmm5,%xmm0
L96:
  mulsd  D106(%rip),%xmm0
  movapd %xmm2,%xmm1
  movsd  D44(%rip),%xmm2
  divsd  %xmm0,%xmm1
  movapd %xmm2,%xmm0
  subsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  subsd  %xmm0,%xmm2
  movsd  %xmm2,(%r12)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L99:
  movsd  D50(%rip),%xmm3
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  mulsd  %xmm2,%xmm3
  mulsd  %xmm3,%xmm2
  movsd  %xmm3,(%rsp)
  movapd %xmm2,%xmm0
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm5
  movsd  (%rsp),%xmm3
  movapd %xmm0,%xmm6
  pxor   %xmm0,%xmm0
  mov    D157(%rip),%rax
  xorpd  D79(%rip),%xmm3
  ucomisd %xmm5,%xmm0
  movsd  0x10(%rsp),%xmm1
  movq   %rax,%xmm4
  ja     L27
  movapd %xmm5,%xmm0
  sqrtsd %xmm0,%xmm0
L32:
  mulsd  D106(%rip),%xmm0
  divsd  %xmm0,%xmm3
  movapd %xmm3,%xmm2
  movsd  D44(%rip),%xmm3
  movapd %xmm3,%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm6,%xmm0
  subsd  %xmm0,%xmm3
  jmp    L9
L71:
  movapd %xmm5,%xmm0
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm3,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  (%rsp),%xmm3
  jmp    L96
L27:
  movapd %xmm5,%xmm0
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  movsd  %xmm5,(%rsp)
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm1
  movsd  (%rsp),%xmm5
  mov    D157(%rip),%rax
  movsd  0x10(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm6
  movq   %rax,%xmm4
  jmp    L32
```

tool_calls: name: unpack_data
arguments: data_label: D157
type: byte[8]
name: unpack_data
arguments: data_label: D159
type: f64[2]
name: unpack_data
arguments: data_label: D44
type: f64
name: unpack_data
arguments: data_label: D168
type: string
name: unpack_data
arguments: data_label: D104
type: string
name: unpack_data
arguments: data_label: D50
type: f32[2]
name: unpack_data
arguments: data_label: D79
type: f32[4]
name: unpack_data
arguments: data_label: D106
type: f64

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

tool: {"D159": [3.5,-2.0]}

tool: D44: 1

tool: D168: Error in ks_prob: argument out of range


tool: D104: Program aborted



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

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

tool: D106: 3

assistant: ```c
void ks_prob(int n, double kp, double km, double *pp, double *pm) {
  double xn;
  if (n <= 0) {
    printf("Error in ks_prob: argument out of range\n");
    printf("Program aborted\n\n");
    exit(0);
  }
  xn = (double)n;
  if (kp < 1e-8)
    *pp = 0.0;
  else if (kp > 3.5)
    *pp = 1.0;
  else
    *pp = 1.0 - exp(-2.0 * kp * kp) * (1.0 - 2.0 * kp / (3.0 * sqrt(xn)));
  if (km < 1e-8)
    *pm = 0.0;
  else if (km > 3.5)
    *pm = 1.0;
  else
    *pm = 1.0 - exp(-2.0 * km * km) * (1.0 - 2.0 * km / (3.0 * sqrt(xn)));
}
```