double determinant(double conlist[4][3], int code) {
  double t1, t2, t3, t4, tl[3][3];
  int mm, tc;
  for (mm = 0, tc = 0; mm < 3; mm++) {
    if (mm == code)
      continue;
    else {
      tl[0][tc] = conlist[0][mm];
      tl[1][tc] = conlist[1][mm];
      tl[2][tc] = conlist[2][mm];
      tc++;
    }
  }
  tl[0][2] = 1;
  tl[1][2] = 1;
  tl[2][2] = 1;
  t1 = tl[0][0] * ((tl[1][1] * tl[2][2]) - (tl[1][2] * tl[2][1]));
  t2 = -tl[0][1] * ((tl[1][0] * tl[2][2]) - (tl[1][2] * tl[2][0]));
  t3 = tl[0][2] * ((tl[1][0] * tl[2][1]) - (tl[1][1] * tl[2][0]));
  t4 = t1 + t2 + t3;
  return (t4);
}


x86 assembly (clang, -O0):
<determinant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x0,-0x88(%rbp)
cmpl   $0x3,-0x84(%rbp)
jge    11c5 <determinant+0xc5>
mov    -0x84(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1144 <determinant+0x44>
jmp    11b1 <determinant+0xb1>
mov    -0x8(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x88(%rbp),%rax
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x8(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  0x18(%rax,%rcx,8),%xmm0
movslq -0x88(%rbp),%rax
movsd  %xmm0,-0x68(%rbp,%rax,8)
mov    -0x8(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm0
movslq -0x88(%rbp),%rax
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    11b1 <determinant+0xb1>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1123 <determinant+0x23>
movsd  0xe33(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe26(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe19(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm2
mulsd  -0x48(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm2
mulsd  -0x50(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm2
mulsd  -0x50(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<determinant>:
test   %esi,%esi
je     1130 <determinant+0x30>
movsd  (%rdi),%xmm0
movsd  %xmm0,-0x48(%rsp)
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,-0x30(%rsp)
movsd  0x30(%rdi),%xmm0
movsd  %xmm0,-0x18(%rsp)
mov    $0x1,%eax
cmp    $0x1,%esi
jne    1132 <determinant+0x32>
jmp    115d <determinant+0x5d>
xor    %eax,%eax
movsd  0x8(%rdi),%xmm0
mov    %eax,%ecx
movsd  %xmm0,-0x48(%rsp,%rcx,8)
movsd  0x20(%rdi),%xmm0
movsd  %xmm0,-0x30(%rsp,%rcx,8)
movsd  0x38(%rdi),%xmm0
movsd  %xmm0,-0x18(%rsp,%rcx,8)
cmp    $0x2,%esi
je     1180 <determinant+0x80>
add    $0x1,%eax
movsd  0x10(%rdi),%xmm0
mov    %eax,%eax
movsd  %xmm0,-0x48(%rsp,%rax,8)
movsd  0x28(%rdi),%xmm0
movsd  %xmm0,-0x30(%rsp,%rax,8)
movsd  0x40(%rdi),%xmm0
movsd  %xmm0,-0x18(%rsp,%rax,8)
movapd -0x48(%rsp),%xmm0
shufpd $0x1,%xmm0,%xmm0
movupd -0x30(%rsp),%xmm1
movapd -0x18(%rsp),%xmm2
movapd %xmm1,%xmm3
subpd  %xmm2,%xmm3
mulpd  %xmm0,%xmm3
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
unpckhpd %xmm2,%xmm2
mulsd  %xmm1,%xmm2
subsd  %xmm0,%xmm2
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
subsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @determinant([3 x double]* nocapture %0, i32 %1) {
%3 = alloca [3 x [3 x double]]
%4 = bitcast [3 x [3 x double]]* %3 to i8*
%5 = icmp eq i32 %1, 0
br i1 %5, label %17, label %6
6: ; preds = %2
%7 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%8 = load double, double* %7
%9 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 0, i64 0
store double %8, double* %9
%10 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%11 = load double, double* %10
%12 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 1, i64 0
store double %11, double* %12
%13 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%14 = load double, double* %13
%15 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 2, i64 0
store double %14, double* %15
%16 = icmp eq i32 %1, 1
br i1 %16, label %31, label %17
17: ; preds = %2, %6
%18 = phi i32 [ 1, %6 ], [ 0, %2 ]
%19 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%20 = load double, double* %19
%21 = zext i32 %18 to i64
%22 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 0, i64 %21
store double %20, double* %22
%23 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%24 = load double, double* %23
%25 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 1, i64 %21
store double %24, double* %25
%26 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%27 = load double, double* %26
%28 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 2, i64 %21
store double %27, double* %28
%29 = add nuw nsw i32 %18, 1
%30 = icmp eq i32 %1, 2
br i1 %30, label %43, label %31
31: ; preds = %6, %17
%32 = phi i32 [ %29, %17 ], [ 1, %6 ]
%33 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%34 = load double, double* %33
%35 = zext i32 %32 to i64
%36 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 0, i64 %35
store double %34, double* %36
%37 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%38 = load double, double* %37
%39 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 1, i64 %35
store double %38, double* %39
%40 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%41 = load double, double* %40
%42 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 2, i64 %35
store double %41, double* %42
br label %43
43: ; preds = %31, %17
%44 = bitcast [3 x [3 x double]]* %3 to <2 x double>*
%45 = load <2 x double>, <2 x double>* %44
%46 = shufflevector <2 x double> %45, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%47 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 1, i64 0
%48 = bitcast double* %47 to <2 x double>*
%49 = load <2 x double>, <2 x double>* %48
%50 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 2, i64 0
%51 = bitcast double* %50 to <2 x double>*
%52 = load <2 x double>, <2 x double>* %51
%53 = fsub <2 x double> %49, %52
%54 = extractelement <2 x double> %49, i64 1
%55 = fneg double %54
%56 = extractelement <2 x double> %52, i64 0
%57 = fmul double %56, %55
%58 = extractelement <2 x double> %49, i64 0
%59 = extractelement <2 x double> %52, i64 1
%60 = tail call double @llvm.fmuladd.f64(double %58, double %59, double %57)
%61 = fmul <2 x double> %46, %53
%62 = shufflevector <2 x double> %61, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%63 = fsub <2 x double> %62, %61
%64 = extractelement <2 x double> %63, i64 0
%65 = fadd double %60, %64
ret double %65
}