#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 _matrix_2x2_determinant(float **);
float _matrix_3x3_determinant(float m[3][3]) {
  float tmp[2][2];
  float result;
  tmp[0][0] = m[1][1];
  tmp[0][1] = m[1][2];
  tmp[1][0] = m[2][1];
  tmp[1][1] = m[2][2];
  result = m[0][0] * _matrix_2x2_determinant(tmp);
  tmp[0][0] = m[1][0];
  tmp[0][1] = m[1][2];
  tmp[1][0] = m[2][0];
  tmp[1][1] = m[2][2];
  result -= m[0][1] * _matrix_2x2_determinant(tmp);
  tmp[0][0] = m[1][0];
  tmp[0][1] = m[1][1];
  tmp[1][0] = m[2][0];
  tmp[1][1] = m[2][1];
  result += m[0][1] * _matrix_2x2_determinant(tmp);
  return result;
}


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

x86 assembly (clang, -O2):
<_matrix_3x3_determinant>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
movsd  0x10(%rdi),%xmm0
movhps 0x1c(%rdi),%xmm0
movaps %xmm0,0x10(%rsp)
movss  (%rdi),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1030 <_matrix_2x2_determinant@plt>
mulss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0xc(%rbx),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x14(%rbx),%xmm0
movss  %xmm0,0x14(%rsp)
movss  0x18(%rbx),%xmm0
movss  %xmm0,0x18(%rsp)
movss  0x20(%rbx),%xmm0
movss  %xmm0,0x1c(%rsp)
movss  0x4(%rbx),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
call   1030 <_matrix_2x2_determinant@plt>
mulss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
movsd  0xc(%rbx),%xmm0
movhps 0x18(%rbx),%xmm0
movaps %xmm0,0x10(%rsp)
movss  0x4(%rbx),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
call   1030 <_matrix_2x2_determinant@plt>
mulss  0xc(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define float @_matrix_3x3_determinant([3 x float]* %0) {
%2 = alloca [3 x float]*
%3 = alloca [2 x [2 x float]]
%4 = alloca float
store [3 x float]* %0, [3 x float]** %2
%5 = load [3 x float]*, [3 x float]** %2
%6 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 1
%7 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%10 = getelementptr inbounds [2 x float], [2 x float]* %9, i64 0, i64 0
store float %8, float* %10
%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 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%16 = getelementptr inbounds [2 x float], [2 x float]* %15, i64 0, i64 1
store float %14, float* %16
%17 = load [3 x float]*, [3 x float]** %2
%18 = getelementptr inbounds [3 x float], [3 x float]* %17, i64 2
%19 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 0, i64 1
%20 = load float, float* %19
%21 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 1
%22 = getelementptr inbounds [2 x float], [2 x float]* %21, i64 0, i64 0
store float %20, float* %22
%23 = load [3 x float]*, [3 x float]** %2
%24 = getelementptr inbounds [3 x float], [3 x float]* %23, i64 2
%25 = getelementptr inbounds [3 x float], [3 x float]* %24, i64 0, i64 2
%26 = load float, float* %25
%27 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 1
%28 = getelementptr inbounds [2 x float], [2 x float]* %27, i64 0, i64 1
store float %26, float* %28
%29 = load [3 x float]*, [3 x float]** %2
%30 = getelementptr inbounds [3 x float], [3 x float]* %29, i64 0
%31 = getelementptr inbounds [3 x float], [3 x float]* %30, i64 0, i64 0
%32 = load float, float* %31
%33 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%34 = bitcast [2 x float]* %33 to float**
%35 = call float @_matrix_2x2_determinant(float** %34)
%36 = fmul float %32, %35
store float %36, float* %4
%37 = load [3 x float]*, [3 x float]** %2
%38 = getelementptr inbounds [3 x float], [3 x float]* %37, i64 1
%39 = getelementptr inbounds [3 x float], [3 x float]* %38, i64 0, i64 0
%40 = load float, float* %39
%41 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%42 = getelementptr inbounds [2 x float], [2 x float]* %41, i64 0, i64 0
store float %40, float* %42
%43 = load [3 x float]*, [3 x float]** %2
%44 = getelementptr inbounds [3 x float], [3 x float]* %43, i64 1
%45 = getelementptr inbounds [3 x float], [3 x float]* %44, i64 0, i64 2
%46 = load float, float* %45
%47 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%48 = getelementptr inbounds [2 x float], [2 x float]* %47, i64 0, i64 1
store float %46, float* %48
%49 = load [3 x float]*, [3 x float]** %2
%50 = getelementptr inbounds [3 x float], [3 x float]* %49, i64 2
%51 = getelementptr inbounds [3 x float], [3 x float]* %50, i64 0, i64 0
%52 = load float, float* %51
%53 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 1
%54 = getelementptr inbounds [2 x float], [2 x float]* %53, i64 0, i64 0
store float %52, float* %54
%55 = load [3 x float]*, [3 x float]** %2
%56 = getelementptr inbounds [3 x float], [3 x float]* %55, i64 2
%57 = getelementptr inbounds [3 x float], [3 x float]* %56, i64 0, i64 2
%58 = load float, float* %57
%59 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 1
%60 = getelementptr inbounds [2 x float], [2 x float]* %59, i64 0, i64 1
store float %58, float* %60
%61 = load [3 x float]*, [3 x float]** %2
%62 = getelementptr inbounds [3 x float], [3 x float]* %61, i64 0
%63 = getelementptr inbounds [3 x float], [3 x float]* %62, i64 0, i64 1
%64 = load float, float* %63
%65 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%66 = bitcast [2 x float]* %65 to float**
%67 = call float @_matrix_2x2_determinant(float** %66)
%68 = load float, float* %4
%69 = fneg float %64
%70 = call float @llvm.fmuladd.f32(float %69, float %67, float %68)
store float %70, float* %4
%71 = load [3 x float]*, [3 x float]** %2
%72 = getelementptr inbounds [3 x float], [3 x float]* %71, i64 1
%73 = getelementptr inbounds [3 x float], [3 x float]* %72, i64 0, i64 0
%74 = load float, float* %73
%75 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%76 = getelementptr inbounds [2 x float], [2 x float]* %75, i64 0, i64 0
store float %74, float* %76
%77 = load [3 x float]*, [3 x float]** %2
%78 = getelementptr inbounds [3 x float], [3 x float]* %77, i64 1
%79 = getelementptr inbounds [3 x float], [3 x float]* %78, i64 0, i64 1
%80 = load float, float* %79
%81 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%82 = getelementptr inbounds [2 x float], [2 x float]* %81, i64 0, i64 1
store float %80, float* %82
%83 = load [3 x float]*, [3 x float]** %2
%84 = getelementptr inbounds [3 x float], [3 x float]* %83, i64 2
%85 = getelementptr inbounds [3 x float], [3 x float]* %84, i64 0, i64 0
%86 = load float, float* %85
%87 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 1
%88 = getelementptr inbounds [2 x float], [2 x float]* %87, i64 0, i64 0
store float %86, float* %88
%89 = load [3 x float]*, [3 x float]** %2
%90 = getelementptr inbounds [3 x float], [3 x float]* %89, i64 2
%91 = getelementptr inbounds [3 x float], [3 x float]* %90, i64 0, i64 1
%92 = load float, float* %91
%93 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 1
%94 = getelementptr inbounds [2 x float], [2 x float]* %93, i64 0, i64 1
store float %92, float* %94
%95 = load [3 x float]*, [3 x float]** %2
%96 = getelementptr inbounds [3 x float], [3 x float]* %95, i64 0
%97 = getelementptr inbounds [3 x float], [3 x float]* %96, i64 0, i64 1
%98 = load float, float* %97
%99 = getelementptr inbounds [2 x [2 x float]], [2 x [2 x float]]* %3, i64 0, i64 0
%100 = bitcast [2 x float]* %99 to float**
%101 = call float @_matrix_2x2_determinant(float** %100)
%102 = load float, float* %4
%103 = call float @llvm.fmuladd.f32(float %98, float %101, float %102)
store float %103, float* %4
%104 = load float, float* %4
ret float %104
}

LLVM IR (-O2):
define float @_matrix_3x3_determinant([3 x float]* nocapture %0) {
%2 = alloca <4 x float>
%3 = bitcast <4 x float>* %2 to i8*
%4 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 1
%5 = getelementptr inbounds <4 x float>, <4 x float>* %2, i64 0, i64 0
%6 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 2
%7 = bitcast float* %4 to <2 x float>*
%8 = load <2 x float>, <2 x float>* %7
%9 = getelementptr inbounds <4 x float>, <4 x float>* %2, i64 0, i64 1
%10 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 1
%11 = getelementptr inbounds <4 x float>, <4 x float>* %2, i64 0, i64 2
%12 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 2
%13 = bitcast float* %10 to <2 x float>*
%14 = load <2 x float>, <2 x float>* %13
%15 = getelementptr inbounds <4 x float>, <4 x float>* %2, i64 0, i64 3
%16 = shufflevector <2 x float> %8, <2 x float> %14, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
store <4 x float> %16, <4 x float>* %2
%17 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 0, i64 0
%18 = load float, float* %17
%19 = bitcast <4 x float>* %2 to float**
%20 = call float @_matrix_2x2_determinant(float** %19)
%21 = fmul float %18, %20
%22 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 0
%23 = load float, float* %22
store float %23, float* %5
%24 = load float, float* %6
store float %24, float* %9
%25 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 0
%26 = load float, float* %25
store float %26, float* %11
%27 = load float, float* %12
store float %27, float* %15
%28 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 0, i64 1
%29 = load float, float* %28
%30 = call float @_matrix_2x2_determinant(float** %19)
%31 = fneg float %29
%32 = call float @llvm.fmuladd.f32(float %31, float %30, float %21)
%33 = bitcast float* %22 to <2 x float>*
%34 = load <2 x float>, <2 x float>* %33
%35 = bitcast float* %25 to <2 x float>*
%36 = load <2 x float>, <2 x float>* %35
%37 = shufflevector <2 x float> %34, <2 x float> %36, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
store <4 x float> %37, <4 x float>* %2
%38 = load float, float* %28
%39 = call float @_matrix_2x2_determinant(float** %19)
%40 = call float @llvm.fmuladd.f32(float %38, float %39, float %32)
ret float %40
}