void corner_dtrinv_2x2_lib4(double *fact, double *C) {
  const int bs = 4;
  double c_00 = 0.0, c_10 = 0.0, c_11 = 0.0;
  c_00 = fact[0];
  c_11 = fact[2];
  C[0 + bs * 0] = c_00;
  C[1 + bs * 1] = c_11;
  c_10 = fact[1];
  c_10 = -c_11 * c_10 * c_00;
  C[0 + bs * 1] = c_10;
  return;
}


x86 assembly (clang, -O0):
<corner_dtrinv_2x2_lib4>:
push   %rbp
mov    %rsp,%rbp
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)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%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  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<corner_dtrinv_2x2_lib4>:
movsd  (%rdi),%xmm0
movsd  0x10(%rdi),%xmm1
movsd  %xmm0,(%rsi)
movsd  %xmm1,0x28(%rsi)
xorpd  0xee6(%rip),%xmm1
mulsd  0x8(%rdi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsi)
ret

LLVM IR (-O0):
define void @corner_dtrinv_2x2_lib4(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = 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
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
store double %11, double* %6
%12 = load double*, double** %3
%13 = getelementptr inbounds double, double* %12, i64 2
%14 = load double, double* %13
store double %14, double* %8
%15 = load double, double* %6
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i64 0
store double %15, double* %17
%18 = load double, double* %8
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i64 5
store double %18, double* %20
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
store double %23, double* %7
%24 = load double, double* %8
%25 = fneg double %24
%26 = load double, double* %7
%27 = fmul double %25, %26
%28 = load double, double* %6
%29 = fmul double %27, %28
store double %29, double* %7
%30 = load double, double* %7
%31 = load double*, double** %4
%32 = getelementptr inbounds double, double* %31, i64 4
store double %30, double* %32
ret void
}

LLVM IR (-O2):
define void @corner_dtrinv_2x2_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
store double %3, double* %1
%6 = getelementptr inbounds double, double* %1, i64 5
store double %5, double* %6
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = fneg double %5
%10 = fmul double %8, %9
%11 = fmul double %3, %10
%12 = getelementptr inbounds double, double* %1, i64 4
store double %11, double* %12
ret void
}