void doubles_mat33_lower_tri_inv(const double *A, int Arows, int Acols,
                                 double *R, int Rrows, int Rcols) {
  R[0] = 1 / A[0];
  R[3] = -A[3] * R[0] / A[4];
  R[4] = 1 / A[4];
  R[6] = (-A[6] * R[0] - A[7] * R[3]) / A[8];
  R[7] = -A[7] * R[4] / A[8];
  R[8] = 1 / A[8];
}


x86 assembly (clang, -O0):
<doubles_mat33_lower_tri_inv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeda(%rip),%xmm0
divsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
divsd  0x20(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
movsd  0xe88(%rip),%xmm0
divsd  0x20(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x18(%rbp),%rax
mulsd  0x18(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
divsd  0x40(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
divsd  0x40(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
movsd  0xdc8(%rip),%xmm0
divsd  0x40(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x40(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubles_mat33_lower_tri_inv>:
movsd  0xef8(%rip),%xmm0
movapd %xmm0,%xmm1
divsd  (%rdi),%xmm1
movsd  %xmm1,(%rcx)
movsd  0x18(%rdi),%xmm2
movapd 0xeef(%rip),%xmm3
xorpd  %xmm3,%xmm2
mulsd  %xmm1,%xmm2
divsd  0x20(%rdi),%xmm2
movsd  %xmm2,0x18(%rcx)
movapd %xmm0,%xmm4
divsd  0x20(%rdi),%xmm4
movsd  %xmm4,0x20(%rcx)
movsd  0x30(%rdi),%xmm5
xorpd  %xmm3,%xmm5
mulsd  0x38(%rdi),%xmm2
mulsd  %xmm1,%xmm5
subsd  %xmm2,%xmm5
divsd  0x40(%rdi),%xmm5
movsd  %xmm5,0x30(%rcx)
movsd  0x38(%rdi),%xmm1
xorpd  %xmm3,%xmm1
mulsd  %xmm4,%xmm1
divsd  0x40(%rdi),%xmm1
movsd  %xmm1,0x38(%rcx)
divsd  0x40(%rdi),%xmm0
movsd  %xmm0,0x40(%rcx)
ret

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

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