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

```asm
<linear_expansion_sum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x18,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %edx,-0x78(%rbp)
  mov    %rcx,-0x88(%rbp)
  mov    %r8,-0x90(%rbp)
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x88(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x60(%rbp)
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  movsd  -0x30(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  seta   %al
  xor    $0x1,%eax
  mov    %eax,%edx
  movsd  -0x38(%rbp),%xmm0
  movq   D8(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm0
  comisd %xmm1,%xmm0
  seta   %al
  xor    %edx,%eax
  test   %al,%al
  je     L42
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x64(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  jmp    L77
L42:
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x60(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
L77:
  mov    -0x64(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jge    L53
  mov    -0x60(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jge    L65
  movsd  -0x30(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  seta   %al
  xor    $0x1,%eax
  mov    %eax,%edx
  movsd  -0x38(%rbp),%xmm0
  movq   D8(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm0
  comisd %xmm1,%xmm0
  seta   %al
  xor    %edx,%eax
  test   %al,%al
  je     L53
L65:
  movsd  -0x38(%rbp),%xmm0
  addsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  addl   $0x1,-0x64(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  jmp    L102
L53:
  movsd  -0x30(%rbp),%xmm0
  addsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  addl   $0x1,-0x60(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
L102:
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movl   $0x0,-0x5c(%rbp)
  jmp    L2
L73:
  mov    -0x64(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jge    L32
  mov    -0x60(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jge    L54
  movsd  -0x30(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  seta   %al
  xor    $0x1,%eax
  mov    %eax,%edx
  movsd  -0x38(%rbp),%xmm0
  movq   D8(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm0
  comisd %xmm1,%xmm0
  seta   %al
  xor    %edx,%eax
  test   %al,%al
  je     L32
L54:
  movsd  -0x38(%rbp),%xmm0
  addsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x50(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x64(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  jmp    L108
L32:
  movsd  -0x30(%rbp),%xmm0
  addsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x50(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x60(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
L108:
  movsd  -0x58(%rbp),%xmm0
  addsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x58(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  addl   $0x1,-0x5c(%rbp)
L2:
  mov    -0x74(%rbp),%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  sub    $0x2,%eax
  cmp    %eax,-0x5c(%rbp)
  jl     L73
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x5c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x5c(%rbp),%eax
  add    $0x2,%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D8
type: byte[8]

tool: {"D8": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
int linear_expansion_sum(elen, e, flen, f, h)
int elen;
double *e;
int flen;
double *f;
double *h;
{
  double Q, q;
  double Qnew;
  double R;
  double bvirt;
  double avirt, bround, around;
  int eindex, findex, hindex;
  double enow, fnow;
  double g0;
  enow = e[0];
  fnow = f[0];
  eindex = findex = 0;
  if ((fnow > enow) == (fnow > -enow)) {
    g0 = enow;
    enow = e[++eindex];
  } else {
    g0 = fnow;
    fnow = f[++findex];
  }
  if ((eindex < elen) && ((findex >= flen) || ((fnow > enow) == (fnow > -enow)))) {
    Qnew = (double)(enow + g0);
    bvirt = Qnew - enow;
    q = g0 - bvirt;
    enow = e[++eindex];
  } else {
    Qnew = (double)(fnow + g0);
    bvirt = Qnew - fnow;
    q = g0 - bvirt;
    fnow = f[++findex];
  }
  Q = Qnew;
  for (hindex = 0; hindex < elen + flen - 2; hindex++) {
    if ((eindex < elen) && ((findex >= flen) || ((fnow > enow) == (fnow > -enow)))) {
      R = (double)(enow + q);
      bvirt = R - enow;
      h[hindex] = q - bvirt;
      enow = e[++eindex];
    } else {
      R = (double)(fnow + q);
      bvirt = R - fnow;
      h[hindex] = q - bvirt;
      fnow = f[++findex];
    }
    Qnew = (double)(Q + R);
    bvirt = (double)(Qnew - Q);
    avirt = Qnew - bvirt;
    bround = R - bvirt;
    around = Q - avirt;
    q = around + bround;
    Q = Qnew;
  }
  h[hindex] = q;
  h[hindex + 1] = Q;
  return hindex + 2;
}
```