#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*/ HECMW_vis_print_exit(char *);
double fabs(double);
void find_inverse_matrix(double coff_matrix[3][3], double inv_matrix[3][3]) {
  int i, j;
  double a[3][3], norm_a, aa[3][3];
  for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
      a[i][j] = coff_matrix[i][j];
  norm_a = a[0][0] * a[1][1] * a[2][2] + a[0][1] * a[1][2] * a[2][0] +
           a[0][2] * a[1][0] * a[2][1] - a[0][2] * a[1][1] * a[2][0] -
           a[0][1] * a[1][0] * a[2][2] - a[0][0] * a[1][2] * a[2][1];
  if (fabs(norm_a) < 1.0E-7)
    HECMW_vis_print_exit(
        "ERROR: HEC-MW-VIS-E2001: There is something wrong with transform "
        "matrix, invers =0");
  aa[0][0] = a[1][1] * a[2][2] - a[1][2] * a[2][1];
  aa[0][1] = -(a[0][1] * a[2][2] - a[2][1] * a[0][2]);
  aa[0][2] = a[0][1] * a[1][2] - a[1][1] * a[0][2];
  aa[1][0] = -(a[1][0] * a[2][2] - a[2][0] * a[1][2]);
  aa[1][1] = a[0][0] * a[2][2] - a[2][0] * a[0][2];
  aa[1][2] = -(a[0][0] * a[1][2] - a[1][0] * a[0][2]);
  aa[2][0] = a[1][0] * a[2][1] - a[2][0] * a[1][1];
  aa[2][1] = -(a[0][0] * a[2][1] - a[2][0] * a[0][1]);
  aa[2][2] = a[0][0] * a[1][1] - a[1][0] * a[0][1];
  for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
      inv_matrix[i][j] = aa[i][j] / norm_a;
  return;
}


