int fast_expansion_sum_zeroelim(int elen, double *e, int flen, double *f,
                                double *h) {
  double Q;
  volatile double Qnew;
  volatile double hh;
  volatile double bvirt;
  double avirt, bround, around;
  int eindex, findex, hindex;
  double enow, fnow;
  enow = e[0];
  fnow = f[0];
  eindex = findex = 0;
  if ((fnow > enow) == (fnow > -enow)) {
    Q = enow;
    enow = e[++eindex];
  } else {
    Q = fnow;
    fnow = f[++findex];
  }
  hindex = 0;
  if ((eindex < elen) && (findex < flen)) {
    if ((fnow > enow) == (fnow > -enow)) {
      Qnew = (double)(enow + Q);
      bvirt = Qnew - enow;
      hh = Q - bvirt;
      enow = e[++eindex];
    } else {
      Qnew = (double)(fnow + Q);
      bvirt = Qnew - fnow;
      hh = Q - bvirt;
      fnow = f[++findex];
    }
    Q = Qnew;
    if (hh != 0.0) {
      h[hindex++] = hh;
    }
    while ((eindex < elen) && (findex < flen)) {
      if ((fnow > enow) == (fnow > -enow)) {
        Qnew = (double)(Q + enow);
        bvirt = (double)(Qnew - Q);
        avirt = Qnew - bvirt;
        bround = enow - bvirt;
        around = Q - avirt;
        hh = around + bround;
        enow = e[++eindex];
      } else {
        Qnew = (double)(Q + fnow);
        bvirt = (double)(Qnew - Q);
        avirt = Qnew - bvirt;
        bround = fnow - bvirt;
        around = Q - avirt;
        hh = around + bround;
        fnow = f[++findex];
      }
      Q = Qnew;
      if (hh != 0.0) {
        h[hindex++] = hh;
      }
    }
  }
  while (eindex < elen) {
    Qnew = (double)(Q + enow);
    bvirt = (double)(Qnew - Q);
    avirt = Qnew - bvirt;
    bround = enow - bvirt;
    around = Q - avirt;
    hh = around + bround;
    enow = e[++eindex];
    Q = Qnew;
    if (hh != 0.0) {
      h[hindex++] = hh;
    }
  }
  while (findex < flen) {
    Qnew = (double)(Q + fnow);
    bvirt = (double)(Qnew - Q);
    avirt = Qnew - bvirt;
    bround = fnow - bvirt;
    around = Q - avirt;
    hh = around + bround;
    fnow = f[++findex];
    Q = Qnew;
    if (hh != 0.0) {
      h[hindex++] = hh;
    }
  }
  if ((Q != 0.0) || (hindex == 0)) {
    h[hindex++] = Q;
  }
  return hindex;
}


