#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 */
double dot(int, double *, int, double *, int);
int /*<<< orphan*/ eye(int, double *);
int /*<<< orphan*/ free(double *);
int jacobi(double *, int, double *, double *, double *, double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ matmult(int, int, int, double *, double *, double *);
int /*<<< orphan*/ matmult_tn(int, int, int, double *, double *, double *);
int /*<<< orphan*/ printf(char *, int, ...);
int /*<<< orphan*/ printmat(int, int, double *, char *);
int main() {
  double *B, *C;
  int N = 3;
  double A[] = {1, 2, 3, 2, 4, 5, 3, 5, 6};
  double val = 0;
  double D[N], TMP1[N], TMP2[N];
  int info, i;
  B = (double *)malloc(N * N * sizeof(double));
  C = (double *)malloc(N * N * sizeof(double));
  eye(N, B);
  eye(N, C);
  printmat(N, N, A, "Matrix A");
  printmat(N, N, B, "Matrix B");
  matmult(N, N, N, A, A, C);
  printmat(N, N, C, "Matrix A*A");
  matmult(N, N, N, A, B, C);
  printmat(N, N, C, "Matrix A*B");
  matmult(N, N, N, B, B, C);
  printmat(N, N, C, "Matrix B*B");
  matmult_tn(N, N, N, A, B, C);
  printmat(N, N, C, "Matrix At*B");
  matmult_tn(N, N, N, A, A, C);
  printmat(N, N, C, "Matrix At*A");
  val = dot(N * N, A, 1, A, 1);
  printf("Dot product results = %f\n", val);
  info = jacobi(A, N, D, B, TMP1, TMP2);
  for (i = 0; i < N; i++)
    printf("D[%d] = %f\n", i, D[i]);
  printmat(N, N, B, "Evecs(A)");
  free(B);
  free(C);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x1c(%rbp)
mov    0xe90(%rip),%rax
mov    %rax,-0x30(%rbp)
movaps 0xe75(%rip),%xmm0
movaps %xmm0,-0x40(%rbp)
movaps 0xe5a(%rip),%xmm0
movaps %xmm0,-0x50(%rbp)
movaps 0xe3f(%rip),%xmm0
movaps %xmm0,-0x60(%rbp)
movaps 0xe24(%rip),%xmm0
movaps %xmm0,-0x70(%rbp)
movq   $0x0,-0x78(%rbp)
mov    -0x1c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x80(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xb8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x88(%rbp)
mov    -0x1c(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xb0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x98(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <eye@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1090 <eye@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
lea    -0x70(%rbp),%rdx
lea    0xd8e(%rip),%rcx
call   1060 <printmat@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xd81(%rip),%rcx
call   1060 <printmat@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    -0x70(%rbp),%rcx
lea    -0x70(%rbp),%r8
mov    -0x18(%rbp),%r9
call   1080 <matmult@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xd5a(%rip),%rcx
call   1060 <printmat@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    -0x70(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
call   1080 <matmult@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xd35(%rip),%rcx
call   1060 <printmat@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
call   1080 <matmult@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xd10(%rip),%rcx
call   1060 <printmat@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    -0x70(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
call   10a0 <matmult_tn@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xceb(%rip),%rcx
call   1060 <printmat@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    -0x70(%rbp),%rcx
lea    -0x70(%rbp),%r8
mov    -0x18(%rbp),%r9
call   10a0 <matmult_tn@plt>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xcc7(%rip),%rcx
call   1060 <printmat@plt>
mov    -0x1c(%rbp),%edi
imul   -0x1c(%rbp),%edi
lea    -0x70(%rbp),%rsi
lea    -0x70(%rbp),%rcx
mov    $0x1,%r8d
mov    %r8d,%edx
call   1030 <dot@plt>
movsd  %xmm0,-0x78(%rbp)
cvttsd2si -0x78(%rbp),%esi
lea    0xca0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0xb8(%rbp),%rdx
mov    -0xb0(%rbp),%r8
mov    -0xa8(%rbp),%r9
lea    -0x70(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rcx
call   1050 <jacobi@plt>
mov    %eax,-0x9c(%rbp)
movl   $0x0,-0xa0(%rbp)
mov    -0xa0(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1479 <main+0x2e9>
mov    -0xb8(%rbp),%rax
mov    -0xa0(%rbp),%esi
movslq -0xa0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc4f(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
jmp    142f <main+0x29f>
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xc2f(%rip),%rcx
call   1060 <printmat@plt>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rsp,%r12
mov    0xe98(%rip),%rax
mov    %rax,0x60(%rsp)
movaps 0xe7c(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe60(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe44(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movapd 0xe27(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
mov    $0x48,%edi
call   10b0 <malloc@plt>
mov    %rax,%r14
mov    $0x48,%edi
call   10b0 <malloc@plt>
mov    %rax,%rbx
mov    $0x3,%edi
mov    %r14,%rsi
call   1090 <eye@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
call   1090 <eye@plt>
lea    0xe2e(%rip),%rcx
lea    0x20(%rsp),%r15
mov    $0x3,%edi
mov    $0x3,%esi
mov    %r15,%rdx
call   1060 <printmat@plt>
lea    0xe19(%rip),%rcx
mov    $0x3,%edi
mov    $0x3,%esi
mov    %r14,%rdx
call   1060 <printmat@plt>
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x3,%edx
mov    %r15,%rcx
mov    %r15,%r8
mov    %rbx,%r9
call   1080 <matmult@plt>
lea    0xdec(%rip),%rcx
mov    $0x3,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1060 <printmat@plt>
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x3,%edx
mov    %r15,%rcx
mov    %r14,%r8
mov    %rbx,%r9
call   1080 <matmult@plt>
lea    0xdc1(%rip),%rcx
mov    $0x3,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1060 <printmat@plt>
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x3,%edx
mov    %r14,%rcx
mov    %r14,%r8
mov    %rbx,%r9
call   1080 <matmult@plt>
lea    0xd96(%rip),%rcx
mov    $0x3,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1060 <printmat@plt>
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x3,%edx
mov    %r15,%rcx
mov    %r14,%r8
mov    %rbx,%r9
call   10a0 <matmult_tn@plt>
lea    0xd6b(%rip),%rcx
mov    $0x3,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1060 <printmat@plt>
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x3,%edx
mov    %r15,%rcx
mov    %r15,%r8
mov    %rbx,%r9
call   10a0 <matmult_tn@plt>
lea    0xd41(%rip),%rcx
mov    $0x3,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1060 <printmat@plt>
mov    $0x9,%edi
mov    %r15,%rsi
mov    $0x1,%edx
mov    %r15,%rcx
mov    $0x1,%r8d
call   1030 <dot@plt>
cvttsd2si %xmm0,%esi
lea    0xd15(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rsp,%rdx
lea    0x90(%rsp),%r8
lea    0x70(%rsp),%r9
mov    %r15,%rdi
mov    $0x3,%esi
mov    %r14,%rcx
call   1050 <jacobi@plt>
movsd  (%rsp),%xmm0
lea    0xcfc(%rip),%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x8(%rsp),%xmm0
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x10(%rsp),%xmm0
mov    %r15,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1070 <printf@plt>
lea    0xccb(%rip),%rcx
mov    $0x3,%edi
mov    $0x3,%esi
mov    %r14,%rdx
call   1060 <printmat@plt>
mov    %r14,%rdi
call   1040 <free@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %r12,%rsp
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.A = [9 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 2.000000e+00, double 4.000000e+00, double 5.000000e+00, double 3.000000e+00, double 5.000000e+00, double 6.000000e+00]
@.str = [9 x i8] c"Matrix A\00"
@.str.1 = [9 x i8] c"Matrix B\00"
@.str.2 = [11 x i8] c"Matrix A*A\00"
@.str.3 = [11 x i8] c"Matrix A*B\00"
@.str.4 = [11 x i8] c"Matrix B*B\00"
@.str.5 = [12 x i8] c"Matrix At*B\00"
@.str.6 = [12 x i8] c"Matrix At*A\00"
@.str.7 = [26 x i8] c"Dot product results = %f\0A\00"
@.str.8 = [12 x i8] c"D[%d] = %f\0A\00"
@.str.9 = [9 x i8] c"Evecs(A)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double*
%3 = alloca double*
%4 = alloca i32
%5 = alloca [9 x double]
%6 = alloca double
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %4
%13 = bitcast [9 x double]* %5 to i8*
store double 0.000000e+00, double* %6
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %7
%17 = alloca double, i64 %15
store i64 %15, i64* %8
%18 = load i32, i32* %4
%19 = zext i32 %18 to i64
%20 = alloca double, i64 %19
store i64 %19, i64* %9
%21 = load i32, i32* %4
%22 = zext i32 %21 to i64
%23 = alloca double, i64 %22
store i64 %22, i64* %10
%24 = load i32, i32* %4
%25 = load i32, i32* %4
%26 = mul nsw i32 %24, %25
%27 = sext i32 %26 to i64
%28 = mul i64 %27, 8
%29 = trunc i64 %28 to i32
%30 = call i64 @malloc(i32 %29)
%31 = inttoptr i64 %30 to double*
store double* %31, double** %2
%32 = load i32, i32* %4
%33 = load i32, i32* %4
%34 = mul nsw i32 %32, %33
%35 = sext i32 %34 to i64
%36 = mul i64 %35, 8
%37 = trunc i64 %36 to i32
%38 = call i64 @malloc(i32 %37)
%39 = inttoptr i64 %38 to double*
store double* %39, double** %3
%40 = load i32, i32* %4
%41 = load double*, double** %2
%42 = call i32 @eye(i32 %40, double* %41)
%43 = load i32, i32* %4
%44 = load double*, double** %3
%45 = call i32 @eye(i32 %43, double* %44)
%46 = load i32, i32* %4
%47 = load i32, i32* %4
%48 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%49 = call i32 @printmat(i32 %46, i32 %47, double* %48, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%50 = load i32, i32* %4
%51 = load i32, i32* %4
%52 = load double*, double** %2
%53 = call i32 @printmat(i32 %50, i32 %51, double* %52, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%54 = load i32, i32* %4
%55 = load i32, i32* %4
%56 = load i32, i32* %4
%57 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%58 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%59 = load double*, double** %3
%60 = call i32 @matmult(i32 %54, i32 %55, i32 %56, double* %57, double* %58, double* %59)
%61 = load i32, i32* %4
%62 = load i32, i32* %4
%63 = load double*, double** %3
%64 = call i32 @printmat(i32 %61, i32 %62, double* %63, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%65 = load i32, i32* %4
%66 = load i32, i32* %4
%67 = load i32, i32* %4
%68 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%69 = load double*, double** %2
%70 = load double*, double** %3
%71 = call i32 @matmult(i32 %65, i32 %66, i32 %67, double* %68, double* %69, double* %70)
%72 = load i32, i32* %4
%73 = load i32, i32* %4
%74 = load double*, double** %3
%75 = call i32 @printmat(i32 %72, i32 %73, double* %74, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%76 = load i32, i32* %4
%77 = load i32, i32* %4
%78 = load i32, i32* %4
%79 = load double*, double** %2
%80 = load double*, double** %2
%81 = load double*, double** %3
%82 = call i32 @matmult(i32 %76, i32 %77, i32 %78, double* %79, double* %80, double* %81)
%83 = load i32, i32* %4
%84 = load i32, i32* %4
%85 = load double*, double** %3
%86 = call i32 @printmat(i32 %83, i32 %84, double* %85, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%87 = load i32, i32* %4
%88 = load i32, i32* %4
%89 = load i32, i32* %4
%90 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%91 = load double*, double** %2
%92 = load double*, double** %3
%93 = call i32 @matmult_tn(i32 %87, i32 %88, i32 %89, double* %90, double* %91, double* %92)
%94 = load i32, i32* %4
%95 = load i32, i32* %4
%96 = load double*, double** %3
%97 = call i32 @printmat(i32 %94, i32 %95, double* %96, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%98 = load i32, i32* %4
%99 = load i32, i32* %4
%100 = load i32, i32* %4
%101 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%102 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%103 = load double*, double** %3
%104 = call i32 @matmult_tn(i32 %98, i32 %99, i32 %100, double* %101, double* %102, double* %103)
%105 = load i32, i32* %4
%106 = load i32, i32* %4
%107 = load double*, double** %3
%108 = call i32 @printmat(i32 %105, i32 %106, double* %107, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%109 = load i32, i32* %4
%110 = load i32, i32* %4
%111 = mul nsw i32 %109, %110
%112 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%113 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%114 = call double @dot(i32 %111, double* %112, i32 1, double* %113, i32 1)
store double %114, double* %6
%115 = load double, double* %6
%116 = fptosi double %115 to i32
%117 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %116)
%118 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%119 = load i32, i32* %4
%120 = load double*, double** %2
%121 = call i32 @jacobi(double* %118, i32 %119, double* %17, double* %120, double* %20, double* %23)
store i32 %121, i32* %11
store i32 0, i32* %12
br label %122
122: ; preds = %133, %0
%123 = load i32, i32* %12
%124 = load i32, i32* %4
%125 = icmp slt i32 %123, %124
br i1 %125, label %126, label %136
126: ; preds = %122
%127 = load i32, i32* %12
%128 = load i32, i32* %12
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %17, i64 %129
%131 = load double, double* %130
%132 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 %127, double %131)
br label %133
133: ; preds = %126
%134 = load i32, i32* %12
%135 = add nsw i32 %134, 1
store i32 %135, i32* %12
br label %122
136: ; preds = %122
%137 = load i32, i32* %4
%138 = load i32, i32* %4
%139 = load double*, double** %2
%140 = call i32 @printmat(i32 %137, i32 %138, double* %139, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%141 = load double*, double** %2
%142 = call i32 @free(double* %141)
%143 = load double*, double** %3
%144 = call i32 @free(double* %143)
store i32 0, i32* %1
%145 = load i8*, i8** %7
%146 = load i32, i32* %1
ret i32 %146
}

LLVM IR (-O2):
@__const.main.A = [9 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 2.000000e+00, double 4.000000e+00, double 5.000000e+00, double 3.000000e+00, double 5.000000e+00, double 6.000000e+00]
@.str = [9 x i8] c"Matrix A\00"
@.str.1 = [9 x i8] c"Matrix B\00"
@.str.2 = [11 x i8] c"Matrix A*A\00"
@.str.3 = [11 x i8] c"Matrix A*B\00"
@.str.4 = [11 x i8] c"Matrix B*B\00"
@.str.5 = [12 x i8] c"Matrix At*B\00"
@.str.6 = [12 x i8] c"Matrix At*A\00"
@.str.7 = [26 x i8] c"Dot product results = %f\0A\00"
@.str.8 = [12 x i8] c"D[%d] = %f\0A\00"
@.str.9 = [9 x i8] c"Evecs(A)\00"
define i32 @main() {
%1 = alloca [9 x double]
%2 = bitcast [9 x double]* %1 to i8*
%3 = tail call i8* @llvm.stacksave()
%4 = alloca [3 x double]
%5 = alloca [3 x double]
%6 = alloca [3 x double]
%7 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%8 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%9 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%10 = tail call i64 @malloc(i32 72)
%11 = inttoptr i64 %10 to double*
%12 = tail call i64 @malloc(i32 72)
%13 = inttoptr i64 %12 to double*
%14 = tail call i32 @eye(i32 3, double* %11)
%15 = tail call i32 @eye(i32 3, double* %13)
%16 = getelementptr inbounds [9 x double], [9 x double]* %1, i64 0, i64 0
%17 = call i32 @printmat(i32 3, i32 3, double* %16, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @printmat(i32 3, i32 3, double* %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @matmult(i32 3, i32 3, i32 3, double* %16, double* %16, double* %13)
%20 = call i32 @printmat(i32 3, i32 3, double* %13, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @matmult(i32 3, i32 3, i32 3, double* %16, double* %11, double* %13)
%22 = call i32 @printmat(i32 3, i32 3, double* %13, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 @matmult(i32 3, i32 3, i32 3, double* %11, double* %11, double* %13)
%24 = call i32 @printmat(i32 3, i32 3, double* %13, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%25 = call i32 @matmult_tn(i32 3, i32 3, i32 3, double* %16, double* %11, double* %13)
%26 = call i32 @printmat(i32 3, i32 3, double* %13, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%27 = call i32 @matmult_tn(i32 3, i32 3, i32 3, double* %16, double* %16, double* %13)
%28 = call i32 @printmat(i32 3, i32 3, double* %13, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%29 = call double @dot(i32 9, double* %16, i32 1, double* %16, i32 1)
%30 = fptosi double %29 to i32
%31 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %30)
%32 = call i32 @jacobi(double* %16, i32 3, double* %9, double* %11, double* %8, double* %7)
%33 = load double, double* %9
%34 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 0, double %33)
%35 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%36 = load double, double* %35
%37 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 1, double %36)
%38 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%39 = load double, double* %38
%40 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 2, double %39)
%41 = call i32 @printmat(i32 3, i32 3, double* %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%42 = call i32 @free(double* %11)
%43 = call i32 @free(double* %13)
ret i32 0
}