void transform44d3d(double *m1, double *m2, double *m3) {
  register double m2r0 = m2[0];
  register double m2r1 = m2[1];
  register double m2r2 = m2[2];
  m3[0] = (float)(m1[0] * m2r0 + m1[1] * m2r1 + m1[2] * m2r2 + m1[3]);
  m3[1] = (float)(m1[4] * m2r0 + m1[5] * m2r1 + m1[6] * m2r2 + m1[7]);
  m3[2] = (float)(m1[8] * m2r0 + m1[9] * m2r1 + m1[10] * m2r2 + m1[11]);
}


x86 assembly (clang, -O0):
<transform44d3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
addsd  0x38(%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
addsd  0x58(%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transform44d3d>:
movsd  (%rsi),%xmm1
movsd  0x8(%rsi),%xmm2
movsd  0x10(%rsi),%xmm0
movsd  0x8(%rdi),%xmm3
mulsd  %xmm2,%xmm3
movsd  (%rdi),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  0x10(%rdi),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm4,%xmm3
addsd  0x18(%rdi),%xmm3
cvtsd2ss %xmm3,%xmm3
cvtss2sd %xmm3,%xmm3
movsd  %xmm3,(%rdx)
movsd  0x28(%rdi),%xmm3
mulsd  %xmm2,%xmm3
movsd  0x20(%rdi),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  0x30(%rdi),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm4,%xmm3
addsd  0x38(%rdi),%xmm3
cvtsd2ss %xmm3,%xmm3
cvtss2sd %xmm3,%xmm3
movsd  %xmm3,0x8(%rdx)
mulsd  0x48(%rdi),%xmm2
mulsd  0x40(%rdi),%xmm1
mulsd  0x50(%rdi),%xmm0
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  0x58(%rdi),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rdx)
ret

LLVM IR (-O0):
define void @transform44d3d(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
store double %12, double* %7
%13 = load double*, double** %5
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
store double %15, double* %8
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 2
%18 = load double, double* %17
store double %18, double* %9
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i64 0
%21 = load double, double* %20
%22 = load double, double* %7
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
%25 = load double, double* %24
%26 = load double, double* %8
%27 = fmul double %25, %26
%28 = call double @llvm.fmuladd.f64(double %21, double %22, double %27)
%29 = load double*, double** %4
%30 = getelementptr inbounds double, double* %29, i64 2
%31 = load double, double* %30
%32 = load double, double* %9
%33 = call double @llvm.fmuladd.f64(double %31, double %32, double %28)
%34 = load double*, double** %4
%35 = getelementptr inbounds double, double* %34, i64 3
%36 = load double, double* %35
%37 = fadd double %33, %36
%38 = fptrunc double %37 to float
%39 = fpext float %38 to double
%40 = load double*, double** %6
%41 = getelementptr inbounds double, double* %40, i64 0
store double %39, double* %41
%42 = load double*, double** %4
%43 = getelementptr inbounds double, double* %42, i64 4
%44 = load double, double* %43
%45 = load double, double* %7
%46 = load double*, double** %4
%47 = getelementptr inbounds double, double* %46, i64 5
%48 = load double, double* %47
%49 = load double, double* %8
%50 = fmul double %48, %49
%51 = call double @llvm.fmuladd.f64(double %44, double %45, double %50)
%52 = load double*, double** %4
%53 = getelementptr inbounds double, double* %52, i64 6
%54 = load double, double* %53
%55 = load double, double* %9
%56 = call double @llvm.fmuladd.f64(double %54, double %55, double %51)
%57 = load double*, double** %4
%58 = getelementptr inbounds double, double* %57, i64 7
%59 = load double, double* %58
%60 = fadd double %56, %59
%61 = fptrunc double %60 to float
%62 = fpext float %61 to double
%63 = load double*, double** %6
%64 = getelementptr inbounds double, double* %63, i64 1
store double %62, double* %64
%65 = load double*, double** %4
%66 = getelementptr inbounds double, double* %65, i64 8
%67 = load double, double* %66
%68 = load double, double* %7
%69 = load double*, double** %4
%70 = getelementptr inbounds double, double* %69, i64 9
%71 = load double, double* %70
%72 = load double, double* %8
%73 = fmul double %71, %72
%74 = call double @llvm.fmuladd.f64(double %67, double %68, double %73)
%75 = load double*, double** %4
%76 = getelementptr inbounds double, double* %75, i64 10
%77 = load double, double* %76
%78 = load double, double* %9
%79 = call double @llvm.fmuladd.f64(double %77, double %78, double %74)
%80 = load double*, double** %4
%81 = getelementptr inbounds double, double* %80, i64 11
%82 = load double, double* %81
%83 = fadd double %79, %82
%84 = fptrunc double %83 to float
%85 = fpext float %84 to double
%86 = load double*, double** %6
%87 = getelementptr inbounds double, double* %86, i64 2
store double %85, double* %87
ret void
}

LLVM IR (-O2):
define void @transform44d3d(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 2
%8 = load double, double* %7
%9 = load double, double* %0
%10 = getelementptr inbounds double, double* %0, i64 1
%11 = load double, double* %10
%12 = fmul double %6, %11
%13 = tail call double @llvm.fmuladd.f64(double %9, double %4, double %12)
%14 = getelementptr inbounds double, double* %0, i64 2
%15 = load double, double* %14
%16 = tail call double @llvm.fmuladd.f64(double %15, double %8, double %13)
%17 = getelementptr inbounds double, double* %0, i64 3
%18 = load double, double* %17
%19 = fadd double %18, %16
%20 = fptrunc double %19 to float
%21 = fpext float %20 to double
store double %21, double* %2
%22 = getelementptr inbounds double, double* %0, i64 4
%23 = load double, double* %22
%24 = getelementptr inbounds double, double* %0, i64 5
%25 = load double, double* %24
%26 = fmul double %6, %25
%27 = tail call double @llvm.fmuladd.f64(double %23, double %4, double %26)
%28 = getelementptr inbounds double, double* %0, i64 6
%29 = load double, double* %28
%30 = tail call double @llvm.fmuladd.f64(double %29, double %8, double %27)
%31 = getelementptr inbounds double, double* %0, i64 7
%32 = load double, double* %31
%33 = fadd double %32, %30
%34 = fptrunc double %33 to float
%35 = fpext float %34 to double
%36 = getelementptr inbounds double, double* %2, i64 1
store double %35, double* %36
%37 = getelementptr inbounds double, double* %0, i64 8
%38 = load double, double* %37
%39 = getelementptr inbounds double, double* %0, i64 9
%40 = load double, double* %39
%41 = fmul double %6, %40
%42 = tail call double @llvm.fmuladd.f64(double %38, double %4, double %41)
%43 = getelementptr inbounds double, double* %0, i64 10
%44 = load double, double* %43
%45 = tail call double @llvm.fmuladd.f64(double %44, double %8, double %42)
%46 = getelementptr inbounds double, double* %0, i64 11
%47 = load double, double* %46
%48 = fadd double %47, %45
%49 = fptrunc double %48 to float
%50 = fpext float %49 to double
%51 = getelementptr inbounds double, double* %2, i64 2
store double %50, double* %51
ret void
}