void palInvf(double fwds[6], double bkwds[6], int *j) {
  double a, b, c, d, e, f, det;
  a = fwds[0];
  b = fwds[1];
  c = fwds[2];
  d = fwds[3];
  e = fwds[4];
  f = fwds[5];
  det = b * f - c * e;
  if (det != 0.0) {
    bkwds[0] = (c * d - a * f) / det;
    bkwds[1] = f / det;
    bkwds[2] = -c / det;
    bkwds[3] = (a * e - b * d) / det;
    bkwds[4] = -e / det;
    bkwds[5] = b / det;
    *j = 0;
  } else {
    *j = -1;
  }
}


x86 assembly (clang, -O0):
<palInvf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11b8 <palInvf+0xb8>
jp     11b8 <palInvf+0xb8>
jmp    12c2 <palInvf+0x1c2>
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x28(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    12cc <palInvf+0x1cc>
mov    -0x18(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<palInvf>:
movsd  0x8(%rdi),%xmm8
movsd  0x10(%rdi),%xmm3
movsd  0x20(%rdi),%xmm0
movsd  0x28(%rdi),%xmm1
movapd %xmm0,%xmm5
mulsd  %xmm3,%xmm5
movapd %xmm8,%xmm2
mulsd  %xmm1,%xmm2
subsd  %xmm5,%xmm2
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm2
jne    1136 <palInvf+0x36>
jnp    11a0 <palInvf+0xa0>
movsd  (%rdi),%xmm5
movsd  0x18(%rdi),%xmm6
movapd 0xeb9(%rip),%xmm7
xorpd  %xmm3,%xmm7
movapd %xmm1,%xmm4
mulsd  %xmm5,%xmm4
mulsd  %xmm6,%xmm3
subsd  %xmm4,%xmm3
unpcklpd %xmm1,%xmm3
unpcklpd %xmm2,%xmm2
divpd  %xmm2,%xmm3
movupd %xmm3,(%rsi)
mulsd  %xmm8,%xmm6
mulsd  %xmm0,%xmm5
subsd  %xmm6,%xmm5
unpcklpd %xmm5,%xmm7
divpd  %xmm2,%xmm7
movupd %xmm7,0x10(%rsi)
xorpd  0xe73(%rip),%xmm0
unpcklpd %xmm8,%xmm0
divpd  %xmm2,%xmm0
movupd %xmm0,0x20(%rsi)
xor    %eax,%eax
mov    %eax,(%rdx)
ret
mov    $0xffffffff,%eax
mov    %eax,(%rdx)
ret

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

LLVM IR (-O2):
define void @palInvf(double* nocapture %0, double* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %0, i64 3
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %0, i64 4
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %0, i64 5
%14 = load double, double* %13
%15 = fneg double %8
%16 = fmul double %12, %15
%17 = tail call double @llvm.fmuladd.f64(double %6, double %14, double %16)
%18 = fcmp une double %17, 0.000000e+00
br i1 %18, label %19, label %43
19: ; preds = %3
%20 = fneg double %4
%21 = fmul double %14, %20
%22 = tail call double @llvm.fmuladd.f64(double %8, double %10, double %21)
%23 = insertelement <2 x double> poison, double %22, i64 0
%24 = insertelement <2 x double> %23, double %14, i64 1
%25 = insertelement <2 x double> poison, double %17, i64 0
%26 = shufflevector <2 x double> %25, <2 x double> poison, <2 x i32> zeroinitializer
%27 = fdiv <2 x double> %24, %26
%28 = bitcast double* %1 to <2 x double>*
store <2 x double> %27, <2 x double>* %28
%29 = getelementptr inbounds double, double* %1, i64 2
%30 = fneg double %6
%31 = fmul double %10, %30
%32 = tail call double @llvm.fmuladd.f64(double %4, double %12, double %31)
%33 = insertelement <2 x double> poison, double %15, i64 0
%34 = insertelement <2 x double> %33, double %32, i64 1
%35 = fdiv <2 x double> %34, %26
%36 = bitcast double* %29 to <2 x double>*
store <2 x double> %35, <2 x double>* %36
%37 = fneg double %12
%38 = getelementptr inbounds double, double* %1, i64 4
%39 = insertelement <2 x double> poison, double %37, i64 0
%40 = insertelement <2 x double> %39, double %6, i64 1
%41 = fdiv <2 x double> %40, %26
%42 = bitcast double* %38 to <2 x double>*
store <2 x double> %41, <2 x double>* %42
br label %43
43: ; preds = %3, %19
%44 = phi i32 [ 0, %19 ], [ -1, %3 ]
store i32 %44, i32* %2
ret void
}