#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 */
int /*<<< orphan*/ Adjoint44(double **, double **);
double Determinant44(double **);
int Inverse44(double a[4][4], double b[4][4]) {
  int i, j;
  double det;
  Adjoint44(a, b);
  det = Determinant44(a);
  if ((det < 0 ? -(det) : (det)) < 0.000001)
    return (0);
  for (i = 0; i < 4; i++)
    for (j = 0; j < 4; j++)
      b[i][j] = b[i][j] / det;
  return (1);
}


x86 assembly (clang, -O0):
<Inverse44>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <Adjoint44@plt>
mov    -0x10(%rbp),%rdi
call   1030 <Determinant44@plt>
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    117f <Inverse44+0x5f>
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1189 <Inverse44+0x69>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  0xe6a(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11ac <Inverse44+0x8c>
movl   $0x0,-0x4(%rbp)
jmp    122b <Inverse44+0x10b>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1224 <Inverse44+0x104>
movl   $0x0,-0x20(%rbp)
cmpl   $0x4,-0x20(%rbp)
jge    1211 <Inverse44+0xf1>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c4 <Inverse44+0xa4>
jmp    1216 <Inverse44+0xf6>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b3 <Inverse44+0x93>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Inverse44>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <Adjoint44@plt>
mov    %r14,%rdi
call   1030 <Determinant44@plt>
movapd 0xec1(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
xor    %eax,%eax
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm3,%xmm1
ja     11e3 <Inverse44+0xc3>
unpcklpd %xmm0,%xmm0
movupd (%rbx),%xmm1
movupd 0x10(%rbx),%xmm2
movupd 0x20(%rbx),%xmm3
movupd 0x30(%rbx),%xmm4
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx)
divpd  %xmm0,%xmm2
movupd %xmm2,0x10(%rbx)
divpd  %xmm0,%xmm3
movupd %xmm3,0x20(%rbx)
divpd  %xmm0,%xmm4
movupd %xmm4,0x30(%rbx)
movupd 0x40(%rbx),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x40(%rbx)
movupd 0x50(%rbx),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x50(%rbx)
movupd 0x60(%rbx),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x60(%rbx)
movupd 0x70(%rbx),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x70(%rbx)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @Inverse44([4 x double]* %0, [4 x double]* %1) {
%3 = alloca i32
%4 = alloca [4 x double]*
%5 = alloca [4 x double]*
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store [4 x double]* %0, [4 x double]** %4
store [4 x double]* %1, [4 x double]** %5
%9 = load [4 x double]*, [4 x double]** %4
%10 = bitcast [4 x double]* %9 to double**
%11 = load [4 x double]*, [4 x double]** %5
%12 = bitcast [4 x double]* %11 to double**
%13 = call i32 @Adjoint44(double** %10, double** %12)
%14 = load [4 x double]*, [4 x double]** %4
%15 = bitcast [4 x double]* %14 to double**
%16 = call double @Determinant44(double** %15)
store double %16, double* %8
%17 = load double, double* %8
%18 = fcmp olt double %17, 0.000000e+00
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = load double, double* %8
%21 = fneg double %20
br label %24
22: ; preds = %2
%23 = load double, double* %8
br label %24
24: ; preds = %22, %19
%25 = phi double [ %21, %19 ], [ %23, %22 ]
%26 = fcmp olt double %25, 0x3EB0C6F7A0B5ED8D
br i1 %26, label %27, label %28
27: ; preds = %24
store i32 0, i32* %3
br label %62
28: ; preds = %24
store i32 0, i32* %6
br label %29
29: ; preds = %58, %28
%30 = load i32, i32* %6
%31 = icmp slt i32 %30, 4
br i1 %31, label %32, label %61
32: ; preds = %29
store i32 0, i32* %7
br label %33
33: ; preds = %54, %32
%34 = load i32, i32* %7
%35 = icmp slt i32 %34, 4
br i1 %35, label %36, label %57
36: ; preds = %33
%37 = load [4 x double]*, [4 x double]** %5
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [4 x double], [4 x double]* %37, i64 %39
%41 = load i32, i32* %7
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [4 x double], [4 x double]* %40, i64 0, i64 %42
%44 = load double, double* %43
%45 = load double, double* %8
%46 = fdiv double %44, %45
%47 = load [4 x double]*, [4 x double]** %5
%48 = load i32, i32* %6
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [4 x double], [4 x double]* %47, i64 %49
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [4 x double], [4 x double]* %50, i64 0, i64 %52
store double %46, double* %53
br label %54
54: ; preds = %36
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %33
57: ; preds = %33
br label %58
58: ; preds = %57
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
br label %29
61: ; preds = %29
store i32 1, i32* %3
br label %62
62: ; preds = %61, %27
%63 = load i32, i32* %3
ret i32 %63
}

LLVM IR (-O2):
define i32 @Inverse44([4 x double]* %0, [4 x double]* %1) {
%3 = bitcast [4 x double]* %0 to double**
%4 = bitcast [4 x double]* %1 to double**
%5 = tail call i32 @Adjoint44(double** %3, double** %4)
%6 = tail call double @Determinant44(double** %3)
%7 = fcmp olt double %6, 0.000000e+00
%8 = fneg double %6
%9 = select i1 %7, double %8, double %6
%10 = fcmp olt double %9, 0x3EB0C6F7A0B5ED8D
br i1 %10, label %53, label %11
11: ; preds = %2
%12 = bitcast [4 x double]* %1 to <2 x double>*
%13 = load <2 x double>, <2 x double>* %12
%14 = insertelement <2 x double> poison, double %6, i64 0
%15 = shufflevector <2 x double> %14, <2 x double> poison, <2 x i32> zeroinitializer
%16 = fdiv <2 x double> %13, %15
%17 = bitcast [4 x double]* %1 to <2 x double>*
store <2 x double> %16, <2 x double>* %17
%18 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 2
%19 = bitcast double* %18 to <2 x double>*
%20 = load <2 x double>, <2 x double>* %19
%21 = fdiv <2 x double> %20, %15
%22 = bitcast double* %18 to <2 x double>*
store <2 x double> %21, <2 x double>* %22
%23 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 1, i64 0
%24 = bitcast double* %23 to <2 x double>*
%25 = load <2 x double>, <2 x double>* %24
%26 = fdiv <2 x double> %25, %15
%27 = bitcast double* %23 to <2 x double>*
store <2 x double> %26, <2 x double>* %27
%28 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 1, i64 2
%29 = bitcast double* %28 to <2 x double>*
%30 = load <2 x double>, <2 x double>* %29
%31 = fdiv <2 x double> %30, %15
%32 = bitcast double* %28 to <2 x double>*
store <2 x double> %31, <2 x double>* %32
%33 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 2, i64 0
%34 = bitcast double* %33 to <2 x double>*
%35 = load <2 x double>, <2 x double>* %34
%36 = fdiv <2 x double> %35, %15
%37 = bitcast double* %33 to <2 x double>*
store <2 x double> %36, <2 x double>* %37
%38 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 2, i64 2
%39 = bitcast double* %38 to <2 x double>*
%40 = load <2 x double>, <2 x double>* %39
%41 = fdiv <2 x double> %40, %15
%42 = bitcast double* %38 to <2 x double>*
store <2 x double> %41, <2 x double>* %42
%43 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 3, i64 0
%44 = bitcast double* %43 to <2 x double>*
%45 = load <2 x double>, <2 x double>* %44
%46 = fdiv <2 x double> %45, %15
%47 = bitcast double* %43 to <2 x double>*
store <2 x double> %46, <2 x double>* %47
%48 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 3, i64 2
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = fdiv <2 x double> %50, %15
%52 = bitcast double* %48 to <2 x double>*
store <2 x double> %51, <2 x double>* %52
br label %53
53: ; preds = %11, %2
%54 = phi i32 [ 0, %2 ], [ 1, %11 ]
ret i32 %54
}