void scalar_minv_f(double s, double *scalar_f) {
  double xa11, xa12;
  double ya11, ya12;
  double s2, s3, s6;
  double dx, dy;
  s2 = s * s;
  s3 = s * s2;
  s6 = s3 * s3;
  dx = 4.0 * s6 - (3.0 * s2 - 2.0) * (3.0 * s2 - 2.0);
  dy = (((16.0 * s2 - 9.0) * s2 - 12.0) * s2 - 4.0);
  xa11 = 4.0 * s6 / dx;
  xa12 = -2.0 * s3 * (3.0 * s2 - 2.0) / dx;
  ya11 = 16.0 * s6 / dy;
  ya12 = -4.0 * s3 * (3.0 * s2 + 2.0) / dy;
  scalar_f[0] = xa11;
  scalar_f[1] = xa12;
  scalar_f[2] = ya11;
  scalar_f[3] = ya12;
}


x86 assembly (clang, -O0):
<scalar_minv_f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  0xeb4(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xec8(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  0xe97(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xeab(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe8c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xe62(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe76(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe59(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe24(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe2b(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe0c(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  0xdda(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdee(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xdcc(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xdad(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  0xd8b(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd87(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalar_minv_f>:
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xee8(%rip),%xmm3
addsd  %xmm1,%xmm3
movapd 0xf24(%rip),%xmm4
unpcklpd %xmm3,%xmm4
mulsd  %xmm3,%xmm3
movapd %xmm0,%xmm5
unpcklpd %xmm0,%xmm5
movapd 0xefc(%rip),%xmm6
movsd  %xmm0,%xmm6
mulpd  %xmm5,%xmm6
movsd  0xebc(%rip),%xmm5
mulsd  %xmm6,%xmm5
subsd  %xmm3,%xmm5
movsd  0xeb4(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xeb0(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xeac(%rip),%xmm3
mulsd  %xmm2,%xmm3
movsd  0xea8(%rip),%xmm2
addsd  %xmm2,%xmm3
mulpd  %xmm6,%xmm4
unpcklpd %xmm5,%xmm5
divpd  %xmm5,%xmm4
mulsd  %xmm2,%xmm0
addsd  0xe94(%rip),%xmm1
unpcklpd %xmm1,%xmm6
movapd 0xeb0(%rip),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  %xmm6,%xmm1
unpcklpd %xmm3,%xmm3
divpd  %xmm3,%xmm1
movupd %xmm4,(%rdi)
movupd %xmm1,0x10(%rdi)
ret

LLVM IR (-O0):
define void @scalar_minv_f(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %3
store double* %1, double** %4
%14 = load double, double* %3
%15 = load double, double* %3
%16 = fmul double %14, %15
store double %16, double* %9
%17 = load double, double* %3
%18 = load double, double* %9
%19 = fmul double %17, %18
store double %19, double* %10
%20 = load double, double* %10
%21 = load double, double* %10
%22 = fmul double %20, %21
store double %22, double* %11
%23 = load double, double* %11
%24 = load double, double* %9
%25 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %24, double -2.000000e+00)
%26 = load double, double* %9
%27 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %26, double -2.000000e+00)
%28 = fmul double %25, %27
%29 = fneg double %28
%30 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %23, double %29)
store double %30, double* %12
%31 = load double, double* %9
%32 = call double @llvm.fmuladd.f64(double 1.600000e+01, double %31, double -9.000000e+00)
%33 = load double, double* %9
%34 = call double @llvm.fmuladd.f64(double %32, double %33, double -1.200000e+01)
%35 = load double, double* %9
%36 = call double @llvm.fmuladd.f64(double %34, double %35, double -4.000000e+00)
store double %36, double* %13
%37 = load double, double* %11
%38 = fmul double 4.000000e+00, %37
%39 = load double, double* %12
%40 = fdiv double %38, %39
store double %40, double* %5
%41 = load double, double* %10
%42 = fmul double -2.000000e+00, %41
%43 = load double, double* %9
%44 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %43, double -2.000000e+00)
%45 = fmul double %42, %44
%46 = load double, double* %12
%47 = fdiv double %45, %46
store double %47, double* %6
%48 = load double, double* %11
%49 = fmul double 1.600000e+01, %48
%50 = load double, double* %13
%51 = fdiv double %49, %50
store double %51, double* %7
%52 = load double, double* %10
%53 = fmul double -4.000000e+00, %52
%54 = load double, double* %9
%55 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %54, double 2.000000e+00)
%56 = fmul double %53, %55
%57 = load double, double* %13
%58 = fdiv double %56, %57
store double %58, double* %8
%59 = load double, double* %5
%60 = load double*, double** %4
%61 = getelementptr inbounds double, double* %60, i64 0
store double %59, double* %61
%62 = load double, double* %6
%63 = load double*, double** %4
%64 = getelementptr inbounds double, double* %63, i64 1
store double %62, double* %64
%65 = load double, double* %7
%66 = load double*, double** %4
%67 = getelementptr inbounds double, double* %66, i64 2
store double %65, double* %67
%68 = load double, double* %8
%69 = load double*, double** %4
%70 = getelementptr inbounds double, double* %69, i64 3
store double %68, double* %70
ret void
}

LLVM IR (-O2):
define void @scalar_minv_f(double %0, double* nocapture writeonly %1) {
%3 = fmul double %0, %0
%4 = fmul double %3, %0
%5 = tail call double @llvm.fmuladd.f64(double %3, double 3.000000e+00, double -2.000000e+00)
%6 = fneg double %5
%7 = fmul double %5, %6
%8 = insertelement <2 x double> poison, double %4, i64 0
%9 = shufflevector <2 x double> %8, <2 x double> poison, <2 x i32> zeroinitializer
%10 = insertelement <2 x double> <double poison, double -2.000000e+00>, double %4, i64 0
%11 = fmul <2 x double> %9, %10
%12 = extractelement <2 x double> %11, i64 0
%13 = tail call double @llvm.fmuladd.f64(double %12, double 4.000000e+00, double %7)
%14 = tail call double @llvm.fmuladd.f64(double %3, double 1.600000e+01, double -9.000000e+00)
%15 = tail call double @llvm.fmuladd.f64(double %14, double %3, double -1.200000e+01)
%16 = tail call double @llvm.fmuladd.f64(double %15, double %3, double -4.000000e+00)
%17 = insertelement <2 x double> <double 4.000000e+00, double poison>, double %5, i64 1
%18 = fmul <2 x double> %17, %11
%19 = insertelement <2 x double> poison, double %13, i64 0
%20 = shufflevector <2 x double> %19, <2 x double> poison, <2 x i32> zeroinitializer
%21 = fdiv <2 x double> %18, %20
%22 = fmul double %4, -4.000000e+00
%23 = tail call double @llvm.fmuladd.f64(double %3, double 3.000000e+00, double 2.000000e+00)
%24 = insertelement <2 x double> %11, double %23, i64 1
%25 = insertelement <2 x double> <double 1.600000e+01, double poison>, double %22, i64 1
%26 = fmul <2 x double> %24, %25
%27 = insertelement <2 x double> poison, double %16, i64 0
%28 = shufflevector <2 x double> %27, <2 x double> poison, <2 x i32> zeroinitializer
%29 = fdiv <2 x double> %26, %28
%30 = bitcast double* %1 to <2 x double>*
store <2 x double> %21, <2 x double>* %30
%31 = getelementptr inbounds double, double* %1, i64 2
%32 = bitcast double* %31 to <2 x double>*
store <2 x double> %29, <2 x double>* %32
ret void
}