void mp_mul_rcmul_nt_in1_add(int n, double *a, double *b, double *badd, int nc,
                             double *c) {
  int j, k, kk, ks, m;
  double wkr, wki, xr, xi, yr, yi, bjr, bji, bkr, bki;
  ks = (nc << 2) / n;
  kk = 0;
  m = n >> 1;
  for (j = 2; j < m; j += 2) {
    k = n - j;
    kk += ks;
    wkr = ((double)0.5) - c[nc - kk];
    wki = c[kk];
    xr = b[j] - b[k];
    xi = b[j + 1] + b[k + 1];
    yr = wkr * xr - wki * xi;
    yi = wkr * xi + wki * xr;
    xr = b[j] - yr;
    xi = b[j + 1] - yi;
    yr = b[k] + yr;
    yi = b[k + 1] - yi;
    bjr = badd[j] + (a[j] * xr - a[j + 1] * xi);
    bji = badd[j + 1] + (a[j] * xi + a[j + 1] * xr);
    bkr = badd[k] + (a[k] * yr - a[k + 1] * yi);
    bki = badd[k + 1] + (a[k] * yi + a[k + 1] * yr);
    xr = bjr - bkr;
    xi = bji + bki;
    yr = wkr * xr + wki * xi;
    yi = wkr * xi - wki * xr;
    badd[j] = bjr - yr;
    badd[j + 1] = bji - yi;
    badd[k] = bkr + yr;
    badd[k + 1] = bki - yi;
  }
  xr = a[m];
  xi = a[m + 1];
  yr = b[m];
  yi = b[m + 1];
  badd[m] += xr * yr - xi * yi;
  badd[m + 1] += xr * yi + xi * yr;
}


