#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float const det22(float const, float const, float const, float const);
float det33(const float m[3][3]) {
  return (m[0][0] * det22(m[1][1], m[1][2], m[2][1], m[2][2])) -
         (m[0][1] * det22(m[1][0], m[1][2], m[2][0], m[2][2])) +
         (m[0][2] * det22(m[1][0], m[1][1], m[2][0], m[2][1]));
}


x86 assembly (clang, -O0):
<det33>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x1c(%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm3
call   1030 <det22@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm3
call   1030 <det22@plt>
movss  -0x1c(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x14(%rbp),%xmm0
mulss  %xmm3,%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x1c(%rax),%xmm3
call   1030 <det22@plt>
movss  -0x10(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0xc(%rbp),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<det33>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movss  (%rdi),%xmm0
movss  %xmm0,0x4(%rsp)
movss  0x10(%rdi),%xmm0
movss  0x14(%rdi),%xmm1
movss  0x1c(%rdi),%xmm2
movss  0x20(%rdi),%xmm3
call   1030 <det22@plt>
movss  %xmm0,0x8(%rsp)
movss  0x4(%rbx),%xmm0
movss  %xmm0,0xc(%rsp)
movss  0xc(%rbx),%xmm0
movss  0x14(%rbx),%xmm1
movss  0x18(%rbx),%xmm2
movss  0x20(%rbx),%xmm3
call   1030 <det22@plt>
mulss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
mulss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
movss  0x8(%rbx),%xmm0
movss  %xmm0,0x4(%rsp)
movss  0xc(%rbx),%xmm0
movss  0x10(%rbx),%xmm1
movss  0x18(%rbx),%xmm2
movss  0x1c(%rbx),%xmm3
call   1030 <det22@plt>
mulss  0x4(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define float @det33([3 x float]* nocapture %0) {
%2 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 0, i64 0
%3 = load float, float* %2
%4 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 2
%7 = load float, float* %6
%8 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 1
%9 = load float, float* %8
%10 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 2
%11 = load float, float* %10
%12 = tail call float @det22(float %5, float %7, float %9, float %11)
%13 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 0, i64 1
%14 = load float, float* %13
%15 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 0
%16 = load float, float* %15
%17 = load float, float* %6
%18 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 0
%19 = load float, float* %18
%20 = load float, float* %10
%21 = tail call float @det22(float %16, float %17, float %19, float %20)
%22 = fneg float %14
%23 = fmul float %21, %22
%24 = tail call float @llvm.fmuladd.f32(float %3, float %12, float %23)
%25 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 0, i64 2
%26 = load float, float* %25
%27 = load float, float* %15
%28 = load float, float* %4
%29 = load float, float* %18
%30 = load float, float* %8
%31 = tail call float @det22(float %27, float %28, float %29, float %30)
%32 = tail call float @llvm.fmuladd.f32(float %26, float %31, float %24)
ret float %32
}