#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*/ clrscr();
int det3(int **);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main(void) {
  int A[3][3], B[3], detx[3][3], dety[3][3], detz[3][3];
  clrscr();
  printf("\tCramer's Rule Calculator\nEnter coeffiecients only of x1, x2, x3, "
         "b of each equation.");
  printf("\n\nEnter eqn. 1 : ");
  scanf("%d %d %d %d", &A[0][0], &A[0][1], &A[0][2], &B[0]);
  printf("\nEnter eqn. 2 : ");
  scanf("%d %d %d %d", &A[1][0], &A[1][1], &A[1][2], &B[1]);
  printf("\nEnter eqn. 3 : ");
  scanf("%d %d %d %d", &A[2][0], &A[2][1], &A[2][2], &B[2]);
  detx[3][3] = ((B[0] * A[0][1] * A[0][2]) * (B[1] * A[1][1] * A[1][2]) *
                (B[2] * A[2][1] * A[2][2]));
  dety[3][3] = ((A[0][0] * B[0] * A[0][2]) * (A[1][0] * B[1] * A[1][2]) *
                (A[2][0] * B[2] * A[2][2]));
  detz[3][3] = ((A[0][0] * A[0][1] * B[0]) * (A[1][0] * A[1][1] * B[1]) *
                (A[2][0] * A[2][1] * B[2]));
  if (det3(A) != 0)
    printf("\nSystem has a unique solution ( %d, %d, %d)", det3(detx) / det3(A),
           det3(dety) / det3(A), det3(detz) / det3(A));
  else
    printf("\nSystem does not have a unique solution because determinant is 0");
  getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clrscr@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    -0x30(%rbp),%rdx
add    $0x4,%rdx
lea    -0x30(%rbp),%rcx
add    $0x8,%rcx
lea    -0x3c(%rbp),%r8
lea    0xec4(%rip),%rdi
call   1060 <scanf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0xc,%rsi
lea    -0x30(%rbp),%rdx
add    $0xc,%rdx
add    $0x4,%rdx
lea    -0x30(%rbp),%rcx
add    $0xc,%rcx
add    $0x8,%rcx
lea    -0x3c(%rbp),%r8
add    $0x4,%r8
lea    0xe82(%rip),%rdi
call   1060 <scanf@plt>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0x18,%rsi
lea    -0x30(%rbp),%rdx
add    $0x18,%rdx
add    $0x4,%rdx
lea    -0x30(%rbp),%rcx
add    $0x18,%rcx
add    $0x8,%rcx
lea    -0x3c(%rbp),%r8
add    $0x8,%r8
lea    0xe40(%rip),%rdi
call   1060 <scanf@plt>
mov    -0x3c(%rbp),%eax
imul   -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
mov    -0x38(%rbp),%ecx
imul   -0x20(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
imul   %ecx,%eax
mov    -0x34(%rbp),%ecx
imul   -0x14(%rbp),%ecx
imul   -0x10(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
imul   -0x3c(%rbp),%eax
imul   -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
imul   -0x38(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
imul   %ecx,%eax
mov    -0x18(%rbp),%ecx
imul   -0x34(%rbp),%ecx
imul   -0x10(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x60(%rbp)
mov    -0x30(%rbp),%eax
imul   -0x2c(%rbp),%eax
imul   -0x3c(%rbp),%eax
mov    -0x24(%rbp),%ecx
imul   -0x20(%rbp),%ecx
imul   -0x38(%rbp),%ecx
imul   %ecx,%eax
mov    -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
imul   -0x34(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x90(%rbp)
lea    -0x30(%rbp),%rdi
call   1050 <det3@plt>
cmp    $0x0,%eax
je     135c <main+0x20c>
lea    -0x60(%rbp),%rdi
call   1050 <det3@plt>
mov    %eax,-0xd4(%rbp)
lea    -0x30(%rbp),%rdi
call   1050 <det3@plt>
mov    %eax,%ecx
mov    -0xd4(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0xcc(%rbp)
lea    -0x90(%rbp),%rdi
call   1050 <det3@plt>
mov    %eax,-0xd0(%rbp)
lea    -0x30(%rbp),%rdi
call   1050 <det3@plt>
mov    %eax,%ecx
mov    -0xd0(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0xc4(%rbp)
lea    -0xc0(%rbp),%rdi
call   1050 <det3@plt>
mov    %eax,-0xc8(%rbp)
lea    -0x30(%rbp),%rdi
call   1050 <det3@plt>
mov    -0xcc(%rbp),%esi
mov    %eax,%ecx
mov    -0xc8(%rbp),%eax
cltd
idiv   %ecx
mov    -0xc4(%rbp),%edx
mov    %eax,%ecx
lea    0xd46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    136a <main+0x21a>
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <getch@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xb8,%rsp
xor    %eax,%eax
call   1030 <clrscr@plt>
lea    0xe95(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0xed7(%rip),%rbx
mov    %rsp,%r14
lea    0x24(%rsp),%r8
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x28(%rsp),%r8
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%rsi
lea    0x1c(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x2c(%rsp),%r8
mov    %rbx,%rdi
call   1060 <scanf@plt>
mov    (%rsp),%eax
mov    0x8(%rsp),%esi
mov    0x10(%rsp),%ecx
mov    0x14(%rsp),%r9d
mov    0x28(%rsp),%edx
mov    0x2c(%rsp),%r10d
mov    0x1c(%rsp),%r8d
mov    0x20(%rsp),%ebx
imul   0x24(%rsp),%edx
mov    0x4(%rsp),%r11d
imul   %edx,%r11d
mov    %esi,%ebp
imul   %ecx,%ebp
imul   %r9d,%ebp
imul   %r11d,%ebp
mov    %r10d,%edi
imul   %r8d,%edi
imul   %ebx,%edi
imul   %ebp,%edi
mov    %edi,0xc0(%rsp)
mov    0xc(%rsp),%edi
mov    0x18(%rsp),%ebp
imul   %r9d,%esi
imul   %edx,%esi
imul   %r10d,%ebx
imul   %eax,%ebx
imul   %esi,%ebx
imul   %edi,%eax
imul   %ebp,%edi
imul   %ebx,%edi
mov    %edi,0x90(%rsp)
imul   %r10d,%ecx
imul   %r8d,%ecx
imul   %r11d,%ecx
imul   %ebp,%eax
imul   %ecx,%eax
mov    %eax,0x60(%rsp)
mov    %r14,%rdi
call   1050 <det3@plt>
test   %eax,%eax
je     1307 <main+0x1b7>
lea    0x90(%rsp),%rdi
call   1050 <det3@plt>
mov    %eax,%ebp
mov    %rsp,%r15
mov    %r15,%rdi
call   1050 <det3@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %eax,%r14d
lea    0x60(%rsp),%rdi
call   1050 <det3@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   1050 <det3@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %eax,%ebp
lea    0x30(%rsp),%rdi
call   1050 <det3@plt>
mov    %eax,%ebx
mov    %r15,%rdi
call   1050 <det3@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
lea    0xd9f(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1315 <main+0x1c5>
lea    0xdb4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <getch@plt>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [86 x i8] c"\09Cramer's Rule Calculator\0AEnter coeffiecients only of x1, x2, x3, b of each equation.\00"
@.str.1 = [18 x i8] c"\0A\0AEnter eqn. 1 : \00"
@.str.2 = [12 x i8] c"%d %d %d %d\00"
@.str.3 = [17 x i8] c"\0AEnter eqn. 2 : \00"
@.str.4 = [17 x i8] c"\0AEnter eqn. 3 : \00"
@.str.5 = [44 x i8] c"\0ASystem has a unique solution ( %d, %d, %d)\00"
@.str.6 = [65 x i8] c"\0ASystem does not have a unique solution because determinant is 0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [3 x i32]]
%3 = alloca [3 x i32]
%4 = alloca [3 x [3 x i32]]
%5 = alloca [3 x [3 x i32]]
%6 = alloca [3 x [3 x i32]]
store i32 0, i32* %1
%7 = call i32 (...) @clrscr()
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%10 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
%12 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 1
%14 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %14, i64 0, i64 2
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%17 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %11, i32* %13, i32* %15, i32* %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%19 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %19, i64 0, i64 0
%21 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %21, i64 0, i64 1
%23 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 2
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%26 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %20, i32* %22, i32* %24, i32* %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%28 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%29 = getelementptr inbounds [3 x i32], [3 x i32]* %28, i64 0, i64 0
%30 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %30, i64 0, i64 1
%32 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%33 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%35 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %29, i32* %31, i32* %33, i32* %34)
%36 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%37 = load i32, i32* %36
%38 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%39 = getelementptr inbounds [3 x i32], [3 x i32]* %38, i64 0, i64 1
%40 = load i32, i32* %39
%41 = mul nsw i32 %37, %40
%42 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%43 = getelementptr inbounds [3 x i32], [3 x i32]* %42, i64 0, i64 2
%44 = load i32, i32* %43
%45 = mul nsw i32 %41, %44
%46 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%47 = load i32, i32* %46
%48 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%49 = getelementptr inbounds [3 x i32], [3 x i32]* %48, i64 0, i64 1
%50 = load i32, i32* %49
%51 = mul nsw i32 %47, %50
%52 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%53 = getelementptr inbounds [3 x i32], [3 x i32]* %52, i64 0, i64 2
%54 = load i32, i32* %53
%55 = mul nsw i32 %51, %54
%56 = mul nsw i32 %45, %55
%57 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%58 = load i32, i32* %57
%59 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%60 = getelementptr inbounds [3 x i32], [3 x i32]* %59, i64 0, i64 1
%61 = load i32, i32* %60
%62 = mul nsw i32 %58, %61
%63 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%64 = getelementptr inbounds [3 x i32], [3 x i32]* %63, i64 0, i64 2
%65 = load i32, i32* %64
%66 = mul nsw i32 %62, %65
%67 = mul nsw i32 %56, %66
%68 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 3
%69 = getelementptr inbounds [3 x i32], [3 x i32]* %68, i64 0, i64 3
store i32 %67, i32* %69
%70 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%71 = getelementptr inbounds [3 x i32], [3 x i32]* %70, i64 0, i64 0
%72 = load i32, i32* %71
%73 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%74 = load i32, i32* %73
%75 = mul nsw i32 %72, %74
%76 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%77 = getelementptr inbounds [3 x i32], [3 x i32]* %76, i64 0, i64 2
%78 = load i32, i32* %77
%79 = mul nsw i32 %75, %78
%80 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%81 = getelementptr inbounds [3 x i32], [3 x i32]* %80, i64 0, i64 0
%82 = load i32, i32* %81
%83 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%84 = load i32, i32* %83
%85 = mul nsw i32 %82, %84
%86 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%87 = getelementptr inbounds [3 x i32], [3 x i32]* %86, i64 0, i64 2
%88 = load i32, i32* %87
%89 = mul nsw i32 %85, %88
%90 = mul nsw i32 %79, %89
%91 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%92 = getelementptr inbounds [3 x i32], [3 x i32]* %91, i64 0, i64 0
%93 = load i32, i32* %92
%94 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%95 = load i32, i32* %94
%96 = mul nsw i32 %93, %95
%97 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%98 = getelementptr inbounds [3 x i32], [3 x i32]* %97, i64 0, i64 2
%99 = load i32, i32* %98
%100 = mul nsw i32 %96, %99
%101 = mul nsw i32 %90, %100
%102 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %5, i64 0, i64 3
%103 = getelementptr inbounds [3 x i32], [3 x i32]* %102, i64 0, i64 3
store i32 %101, i32* %103
%104 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%105 = getelementptr inbounds [3 x i32], [3 x i32]* %104, i64 0, i64 0
%106 = load i32, i32* %105
%107 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%108 = getelementptr inbounds [3 x i32], [3 x i32]* %107, i64 0, i64 1
%109 = load i32, i32* %108
%110 = mul nsw i32 %106, %109
%111 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%112 = load i32, i32* %111
%113 = mul nsw i32 %110, %112
%114 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%115 = getelementptr inbounds [3 x i32], [3 x i32]* %114, i64 0, i64 0
%116 = load i32, i32* %115
%117 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%118 = getelementptr inbounds [3 x i32], [3 x i32]* %117, i64 0, i64 1
%119 = load i32, i32* %118
%120 = mul nsw i32 %116, %119
%121 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%122 = load i32, i32* %121
%123 = mul nsw i32 %120, %122
%124 = mul nsw i32 %113, %123
%125 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%126 = getelementptr inbounds [3 x i32], [3 x i32]* %125, i64 0, i64 0
%127 = load i32, i32* %126
%128 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%129 = getelementptr inbounds [3 x i32], [3 x i32]* %128, i64 0, i64 1
%130 = load i32, i32* %129
%131 = mul nsw i32 %127, %130
%132 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%133 = load i32, i32* %132
%134 = mul nsw i32 %131, %133
%135 = mul nsw i32 %124, %134
%136 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %6, i64 0, i64 3
%137 = getelementptr inbounds [3 x i32], [3 x i32]* %136, i64 0, i64 3
store i32 %135, i32* %137
%138 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%139 = bitcast [3 x i32]* %138 to i32**
%140 = call i32 @det3(i32** %139)
%141 = icmp ne i32 %140, 0
br i1 %141, label %142, label %165
142: ; preds = %0
%143 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 0
%144 = bitcast [3 x i32]* %143 to i32**
%145 = call i32 @det3(i32** %144)
%146 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%147 = bitcast [3 x i32]* %146 to i32**
%148 = call i32 @det3(i32** %147)
%149 = sdiv i32 %145, %148
%150 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %5, i64 0, i64 0
%151 = bitcast [3 x i32]* %150 to i32**
%152 = call i32 @det3(i32** %151)
%153 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%154 = bitcast [3 x i32]* %153 to i32**
%155 = call i32 @det3(i32** %154)
%156 = sdiv i32 %152, %155
%157 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %6, i64 0, i64 0
%158 = bitcast [3 x i32]* %157 to i32**
%159 = call i32 @det3(i32** %158)
%160 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%161 = bitcast [3 x i32]* %160 to i32**
%162 = call i32 @det3(i32** %161)
%163 = sdiv i32 %159, %162
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i32 %149, i32 %156, i32 %163)
br label %167
165: ; preds = %0
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.6, i64 0, i64 0))
br label %167
167: ; preds = %165, %142
%168 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [86 x i8] c"\09Cramer's Rule Calculator\0AEnter coeffiecients only of x1, x2, x3, b of each equation.\00"
@.str.1 = [18 x i8] c"\0A\0AEnter eqn. 1 : \00"
@.str.2 = [12 x i8] c"%d %d %d %d\00"
@.str.3 = [17 x i8] c"\0AEnter eqn. 2 : \00"
@.str.4 = [17 x i8] c"\0AEnter eqn. 3 : \00"
@.str.5 = [44 x i8] c"\0ASystem has a unique solution ( %d, %d, %d)\00"
@.str.6 = [65 x i8] c"\0ASystem does not have a unique solution because determinant is 0\00"
define i32 @main() {
%1 = alloca [3 x [3 x i32]]
%2 = alloca [3 x i32]
%3 = alloca [3 x [3 x i32]]
%4 = alloca [3 x [3 x i32]]
%5 = alloca [3 x [3 x i32]]
%6 = bitcast [3 x [3 x i32]]* %1 to i8*
%7 = bitcast [3 x i32]* %2 to i8*
%8 = bitcast [3 x [3 x i32]]* %3 to i8*
%9 = bitcast [3 x [3 x i32]]* %4 to i8*
%10 = bitcast [3 x [3 x i32]]* %5 to i8*
%11 = tail call i32 (...) @clrscr()
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%14 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 0
%15 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 1
%16 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 2
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%18 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %14, i32* %15, i32* %16, i32* %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%20 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 0
%21 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 1
%22 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 2
%23 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%24 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %20, i32* %21, i32* %22, i32* %23)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%26 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 0
%27 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 1
%28 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 2
%29 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%30 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %26, i32* %27, i32* %28, i32* %29)
%31 = load i32, i32* %17
%32 = load i32, i32* %15
%33 = load i32, i32* %16
%34 = load i32, i32* %23
%35 = load i32, i32* %21
%36 = load i32, i32* %22
%37 = load i32, i32* %29
%38 = load i32, i32* %27
%39 = load i32, i32* %28
%40 = mul i32 %34, %31
%41 = mul i32 %40, %32
%42 = mul i32 %41, %33
%43 = mul i32 %42, %35
%44 = mul i32 %43, %36
%45 = mul i32 %44, %37
%46 = mul i32 %45, %38
%47 = mul i32 %46, %39
%48 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 3, i64 3
store i32 %47, i32* %48
%49 = load i32, i32* %14
%50 = load i32, i32* %20
%51 = load i32, i32* %26
%52 = mul i32 %40, %33
%53 = mul i32 %52, %36
%54 = mul i32 %53, %37
%55 = mul i32 %54, %39
%56 = mul i32 %55, %49
%57 = mul i32 %56, %50
%58 = mul i32 %57, %51
%59 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 3, i64 3
store i32 %58, i32* %59
%60 = mul i32 %41, %35
%61 = mul i32 %60, %37
%62 = mul i32 %61, %38
%63 = mul i32 %62, %49
%64 = mul i32 %63, %50
%65 = mul i32 %64, %51
%66 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %5, i64 0, i64 3, i64 3
store i32 %65, i32* %66
%67 = bitcast [3 x [3 x i32]]* %1 to i32**
%68 = call i32 @det3(i32** %67)
%69 = icmp eq i32 %68, 0
br i1 %69, label %84, label %70
70: ; preds = %0
%71 = bitcast [3 x [3 x i32]]* %3 to i32**
%72 = call i32 @det3(i32** %71)
%73 = call i32 @det3(i32** %67)
%74 = sdiv i32 %72, %73
%75 = bitcast [3 x [3 x i32]]* %4 to i32**
%76 = call i32 @det3(i32** %75)
%77 = call i32 @det3(i32** %67)
%78 = sdiv i32 %76, %77
%79 = bitcast [3 x [3 x i32]]* %5 to i32**
%80 = call i32 @det3(i32** %79)
%81 = call i32 @det3(i32** %67)
%82 = sdiv i32 %80, %81
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i32 %74, i32 %78, i32 %82)
br label %86
84: ; preds = %0
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.6, i64 0, i64 0))
br label %86
86: ; preds = %84, %70
%87 = call i32 (...) @getch()
ret i32 0
}