x86 assembly (clang, -O0):
<fast_expansion_sum_zeroelim>:
push   %rbp
mov    %rsp,%rbp
push   %rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x64(%rbp)
movsd  -0x80(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm1
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    11b0 <fast_expansion_sum_zeroelim+0xb0>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x64(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    11d4 <fast_expansion_sum_zeroelim+0xd4>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x68(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    14e6 <fast_expansion_sum_zeroelim+0x3e6>
mov    -0x68(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14e6 <fast_expansion_sum_zeroelim+0x3e6>
movsd  -0x80(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm1
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    128b <fast_expansion_sum_zeroelim+0x18b>
movsd  -0x78(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x64(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    12d6 <fast_expansion_sum_zeroelim+0x1d6>
movsd  -0x80(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x68(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12fd <fast_expansion_sum_zeroelim+0x1fd>
jp     12fd <fast_expansion_sum_zeroelim+0x1fd>
jmp    1319 <fast_expansion_sum_zeroelim+0x219>
movsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x6c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x6c(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    131e <fast_expansion_sum_zeroelim+0x21e>
mov    -0x64(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x81(%rbp)
jge    1341 <fast_expansion_sum_zeroelim+0x241>
mov    -0x68(%rbp),%eax
cmp    -0x14(%rbp),%eax
setl   %al
mov    %al,-0x81(%rbp)
mov    -0x81(%rbp),%al
test   $0x1,%al
jne    1354 <fast_expansion_sum_zeroelim+0x254>
jmp    14e1 <fast_expansion_sum_zeroelim+0x3e1>
movsd  -0x80(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm1
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    141d <fast_expansion_sum_zeroelim+0x31d>
movsd  -0x30(%rbp),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x64(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    1499 <fast_expansion_sum_zeroelim+0x399>
movsd  -0x30(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x68(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14c0 <fast_expansion_sum_zeroelim+0x3c0>
jp     14c0 <fast_expansion_sum_zeroelim+0x3c0>
jmp    14dc <fast_expansion_sum_zeroelim+0x3dc>
movsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x6c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x6c(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    131e <fast_expansion_sum_zeroelim+0x21e>
jmp    14e6 <fast_expansion_sum_zeroelim+0x3e6>
jmp    14eb <fast_expansion_sum_zeroelim+0x3eb>
mov    -0x64(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15bb <fast_expansion_sum_zeroelim+0x4bb>
movsd  -0x30(%rbp),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x64(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    159a <fast_expansion_sum_zeroelim+0x49a>
jp     159a <fast_expansion_sum_zeroelim+0x49a>
jmp    15b6 <fast_expansion_sum_zeroelim+0x4b6>
movsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x6c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x6c(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14eb <fast_expansion_sum_zeroelim+0x3eb>
jmp    15c0 <fast_expansion_sum_zeroelim+0x4c0>
mov    -0x68(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1690 <fast_expansion_sum_zeroelim+0x590>
movsd  -0x30(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x68(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    166f <fast_expansion_sum_zeroelim+0x56f>
jp     166f <fast_expansion_sum_zeroelim+0x56f>
jmp    168b <fast_expansion_sum_zeroelim+0x58b>
movsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x6c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x6c(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15c0 <fast_expansion_sum_zeroelim+0x4c0>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    16b2 <fast_expansion_sum_zeroelim+0x5b2>
jp     16b2 <fast_expansion_sum_zeroelim+0x5b2>
cmpl   $0x0,-0x6c(%rbp)
jne    16ce <fast_expansion_sum_zeroelim+0x5ce>
movsd  -0x30(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x6c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x6c(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_expansion_sum_zeroelim>:
push   %rbx
movsd  (%rsi),%xmm2
movsd  (%rcx),%xmm0
ucomisd %xmm2,%xmm0
setbe  %r9b
movapd 0xee7(%rip),%xmm1
xorpd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
cmp    %al,%r9b
je     113d <fast_expansion_sum_zeroelim+0x3d>
movapd %xmm2,%xmm1
movsd  0x8(%rsi),%xmm2
xor    %r9d,%r9d
mov    $0x1,%r10d
jmp    114f <fast_expansion_sum_zeroelim+0x4f>
movapd %xmm0,%xmm1
movsd  0x8(%rcx),%xmm0
mov    $0x1,%r9d
xor    %r10d,%r10d
xor    %eax,%eax
cmp    %edi,%r10d
jge    133b <fast_expansion_sum_zeroelim+0x23b>
cmp    %edx,%r9d
jge    133b <fast_expansion_sum_zeroelim+0x23b>
ucomisd %xmm2,%xmm0
setbe  %r11b
movapd 0xe8d(%rip),%xmm3
xorpd  %xmm2,%xmm3
ucomisd %xmm3,%xmm0
seta   %al
movapd %xmm1,%xmm3
cmp    %al,%r11b
je     11bc <fast_expansion_sum_zeroelim+0xbc>
addsd  %xmm2,%xmm3
movsd  %xmm3,-0x18(%rsp)
movsd  -0x18(%rsp),%xmm3
subsd  %xmm2,%xmm3
movsd  %xmm3,-0x10(%rsp)
subsd  -0x10(%rsp),%xmm1
movsd  %xmm1,-0x8(%rsp)
mov    %r10d,%eax
add    $0x1,%r10d
movsd  0x8(%rsi,%rax,8),%xmm2
jmp    11ef <fast_expansion_sum_zeroelim+0xef>
addsd  %xmm0,%xmm3
movsd  %xmm3,-0x18(%rsp)
movsd  -0x18(%rsp),%xmm3
subsd  %xmm0,%xmm3
movsd  %xmm3,-0x10(%rsp)
subsd  -0x10(%rsp),%xmm1
movsd  %xmm1,-0x8(%rsp)
mov    %r9d,%eax
add    $0x1,%r9d
movsd  0x8(%rcx,%rax,8),%xmm0
movsd  -0x18(%rsp),%xmm1
movsd  -0x8(%rsp),%xmm3
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm3
jne    1207 <fast_expansion_sum_zeroelim+0x107>
jnp    1221 <fast_expansion_sum_zeroelim+0x121>
movsd  -0x8(%rsp),%xmm3
movsd  %xmm3,(%r8)
mov    $0x1,%eax
cmp    %edi,%r10d
jl     122c <fast_expansion_sum_zeroelim+0x12c>
jmp    133b <fast_expansion_sum_zeroelim+0x23b>
xor    %eax,%eax
cmp    %edi,%r10d
jge    133b <fast_expansion_sum_zeroelim+0x23b>
cmp    %edx,%r9d
jge    133b <fast_expansion_sum_zeroelim+0x23b>
movapd 0xdc3(%rip),%xmm3
xorpd  %xmm4,%xmm4
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
ucomisd %xmm2,%xmm0
setbe  %r11b
movapd %xmm2,%xmm5
xorpd  %xmm3,%xmm5
ucomisd %xmm5,%xmm0
seta   %bl
movapd %xmm1,%xmm5
cmp    %bl,%r11b
je     12c0 <fast_expansion_sum_zeroelim+0x1c0>
addsd  %xmm2,%xmm5
movsd  %xmm5,-0x18(%rsp)
movsd  -0x18(%rsp),%xmm5
subsd  %xmm1,%xmm5
movsd  %xmm5,-0x10(%rsp)
movsd  -0x18(%rsp),%xmm5
subsd  -0x10(%rsp),%xmm5
subsd  -0x10(%rsp),%xmm2
subsd  %xmm5,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,-0x8(%rsp)
movslq %r10d,%rbx
add    $0x1,%r10d
movsd  0x8(%rsi,%rbx,8),%xmm2
jmp    1307 <fast_expansion_sum_zeroelim+0x207>
nopl   0x0(%rax)
addsd  %xmm0,%xmm5
movsd  %xmm5,-0x18(%rsp)
movsd  -0x18(%rsp),%xmm5
subsd  %xmm1,%xmm5
movsd  %xmm5,-0x10(%rsp)
movsd  -0x18(%rsp),%xmm5
subsd  -0x10(%rsp),%xmm5
subsd  -0x10(%rsp),%xmm0
subsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rsp)
movslq %r9d,%rbx
add    $0x1,%r9d
movsd  0x8(%rcx,%rbx,8),%xmm0
movsd  -0x18(%rsp),%xmm1
movsd  -0x8(%rsp),%xmm5
ucomisd %xmm4,%xmm5
jne    131b <fast_expansion_sum_zeroelim+0x21b>
jnp    132d <fast_expansion_sum_zeroelim+0x22d>
movsd  -0x8(%rsp),%xmm5
movslq %eax,%rbx
add    $0x1,%eax
movsd  %xmm5,(%r8,%rbx,8)
cmp    %edi,%r10d
jge    133b <fast_expansion_sum_zeroelim+0x23b>
cmp    %edx,%r9d
jl     1250 <fast_expansion_sum_zeroelim+0x150>
cmp    %edi,%r10d
jge    13c6 <fast_expansion_sum_zeroelim+0x2c6>
movslq %r10d,%r10
movslq %edi,%rdi
xorpd  %xmm3,%xmm3
jmp    1355 <fast_expansion_sum_zeroelim+0x255>
cmp    %r10,%rdi
je     13c6 <fast_expansion_sum_zeroelim+0x2c6>
movapd %xmm1,%xmm4
addsd  %xmm2,%xmm4
movsd  %xmm4,-0x18(%rsp)
movsd  -0x18(%rsp),%xmm4
subsd  %xmm1,%xmm4
movsd  %xmm4,-0x10(%rsp)
movsd  -0x18(%rsp),%xmm4
subsd  -0x10(%rsp),%xmm4
subsd  -0x10(%rsp),%xmm2
subsd  %xmm4,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,-0x8(%rsp)
movsd  0x8(%rsi,%r10,8),%xmm2
add    $0x1,%r10
movsd  -0x18(%rsp),%xmm1
movsd  -0x8(%rsp),%xmm4
ucomisd %xmm3,%xmm4
jne    13b2 <fast_expansion_sum_zeroelim+0x2b2>
jnp    1350 <fast_expansion_sum_zeroelim+0x250>
movsd  -0x8(%rsp),%xmm4
movslq %eax,%rbx
add    $0x1,%eax
movsd  %xmm4,(%r8,%rbx,8)
jmp    1350 <fast_expansion_sum_zeroelim+0x250>
cmp    %edx,%r9d
jge    1455 <fast_expansion_sum_zeroelim+0x355>
movslq %r9d,%rsi
movslq %edx,%rdx
xorpd  %xmm2,%xmm2
jmp    13e5 <fast_expansion_sum_zeroelim+0x2e5>
nopl   0x0(%rax,%rax,1)
cmp    %rsi,%rdx
je     1455 <fast_expansion_sum_zeroelim+0x355>
movapd %xmm1,%xmm3
addsd  %xmm0,%xmm3
movsd  %xmm3,-0x18(%rsp)
movsd  -0x18(%rsp),%xmm3
subsd  %xmm1,%xmm3
movsd  %xmm3,-0x10(%rsp)
movsd  -0x18(%rsp),%xmm3
subsd  -0x10(%rsp),%xmm3
subsd  -0x10(%rsp),%xmm0
subsd  %xmm3,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rsp)
movsd  0x8(%rcx,%rsi,8),%xmm0
add    $0x1,%rsi
movsd  -0x18(%rsp),%xmm1
movsd  -0x8(%rsp),%xmm3
ucomisd %xmm2,%xmm3
jne    1441 <fast_expansion_sum_zeroelim+0x341>
jnp    13e0 <fast_expansion_sum_zeroelim+0x2e0>
movsd  -0x8(%rsp),%xmm3
movslq %eax,%rdi
add    $0x1,%eax
movsd  %xmm3,(%r8,%rdi,8)
jmp    13e0 <fast_expansion_sum_zeroelim+0x2e0>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1467 <fast_expansion_sum_zeroelim+0x367>
jp     1467 <fast_expansion_sum_zeroelim+0x367>
test   %eax,%eax
je     1467 <fast_expansion_sum_zeroelim+0x367>
pop    %rbx
ret
movslq %eax,%rcx
add    $0x1,%eax
movsd  %xmm1,(%r8,%rcx,8)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fast_expansion_sum_zeroelim(i32 %0, double* %1, i32 %2, double* %3, double* %4) {
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double
%22 = alloca double
store i32 %0, i32* %6
store double* %1, double** %7
store i32 %2, i32* %8
store double* %3, double** %9
store double* %4, double** %10
%23 = load double*, double** %7
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
store double %25, double* %21
%26 = load double*, double** %9
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
store double %28, double* %22
store i32 0, i32* %19
store i32 0, i32* %18
%29 = load double, double* %22
%30 = load double, double* %21
%31 = fcmp ogt double %29, %30
%32 = zext i1 %31 to i32
%33 = load double, double* %22
%34 = load double, double* %21
%35 = fneg double %34
%36 = fcmp ogt double %33, %35
%37 = zext i1 %36 to i32
%38 = icmp eq i32 %32, %37
br i1 %38, label %39, label %47
39: ; preds = %5
%40 = load double, double* %21
store double %40, double* %11
%41 = load double*, double** %7
%42 = load i32, i32* %18
%43 = add nsw i32 %42, 1
store i32 %43, i32* %18
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %41, i64 %44
%46 = load double, double* %45
store double %46, double* %21
br label %55
47: ; preds = %5
%48 = load double, double* %22
store double %48, double* %11
%49 = load double*, double** %9
%50 = load i32, i32* %19
%51 = add nsw i32 %50, 1
store i32 %51, i32* %19
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %49, i64 %52
%54 = load double, double* %53
store double %54, double* %22
br label %55
55: ; preds = %47, %39
store i32 0, i32* %20
%56 = load i32, i32* %18
%57 = load i32, i32* %6
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %202
59: ; preds = %55
%60 = load i32, i32* %19
%61 = load i32, i32* %8
%62 = icmp slt i32 %60, %61
br i1 %62, label %63, label %202
63: ; preds = %59
%64 = load double, double* %22
%65 = load double, double* %21
%66 = fcmp ogt double %64, %65
%67 = zext i1 %66 to i32
%68 = load double, double* %22
%69 = load double, double* %21
%70 = fneg double %69
%71 = fcmp ogt double %68, %70
%72 = zext i1 %71 to i32
%73 = icmp eq i32 %67, %72
br i1 %73, label %74, label %90
74: ; preds = %63
%75 = load double, double* %21
%76 = load double, double* %11
%77 = fadd double %75, %76
store volatile double %77, double* %12
%78 = load volatile double, double* %12
%79 = load double, double* %21
%80 = fsub double %78, %79
store volatile double %80, double* %14
%81 = load double, double* %11
%82 = load volatile double, double* %14
%83 = fsub double %81, %82
store volatile double %83, double* %13
%84 = load double*, double** %7
%85 = load i32, i32* %18
%86 = add nsw i32 %85, 1
store i32 %86, i32* %18
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %84, i64 %87
%89 = load double, double* %88
store double %89, double* %21
br label %106
90: ; preds = %63
%91 = load double, double* %22
%92 = load double, double* %11
%93 = fadd double %91, %92
store volatile double %93, double* %12
%94 = load volatile double, double* %12
%95 = load double, double* %22
%96 = fsub double %94, %95
store volatile double %96, double* %14
%97 = load double, double* %11
%98 = load volatile double, double* %14
%99 = fsub double %97, %98
store volatile double %99, double* %13
%100 = load double*, double** %9
%101 = load i32, i32* %19
%102 = add nsw i32 %101, 1
store i32 %102, i32* %19
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %100, i64 %103
%105 = load double, double* %104
store double %105, double* %22
br label %106
106: ; preds = %90, %74
%107 = load volatile double, double* %12
store double %107, double* %11
%108 = load volatile double, double* %13
%109 = fcmp une double %108, 0.000000e+00
br i1 %109, label %110, label %117
110: ; preds = %106
%111 = load volatile double, double* %13
%112 = load double*, double** %10
%113 = load i32, i32* %20
%114 = add nsw i32 %113, 1
store i32 %114, i32* %20
%115 = sext i32 %113 to i64
%116 = getelementptr inbounds double, double* %112, i64 %115
store double %111, double* %116
br label %117
117: ; preds = %110, %106
br label %118
118: ; preds = %200, %117
%119 = load i32, i32* %18
%120 = load i32, i32* %6
%121 = icmp slt i32 %119, %120
br i1 %121, label %122, label %126
122: ; preds = %118
%123 = load i32, i32* %19
%124 = load i32, i32* %8
%125 = icmp slt i32 %123, %124
br label %126
126: ; preds = %122, %118
%127 = phi i1 [ false, %118 ], [ %125, %122 ]
br i1 %127, label %128, label %201
128: ; preds = %126
%129 = load double, double* %22
%130 = load double, double* %21
%131 = fcmp ogt double %129, %130
%132 = zext i1 %131 to i32
%133 = load double, double* %22
%134 = load double, double* %21
%135 = fneg double %134
%136 = fcmp ogt double %133, %135
%137 = zext i1 %136 to i32
%138 = icmp eq i32 %132, %137
br i1 %138, label %139, label %164
139: ; preds = %128
%140 = load double, double* %11
%141 = load double, double* %21
%142 = fadd double %140, %141
store volatile double %142, double* %12
%143 = load volatile double, double* %12
%144 = load double, double* %11
%145 = fsub double %143, %144
store volatile double %145, double* %14
%146 = load volatile double, double* %12
%147 = load volatile double, double* %14
%148 = fsub double %146, %147
store double %148, double* %15
%149 = load double, double* %21
%150 = load volatile double, double* %14
%151 = fsub double %149, %150
store double %151, double* %16
%152 = load double, double* %11
%153 = load double, double* %15
%154 = fsub double %152, %153
store double %154, double* %17
%155 = load double, double* %17
%156 = load double, double* %16
%157 = fadd double %155, %156
store volatile double %157, double* %13
%158 = load double*, double** %7
%159 = load i32, i32* %18
%160 = add nsw i32 %159, 1
store i32 %160, i32* %18
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %158, i64 %161
%163 = load double, double* %162
store double %163, double* %21
br label %189
164: ; preds = %128
%165 = load double, double* %11
%166 = load double, double* %22
%167 = fadd double %165, %166
store volatile double %167, double* %12
%168 = load volatile double, double* %12
%169 = load double, double* %11
%170 = fsub double %168, %169
store volatile double %170, double* %14
%171 = load volatile double, double* %12
%172 = load volatile double, double* %14
%173 = fsub double %171, %172
store double %173, double* %15
%174 = load double, double* %22
%175 = load volatile double, double* %14
%176 = fsub double %174, %175
store double %176, double* %16
%177 = load double, double* %11
%178 = load double, double* %15
%179 = fsub double %177, %178
store double %179, double* %17
%180 = load double, double* %17
%181 = load double, double* %16
%182 = fadd double %180, %181
store volatile double %182, double* %13
%183 = load double*, double** %9
%184 = load i32, i32* %19
%185 = add nsw i32 %184, 1
store i32 %185, i32* %19
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds double, double* %183, i64 %186
%188 = load double, double* %187
store double %188, double* %22
br label %189
189: ; preds = %164, %139
%190 = load volatile double, double* %12
store double %190, double* %11
%191 = load volatile double, double* %13
%192 = fcmp une double %191, 0.000000e+00
br i1 %192, label %193, label %200
193: ; preds = %189
%194 = load volatile double, double* %13
%195 = load double*, double** %10
%196 = load i32, i32* %20
%197 = add nsw i32 %196, 1
store i32 %197, i32* %20
%198 = sext i32 %196 to i64
%199 = getelementptr inbounds double, double* %195, i64 %198
store double %194, double* %199
br label %200
200: ; preds = %193, %189
br label %118
201: ; preds = %126
br label %202
202: ; preds = %201, %59, %55
br label %203
203: ; preds = %242, %202
%204 = load i32, i32* %18
%205 = load i32, i32* %6
%206 = icmp slt i32 %204, %205
br i1 %206, label %207, label %243
207: ; preds = %203
%208 = load double, double* %11
%209 = load double, double* %21
%210 = fadd double %208, %209
store volatile double %210, double* %12
%211 = load volatile double, double* %12
%212 = load double, double* %11
%213 = fsub double %211, %212
store volatile double %213, double* %14
%214 = load volatile double, double* %12
%215 = load volatile double, double* %14
%216 = fsub double %214, %215
store double %216, double* %15
%217 = load double, double* %21
%218 = load volatile double, double* %14
%219 = fsub double %217, %218
store double %219, double* %16
%220 = load double, double* %11
%221 = load double, double* %15
%222 = fsub double %220, %221
store double %222, double* %17
%223 = load double, double* %17
%224 = load double, double* %16
%225 = fadd double %223, %224
store volatile double %225, double* %13
%226 = load double*, double** %7
%227 = load i32, i32* %18
%228 = add nsw i32 %227, 1
store i32 %228, i32* %18
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %226, i64 %229
%231 = load double, double* %230
store double %231, double* %21
%232 = load volatile double, double* %12
store double %232, double* %11
%233 = load volatile double, double* %13
%234 = fcmp une double %233, 0.000000e+00
br i1 %234, label %235, label %242
235: ; preds = %207
%236 = load volatile double, double* %13
%237 = load double*, double** %10
%238 = load i32, i32* %20
%239 = add nsw i32 %238, 1
store i32 %239, i32* %20
%240 = sext i32 %238 to i64
%241 = getelementptr inbounds double, double* %237, i64 %240
store double %236, double* %241
br label %242
242: ; preds = %235, %207
br label %203
243: ; preds = %203
br label %244
244: ; preds = %283, %243
%245 = load i32, i32* %19
%246 = load i32, i32* %8
%247 = icmp slt i32 %245, %246
br i1 %247, label %248, label %284
248: ; preds = %244
%249 = load double, double* %11
%250 = load double, double* %22
%251 = fadd double %249, %250
store volatile double %251, double* %12
%252 = load volatile double, double* %12
%253 = load double, double* %11
%254 = fsub double %252, %253
store volatile double %254, double* %14
%255 = load volatile double, double* %12
%256 = load volatile double, double* %14
%257 = fsub double %255, %256
store double %257, double* %15
%258 = load double, double* %22
%259 = load volatile double, double* %14
%260 = fsub double %258, %259
store double %260, double* %16
%261 = load double, double* %11
%262 = load double, double* %15
%263 = fsub double %261, %262
store double %263, double* %17
%264 = load double, double* %17
%265 = load double, double* %16
%266 = fadd double %264, %265
store volatile double %266, double* %13
%267 = load double*, double** %9
%268 = load i32, i32* %19
%269 = add nsw i32 %268, 1
store i32 %269, i32* %19
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds double, double* %267, i64 %270
%272 = load double, double* %271
store double %272, double* %22
%273 = load volatile double, double* %12
store double %273, double* %11
%274 = load volatile double, double* %13
%275 = fcmp une double %274, 0.000000e+00
br i1 %275, label %276, label %283
276: ; preds = %248
%277 = load volatile double, double* %13
%278 = load double*, double** %10
%279 = load i32, i32* %20
%280 = add nsw i32 %279, 1
store i32 %280, i32* %20
%281 = sext i32 %279 to i64
%282 = getelementptr inbounds double, double* %278, i64 %281
store double %277, double* %282
br label %283
283: ; preds = %276, %248
br label %244
284: ; preds = %244
%285 = load double, double* %11
%286 = fcmp une double %285, 0.000000e+00
br i1 %286, label %290, label %287
287: ; preds = %284
%288 = load i32, i32* %20
%289 = icmp eq i32 %288, 0
br i1 %289, label %290, label %297
290: ; preds = %287, %284
%291 = load double, double* %11
%292 = load double*, double** %10
%293 = load i32, i32* %20
%294 = add nsw i32 %293, 1
store i32 %294, i32* %20
%295 = sext i32 %293 to i64
%296 = getelementptr inbounds double, double* %292, i64 %295
store double %291, double* %296
br label %297
297: ; preds = %290, %287
%298 = load i32, i32* %20
ret i32 %298
}

LLVM IR (-O2):
define i32 @fast_expansion_sum_zeroelim(i32 %0, double* nocapture %1, i32 %2, double* nocapture %3, double* nocapture writeonly %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = bitcast double* %6 to i8*
%10 = bitcast double* %7 to i8*
%11 = bitcast double* %8 to i8*
%12 = load double, double* %1
%13 = load double, double* %3
%14 = fcmp ule double %13, %12
%15 = fneg double %12
%16 = fcmp ogt double %13, %15
%17 = xor i1 %14, %16
br i1 %17, label %18, label %21
18: ; preds = %5
%19 = getelementptr inbounds double, double* %1, i64 1
%20 = load double, double* %19
br label %24
21: ; preds = %5
%22 = getelementptr inbounds double, double* %3, i64 1
%23 = load double, double* %22
br label %24
24: ; preds = %21, %18
%25 = phi double [ %12, %18 ], [ %13, %21 ]
%26 = phi i32 [ 1, %18 ], [ 0, %21 ]
%27 = phi i32 [ 0, %18 ], [ 1, %21 ]
%28 = phi double [ %20, %18 ], [ %12, %21 ]
%29 = phi double [ %13, %18 ], [ %23, %21 ]
%30 = icmp slt i32 %26, %0
%31 = icmp slt i32 %27, %2
%32 = and i1 %30, %31
br i1 %32, label %33, label %132
33: ; preds = %24
%34 = fcmp ule double %29, %28
%35 = fneg double %28
%36 = fcmp ogt double %29, %35
%37 = xor i1 %34, %36
br i1 %37, label %38, label %48
38: ; preds = %33
%39 = fadd double %25, %28
store volatile double %39, double* %6
%40 = load volatile double, double* %6
%41 = fsub double %40, %28
store volatile double %41, double* %8
%42 = load volatile double, double* %8
%43 = fsub double %25, %42
store volatile double %43, double* %7
%44 = add nuw nsw i32 %26, 1
%45 = zext i32 %44 to i64
%46 = getelementptr inbounds double, double* %1, i64 %45
%47 = load double, double* %46
br label %58
48: ; preds = %33
%49 = fadd double %25, %29
store volatile double %49, double* %6
%50 = load volatile double, double* %6
%51 = fsub double %50, %29
store volatile double %51, double* %8
%52 = load volatile double, double* %8
%53 = fsub double %25, %52
store volatile double %53, double* %7
%54 = add nuw nsw i32 %27, 1
%55 = zext i32 %54 to i64
%56 = getelementptr inbounds double, double* %3, i64 %55
%57 = load double, double* %56
br label %58
58: ; preds = %48, %38
%59 = phi i32 [ %44, %38 ], [ %26, %48 ]
%60 = phi i32 [ %27, %38 ], [ %54, %48 ]
%61 = phi double [ %47, %38 ], [ %28, %48 ]
%62 = phi double [ %29, %38 ], [ %57, %48 ]
%63 = load volatile double, double* %6
%64 = load volatile double, double* %7
%65 = fcmp une double %64, 0.000000e+00
br i1 %65, label %66, label %68
66: ; preds = %58
%67 = load volatile double, double* %7
store double %67, double* %4
br label %68
68: ; preds = %66, %58
%69 = phi i32 [ 1, %66 ], [ 0, %58 ]
%70 = icmp slt i32 %59, %0
%71 = icmp slt i32 %60, %2
%72 = select i1 %70, i1 %71, i1 false
br i1 %72, label %73, label %132
73: ; preds = %68, %127
%74 = phi double [ %118, %127 ], [ %62, %68 ]
%75 = phi double [ %117, %127 ], [ %61, %68 ]
%76 = phi i32 [ %128, %127 ], [ %69, %68 ]
%77 = phi i32 [ %116, %127 ], [ %60, %68 ]
%78 = phi i32 [ %115, %127 ], [ %59, %68 ]
%79 = phi double [ %119, %127 ], [ %63, %68 ]
%80 = fcmp ule double %74, %75
%81 = fneg double %75
%82 = fcmp ogt double %74, %81
%83 = xor i1 %80, %82
br i1 %83, label %84, label %99
84: ; preds = %73
%85 = fadd double %79, %75
store volatile double %85, double* %6
%86 = load volatile double, double* %6
%87 = fsub double %86, %79
store volatile double %87, double* %8
%88 = load volatile double, double* %6
%89 = load volatile double, double* %8
%90 = fsub double %88, %89
%91 = load volatile double, double* %8
%92 = fsub double %75, %91
%93 = fsub double %79, %90
%94 = fadd double %93, %92
store volatile double %94, double* %7
%95 = add nsw i32 %78, 1
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %1, i64 %96
%98 = load double, double* %97
br label %114
99: ; preds = %73
%100 = fadd double %79, %74
store volatile double %100, double* %6
%101 = load volatile double, double* %6
%102 = fsub double %101, %79
store volatile double %102, double* %8
%103 = load volatile double, double* %6
%104 = load volatile double, double* %8
%105 = fsub double %103, %104
%106 = load volatile double, double* %8
%107 = fsub double %74, %106
%108 = fsub double %79, %105
%109 = fadd double %108, %107
store volatile double %109, double* %7
%110 = add nsw i32 %77, 1
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %3, i64 %111
%113 = load double, double* %112
br label %114
114: ; preds = %99, %84
%115 = phi i32 [ %95, %84 ], [ %78, %99 ]
%116 = phi i32 [ %77, %84 ], [ %110, %99 ]
%117 = phi double [ %98, %84 ], [ %75, %99 ]
%118 = phi double [ %74, %84 ], [ %113, %99 ]
%119 = load volatile double, double* %6
%120 = load volatile double, double* %7
%121 = fcmp une double %120, 0.000000e+00
br i1 %121, label %122, label %127
122: ; preds = %114
%123 = load volatile double, double* %7
%124 = add nsw i32 %76, 1
%125 = sext i32 %76 to i64
%126 = getelementptr inbounds double, double* %4, i64 %125
store double %123, double* %126
br label %127
127: ; preds = %122, %114
%128 = phi i32 [ %124, %122 ], [ %76, %114 ]
%129 = icmp slt i32 %115, %0
%130 = icmp slt i32 %116, %2
%131 = select i1 %129, i1 %130, i1 false
br i1 %131, label %73, label %132
132: ; preds = %127, %68, %24
%133 = phi double [ %25, %24 ], [ %63, %68 ], [ %119, %127 ]
%134 = phi i32 [ %26, %24 ], [ %59, %68 ], [ %115, %127 ]
%135 = phi i32 [ %27, %24 ], [ %60, %68 ], [ %116, %127 ]
%136 = phi i32 [ 0, %24 ], [ %69, %68 ], [ %128, %127 ]
%137 = phi double [ %28, %24 ], [ %61, %68 ], [ %117, %127 ]
%138 = phi double [ %29, %24 ], [ %62, %68 ], [ %118, %127 ]
%139 = icmp slt i32 %134, %0
br i1 %139, label %140, label %143
140: ; preds = %132
%141 = sext i32 %134 to i64
%142 = sext i32 %0 to i64
br label %150
143: ; preds = %176, %132
%144 = phi double [ %133, %132 ], [ %168, %176 ]
%145 = phi i32 [ %136, %132 ], [ %177, %176 ]
%146 = icmp slt i32 %135, %2
br i1 %146, label %147, label %208
147: ; preds = %143
%148 = sext i32 %135 to i64
%149 = sext i32 %2 to i64
br label %179
150: ; preds = %140, %176
%151 = phi i64 [ %141, %140 ], [ %165, %176 ]
%152 = phi double [ %137, %140 ], [ %167, %176 ]
%153 = phi i32 [ %136, %140 ], [ %177, %176 ]
%154 = phi double [ %133, %140 ], [ %168, %176 ]
%155 = fadd double %154, %152
store volatile double %155, double* %6
%156 = load volatile double, double* %6
%157 = fsub double %156, %154
store volatile double %157, double* %8
%158 = load volatile double, double* %6
%159 = load volatile double, double* %8
%160 = fsub double %158, %159
%161 = load volatile double, double* %8
%162 = fsub double %152, %161
%163 = fsub double %154, %160
%164 = fadd double %163, %162
store volatile double %164, double* %7
%165 = add nsw i64 %151, 1
%166 = getelementptr inbounds double, double* %1, i64 %165
%167 = load double, double* %166
%168 = load volatile double, double* %6
%169 = load volatile double, double* %7
%170 = fcmp une double %169, 0.000000e+00
br i1 %170, label %171, label %176
171: ; preds = %150
%172 = load volatile double, double* %7
%173 = add nsw i32 %153, 1
%174 = sext i32 %153 to i64
%175 = getelementptr inbounds double, double* %4, i64 %174
store double %172, double* %175
br label %176
176: ; preds = %171, %150
%177 = phi i32 [ %173, %171 ], [ %153, %150 ]
%178 = icmp eq i64 %165, %142
br i1 %178, label %143, label %150
179: ; preds = %147, %205
%180 = phi i64 [ %148, %147 ], [ %194, %205 ]
%181 = phi double [ %138, %147 ], [ %196, %205 ]
%182 = phi i32 [ %145, %147 ], [ %206, %205 ]
%183 = phi double [ %144, %147 ], [ %197, %205 ]
%184 = fadd double %183, %181
store volatile double %184, double* %6
%185 = load volatile double, double* %6
%186 = fsub double %185, %183
store volatile double %186, double* %8
%187 = load volatile double, double* %6
%188 = load volatile double, double* %8
%189 = fsub double %187, %188
%190 = load volatile double, double* %8
%191 = fsub double %181, %190
%192 = fsub double %183, %189
%193 = fadd double %192, %191
store volatile double %193, double* %7
%194 = add nsw i64 %180, 1
%195 = getelementptr inbounds double, double* %3, i64 %194
%196 = load double, double* %195
%197 = load volatile double, double* %6
%198 = load volatile double, double* %7
%199 = fcmp une double %198, 0.000000e+00
br i1 %199, label %200, label %205
200: ; preds = %179
%201 = load volatile double, double* %7
%202 = add nsw i32 %182, 1
%203 = sext i32 %182 to i64
%204 = getelementptr inbounds double, double* %4, i64 %203
store double %201, double* %204
br label %205
205: ; preds = %200, %179
%206 = phi i32 [ %202, %200 ], [ %182, %179 ]
%207 = icmp eq i64 %194, %149
br i1 %207, label %208, label %179
208: ; preds = %205, %143
%209 = phi double [ %144, %143 ], [ %197, %205 ]
%210 = phi i32 [ %145, %143 ], [ %206, %205 ]
%211 = fcmp une double %209, 0.000000e+00
%212 = icmp eq i32 %210, 0
%213 = select i1 %211, i1 true, i1 %212
br i1 %213, label %214, label %218
214: ; preds = %208
%215 = add nsw i32 %210, 1
%216 = sext i32 %210 to i64
%217 = getelementptr inbounds double, double* %4, i64 %216
store double %209, double* %217
br label %218
218: ; preds = %208, %214
%219 = phi i32 [ %215, %214 ], [ %210, %208 ]
ret i32 %219
}