#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*/ mat444Multiply(double **, double **, double **);
int /*<<< orphan*/ mat44Transpose(double **, double **);
void mat44InverseIsometry(double rot[3][3], double trans[3],
                          double isom[4][4]) {
  double trans44Inverse[4][4] = {1, 0, 0, -trans[0], 0, 1, 0, -trans[1],
                                 0, 0, 1, -trans[2], 0, 0, 0, 1};
  double rot44[4][4] = {
      rot[0][0], rot[0][1], rot[0][2], 0, rot[1][0], rot[1][1], rot[1][2], 0,
      rot[2][0], rot[2][1], rot[2][2], 0, 0,         0,         0,         1};
  double rot44Transpose[4][4];
  mat44Transpose(rot44, rot44Transpose);
  mat444Multiply(rot44Transpose, trans44Inverse, isom);
}


x86 assembly (clang, -O0):
<mat44InverseIsometry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
add    $0x20,%rdi
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe51(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x68(%rbp)
add    $0x20,%rdi
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe03(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
add    $0x20,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
mov    0x2dfa(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2df7(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2df4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2df1(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
add    $0x20,%rdi
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
add    $0x20,%rdi
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
add    $0x20,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
mov    0x2d16(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0x2d10(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0x2d0a(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0x2d04(%rip),%rax
mov    %rax,-0xa8(%rbp)
lea    -0x120(%rbp),%rdi
lea    -0x1a0(%rbp),%rsi
call   1050 <mat44Transpose@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <mat444Multiply@plt>
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat44InverseIsometry>:
push   %r14
push   %rbx
sub    $0x188,%rsp
mov    %rdx,%r14
movabs $0x3ff0000000000000,%rax
mov    %rax,0x80(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x88(%rsp)
movsd  (%rsi),%xmm1
movaps 0xeab(%rip),%xmm2
xorps  %xmm2,%xmm1
xorps  %xmm3,%xmm3
movhps 0xeae(%rip),%xmm3
movlps %xmm1,0x98(%rsp)
movaps %xmm3,0xa0(%rsp)
movq   $0x0,0xb0(%rsp)
movsd  0x8(%rsi),%xmm1
xorps  %xmm2,%xmm1
movlps %xmm1,0xb8(%rsp)
movaps %xmm0,0xc0(%rsp)
mov    %rax,0xd0(%rsp)
movsd  0x10(%rsi),%xmm0
xorps  %xmm2,%xmm0
movlps %xmm0,0xd8(%rsp)
movups 0xe63(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movups 0xe64(%rip),%xmm1
movaps %xmm1,0xf0(%rsp)
movups (%rdi),%xmm2
movaps %xmm2,(%rsp)
movsd  0x10(%rdi),%xmm2
movsd  %xmm2,0x10(%rsp)
movq   $0x0,0x18(%rsp)
movups 0x18(%rdi),%xmm2
movaps %xmm2,0x20(%rsp)
movsd  0x28(%rdi),%xmm2
movsd  %xmm2,0x30(%rsp)
movq   $0x0,0x38(%rsp)
movups 0x30(%rdi),%xmm2
movaps %xmm2,0x40(%rsp)
movsd  0x40(%rdi),%xmm2
movsd  %xmm2,0x50(%rsp)
movq   $0x0,0x58(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm1,0x70(%rsp)
mov    %rsp,%rdi
lea    0x100(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <mat44Transpose@plt>
lea    0x80(%rsp),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <mat444Multiply@plt>
add    $0x188,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@constinit = private global [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@constinit.1 = private global [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
define void @mat44InverseIsometry([3 x double]* %0, double* %1, [4 x double]* %2) {
%4 = alloca [3 x double]*
%5 = alloca double*
%6 = alloca [4 x double]*
%7 = alloca [4 x [4 x double]]
%8 = alloca [4 x [4 x double]]
%9 = alloca [4 x [4 x double]]
store [3 x double]* %0, [3 x double]** %4
store double* %1, double** %5
store [4 x double]* %2, [4 x double]** %6
%10 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %7, i64 0, i64 0
%11 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
store double 1.000000e+00, double* %11
%12 = getelementptr inbounds double, double* %11, i64 1
store double 0.000000e+00, double* %12
%13 = getelementptr inbounds double, double* %12, i64 1
store double 0.000000e+00, double* %13
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 0
%17 = load double, double* %16
%18 = fneg double %17
store double %18, double* %14
%19 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 1
%20 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 0
store double 0.000000e+00, double* %20
%21 = getelementptr inbounds double, double* %20, i64 1
store double 1.000000e+00, double* %21
%22 = getelementptr inbounds double, double* %21, i64 1
store double 0.000000e+00, double* %22
%23 = getelementptr inbounds double, double* %22, i64 1
%24 = load double*, double** %5
%25 = getelementptr inbounds double, double* %24, i64 1
%26 = load double, double* %25
%27 = fneg double %26
store double %27, double* %23
%28 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 1
%29 = getelementptr inbounds [4 x double], [4 x double]* %28, i64 0, i64 0
store double 0.000000e+00, double* %29
%30 = getelementptr inbounds double, double* %29, i64 1
store double 0.000000e+00, double* %30
%31 = getelementptr inbounds double, double* %30, i64 1
store double 1.000000e+00, double* %31
%32 = getelementptr inbounds double, double* %31, i64 1
%33 = load double*, double** %5
%34 = getelementptr inbounds double, double* %33, i64 2
%35 = load double, double* %34
%36 = fneg double %35
store double %36, double* %32
%37 = getelementptr inbounds [4 x double], [4 x double]* %28, i64 1
%38 = bitcast [4 x double]* %37 to i8*
%39 = getelementptr inbounds [4 x double], [4 x double]* %37, i64 0, i64 0
%40 = bitcast [4 x double]* %37 to i8*
%41 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %8, i64 0, i64 0
%42 = getelementptr inbounds [4 x double], [4 x double]* %41, i64 0, i64 0
%43 = load [3 x double]*, [3 x double]** %4
%44 = getelementptr inbounds [3 x double], [3 x double]* %43, i64 0
%45 = getelementptr inbounds [3 x double], [3 x double]* %44, i64 0, i64 0
%46 = load double, double* %45
store double %46, double* %42
%47 = getelementptr inbounds double, double* %42, i64 1
%48 = load [3 x double]*, [3 x double]** %4
%49 = getelementptr inbounds [3 x double], [3 x double]* %48, i64 0
%50 = getelementptr inbounds [3 x double], [3 x double]* %49, i64 0, i64 1
%51 = load double, double* %50
store double %51, double* %47
%52 = getelementptr inbounds double, double* %47, i64 1
%53 = load [3 x double]*, [3 x double]** %4
%54 = getelementptr inbounds [3 x double], [3 x double]* %53, i64 0
%55 = getelementptr inbounds [3 x double], [3 x double]* %54, i64 0, i64 2
%56 = load double, double* %55
store double %56, double* %52
%57 = getelementptr inbounds double, double* %52, i64 1
store double 0.000000e+00, double* %57
%58 = getelementptr inbounds [4 x double], [4 x double]* %41, i64 1
%59 = getelementptr inbounds [4 x double], [4 x double]* %58, i64 0, i64 0
%60 = load [3 x double]*, [3 x double]** %4
%61 = getelementptr inbounds [3 x double], [3 x double]* %60, i64 1
%62 = getelementptr inbounds [3 x double], [3 x double]* %61, i64 0, i64 0
%63 = load double, double* %62
store double %63, double* %59
%64 = getelementptr inbounds double, double* %59, i64 1
%65 = load [3 x double]*, [3 x double]** %4
%66 = getelementptr inbounds [3 x double], [3 x double]* %65, i64 1
%67 = getelementptr inbounds [3 x double], [3 x double]* %66, i64 0, i64 1
%68 = load double, double* %67
store double %68, double* %64
%69 = getelementptr inbounds double, double* %64, i64 1
%70 = load [3 x double]*, [3 x double]** %4
%71 = getelementptr inbounds [3 x double], [3 x double]* %70, i64 1
%72 = getelementptr inbounds [3 x double], [3 x double]* %71, i64 0, i64 2
%73 = load double, double* %72
store double %73, double* %69
%74 = getelementptr inbounds double, double* %69, i64 1
store double 0.000000e+00, double* %74
%75 = getelementptr inbounds [4 x double], [4 x double]* %58, i64 1
%76 = getelementptr inbounds [4 x double], [4 x double]* %75, i64 0, i64 0
%77 = load [3 x double]*, [3 x double]** %4
%78 = getelementptr inbounds [3 x double], [3 x double]* %77, i64 2
%79 = getelementptr inbounds [3 x double], [3 x double]* %78, i64 0, i64 0
%80 = load double, double* %79
store double %80, double* %76
%81 = getelementptr inbounds double, double* %76, i64 1
%82 = load [3 x double]*, [3 x double]** %4
%83 = getelementptr inbounds [3 x double], [3 x double]* %82, i64 2
%84 = getelementptr inbounds [3 x double], [3 x double]* %83, i64 0, i64 1
%85 = load double, double* %84
store double %85, double* %81
%86 = getelementptr inbounds double, double* %81, i64 1
%87 = load [3 x double]*, [3 x double]** %4
%88 = getelementptr inbounds [3 x double], [3 x double]* %87, i64 2
%89 = getelementptr inbounds [3 x double], [3 x double]* %88, i64 0, i64 2
%90 = load double, double* %89
store double %90, double* %86
%91 = getelementptr inbounds double, double* %86, i64 1
store double 0.000000e+00, double* %91
%92 = getelementptr inbounds [4 x double], [4 x double]* %75, i64 1
%93 = bitcast [4 x double]* %92 to i8*
%94 = getelementptr inbounds [4 x double], [4 x double]* %92, i64 0, i64 0
%95 = bitcast [4 x double]* %92 to i8*
%96 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %8, i64 0, i64 0
%97 = bitcast [4 x double]* %96 to double**
%98 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %9, i64 0, i64 0
%99 = bitcast [4 x double]* %98 to double**
%100 = call i32 @mat44Transpose(double** %97, double** %99)
%101 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %9, i64 0, i64 0
%102 = bitcast [4 x double]* %101 to double**
%103 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %7, i64 0, i64 0
%104 = bitcast [4 x double]* %103 to double**
%105 = load [4 x double]*, [4 x double]** %6
%106 = bitcast [4 x double]* %105 to double**
%107 = call i32 @mat444Multiply(double** %102, double** %104, double** %106)
ret void
}

LLVM IR (-O2):
@constinit.1 = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
define void @mat44InverseIsometry([3 x double]* nocapture %0, double* nocapture %1, [4 x double]* %2) {
%4 = alloca [4 x [4 x double]]
%5 = alloca [4 x [4 x double]]
%6 = alloca [4 x [4 x double]]
%7 = bitcast [4 x [4 x double]]* %4 to i8*
%8 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 0, i64 0
store double 1.000000e+00, double* %8
%9 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 0, i64 1
%10 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 0, i64 3
%11 = bitcast double* %9 to i8*
%12 = load double, double* %1
%13 = fneg double %12
store double %13, double* %10
%14 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 1, i64 0
%15 = bitcast double* %14 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %15
%16 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 1, i64 2
store double 0.000000e+00, double* %16
%17 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 1, i64 3
%18 = getelementptr inbounds double, double* %1, i64 1
%19 = load double, double* %18
%20 = fneg double %19
store double %20, double* %17
%21 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 2, i64 0
%22 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 2, i64 2
%23 = bitcast double* %21 to i8*
store double 1.000000e+00, double* %22
%24 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 2, i64 3
%25 = getelementptr inbounds double, double* %1, i64 2
%26 = load double, double* %25
%27 = fneg double %26
store double %27, double* %24
%28 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %4, i64 0, i64 3
%29 = bitcast [4 x double]* %28 to i8*
%30 = bitcast [4 x [4 x double]]* %5 to i8*
%31 = bitcast [3 x double]* %0 to <2 x double>*
%32 = load <2 x double>, <2 x double>* %31
%33 = bitcast [4 x [4 x double]]* %5 to <2 x double>*
store <2 x double> %32, <2 x double>* %33
%34 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 0, i64 2
%35 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%36 = load double, double* %35
store double %36, double* %34
%37 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 0, i64 3
store double 0.000000e+00, double* %37
%38 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 1, i64 0
%39 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%40 = bitcast double* %39 to <2 x double>*
%41 = load <2 x double>, <2 x double>* %40
%42 = bitcast double* %38 to <2 x double>*
store <2 x double> %41, <2 x double>* %42
%43 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 1, i64 2
%44 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%45 = load double, double* %44
store double %45, double* %43
%46 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 1, i64 3
store double 0.000000e+00, double* %46
%47 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 2, i64 0
%48 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = bitcast double* %47 to <2 x double>*
store <2 x double> %50, <2 x double>* %51
%52 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 2, i64 2
%53 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%54 = load double, double* %53
store double %54, double* %52
%55 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 2, i64 3
%56 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* %5, i64 0, i64 3
%57 = bitcast [4 x double]* %56 to i8*
%58 = bitcast double* %55 to i64*
store i64 0, i64* %58
%59 = bitcast [4 x [4 x double]]* %6 to i8*
%60 = bitcast [4 x [4 x double]]* %5 to double**
%61 = bitcast [4 x [4 x double]]* %6 to double**
%62 = call i32 @mat44Transpose(double** %60, double** %61)
%63 = bitcast [4 x [4 x double]]* %4 to double**
%64 = bitcast [4 x double]* %2 to double**
%65 = call i32 @mat444Multiply(double** %61, double** %63, double** %64)
ret void
}