user: Converte this assembly snippet into its equivalent C code:

```asm
<fast_expansion_sum>:
  endbr64
  mov    %rsi,%r9
  push   %r14
  movq   D7(%rip),%xmm4
  mov    %rcx,%rsi
  push   %r13
  movsd  (%r9),%xmm0
  push   %r12
  push   %rbp
  movapd %xmm0,%xmm2
  push   %rbx
  movsd  (%rcx),%xmm1
  xorpd  %xmm4,%xmm2
  comisd %xmm0,%xmm1
  seta   %cl
  comisd %xmm2,%xmm1
  seta   %al
  cmp    %al,%cl
  je     L113
  movapd %xmm1,%xmm0
  mov    $0x1,%r13d
  xor    %ebp,%ebp
  xor    %r11d,%r11d
  mov    $0x2,%ebx
  mov    $0x8,%r12d
  mov    $0x1,%ecx
L115:
  cmp    %edi,%r11d
  setl   %r10b
  cmp    %edx,%ecx
  setl   %al
  and    %al,%r10b
  je     L21
  movsd  (%r9,%rbp,1),%xmm3
  movsd  (%rsi,%r12,1),%xmm2
  comisd %xmm3,%xmm2
  movapd %xmm3,%xmm1
  xorpd  %xmm4,%xmm1
  seta   %bpl
  comisd %xmm1,%xmm2
  seta   %al
  cmp    %al,%bpl
  je     L35
  movapd %xmm2,%xmm1
  cmp    %ebx,%edx
  mov    %ebx,%ecx
  addsd  %xmm0,%xmm1
  setg   %r14b
  movapd %xmm1,%xmm3
  subsd  %xmm2,%xmm3
  subsd  %xmm3,%xmm0
L152:
  movsd  %xmm0,(%r8)
  test   %r10b,%r10b
  je     L38
  mov    $0x2,%eax
  movslq %ecx,%rbp
  movslq %r11d,%r12
  test   %r14b,%r14b
  jne    L111
  jmp    L38
L55:
  movapd %xmm2,%xmm0
  mov    %eax,%r10d
  add    $0x1,%ecx
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm5
  subsd  %xmm1,%xmm3
  subsd  %xmm3,%xmm5
  subsd  %xmm3,%xmm2
  subsd  %xmm5,%xmm1
  addsd  %xmm2,%xmm1
  movsd  %xmm1,-0x8(%r8,%rax,8)
  add    $0x1,%rax
  cmp    %r11d,%edi
  jle    L69
  cmp    %ecx,%edx
  jle    L69
  movslq %ecx,%rbp
L58:
  movapd %xmm0,%xmm1
L111:
  movsd  (%rsi,%rbp,8),%xmm2
  movsd  (%r9,%r12,8),%xmm3
  comisd %xmm3,%xmm2
  movapd %xmm3,%xmm0
  xorpd  %xmm4,%xmm0
  seta   %bl
  comisd %xmm0,%xmm2
  seta   %r10b
  cmp    %r10b,%bl
  jne    L55
  movapd %xmm3,%xmm0
  mov    %eax,%r10d
  add    $0x1,%r11d
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm5
  subsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm5
  subsd  %xmm2,%xmm3
  subsd  %xmm5,%xmm1
  addsd  %xmm3,%xmm1
  movsd  %xmm1,-0x8(%r8,%rax,8)
  add    $0x1,%rax
  cmp    %ecx,%edx
  jle    L69
  cmp    %r11d,%edi
  jle    L69
  movslq %r11d,%r12
  jmp    L58
L21:
  mov    %r8,%rbx
  mov    $0x1,%eax
  xor    %r10d,%r10d
L188:
  cmp    %r11d,%edi
  jle    L46
  movslq %r11d,%rax
  movslq %r10d,%rbx
  sub    %rax,%rbx
  lea    (%r8,%rbx,8),%rbx
  nopl   (%rax)
L108:
  movsd  (%r9,%rax,8),%xmm2
  movapd %xmm0,%xmm1
  addsd  %xmm2,%xmm0
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm4
  subsd  %xmm1,%xmm3
  subsd  %xmm3,%xmm4
  subsd  %xmm3,%xmm2
  subsd  %xmm4,%xmm1
  addsd  %xmm2,%xmm1
  movsd  %xmm1,(%rbx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%edi
  jg     L108
  add    %edi,%r10d
  sub    %r11d,%r10d
  movslq %r10d,%rax
  lea    (%r8,%rax,8),%rbx
  lea    0x1(%r10),%eax
L46:
  cmp    %ecx,%edx
  jle    L105
  movslq %ecx,%rax
  movslq %r10d,%rdi
  sub    %rax,%rdi
  lea    (%r8,%rdi,8),%rdi
  nopl   0x0(%rax)
L41:
  movsd  (%rsi,%rax,8),%xmm2
  movapd %xmm0,%xmm1
  addsd  %xmm2,%xmm0
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm4
  subsd  %xmm1,%xmm3
  subsd  %xmm3,%xmm4
  subsd  %xmm3,%xmm2
  subsd  %xmm4,%xmm1
  addsd  %xmm2,%xmm1
  movsd  %xmm1,(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L41
  sub    %ecx,%edx
  add    %r10d,%edx
  movslq %edx,%rax
  lea    (%r8,%rax,8),%rbx
  lea    0x1(%rdx),%eax
L105:
  movsd  %xmm0,(%rbx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L69:
  movslq %r10d,%rax
  lea    (%r8,%rax,8),%rbx
  lea    0x1(%r10),%eax
  jmp    L188
  nopl   0x0(%rax,%rax,1)
L113:
  mov    $0x2,%r13d
  mov    $0x1,%ebx
  xor    %r12d,%r12d
  xor    %ecx,%ecx
  mov    $0x8,%ebp
  mov    $0x1,%r11d
  jmp    L115
L35:
  movapd %xmm3,%xmm1
  cmp    %r13d,%edi
  mov    %r10d,%r14d
  mov    %r13d,%r11d
  addsd  %xmm0,%xmm1
  setg   %r10b
  movapd %xmm1,%xmm2
  subsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm0
  jmp    L152
L38:
  lea    0x8(%r8),%rbx
  movapd %xmm1,%xmm0
  mov    $0x2,%eax
  mov    $0x1,%r10d
  jmp    L188
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
type_guessed: byte[8]

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

assistant: ```c
int fast_expansion_sum(int elen, double *e, int flen, double *f, double *h) {
  double Q;
  double Qnew;
  double bvirt;
  double avirt, bround, around;
  int eindex, findex, hindex;
  eindex = findex = 0;
  if (((f[findex]) > (e[eindex])) == ((f[findex]) > -(e[eindex]))) {
    Q = (e[eindex]);
    ++eindex;
  } else {
    Q = (f[findex]);
    ++findex;
  }
  hindex = 0;
  if ((eindex < elen) && (findex < flen)) {
    if (((f[findex]) > (e[eindex])) == ((f[findex]) > -(e[eindex]))) {
      Qnew = (double)((e[eindex]) + Q);
      bvirt = Qnew - (e[eindex]);
      h[0] = Q - bvirt;
      ++eindex;
    } else {
      Qnew = (double)((f[findex]) + Q);
      bvirt = Qnew - (f[findex]);
      h[0] = Q - bvirt;
      ++findex;
    }
    Q = Qnew;
    hindex = 1;
    while ((eindex < elen) && (findex < flen)) {
      if (((f[findex]) > (e[eindex])) == ((f[findex]) > -(e[eindex]))) {
        Qnew = (double)(Q + (e[eindex]));
        bvirt = (double)(Qnew - Q);
        avirt = Qnew - bvirt;
        bround = (e[eindex]) - bvirt;
        around = Q - avirt;
        h[hindex] = around + bround;
        ++eindex;
      } else {
        Qnew = (double)(Q + (f[findex]));
        bvirt = (double)(Qnew - Q);
        avirt = Qnew - bvirt;
        bround = (f[findex]) - bvirt;
        around = Q - avirt;
        h[hindex] = around + bround;
        ++findex;
      }
      Q = Qnew;
      hindex++;
    }
  }
  while (eindex < elen) {
    Qnew = (double)(Q + (e[eindex]));
    bvirt = (double)(Qnew - Q);
    avirt = Qnew - bvirt;
    bround = (e[eindex]) - bvirt;
    around = Q - avirt;
    h[hindex] = around + bround;
    ++eindex;
    Q = Qnew;
    hindex++;
  }
  while (findex < flen) {
    Qnew = (double)(Q + (f[findex]));
    bvirt = (double)(Qnew - Q);
    avirt = Qnew - bvirt;
    bround = (f[findex]) - bvirt;
    around = Q - avirt;
    h[hindex] = around + bround;
    ++findex;
    Q = Qnew;
    hindex++;
  }
  h[hindex] = Q;
  return hindex + 1;
}
```