user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<linear_expansion_sum>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%r10
  mov    %edx,%r11d
  mov    %rcx,%r9
  movsd  (%rsi),%xmm5
  movsd  (%rcx),%xmm2
  comisd %xmm5,%xmm2
  seta   %dl
  movapd %xmm5,%xmm0
  xorpd  D22(%rip),%xmm0
  comisd %xmm0,%xmm2
  seta   %al
  cmp    %al,%dl
  je     L82
  movsd  0x8(%rcx),%xmm4
  mov    $0x1,%ecx
  mov    $0x0,%esi
L132:
  cmp    %edi,%esi
  jge    L8
  cmp    %r11d,%ecx
  jge    L119
  comisd %xmm5,%xmm4
  seta   %dl
  movapd %xmm5,%xmm0
  xorpd  D22(%rip),%xmm0
  comisd %xmm0,%xmm4
  seta   %al
  cmp    %al,%dl
  je     L119
L8:
  movapd %xmm4,%xmm0
  addsd  %xmm2,%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm2
  add    $0x1,%ecx
  movslq %ecx,%rax
  movsd  (%r9,%rax,8),%xmm4
L107:
  lea    (%rdi,%r11,1),%ebx
  cmp    $0x2,%ebx
  jle    L50
  mov    %r8,%rdx
  lea    -0x3(%rbx),%eax
  lea    0x8(%r8,%rax,8),%rax
  jmp    L102
L82:
  movapd %xmm2,%xmm4
  movapd %xmm5,%xmm2
  movsd  0x8(%rsi),%xmm5
  mov    $0x0,%ecx
  mov    $0x1,%esi
  jmp    L132
L119:
  movapd %xmm5,%xmm0
  addsd  %xmm2,%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm2
  add    $0x1,%esi
  movslq %esi,%rax
  movsd  (%r10,%rax,8),%xmm5
  jmp    L107
L50:
  movapd %xmm0,%xmm3
  mov    $0x0,%ebx
  jmp    L27
L17:
  movapd %xmm2,%xmm1
  addsd  %xmm4,%xmm1
  movapd %xmm1,%xmm3
  subsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm2
  movsd  %xmm2,(%rdx)
  add    $0x1,%ecx
  movslq %ecx,%rbp
  movsd  (%r9,%rbp,8),%xmm4
L10:
  movapd %xmm1,%xmm3
  addsd  %xmm0,%xmm3
  movapd %xmm3,%xmm2
  subsd  %xmm0,%xmm2
  movapd %xmm3,%xmm6
  subsd  %xmm2,%xmm6
  subsd  %xmm6,%xmm0
  subsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm2
  add    $0x8,%rdx
  cmp    %rdx,%rax
  je     L18
  movapd %xmm3,%xmm0
L102:
  cmp    %esi,%edi
  jle    L17
  cmp    %ecx,%r11d
  jle    L26
  comisd %xmm5,%xmm4
  seta   %r12b
  movapd %xmm5,%xmm1
  xorpd  D22(%rip),%xmm1
  comisd %xmm1,%xmm4
  seta   %bpl
  cmp    %bpl,%r12b
  jne    L17
L26:
  movapd %xmm2,%xmm1
  addsd  %xmm5,%xmm1
  movapd %xmm1,%xmm3
  subsd  %xmm5,%xmm3
  subsd  %xmm3,%xmm2
  movsd  %xmm2,(%rdx)
  add    $0x1,%esi
  movslq %esi,%rbp
  movsd  (%r10,%rbp,8),%xmm5
  jmp    L10
L18:
  sub    $0x2,%ebx
L27:
  movslq %ebx,%rax
  movsd  %xmm2,(%r8,%rax,8)
  movsd  %xmm3,0x8(%r8,%rax,8)
  lea    0x2(%rbx),%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: data_label: D22
type_infered: byte[16]

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

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;
}
```