void corner_dlauum_nt_4x4_lib4(double *A, double *B, int alg, double *C,
                               double *D) {
  const int bs = 4;
  double a_0, a_1, a_2, a_3, b_0, b_1, b_2, b_3, d_00, d_10, d_11, d_20, d_21,
      d_22, d_30, d_31, d_32, d_33;
  a_0 = A[0 + bs * 0];
  b_0 = B[0 + bs * 0];
  d_00 = a_0 * b_0;
  a_0 = A[0 + bs * 1];
  a_1 = A[1 + bs * 1];
  b_0 = B[0 + bs * 1];
  b_1 = B[1 + bs * 1];
  d_00 += a_0 * b_0;
  d_10 = a_1 * b_0;
  d_11 = a_1 * b_1;
  a_0 = A[0 + bs * 2];
  a_1 = A[1 + bs * 2];
  a_2 = A[2 + bs * 2];
  b_0 = B[0 + bs * 2];
  b_1 = B[1 + bs * 2];
  b_2 = B[2 + bs * 2];
  d_00 += a_0 * b_0;
  d_10 += a_1 * b_0;
  d_11 += a_1 * b_1;
  d_20 = a_2 * b_0;
  d_21 = a_2 * b_1;
  d_22 = a_2 * b_2;
  a_0 = A[0 + bs * 3];
  a_1 = A[1 + bs * 3];
  a_2 = A[2 + bs * 3];
  a_3 = A[3 + bs * 3];
  b_0 = B[0 + bs * 3];
  b_1 = B[1 + bs * 3];
  b_2 = B[2 + bs * 3];
  b_3 = B[3 + bs * 3];
  d_00 += a_0 * b_0;
  d_10 += a_1 * b_0;
  d_11 += a_1 * b_1;
  d_20 += a_2 * b_0;
  d_21 += a_2 * b_1;
  d_22 += a_2 * b_2;
  d_30 = a_3 * b_0;
  d_31 = a_3 * b_1;
  d_32 = a_3 * b_2;
  d_33 = a_3 * b_3;
  if (alg != 0) {
    if (alg == 1) {
      d_00 = C[0 + bs * 0] + d_00;
      d_10 = C[1 + bs * 0] + d_10;
      d_11 = C[1 + bs * 1] + d_11;
      d_20 = C[2 + bs * 0] + d_20;
      d_21 = C[2 + bs * 1] + d_21;
      d_22 = C[2 + bs * 2] + d_22;
      d_30 = C[3 + bs * 0] + d_30;
      d_31 = C[3 + bs * 1] + d_31;
      d_32 = C[3 + bs * 2] + d_32;
      d_33 = C[3 + bs * 3] + d_33;
    } else {
      d_00 = C[0 + bs * 0] - d_00;
      d_10 = C[1 + bs * 0] - d_10;
      d_11 = C[1 + bs * 1] - d_11;
      d_20 = C[2 + bs * 0] - d_20;
      d_21 = C[2 + bs * 1] - d_21;
      d_22 = C[2 + bs * 2] - d_22;
      d_30 = C[3 + bs * 0] + d_30;
      d_31 = C[3 + bs * 1] + d_31;
      d_32 = C[3 + bs * 2] + d_32;
      d_33 = C[3 + bs * 3] + d_33;
    }
  }
  D[0 + bs * 0] = d_00;
  D[1 + bs * 0] = d_10;
  D[1 + bs * 1] = d_11;
  D[2 + bs * 0] = d_20;
  D[2 + bs * 1] = d_21;
  D[2 + bs * 2] = d_22;
  D[3 + bs * 0] = d_30;
  D[3 + bs * 1] = d_31;
  D[3 + bs * 2] = d_32;
  D[3 + bs * 3] = d_33;
}


