void subrow(double a1[3], double a2[3], double b1[3], double b2[3], double m) {
  a1[0] -= b1[0] * m, a1[1] -= b1[1] * m, a1[2] -= b1[2] * m;
  a2[0] -= b2[0] * m, a2[1] -= b2[1] * m, a2[2] -= b2[2] * m;
}


x86 assembly (clang, -O0):
<subrow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<subrow>:
movsd  (%rdx),%xmm1
mulsd  %xmm0,%xmm1
movsd  (%rdi),%xmm2
subsd  %xmm1,%xmm2
movsd  0x8(%rdi),%xmm1
movsd  %xmm2,(%rdi)
movsd  0x8(%rdx),%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rdi)
movsd  0x10(%rdi),%xmm1
movsd  0x10(%rdx),%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,0x10(%rdi)
movsd  (%rcx),%xmm1
mulsd  %xmm0,%xmm1
movsd  (%rsi),%xmm2
subsd  %xmm1,%xmm2
movsd  0x8(%rsi),%xmm1
movsd  %xmm2,(%rsi)
movsd  0x8(%rcx),%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rsi)
movsd  0x10(%rsi),%xmm1
mulsd  0x10(%rcx),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsi)
ret

LLVM IR (-O0):
define void @subrow(double* %0, double* %1, double* %2, double* %3, double %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store double %4, double* %10
%11 = load double*, double** %8
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double, double* %10
%15 = load double*, double** %6
%16 = getelementptr inbounds double, double* %15, i64 0
%17 = load double, double* %16
%18 = fneg double %13
%19 = call double @llvm.fmuladd.f64(double %18, double %14, double %17)
store double %19, double* %16
%20 = load double*, double** %8
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = load double, double* %10
%24 = load double*, double** %6
%25 = getelementptr inbounds double, double* %24, i64 1
%26 = load double, double* %25
%27 = fneg double %22
%28 = call double @llvm.fmuladd.f64(double %27, double %23, double %26)
store double %28, double* %25
%29 = load double*, double** %8
%30 = getelementptr inbounds double, double* %29, i64 2
%31 = load double, double* %30
%32 = load double, double* %10
%33 = load double*, double** %6
%34 = getelementptr inbounds double, double* %33, i64 2
%35 = load double, double* %34
%36 = fneg double %31
%37 = call double @llvm.fmuladd.f64(double %36, double %32, double %35)
store double %37, double* %34
%38 = load double*, double** %9
%39 = getelementptr inbounds double, double* %38, i64 0
%40 = load double, double* %39
%41 = load double, double* %10
%42 = load double*, double** %7
%43 = getelementptr inbounds double, double* %42, i64 0
%44 = load double, double* %43
%45 = fneg double %40
%46 = call double @llvm.fmuladd.f64(double %45, double %41, double %44)
store double %46, double* %43
%47 = load double*, double** %9
%48 = getelementptr inbounds double, double* %47, i64 1
%49 = load double, double* %48
%50 = load double, double* %10
%51 = load double*, double** %7
%52 = getelementptr inbounds double, double* %51, i64 1
%53 = load double, double* %52
%54 = fneg double %49
%55 = call double @llvm.fmuladd.f64(double %54, double %50, double %53)
store double %55, double* %52
%56 = load double*, double** %9
%57 = getelementptr inbounds double, double* %56, i64 2
%58 = load double, double* %57
%59 = load double, double* %10
%60 = load double*, double** %7
%61 = getelementptr inbounds double, double* %60, i64 2
%62 = load double, double* %61
%63 = fneg double %58
%64 = call double @llvm.fmuladd.f64(double %63, double %59, double %62)
store double %64, double* %61
ret void
}

LLVM IR (-O2):
define void @subrow(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double %4) {
%6 = load double, double* %2
%7 = load double, double* %0
%8 = fneg double %6
%9 = tail call double @llvm.fmuladd.f64(double %8, double %4, double %7)
store double %9, double* %0
%10 = getelementptr inbounds double, double* %2, i64 1
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %0, i64 1
%13 = load double, double* %12
%14 = fneg double %11
%15 = tail call double @llvm.fmuladd.f64(double %14, double %4, double %13)
store double %15, double* %12
%16 = getelementptr inbounds double, double* %2, i64 2
%17 = load double, double* %16
%18 = getelementptr inbounds double, double* %0, i64 2
%19 = load double, double* %18
%20 = fneg double %17
%21 = tail call double @llvm.fmuladd.f64(double %20, double %4, double %19)
store double %21, double* %18
%22 = load double, double* %3
%23 = load double, double* %1
%24 = fneg double %22
%25 = tail call double @llvm.fmuladd.f64(double %24, double %4, double %23)
store double %25, double* %1
%26 = getelementptr inbounds double, double* %3, i64 1
%27 = load double, double* %26
%28 = getelementptr inbounds double, double* %1, i64 1
%29 = load double, double* %28
%30 = fneg double %27
%31 = tail call double @llvm.fmuladd.f64(double %30, double %4, double %29)
store double %31, double* %28
%32 = getelementptr inbounds double, double* %3, i64 2
%33 = load double, double* %32
%34 = getelementptr inbounds double, double* %1, i64 2
%35 = load double, double* %34
%36 = fneg double %33
%37 = tail call double @llvm.fmuladd.f64(double %36, double %4, double %35)
store double %37, double* %34
ret void
}