void corner_dtrinv_4x4_lib4(double *fact, double *C) {
  const int bs = 4;
  double c_00 = 0.0, c_10 = 0.0, c_11 = 0.0, c_20 = 0.0, c_21 = 0.0, c_22 = 0.0,
         c_30 = 0.0, c_31 = 0.0, c_32 = 0.0, c_33 = 0.0, d_20 = 0.0, d_21 = 0.0,
         d_30 = 0.0, d_31 = 0.0;
  c_00 = fact[0];
  c_11 = fact[2];
  c_22 = fact[5];
  c_33 = fact[9];
  C[0 + bs * 0] = c_00;
  C[1 + bs * 1] = c_11;
  C[2 + bs * 2] = c_22;
  C[3 + bs * 3] = c_33;
  c_10 = fact[1];
  c_32 = fact[8];
  c_10 = -c_11 * c_10 * c_00;
  c_32 = -c_33 * c_32 * c_22;
  C[0 + bs * 1] = c_10;
  C[2 + bs * 3] = c_32;
  c_21 = fact[4];
  c_31 = fact[7];
  c_20 = c_21 * c_10;
  c_30 = c_31 * c_10;
  c_21 = c_21 * c_11;
  c_31 = c_31 * c_11;
  c_20 += fact[3] * c_00;
  c_30 += fact[6] * c_00;
  d_20 = c_22 * c_20;
  d_30 = c_32 * c_20;
  d_21 = c_22 * c_21;
  d_31 = c_32 * c_21;
  d_30 += c_33 * c_30;
  d_31 += c_33 * c_31;
  C[0 + bs * 2] = -d_20;
  C[0 + bs * 3] = -d_30;
  C[1 + bs * 2] = -d_21;
  C[1 + bs * 3] = -d_31;
  return;
}