x86 assembly (clang, -O0):
<corner_dlauum_nt_4x4_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x4,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
cmpl   $0x0,-0x14(%rbp)
je     1614 <corner_dlauum_nt_4x4_lib4+0x514>
cmpl   $0x1,-0x14(%rbp)
jne    1522 <corner_dlauum_nt_4x4_lib4+0x422>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x30(%rax),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x50(%rax),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x38(%rax),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x58(%rax),%xmm0
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x78(%rax),%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    160f <corner_dlauum_nt_4x4_lib4+0x50f>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x30(%rax),%xmm0
subsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x50(%rax),%xmm0
subsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x38(%rax),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x58(%rax),%xmm0
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x78(%rax),%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    1614 <corner_dlauum_nt_4x4_lib4+0x514>
movsd  -0x78(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x58(%rax)
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x78(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corner_dlauum_nt_4x4_lib4>:
movsd  (%rdi),%xmm0
movsd  0x28(%rdi),%xmm1
mulsd  (%rsi),%xmm0
movsd  0x20(%rsi),%xmm2
movsd  0x20(%rdi),%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm0,%xmm3
mulsd  %xmm1,%xmm2
unpcklpd %xmm2,%xmm3
mulsd  0x28(%rsi),%xmm1
movupd 0x40(%rdi),%xmm4
movsd  0x50(%rdi),%xmm0
movsd  0x48(%rsi),%xmm2
movsd  0x40(%rsi),%xmm6
movapd %xmm6,%xmm7
unpcklpd %xmm6,%xmm7
mulpd  %xmm4,%xmm7
addpd  %xmm3,%xmm7
unpckhpd %xmm4,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm2
unpcklpd %xmm2,%xmm4
unpcklpd %xmm0,%xmm0
movhpd 0x50(%rsi),%xmm6
mulpd  %xmm0,%xmm6
movupd 0x60(%rdi),%xmm0
movupd 0x70(%rsi),%xmm8
movupd 0x60(%rsi),%xmm5
movapd %xmm5,%xmm1
movapd %xmm5,%xmm2
unpcklpd %xmm8,%xmm2
movsd  0x78(%rdi),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm3,%xmm8
mulpd  %xmm5,%xmm3
unpcklpd %xmm5,%xmm5
mulpd  %xmm0,%xmm5
addpd  %xmm7,%xmm5
movsd  0x70(%rdi),%xmm7
shufpd $0x1,%xmm7,%xmm0
unpckhpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
addpd  %xmm4,%xmm1
unpcklpd %xmm7,%xmm7
mulpd  %xmm7,%xmm2
addpd  %xmm6,%xmm2
test   %edx,%edx
je     1240 <corner_dlauum_nt_4x4_lib4+0x140>
cmp    $0x1,%edx
jne    11f8 <corner_dlauum_nt_4x4_lib4+0xf8>
movupd (%rcx),%xmm0
addpd  %xmm0,%xmm5
movupd 0x28(%rcx),%xmm0
addpd  %xmm0,%xmm1
movsd  0x10(%rcx),%xmm0
movhpd 0x50(%rcx),%xmm0
addpd  %xmm0,%xmm2
jmp    1223 <corner_dlauum_nt_4x4_lib4+0x123>
movupd (%rcx),%xmm0
subpd  %xmm5,%xmm0
movupd 0x28(%rcx),%xmm4
subpd  %xmm1,%xmm4
movsd  0x10(%rcx),%xmm6
movhpd 0x50(%rcx),%xmm6
subpd  %xmm2,%xmm6
movapd %xmm0,%xmm5
movapd %xmm4,%xmm1
movapd %xmm6,%xmm2
movsd  0x18(%rcx),%xmm0
movsd  0x58(%rcx),%xmm4
movhpd 0x38(%rcx),%xmm0
movhpd 0x78(%rcx),%xmm4
addpd  %xmm4,%xmm8
addpd  %xmm0,%xmm3
movupd %xmm5,(%r8)
movapd %xmm2,%xmm0
unpcklpd %xmm3,%xmm0
movupd %xmm0,0x10(%r8)
movupd %xmm1,0x28(%r8)
shufpd $0x1,%xmm8,%xmm2
movupd %xmm2,0x50(%r8)
movhpd %xmm3,0x38(%r8)
movhpd %xmm8,0x78(%r8)
ret

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

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