void corner_dtrmm_nt_u_4x2_lib4(double *A, double *B, double *C) {
  const int bs = 4;
  const int lda = bs;
  const int ldc = 4;
  double a_0, a_1, a_2, a_3, b_0, b_1, b_2, b_3,
      c_00 = 0, c_01 = 0, c_10 = 0, c_11 = 0, c_20 = 0, c_21 = 0, c_30 = 0,
      c_31 = 0;
  a_0 = A[0 + lda * 0];
  a_1 = A[1 + lda * 0];
  a_2 = A[2 + lda * 0];
  a_3 = A[3 + lda * 0];
  b_0 = B[0 + lda * 0];
  c_00 += a_0 * b_0;
  c_10 += a_1 * b_0;
  c_20 += a_2 * b_0;
  c_30 += a_3 * b_0;
  a_0 = A[0 + lda * 1];
  a_1 = A[1 + lda * 1];
  a_2 = A[2 + lda * 1];
  a_3 = A[3 + lda * 1];
  b_0 = B[0 + lda * 1];
  b_1 = B[1 + lda * 1];
  c_00 += a_0 * b_0;
  c_10 += a_1 * b_0;
  c_20 += a_2 * b_0;
  c_30 += a_3 * b_0;
  c_01 += a_0 * b_1;
  c_11 += a_1 * b_1;
  c_21 += a_2 * b_1;
  c_31 += a_3 * b_1;
  C[0 + ldc * 0] = c_00;
  C[1 + ldc * 0] = c_10;
  C[2 + ldc * 0] = c_20;
  C[3 + ldc * 0] = c_30;
  C[0 + ldc * 1] = c_01;
  C[1 + ldc * 1] = c_11;
  C[2 + ldc * 1] = c_21;
  C[3 + ldc * 1] = c_31;
}


x86 assembly (clang, -O0):
<corner_dtrmm_nt_u_4x2_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x28,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x4,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
movl   $0x4,-0x24(%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
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x38(%rax)
add    $0x28,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corner_dtrmm_nt_u_4x2_lib4>:
movsd  (%rsi),%xmm3
movsd  0x20(%rsi),%xmm1
movsd  0x28(%rsi),%xmm0
unpcklpd %xmm3,%xmm3
movupd (%rdi),%xmm4
movupd 0x10(%rdi),%xmm5
movupd 0x20(%rdi),%xmm2
movupd 0x30(%rdi),%xmm6
mulpd  %xmm3,%xmm4
xorpd  %xmm7,%xmm7
addpd  %xmm7,%xmm4
mulpd  %xmm3,%xmm5
addpd  %xmm7,%xmm5
unpcklpd %xmm1,%xmm1
movapd %xmm2,%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm4,%xmm3
mulpd  %xmm6,%xmm1
addpd  %xmm5,%xmm1
unpcklpd %xmm0,%xmm0
mulpd  %xmm0,%xmm2
addpd  %xmm7,%xmm2
mulpd  %xmm6,%xmm0
addpd  %xmm7,%xmm0
movupd %xmm3,(%rdx)
movupd %xmm1,0x10(%rdx)
movupd %xmm2,0x20(%rdx)
movupd %xmm0,0x30(%rdx)
ret

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

LLVM IR (-O2):
define void @corner_dtrmm_nt_u_4x2_lib4(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = bitcast double* %0 to <2 x double>*
%5 = load <2 x double>, <2 x double>* %4
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = bitcast double* %6 to <2 x double>*
%8 = load <2 x double>, <2 x double>* %7
%9 = load double, double* %1
%10 = insertelement <2 x double> poison, double %9, i64 0
%11 = shufflevector <2 x double> %10, <2 x double> poison, <2 x i32> zeroinitializer
%12 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %5, <2 x double> %11, <2 x double> zeroinitializer)
%13 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %8, <2 x double> %11, <2 x double> zeroinitializer)
%14 = getelementptr inbounds double, double* %0, i64 4
%15 = bitcast double* %14 to <2 x double>*
%16 = load <2 x double>, <2 x double>* %15
%17 = getelementptr inbounds double, double* %0, i64 6
%18 = bitcast double* %17 to <2 x double>*
%19 = load <2 x double>, <2 x double>* %18
%20 = getelementptr inbounds double, double* %1, i64 4
%21 = load double, double* %20
%22 = getelementptr inbounds double, double* %1, i64 5
%23 = load double, double* %22
%24 = insertelement <2 x double> poison, double %21, i64 0
%25 = shufflevector <2 x double> %24, <2 x double> poison, <2 x i32> zeroinitializer
%26 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %16, <2 x double> %25, <2 x double> %12)
%27 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %19, <2 x double> %25, <2 x double> %13)
%28 = insertelement <2 x double> poison, double %23, i64 0
%29 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> zeroinitializer
%30 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %16, <2 x double> %29, <2 x double> zeroinitializer)
%31 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %19, <2 x double> %29, <2 x double> zeroinitializer)
%32 = bitcast double* %2 to <2 x double>*
store <2 x double> %26, <2 x double>* %32
%33 = getelementptr inbounds double, double* %2, i64 2
%34 = bitcast double* %33 to <2 x double>*
store <2 x double> %27, <2 x double>* %34
%35 = getelementptr inbounds double, double* %2, i64 4
%36 = bitcast double* %35 to <2 x double>*
store <2 x double> %30, <2 x double>* %36
%37 = getelementptr inbounds double, double* %2, i64 6
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> %31, <2 x double>* %38
ret void
}