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

```asm
<c_single_scat>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x78,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %edi,-0x3c(%rbp)
  mov    %esi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  movsd  %xmm1,-0x60(%rbp)
  movsd  %xmm2,-0x68(%rbp)
  movsd  %xmm3,-0x70(%rbp)
  movsd  %xmm4,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movq   D66(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  divsd  -0x68(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  movsd  -0x60(%rbp),%xmm0
  addsd  -0x68(%rbp),%xmm0
  movq   D16(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L66
  mov    $0x1,%ebx
  jmp    L27
L10:
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  add    $0x1,%ebx
L27:
  cmp    %ebx,-0x3c(%rbp)
  jg     L10
  movsd  -0x68(%rbp),%xmm1
  movsd  D4(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x78(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  movsd  -0x70(%rbp),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  -0x28(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  jmp    L78
L66:
  movsd  -0x60(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L31
  mov    -0x3c(%rbp),%ebx
  jmp    L79
L26:
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x70(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x60(%rbp),%xmm1
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  divsd  -0x68(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movq   D66(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  add    $0x1,%ebx
L79:
  cmp    -0x40(%rbp),%ebx
  jle    L26
  jmp    L21
L31:
  mov    -0x3c(%rbp),%ebx
  jmp    L40
L48:
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x70(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x60(%rbp),%xmm1
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  divsd  -0x68(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movq   D66(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movslq %ebx,%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  sub    $0x1,%ebx
L40:
  test   %ebx,%ebx
  jg     L48
L21:
  movsd  -0x60(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x68(%rbp),%xmm1
  movsd  D15(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D4(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x78(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
L78:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D66
datatype: f32[2]
name: disassemble_data
arguments: tag: D16
datatype: qword
name: disassemble_data
arguments: tag: D4
datatype: byte[8]
name: disassemble_data
arguments: tag: D15
datatype: f64

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

tool: D16: 9223372036854775807

tool: {"D4": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x29,0x40]}

tool: D15: 1

assistant: ```c
double c_single_scat(double dither, int layru, int nlyr, double *phase, double *omega, double *tau, double umu, double umu0, double utau, double fbeam) {
  register int lyr;
  double ans, exp0, exp1;
  ans = 0.;
  exp0 = exp(-utau / umu0);
  if (fabs(umu + umu0) <= dither) {
    for (lyr = 1; lyr <= layru - 1; lyr++) {
      ans += omega[lyr - 1] * phase[lyr - 1] * (tau[lyr] - tau[lyr - 1]);
    }
    ans = fbeam / (4. * 3.14159265358979323846 * umu0) * exp0 * (ans + omega[layru - 1] * phase[layru - 1] * (utau - tau[layru - 1]));
    return ans;
  }
  if (umu > 0.) {
    for (lyr = layru; lyr <= nlyr; lyr++) {
      exp1 = exp(-((tau[lyr] - utau) / umu + tau[lyr] / umu0));
      ans += omega[lyr - 1] * phase[lyr - 1] * (exp0 - exp1);
      exp0 = exp1;
    }
  } else {
    for (lyr = layru; lyr >= 1; lyr--) {
      exp1 = exp(-((tau[lyr - 1] - utau) / umu + tau[lyr - 1] / umu0));
      ans += omega[lyr - 1] * phase[lyr - 1] * (exp0 - exp1);
      exp0 = exp1;
    }
  }
  ans *= fbeam / (4. * 3.14159265358979323846 * (1. + umu / umu0));
  return ans;
}
```