x86 assembly (clang, -O0):
<find_inverse_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1196 <find_inverse_matrix+0x86>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    1183 <find_inverse_matrix+0x73>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x14(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113b <find_inverse_matrix+0x2b>
jmp    1188 <find_inverse_matrix+0x78>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112a <find_inverse_matrix+0x1a>
movsd  -0x60(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x58(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm1
movaps 0xda2(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xd86(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1290 <find_inverse_matrix+0x180>
lea    0xd95(%rip),%rdi
call   1030 <HECMW_vis_print_exit@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1571 <find_inverse_matrix+0x461>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    155e <find_inverse_matrix+0x44e>
movslq -0x14(%rbp),%rcx
lea    -0xb0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    150e <find_inverse_matrix+0x3fe>
jmp    1563 <find_inverse_matrix+0x453>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    14fd <find_inverse_matrix+0x3ed>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_inverse_matrix>:
push   %rbx
sub    $0xb0,%rsp
mov    %rsi,%rbx
movsd  (%rdi),%xmm7
movsd  0x8(%rdi),%xmm9
movsd  0x10(%rdi),%xmm13
movsd  0x18(%rdi),%xmm3
movsd  0x20(%rdi),%xmm12
movsd  0x28(%rdi),%xmm15
movsd  0x30(%rdi),%xmm11
movsd  0x38(%rdi),%xmm10
movsd  0x40(%rdi),%xmm5
movapd %xmm7,%xmm8
mulsd  %xmm12,%xmm8
movapd %xmm9,%xmm6
mulsd  %xmm15,%xmm6
movapd %xmm6,%xmm0
mulsd  %xmm11,%xmm0
movapd %xmm8,%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm13,%xmm4
mulsd  %xmm3,%xmm4
movsd  %xmm4,0x48(%rsp)
mulsd  %xmm10,%xmm4
addsd  %xmm1,%xmm4
movapd %xmm12,%xmm0
mulsd  %xmm13,%xmm0
movsd  %xmm0,0x40(%rsp)
mulsd  %xmm11,%xmm0
subsd  %xmm0,%xmm4
movapd %xmm3,%xmm14
mulsd  %xmm9,%xmm14
movapd %xmm14,%xmm0
mulsd  %xmm5,%xmm0
subsd  %xmm0,%xmm4
movapd %xmm15,%xmm0
mulsd  %xmm7,%xmm0
movapd %xmm0,0xa0(%rsp)
mulsd  %xmm10,%xmm0
subsd  %xmm0,%xmm4
movapd 0xe1e(%rip),%xmm0
andpd  %xmm4,%xmm0
movsd  0xe32(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    12ba <find_inverse_matrix+0x1aa>
lea    0xe29(%rip),%rdi
movapd %xmm3,0x90(%rsp)
movsd  %xmm8,0x38(%rsp)
movapd %xmm5,0x80(%rsp)
movapd %xmm6,0x70(%rsp)
movapd %xmm7,0x60(%rsp)
movapd %xmm4,0x50(%rsp)
movsd  %xmm9,0x30(%rsp)
movsd  %xmm10,0x28(%rsp)
movsd  %xmm11,0x20(%rsp)
movsd  %xmm12,0x18(%rsp)
movsd  %xmm13,0x10(%rsp)
movsd  %xmm14,0x8(%rsp)
movsd  %xmm15,(%rsp)
call   1030 <HECMW_vis_print_exit@plt>
movsd  (%rsp),%xmm15
movsd  0x8(%rsp),%xmm14
movsd  0x10(%rsp),%xmm13
movsd  0x18(%rsp),%xmm12
movsd  0x20(%rsp),%xmm11
movsd  0x28(%rsp),%xmm10
movsd  0x30(%rsp),%xmm9
movapd 0x50(%rsp),%xmm4
movapd 0x60(%rsp),%xmm7
movapd 0x70(%rsp),%xmm6
movapd 0x80(%rsp),%xmm5
movsd  0x38(%rsp),%xmm8
movapd 0x90(%rsp),%xmm3
movapd %xmm10,%xmm1
mulsd  %xmm15,%xmm1
movapd %xmm12,%xmm0
mulsd  %xmm5,%xmm0
subsd  %xmm1,%xmm0
movapd %xmm13,%xmm1
mulsd  %xmm10,%xmm1
movapd %xmm9,%xmm2
mulsd  %xmm5,%xmm2
subsd  %xmm1,%xmm2
movapd 0xd20(%rip),%xmm1
xorpd  %xmm1,%xmm2
unpcklpd %xmm2,%xmm0
subsd  0x40(%rsp),%xmm6
mulsd  %xmm11,%xmm15
movapd %xmm3,%xmm2
mulsd  %xmm5,%xmm2
subsd  %xmm15,%xmm2
xorpd  %xmm1,%xmm2
unpcklpd %xmm2,%xmm6
mulsd  %xmm11,%xmm13
mulsd  %xmm7,%xmm5
subsd  %xmm13,%xmm5
movapd 0xa0(%rsp),%xmm2
subsd  0x48(%rsp),%xmm2
xorpd  %xmm1,%xmm2
unpcklpd %xmm2,%xmm5
mulsd  %xmm11,%xmm12
mulsd  %xmm10,%xmm3
subsd  %xmm12,%xmm3
mulsd  %xmm11,%xmm9
mulsd  %xmm10,%xmm7
subsd  %xmm9,%xmm7
xorpd  %xmm1,%xmm7
unpcklpd %xmm7,%xmm3
subsd  %xmm14,%xmm8
divsd  %xmm4,%xmm8
unpcklpd %xmm4,%xmm4
divpd  %xmm4,%xmm0
movupd %xmm0,(%rbx)
divpd  %xmm4,%xmm6
movupd %xmm6,0x10(%rbx)
divpd  %xmm4,%xmm5
movupd %xmm5,0x20(%rbx)
divpd  %xmm4,%xmm3
movupd %xmm3,0x30(%rbx)
movsd  %xmm8,0x40(%rbx)
add    $0xb0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [83 x i8] c"ERROR: HEC-MW-VIS-E2001: There is something wrong with transform matrix, invers =0\00"
define void @find_inverse_matrix([3 x double]* %0, [3 x double]* %1) {
%3 = alloca [3 x double]*
%4 = alloca [3 x double]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [3 x [3 x double]]
%8 = alloca double
%9 = alloca [3 x [3 x double]]
store [3 x double]* %0, [3 x double]** %3
store [3 x double]* %1, [3 x double]** %4
store i32 0, i32* %5
br label %10
10: ; preds = %36, %2
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %39
13: ; preds = %10
store i32 0, i32* %6
br label %14
14: ; preds = %32, %13
%15 = load i32, i32* %6
%16 = icmp slt i32 %15, 3
br i1 %16, label %17, label %35
17: ; preds = %14
%18 = load [3 x double]*, [3 x double]** %3
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 %20
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %23
%25 = load double, double* %24
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 %27
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 0, i64 %30
store double %25, double* %31
br label %32
32: ; preds = %17
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %14
35: ; preds = %14
br label %36
36: ; preds = %35
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %10
39: ; preds = %10
%40 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%41 = getelementptr inbounds [3 x double], [3 x double]* %40, i64 0, i64 0
%42 = load double, double* %41
%43 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%44 = getelementptr inbounds [3 x double], [3 x double]* %43, i64 0, i64 1
%45 = load double, double* %44
%46 = fmul double %42, %45
%47 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%48 = getelementptr inbounds [3 x double], [3 x double]* %47, i64 0, i64 2
%49 = load double, double* %48
%50 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%51 = getelementptr inbounds [3 x double], [3 x double]* %50, i64 0, i64 1
%52 = load double, double* %51
%53 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%54 = getelementptr inbounds [3 x double], [3 x double]* %53, i64 0, i64 2
%55 = load double, double* %54
%56 = fmul double %52, %55
%57 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%58 = getelementptr inbounds [3 x double], [3 x double]* %57, i64 0, i64 0
%59 = load double, double* %58
%60 = fmul double %56, %59
%61 = call double @llvm.fmuladd.f64(double %46, double %49, double %60)
%62 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%63 = getelementptr inbounds [3 x double], [3 x double]* %62, i64 0, i64 2
%64 = load double, double* %63
%65 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%66 = getelementptr inbounds [3 x double], [3 x double]* %65, i64 0, i64 0
%67 = load double, double* %66
%68 = fmul double %64, %67
%69 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%70 = getelementptr inbounds [3 x double], [3 x double]* %69, i64 0, i64 1
%71 = load double, double* %70
%72 = call double @llvm.fmuladd.f64(double %68, double %71, double %61)
%73 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%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]]* %7, i64 0, i64 1
%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 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%81 = getelementptr inbounds [3 x double], [3 x double]* %80, i64 0, i64 0
%82 = load double, double* %81
%83 = fneg double %79
%84 = call double @llvm.fmuladd.f64(double %83, double %82, double %72)
%85 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%86 = getelementptr inbounds [3 x double], [3 x double]* %85, i64 0, i64 1
%87 = load double, double* %86
%88 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%89 = getelementptr inbounds [3 x double], [3 x double]* %88, i64 0, i64 0
%90 = load double, double* %89
%91 = fmul double %87, %90
%92 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%93 = getelementptr inbounds [3 x double], [3 x double]* %92, i64 0, i64 2
%94 = load double, double* %93
%95 = fneg double %91
%96 = call double @llvm.fmuladd.f64(double %95, double %94, double %84)
%97 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%98 = getelementptr inbounds [3 x double], [3 x double]* %97, i64 0, i64 0
%99 = load double, double* %98
%100 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%101 = getelementptr inbounds [3 x double], [3 x double]* %100, i64 0, i64 2
%102 = load double, double* %101
%103 = fmul double %99, %102
%104 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%105 = getelementptr inbounds [3 x double], [3 x double]* %104, i64 0, i64 1
%106 = load double, double* %105
%107 = fneg double %103
%108 = call double @llvm.fmuladd.f64(double %107, double %106, double %96)
store double %108, double* %8
%109 = load double, double* %8
%110 = call double @llvm.fabs.f64(double %109)
%111 = fcmp olt double %110, 0x3E7AD7F29ABCAF48
br i1 %111, label %112, label %114
112: ; preds = %39
%113 = call i32 @HECMW_vis_print_exit(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
br label %114
114: ; preds = %112, %39
%115 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%116 = getelementptr inbounds [3 x double], [3 x double]* %115, i64 0, i64 1
%117 = load double, double* %116
%118 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%119 = getelementptr inbounds [3 x double], [3 x double]* %118, i64 0, i64 2
%120 = load double, double* %119
%121 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%122 = getelementptr inbounds [3 x double], [3 x double]* %121, i64 0, i64 2
%123 = load double, double* %122
%124 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%125 = getelementptr inbounds [3 x double], [3 x double]* %124, i64 0, i64 1
%126 = load double, double* %125
%127 = fmul double %123, %126
%128 = fneg double %127
%129 = call double @llvm.fmuladd.f64(double %117, double %120, double %128)
%130 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 0
%131 = getelementptr inbounds [3 x double], [3 x double]* %130, i64 0, i64 0
store double %129, double* %131
%132 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%133 = getelementptr inbounds [3 x double], [3 x double]* %132, i64 0, i64 1
%134 = load double, double* %133
%135 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%136 = getelementptr inbounds [3 x double], [3 x double]* %135, i64 0, i64 2
%137 = load double, double* %136
%138 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%139 = getelementptr inbounds [3 x double], [3 x double]* %138, i64 0, i64 1
%140 = load double, double* %139
%141 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%142 = getelementptr inbounds [3 x double], [3 x double]* %141, i64 0, i64 2
%143 = load double, double* %142
%144 = fmul double %140, %143
%145 = fneg double %144
%146 = call double @llvm.fmuladd.f64(double %134, double %137, double %145)
%147 = fneg double %146
%148 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 0
%149 = getelementptr inbounds [3 x double], [3 x double]* %148, i64 0, i64 1
store double %147, double* %149
%150 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%151 = getelementptr inbounds [3 x double], [3 x double]* %150, i64 0, i64 1
%152 = load double, double* %151
%153 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%154 = getelementptr inbounds [3 x double], [3 x double]* %153, i64 0, i64 2
%155 = load double, double* %154
%156 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%157 = getelementptr inbounds [3 x double], [3 x double]* %156, i64 0, i64 1
%158 = load double, double* %157
%159 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%160 = getelementptr inbounds [3 x double], [3 x double]* %159, i64 0, i64 2
%161 = load double, double* %160
%162 = fmul double %158, %161
%163 = fneg double %162
%164 = call double @llvm.fmuladd.f64(double %152, double %155, double %163)
%165 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 0
%166 = getelementptr inbounds [3 x double], [3 x double]* %165, i64 0, i64 2
store double %164, double* %166
%167 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%168 = getelementptr inbounds [3 x double], [3 x double]* %167, i64 0, i64 0
%169 = load double, double* %168
%170 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%171 = getelementptr inbounds [3 x double], [3 x double]* %170, i64 0, i64 2
%172 = load double, double* %171
%173 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%174 = getelementptr inbounds [3 x double], [3 x double]* %173, i64 0, i64 0
%175 = load double, double* %174
%176 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%177 = getelementptr inbounds [3 x double], [3 x double]* %176, i64 0, i64 2
%178 = load double, double* %177
%179 = fmul double %175, %178
%180 = fneg double %179
%181 = call double @llvm.fmuladd.f64(double %169, double %172, double %180)
%182 = fneg double %181
%183 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 1
%184 = getelementptr inbounds [3 x double], [3 x double]* %183, i64 0, i64 0
store double %182, double* %184
%185 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%186 = getelementptr inbounds [3 x double], [3 x double]* %185, i64 0, i64 0
%187 = load double, double* %186
%188 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%189 = getelementptr inbounds [3 x double], [3 x double]* %188, i64 0, i64 2
%190 = load double, double* %189
%191 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%192 = getelementptr inbounds [3 x double], [3 x double]* %191, i64 0, i64 0
%193 = load double, double* %192
%194 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%195 = getelementptr inbounds [3 x double], [3 x double]* %194, i64 0, i64 2
%196 = load double, double* %195
%197 = fmul double %193, %196
%198 = fneg double %197
%199 = call double @llvm.fmuladd.f64(double %187, double %190, double %198)
%200 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 1
%201 = getelementptr inbounds [3 x double], [3 x double]* %200, i64 0, i64 1
store double %199, double* %201
%202 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%203 = getelementptr inbounds [3 x double], [3 x double]* %202, i64 0, i64 0
%204 = load double, double* %203
%205 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%206 = getelementptr inbounds [3 x double], [3 x double]* %205, i64 0, i64 2
%207 = load double, double* %206
%208 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%209 = getelementptr inbounds [3 x double], [3 x double]* %208, i64 0, i64 0
%210 = load double, double* %209
%211 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%212 = getelementptr inbounds [3 x double], [3 x double]* %211, i64 0, i64 2
%213 = load double, double* %212
%214 = fmul double %210, %213
%215 = fneg double %214
%216 = call double @llvm.fmuladd.f64(double %204, double %207, double %215)
%217 = fneg double %216
%218 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 1
%219 = getelementptr inbounds [3 x double], [3 x double]* %218, i64 0, i64 2
store double %217, double* %219
%220 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%221 = getelementptr inbounds [3 x double], [3 x double]* %220, i64 0, i64 0
%222 = load double, double* %221
%223 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%224 = getelementptr inbounds [3 x double], [3 x double]* %223, i64 0, i64 1
%225 = load double, double* %224
%226 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%227 = getelementptr inbounds [3 x double], [3 x double]* %226, i64 0, i64 0
%228 = load double, double* %227
%229 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%230 = getelementptr inbounds [3 x double], [3 x double]* %229, i64 0, i64 1
%231 = load double, double* %230
%232 = fmul double %228, %231
%233 = fneg double %232
%234 = call double @llvm.fmuladd.f64(double %222, double %225, double %233)
%235 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 2
%236 = getelementptr inbounds [3 x double], [3 x double]* %235, i64 0, i64 0
store double %234, double* %236
%237 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%238 = getelementptr inbounds [3 x double], [3 x double]* %237, i64 0, i64 0
%239 = load double, double* %238
%240 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%241 = getelementptr inbounds [3 x double], [3 x double]* %240, i64 0, i64 1
%242 = load double, double* %241
%243 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2
%244 = getelementptr inbounds [3 x double], [3 x double]* %243, i64 0, i64 0
%245 = load double, double* %244
%246 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%247 = getelementptr inbounds [3 x double], [3 x double]* %246, i64 0, i64 1
%248 = load double, double* %247
%249 = fmul double %245, %248
%250 = fneg double %249
%251 = call double @llvm.fmuladd.f64(double %239, double %242, double %250)
%252 = fneg double %251
%253 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 2
%254 = getelementptr inbounds [3 x double], [3 x double]* %253, i64 0, i64 1
store double %252, double* %254
%255 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%256 = getelementptr inbounds [3 x double], [3 x double]* %255, i64 0, i64 0
%257 = load double, double* %256
%258 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%259 = getelementptr inbounds [3 x double], [3 x double]* %258, i64 0, i64 1
%260 = load double, double* %259
%261 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1
%262 = getelementptr inbounds [3 x double], [3 x double]* %261, i64 0, i64 0
%263 = load double, double* %262
%264 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0
%265 = getelementptr inbounds [3 x double], [3 x double]* %264, i64 0, i64 1
%266 = load double, double* %265
%267 = fmul double %263, %266
%268 = fneg double %267
%269 = call double @llvm.fmuladd.f64(double %257, double %260, double %268)
%270 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 2
%271 = getelementptr inbounds [3 x double], [3 x double]* %270, i64 0, i64 2
store double %269, double* %271
store i32 0, i32* %5
br label %272
272: ; preds = %300, %114
%273 = load i32, i32* %5
%274 = icmp slt i32 %273, 3
br i1 %274, label %275, label %303
275: ; preds = %272
store i32 0, i32* %6
br label %276
276: ; preds = %296, %275
%277 = load i32, i32* %6
%278 = icmp slt i32 %277, 3
br i1 %278, label %279, label %299
279: ; preds = %276
%280 = load i32, i32* %5
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %9, i64 0, i64 %281
%283 = load i32, i32* %6
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds [3 x double], [3 x double]* %282, i64 0, i64 %284
%286 = load double, double* %285
%287 = load double, double* %8
%288 = fdiv double %286, %287
%289 = load [3 x double]*, [3 x double]** %4
%290 = load i32, i32* %5
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds [3 x double], [3 x double]* %289, i64 %291
%293 = load i32, i32* %6
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds [3 x double], [3 x double]* %292, i64 0, i64 %294
store double %288, double* %295
br label %296
296: ; preds = %279
%297 = load i32, i32* %6
%298 = add nsw i32 %297, 1
store i32 %298, i32* %6
br label %276
299: ; preds = %276
br label %300
300: ; preds = %299
%301 = load i32, i32* %5
%302 = add nsw i32 %301, 1
store i32 %302, i32* %5
br label %272
303: ; preds = %272
ret void
}

LLVM IR (-O2):
@.str = [83 x i8] c"ERROR: HEC-MW-VIS-E2001: There is something wrong with transform matrix, invers =0\00"
define void @find_inverse_matrix([3 x double]* nocapture %0, [3 x double]* nocapture writeonly %1) {
%3 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%4 = load double, double* %3
%5 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%10 = load double, double* %9
%11 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%12 = load double, double* %11
%13 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%16 = load double, double* %15
%17 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%18 = load double, double* %17
%19 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%20 = load double, double* %19
%21 = fmul double %4, %12
%22 = fmul double %6, %14
%23 = fmul double %22, %16
%24 = tail call double @llvm.fmuladd.f64(double %21, double %20, double %23)
%25 = fmul double %8, %10
%26 = tail call double @llvm.fmuladd.f64(double %25, double %18, double %24)
%27 = fneg double %8
%28 = fmul double %12, %27
%29 = tail call double @llvm.fmuladd.f64(double %28, double %16, double %26)
%30 = fneg double %6
%31 = fmul double %10, %30
%32 = tail call double @llvm.fmuladd.f64(double %31, double %20, double %29)
%33 = fneg double %4
%34 = fmul double %14, %33
%35 = tail call double @llvm.fmuladd.f64(double %34, double %18, double %32)
%36 = tail call double @llvm.fabs.f64(double %35)
%37 = fcmp olt double %36, 0x3E7AD7F29ABCAF48
br i1 %37, label %38, label %40
38: ; preds = %2
%39 = tail call i32 @HECMW_vis_print_exit(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
br label %40
40: ; preds = %38, %2
%41 = fneg double %14
%42 = fmul double %18, %41
%43 = tail call double @llvm.fmuladd.f64(double %12, double %20, double %42)
%44 = fneg double %18
%45 = fmul double %8, %44
%46 = tail call double @llvm.fmuladd.f64(double %6, double %20, double %45)
%47 = fneg double %46
%48 = fneg double %12
%49 = fmul double %8, %48
%50 = tail call double @llvm.fmuladd.f64(double %6, double %14, double %49)
%51 = fneg double %16
%52 = fmul double %14, %51
%53 = tail call double @llvm.fmuladd.f64(double %10, double %20, double %52)
%54 = fneg double %53
%55 = fmul double %8, %51
%56 = tail call double @llvm.fmuladd.f64(double %4, double %20, double %55)
%57 = fneg double %10
%58 = fmul double %8, %57
%59 = tail call double @llvm.fmuladd.f64(double %4, double %14, double %58)
%60 = fneg double %59
%61 = fmul double %12, %51
%62 = tail call double @llvm.fmuladd.f64(double %10, double %18, double %61)
%63 = fmul double %6, %51
%64 = tail call double @llvm.fmuladd.f64(double %4, double %18, double %63)
%65 = fneg double %64
%66 = fmul double %6, %57
%67 = tail call double @llvm.fmuladd.f64(double %4, double %12, double %66)
%68 = insertelement <2 x double> poison, double %43, i64 0
%69 = insertelement <2 x double> %68, double %47, i64 1
%70 = insertelement <2 x double> poison, double %35, i64 0
%71 = shufflevector <2 x double> %70, <2 x double> poison, <2 x i32> zeroinitializer
%72 = fdiv <2 x double> %69, %71
%73 = bitcast [3 x double]* %1 to <2 x double>*
store <2 x double> %72, <2 x double>* %73
%74 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 2
%75 = insertelement <2 x double> poison, double %50, i64 0
%76 = insertelement <2 x double> %75, double %54, i64 1
%77 = fdiv <2 x double> %76, %71
%78 = bitcast double* %74 to <2 x double>*
store <2 x double> %77, <2 x double>* %78
%79 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 1
%80 = insertelement <2 x double> poison, double %56, i64 0
%81 = insertelement <2 x double> %80, double %60, i64 1
%82 = fdiv <2 x double> %81, %71
%83 = bitcast double* %79 to <2 x double>*
store <2 x double> %82, <2 x double>* %83
%84 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 0
%85 = insertelement <2 x double> poison, double %62, i64 0
%86 = insertelement <2 x double> %85, double %65, i64 1
%87 = fdiv <2 x double> %86, %71
%88 = bitcast double* %84 to <2 x double>*
store <2 x double> %87, <2 x double>* %88
%89 = fdiv double %67, %35
%90 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 2
store double %89, double* %90
ret void
}