x86 assembly (clang, -O0):
<corner_dtrinv_4x4_lib4>:
push   %rbp
mov    %rsp,%rbp
push   %rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x78(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x70(%rax)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x68(%rax)
add    $0x8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corner_dtrinv_4x4_lib4>:
movsd  (%rdi),%xmm3
movsd  0x10(%rdi),%xmm4
movsd  0x28(%rdi),%xmm9
movsd  0x48(%rdi),%xmm0
movsd  %xmm3,(%rsi)
movsd  %xmm4,0x28(%rsi)
movsd  %xmm9,0x50(%rsi)
movsd  %xmm0,0x78(%rsi)
movapd 0xecf(%rip),%xmm8
movapd %xmm4,%xmm6
xorpd  %xmm8,%xmm6
mulsd  0x8(%rdi),%xmm6
mulsd  %xmm3,%xmm6
movapd %xmm0,%xmm5
xorpd  %xmm8,%xmm5
mulsd  0x40(%rdi),%xmm5
mulsd  %xmm9,%xmm5
movsd  %xmm6,0x20(%rsi)
movsd  %xmm5,0x70(%rsi)
movsd  0x20(%rdi),%xmm7
movsd  0x38(%rdi),%xmm2
movapd %xmm6,%xmm1
mulsd  %xmm7,%xmm1
mulsd  %xmm2,%xmm6
mulsd  %xmm4,%xmm7
mulsd  %xmm2,%xmm4
movsd  0x18(%rdi),%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
unpcklpd %xmm7,%xmm2
mulsd  0x30(%rdi),%xmm3
addsd  %xmm6,%xmm3
unpcklpd %xmm4,%xmm3
unpcklpd %xmm5,%xmm5
mulpd  %xmm2,%xmm5
unpcklpd %xmm0,%xmm0
mulpd  %xmm3,%xmm0
addpd  %xmm5,%xmm0
xorpd  %xmm8,%xmm9
pshufd $0x44,%xmm9,%xmm1
mulpd  %xmm2,%xmm1
movupd %xmm1,0x40(%rsi)
xorpd  %xmm8,%xmm0
movupd %xmm0,0x60(%rsi)
ret

LLVM IR (-O0):
define void @corner_dtrinv_4x4_lib4(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%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 double
%19 = alloca double
store double* %0, double** %3
store double* %1, double** %4
store i32 4, i32* %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
store double 0.000000e+00, double* %12
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
%20 = load double*, double** %3
%21 = getelementptr inbounds double, double* %20, i64 0
%22 = load double, double* %21
store double %22, double* %6
%23 = load double*, double** %3
%24 = getelementptr inbounds double, double* %23, i64 2
%25 = load double, double* %24
store double %25, double* %8
%26 = load double*, double** %3
%27 = getelementptr inbounds double, double* %26, i64 5
%28 = load double, double* %27
store double %28, double* %11
%29 = load double*, double** %3
%30 = getelementptr inbounds double, double* %29, i64 9
%31 = load double, double* %30
store double %31, double* %15
%32 = load double, double* %6
%33 = load double*, double** %4
%34 = getelementptr inbounds double, double* %33, i64 0
store double %32, double* %34
%35 = load double, double* %8
%36 = load double*, double** %4
%37 = getelementptr inbounds double, double* %36, i64 5
store double %35, double* %37
%38 = load double, double* %11
%39 = load double*, double** %4
%40 = getelementptr inbounds double, double* %39, i64 10
store double %38, double* %40
%41 = load double, double* %15
%42 = load double*, double** %4
%43 = getelementptr inbounds double, double* %42, i64 15
store double %41, double* %43
%44 = load double*, double** %3
%45 = getelementptr inbounds double, double* %44, i64 1
%46 = load double, double* %45
store double %46, double* %7
%47 = load double*, double** %3
%48 = getelementptr inbounds double, double* %47, i64 8
%49 = load double, double* %48
store double %49, double* %14
%50 = load double, double* %8
%51 = fneg double %50
%52 = load double, double* %7
%53 = fmul double %51, %52
%54 = load double, double* %6
%55 = fmul double %53, %54
store double %55, double* %7
%56 = load double, double* %15
%57 = fneg double %56
%58 = load double, double* %14
%59 = fmul double %57, %58
%60 = load double, double* %11
%61 = fmul double %59, %60
store double %61, double* %14
%62 = load double, double* %7
%63 = load double*, double** %4
%64 = getelementptr inbounds double, double* %63, i64 4
store double %62, double* %64
%65 = load double, double* %14
%66 = load double*, double** %4
%67 = getelementptr inbounds double, double* %66, i64 14
store double %65, double* %67
%68 = load double*, double** %3
%69 = getelementptr inbounds double, double* %68, i64 4
%70 = load double, double* %69
store double %70, double* %10
%71 = load double*, double** %3
%72 = getelementptr inbounds double, double* %71, i64 7
%73 = load double, double* %72
store double %73, double* %13
%74 = load double, double* %10
%75 = load double, double* %7
%76 = fmul double %74, %75
store double %76, double* %9
%77 = load double, double* %13
%78 = load double, double* %7
%79 = fmul double %77, %78
store double %79, double* %12
%80 = load double, double* %10
%81 = load double, double* %8
%82 = fmul double %80, %81
store double %82, double* %10
%83 = load double, double* %13
%84 = load double, double* %8
%85 = fmul double %83, %84
store double %85, double* %13
%86 = load double*, double** %3
%87 = getelementptr inbounds double, double* %86, i64 3
%88 = load double, double* %87
%89 = load double, double* %6
%90 = load double, double* %9
%91 = call double @llvm.fmuladd.f64(double %88, double %89, double %90)
store double %91, double* %9
%92 = load double*, double** %3
%93 = getelementptr inbounds double, double* %92, i64 6
%94 = load double, double* %93
%95 = load double, double* %6
%96 = load double, double* %12
%97 = call double @llvm.fmuladd.f64(double %94, double %95, double %96)
store double %97, double* %12
%98 = load double, double* %11
%99 = load double, double* %9
%100 = fmul double %98, %99
store double %100, double* %16
%101 = load double, double* %14
%102 = load double, double* %9
%103 = fmul double %101, %102
store double %103, double* %18
%104 = load double, double* %11
%105 = load double, double* %10
%106 = fmul double %104, %105
store double %106, double* %17
%107 = load double, double* %14
%108 = load double, double* %10
%109 = fmul double %107, %108
store double %109, double* %19
%110 = load double, double* %15
%111 = load double, double* %12
%112 = load double, double* %18
%113 = call double @llvm.fmuladd.f64(double %110, double %111, double %112)
store double %113, double* %18
%114 = load double, double* %15
%115 = load double, double* %13
%116 = load double, double* %19
%117 = call double @llvm.fmuladd.f64(double %114, double %115, double %116)
store double %117, double* %19
%118 = load double, double* %16
%119 = fneg double %118
%120 = load double*, double** %4
%121 = getelementptr inbounds double, double* %120, i64 8
store double %119, double* %121
%122 = load double, double* %18
%123 = fneg double %122
%124 = load double*, double** %4
%125 = getelementptr inbounds double, double* %124, i64 12
store double %123, double* %125
%126 = load double, double* %17
%127 = fneg double %126
%128 = load double*, double** %4
%129 = getelementptr inbounds double, double* %128, i64 9
store double %127, double* %129
%130 = load double, double* %19
%131 = fneg double %130
%132 = load double*, double** %4
%133 = getelementptr inbounds double, double* %132, i64 13
store double %131, double* %133
ret void
}

LLVM IR (-O2):
define void @corner_dtrinv_4x4_lib4(double* nocapture %0, double* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = getelementptr inbounds double, double* %0, i64 2
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %0, i64 5
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %0, i64 9
%9 = load double, double* %8
store double %3, double* %1
%10 = getelementptr inbounds double, double* %1, i64 5
store double %5, double* %10
%11 = getelementptr inbounds double, double* %1, i64 10
store double %7, double* %11
%12 = getelementptr inbounds double, double* %1, i64 15
store double %9, double* %12
%13 = getelementptr inbounds double, double* %0, i64 1
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %0, i64 8
%16 = load double, double* %15
%17 = fneg double %5
%18 = fmul double %14, %17
%19 = fmul double %3, %18
%20 = fneg double %9
%21 = fmul double %16, %20
%22 = fmul double %7, %21
%23 = getelementptr inbounds double, double* %1, i64 4
store double %19, double* %23
%24 = getelementptr inbounds double, double* %1, i64 14
store double %22, double* %24
%25 = getelementptr inbounds double, double* %0, i64 4
%26 = load double, double* %25
%27 = getelementptr inbounds double, double* %0, i64 7
%28 = load double, double* %27
%29 = fmul double %19, %26
%30 = fmul double %19, %28
%31 = fmul double %5, %26
%32 = fmul double %5, %28
%33 = getelementptr inbounds double, double* %0, i64 3
%34 = load double, double* %33
%35 = tail call double @llvm.fmuladd.f64(double %34, double %3, double %29)
%36 = getelementptr inbounds double, double* %0, i64 6
%37 = load double, double* %36
%38 = tail call double @llvm.fmuladd.f64(double %37, double %3, double %30)
%39 = insertelement <2 x double> poison, double %22, i64 0
%40 = shufflevector <2 x double> %39, <2 x double> poison, <2 x i32> zeroinitializer
%41 = insertelement <2 x double> poison, double %35, i64 0
%42 = insertelement <2 x double> %41, double %31, i64 1
%43 = fmul <2 x double> %40, %42
%44 = insertelement <2 x double> poison, double %9, i64 0
%45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
%46 = insertelement <2 x double> poison, double %38, i64 0
%47 = insertelement <2 x double> %46, double %32, i64 1
%48 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %45, <2 x double> %47, <2 x double> %43)
%49 = fneg double %7
%50 = getelementptr inbounds double, double* %1, i64 8
%51 = getelementptr inbounds double, double* %1, i64 12
%52 = insertelement <2 x double> poison, double %49, i64 0
%53 = shufflevector <2 x double> %52, <2 x double> poison, <2 x i32> zeroinitializer
%54 = fmul <2 x double> %42, %53
%55 = bitcast double* %50 to <2 x double>*
store <2 x double> %54, <2 x double>* %55
%56 = fneg <2 x double> %48
%57 = bitcast double* %51 to <2 x double>*
store <2 x double> %56, <2 x double>* %57
ret void
}