x86 assembly (clang, -O0):
<mp_mul_rcmul_nt_in1_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x18,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x2,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x44(%rbp)
movl   $0x2,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    14f3 <mp_mul_rcmul_nt_in1_add+0x3f3>
mov    -0x4(%rbp),%eax
sub    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x40(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xe8a(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x60(%rbp),%xmm3
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  -0x68(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x68(%rbp),%xmm3
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x70(%rbp),%xmm3
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  -0x78(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x78(%rbp),%xmm3
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  -0x70(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
subsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x80(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x34(%rbp)
jmp    1143 <mp_mul_rcmul_nt_in1_add+0x43>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
add    $0x18,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_mul_rcmul_nt_in1_add>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r10
mov    %edi,%ebx
sar    %ebx
movslq %ebx,%r11
cmp    $0x5,%edi
jle    12aa <mp_mul_rcmul_nt_in1_add+0x1aa>
lea    0x0(,%r8,4),%eax
cltd
idiv   %edi
mov    %edi,%edi
movslq %ebx,%r14
movslq %eax,%r15
movslq %r8d,%rax
lea    (%r9,%r15,8),%rdx
sub    %r15,%rax
shl    $0x3,%r15
lea    (%r9,%rax,8),%rbx
mov    %r15,%r8
neg    %r8
add    $0xfffffffffffffffe,%rdi
mov    $0x2,%eax
movsd  0xeab(%rip),%xmm8
movapd 0xeb2(%rip),%xmm9
xchg   %ax,%ax
movapd %xmm8,%xmm2
subsd  (%rbx),%xmm2
movupd (%r10,%rax,8),%xmm3
movupd (%r10,%rdi,8),%xmm5
movapd %xmm3,%xmm0
subpd  %xmm5,%xmm0
movapd %xmm3,%xmm7
addpd  %xmm5,%xmm7
movapd %xmm7,%xmm6
movsd  %xmm0,%xmm6
movsd  (%rdx),%xmm12
movapd %xmm12,%xmm10
xorpd  %xmm9,%xmm10
shufpd $0x1,%xmm12,%xmm7
movapd %xmm10,%xmm4
unpcklpd %xmm0,%xmm4
mulpd  %xmm7,%xmm4
unpcklpd %xmm2,%xmm2
mulpd  %xmm2,%xmm6
addpd  %xmm4,%xmm6
subpd  %xmm6,%xmm3
movapd %xmm5,%xmm4
addpd  %xmm6,%xmm4
subpd  %xmm6,%xmm5
movapd %xmm5,%xmm0
movsd  %xmm4,%xmm0
movsd  (%rsi,%rax,8),%xmm6
movsd  0x8(%rsi,%rax,8),%xmm7
movupd (%rcx,%rax,8),%xmm11
movapd %xmm3,%xmm1
shufpd $0x1,%xmm7,%xmm1
xorpd  %xmm9,%xmm7
unpcklpd %xmm3,%xmm7
mulpd  %xmm1,%xmm7
unpcklpd %xmm6,%xmm6
mulpd  %xmm3,%xmm6
addpd  %xmm7,%xmm6
addpd  %xmm11,%xmm6
movsd  (%rsi,%rdi,8),%xmm7
movsd  0x8(%rsi,%rdi,8),%xmm1
movapd %xmm1,%xmm3
xorpd  %xmm9,%xmm3
movupd (%rcx,%rdi,8),%xmm11
shufpd $0x1,%xmm4,%xmm5
unpcklpd %xmm1,%xmm3
mulpd  %xmm5,%xmm3
unpcklpd %xmm7,%xmm7
mulpd  %xmm0,%xmm7
addpd  %xmm3,%xmm7
addpd  %xmm11,%xmm7
movapd %xmm6,%xmm0
subpd  %xmm7,%xmm0
movapd %xmm6,%xmm1
addpd  %xmm7,%xmm1
movapd %xmm1,%xmm3
movsd  %xmm0,%xmm3
unpcklpd %xmm0,%xmm12
shufpd $0x1,%xmm10,%xmm1
mulpd  %xmm12,%xmm1
mulpd  %xmm2,%xmm3
addpd  %xmm1,%xmm3
subpd  %xmm3,%xmm6
movupd %xmm6,(%rcx,%rax,8)
movapd %xmm7,%xmm0
addpd  %xmm3,%xmm0
subpd  %xmm3,%xmm7
movsd  %xmm0,%xmm7
movupd %xmm7,(%rcx,%rdi,8)
add    $0x2,%rax
add    %r15,%rdx
add    %r8,%rbx
add    $0xfffffffffffffffe,%rdi
cmp    %r14,%rax
jl     1160 <mp_mul_rcmul_nt_in1_add+0x60>
jmp    12ad <mp_mul_rcmul_nt_in1_add+0x1ad>
mov    %r11,%r14
movsd  (%rsi,%r14,8),%xmm0
movsd  0x8(%rsi,%r11,8),%xmm1
movsd  (%r10,%r14,8),%xmm2
movsd  0x8(%r10,%r11,8),%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm4
subsd  %xmm3,%xmm4
addsd  (%rcx,%r14,8),%xmm4
movsd  %xmm4,(%rcx,%r14,8)
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  0x8(%rcx,%r11,8),%xmm0
movsd  %xmm0,0x8(%rcx,%r11,8)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @mp_mul_rcmul_nt_in1_add(i32 %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, i32 %4, double* nocapture %5) {
%7 = ashr i32 %0, 1
%8 = icmp sgt i32 %0, 5
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = sext i32 %7 to i64
br label %106
11: ; preds = %6
%12 = shl i32 %4, 2
%13 = sdiv i32 %12, %0
%14 = zext i32 %0 to i64
%15 = sext i32 %7 to i64
%16 = sext i32 %13 to i64
%17 = sext i32 %4 to i64
br label %18
18: ; preds = %11, %18
%19 = phi i64 [ 0, %11 ], [ %22, %18 ]
%20 = phi i64 [ 2, %11 ], [ %104, %18 ]
%21 = sub nsw i64 %14, %20
%22 = add nsw i64 %19, %16
%23 = sub nsw i64 %17, %22
%24 = getelementptr inbounds double, double* %5, i64 %23
%25 = load double, double* %24
%26 = fsub double 5.000000e-01, %25
%27 = getelementptr inbounds double, double* %5, i64 %22
%28 = load double, double* %27
%29 = getelementptr inbounds double, double* %2, i64 %20
%30 = getelementptr inbounds double, double* %2, i64 %21
%31 = or i64 %20, 1
%32 = bitcast double* %29 to <2 x double>*
%33 = load <2 x double>, <2 x double>* %32
%34 = add nsw i64 %21, 1
%35 = bitcast double* %30 to <2 x double>*
%36 = load <2 x double>, <2 x double>* %35
%37 = fsub <2 x double> %33, %36
%38 = fadd <2 x double> %33, %36
%39 = shufflevector <2 x double> %37, <2 x double> %38, <2 x i32> <i32 0, i32 3>
%40 = fneg double %28
%41 = extractelement <2 x double> %38, i64 1
%42 = insertelement <2 x double> poison, double %41, i64 0
%43 = insertelement <2 x double> %42, double %28, i64 1
%44 = insertelement <2 x double> poison, double %40, i64 0
%45 = shufflevector <2 x double> %44, <2 x double> %37, <2 x i32> <i32 0, i32 2>
%46 = fmul <2 x double> %43, %45
%47 = insertelement <2 x double> poison, double %26, i64 0
%48 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> zeroinitializer
%49 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %48, <2 x double> %39, <2 x double> %46)
%50 = fsub <2 x double> %33, %49
%51 = fadd <2 x double> %36, %49
%52 = fsub <2 x double> %36, %49
%53 = shufflevector <2 x double> %51, <2 x double> %52, <2 x i32> <i32 0, i32 3>
%54 = getelementptr inbounds double, double* %3, i64 %20
%55 = getelementptr inbounds double, double* %1, i64 %20
%56 = load double, double* %55
%57 = getelementptr inbounds double, double* %1, i64 %31
%58 = load double, double* %57
%59 = fneg double %58
%60 = bitcast double* %54 to <2 x double>*
%61 = load <2 x double>, <2 x double>* %60
%62 = extractelement <2 x double> %50, i64 1
%63 = insertelement <2 x double> poison, double %62, i64 0
%64 = insertelement <2 x double> %63, double %58, i64 1
%65 = insertelement <2 x double> poison, double %59, i64 0
%66 = shufflevector <2 x double> %65, <2 x double> %50, <2 x i32> <i32 0, i32 2>
%67 = fmul <2 x double> %64, %66
%68 = insertelement <2 x double> poison, double %56, i64 0
%69 = shufflevector <2 x double> %68, <2 x double> poison, <2 x i32> zeroinitializer
%70 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %69, <2 x double> %50, <2 x double> %67)
%71 = fadd <2 x double> %61, %70
%72 = getelementptr inbounds double, double* %3, i64 %21
%73 = getelementptr inbounds double, double* %1, i64 %21
%74 = load double, double* %73
%75 = getelementptr inbounds double, double* %1, i64 %34
%76 = load double, double* %75
%77 = fneg double %76
%78 = bitcast double* %72 to <2 x double>*
%79 = load <2 x double>, <2 x double>* %78
%80 = shufflevector <2 x double> %52, <2 x double> %51, <2 x i32> <i32 1, i32 2>
%81 = insertelement <2 x double> poison, double %77, i64 0
%82 = insertelement <2 x double> %81, double %76, i64 1
%83 = fmul <2 x double> %80, %82
%84 = insertelement <2 x double> poison, double %74, i64 0
%85 = shufflevector <2 x double> %84, <2 x double> poison, <2 x i32> zeroinitializer
%86 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %85, <2 x double> %53, <2 x double> %83)
%87 = fadd <2 x double> %79, %86
%88 = fsub <2 x double> %71, %87
%89 = fadd <2 x double> %71, %87
%90 = shufflevector <2 x double> %88, <2 x double> %89, <2 x i32> <i32 0, i32 3>
%91 = insertelement <2 x double> poison, double %28, i64 0
%92 = shufflevector <2 x double> %91, <2 x double> %88, <2 x i32> <i32 0, i32 2>
%93 = extractelement <2 x double> %89, i64 1
%94 = insertelement <2 x double> poison, double %93, i64 0
%95 = insertelement <2 x double> %94, double %40, i64 1
%96 = fmul <2 x double> %92, %95
%97 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %48, <2 x double> %90, <2 x double> %96)
%98 = fsub <2 x double> %71, %97
%99 = bitcast double* %54 to <2 x double>*
store <2 x double> %98, <2 x double>* %99
%100 = fadd <2 x double> %87, %97
%101 = fsub <2 x double> %87, %97
%102 = shufflevector <2 x double> %100, <2 x double> %101, <2 x i32> <i32 0, i32 3>
%103 = bitcast double* %72 to <2 x double>*
store <2 x double> %102, <2 x double>* %103
%104 = add nuw nsw i64 %20, 2
%105 = icmp slt i64 %104, %15
br i1 %105, label %18, label %106
106: ; preds = %18, %9
%107 = phi i64 [ %10, %9 ], [ %15, %18 ]
%108 = getelementptr inbounds double, double* %1, i64 %107
%109 = load double, double* %108
%110 = add nsw i32 %7, 1
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %1, i64 %111
%113 = load double, double* %112
%114 = getelementptr inbounds double, double* %2, i64 %107
%115 = load double, double* %114
%116 = getelementptr inbounds double, double* %2, i64 %111
%117 = load double, double* %116
%118 = fneg double %113
%119 = fmul double %117, %118
%120 = tail call double @llvm.fmuladd.f64(double %109, double %115, double %119)
%121 = getelementptr inbounds double, double* %3, i64 %107
%122 = load double, double* %121
%123 = fadd double %122, %120
store double %123, double* %121
%124 = fmul double %113, %115
%125 = tail call double @llvm.fmuladd.f64(double %109, double %117, double %124)
%126 = getelementptr inbounds double, double* %3, i64 %111
%127 = load double, double* %126
%128 = fadd double %125, %127
store double %128, double* %126
ret void
}