void mp_mul_rcmul(int n, double *a, double *b, int nc, double *c) {
  int j, k, kk, ks, m;
  double wkr, wki, xr, xi, yr, yi, ajr, aji, akr, aki, 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 = a[j] - a[k];
    xi = a[j + 1] + a[k + 1];
    yr = wkr * xr - wki * xi;
    yi = wkr * xi + wki * xr;
    ajr = a[j] - yr;
    aji = a[j + 1] - yi;
    akr = a[k] + yr;
    aki = a[k + 1] - yi;
    a[j] = ajr;
    a[j + 1] = aji;
    a[k] = akr;
    a[k + 1] = aki;
    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 = ajr * xr - aji * xi;
    bji = ajr * xi + aji * xr;
    bkr = akr * yr - aki * yi;
    bki = akr * yi + aki * yr;
    xr = bjr - bkr;
    xi = bji + bki;
    yr = wkr * xr + wki * xi;
    yi = wkr * xi - wki * xr;
    b[j] = bjr - yr;
    b[j + 1] = bji - yi;
    b[k] = bkr + yr;
    b[k + 1] = bki - yi;
  }
  xr = a[m];
  xi = a[m + 1];
  yr = b[m];
  yi = b[m + 1];
  b[m] = xr * yr - xi * yi;
  b[m + 1] = xr * yi + xi * yr;
}


x86 assembly (clang, -O0):
<mp_mul_rcmul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x3c(%rbp)
movl   $0x2,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    15c6 <mp_mul_rcmul+0x4c6>
mov    -0x4(%rbp),%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x38(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xe8f(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x50(%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,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x50(%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,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x80(%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,-0x98(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x68(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0x70(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x58(%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  -0x98(%rbp),%xmm0
ff
subsd  -0x68(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xa8(%rbp),%xmm0
ff
addsd  -0x68(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x2c(%rbp)
jmp    113e <mp_mul_rcmul+0x3e>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_mul_rcmul>:
push   %rbx
mov    %rdx,%r9
mov    %edi,%ebx
sar    %ebx
movslq %ebx,%r10
cmp    $0x5,%edi
jle    12f0 <mp_mul_rcmul+0x1f0>
lea    0x0(,%rcx,4),%eax
cltd
idiv   %edi
mov    %edi,%edi
movslq %ebx,%r11
cltq
movslq %ecx,%rdx
lea    (%r8,%rax,8),%rcx
sub    %rax,%rdx
shl    $0x3,%rax
lea    (%r8,%rdx,8),%rdx
mov    %rax,%r8
neg    %r8
add    $0xfffffffffffffffe,%rdi
mov    $0x2,%ebx
movsd  0xeb1(%rip),%xmm8
movapd 0xeb8(%rip),%xmm9
nopl   0x0(%rax,%rax,1)
movapd %xmm8,%xmm12
subsd  (%rdx),%xmm12
movupd (%rsi,%rbx,8),%xmm2
movupd (%rsi,%rdi,8),%xmm7
movapd %xmm2,%xmm0
subpd  %xmm7,%xmm0
movapd %xmm2,%xmm6
addpd  %xmm7,%xmm6
movapd %xmm6,%xmm1
movsd  %xmm0,%xmm1
movsd  (%rcx),%xmm11
movapd %xmm11,%xmm10
xorpd  %xmm9,%xmm10
shufpd $0x1,%xmm11,%xmm6
movapd %xmm10,%xmm5
unpcklpd %xmm0,%xmm5
mulpd  %xmm6,%xmm5
unpcklpd %xmm12,%xmm12
mulpd  %xmm12,%xmm1
addpd  %xmm5,%xmm1
subpd  %xmm1,%xmm2
movapd %xmm7,%xmm6
addpd  %xmm1,%xmm6
subpd  %xmm1,%xmm7
movapd %xmm7,%xmm0
movsd  %xmm6,%xmm0
movupd %xmm2,(%rsi,%rbx,8)
movupd %xmm0,(%rsi,%rdi,8)
movupd (%r9,%rbx,8),%xmm13
movupd (%r9,%rdi,8),%xmm0
movapd %xmm13,%xmm5
subpd  %xmm0,%xmm5
movapd %xmm13,%xmm4
addpd  %xmm0,%xmm4
movapd %xmm4,%xmm1
movsd  %xmm5,%xmm1
shufpd $0x1,%xmm11,%xmm4
movapd %xmm10,%xmm3
unpcklpd %xmm5,%xmm3
mulpd  %xmm4,%xmm3
mulpd  %xmm12,%xmm1
addpd  %xmm3,%xmm1
subpd  %xmm1,%xmm13
movapd %xmm0,%xmm3
addpd  %xmm1,%xmm3
subpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
movsd  %xmm3,%xmm1
movapd %xmm2,%xmm4
unpckhpd %xmm2,%xmm4
xorpd  %xmm9,%xmm4
movapd %xmm13,%xmm5
unpckhpd %xmm2,%xmm5
unpcklpd %xmm13,%xmm4
mulpd  %xmm5,%xmm4
unpcklpd %xmm2,%xmm2
mulpd  %xmm13,%xmm2
addpd  %xmm4,%xmm2
unpckhpd %xmm7,%xmm0
unpckhpd %xmm7,%xmm7
xorpd  %xmm9,%xmm7
unpcklpd %xmm3,%xmm7
mulpd  %xmm0,%xmm7
unpcklpd %xmm6,%xmm6
mulpd  %xmm1,%xmm6
addpd  %xmm7,%xmm6
movapd %xmm2,%xmm0
subpd  %xmm6,%xmm0
movapd %xmm2,%xmm1
addpd  %xmm6,%xmm1
movapd %xmm1,%xmm3
movsd  %xmm0,%xmm3
unpcklpd %xmm0,%xmm11
shufpd $0x1,%xmm10,%xmm1
mulpd  %xmm11,%xmm1
mulpd  %xmm12,%xmm3
addpd  %xmm1,%xmm3
subpd  %xmm3,%xmm2
movupd %xmm2,(%r9,%rbx,8)
movapd %xmm6,%xmm0
addpd  %xmm3,%xmm0
subpd  %xmm3,%xmm6
movsd  %xmm0,%xmm6
movupd %xmm6,(%r9,%rdi,8)
add    $0x2,%rbx
add    %rax,%rcx
add    %r8,%rdx
add    $0xfffffffffffffffe,%rdi
cmp    %r11,%rbx
jl     1160 <mp_mul_rcmul+0x60>
jmp    12f3 <mp_mul_rcmul+0x1f3>
mov    %r10,%r11
movsd  (%rsi,%r11,8),%xmm0
movsd  0x8(%rsi,%r10,8),%xmm1
movsd  (%r9,%r11,8),%xmm2
movsd  0x8(%r9,%r10,8),%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm4
subsd  %xmm3,%xmm4
movsd  %xmm4,(%r9,%r11,8)
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%r9,%r10,8)
pop    %rbx
ret

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

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