#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*/ printf(char *, ...);
void cout(float a[100][100], int n, int show) {
  int i, j;
  if (show == 1)
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++)
        printf(" %.2f \t", a[i][j]);
      printf("\n");
    }
  else if (show == 2) {
    printf("\n\n The Inverse Of Matrix Is : \n\n");
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++)
        printf(" %.4f \t", a[i][j]);
      printf("\n");
    }
  }
}


x86 assembly (clang, -O0):
<cout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    11ae <cout+0x9e>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a9 <cout+0x99>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118d <cout+0x7d>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe88(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1146 <cout+0x36>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <cout+0x23>
jmp    124d <cout+0x13d>
cmpl   $0x2,-0x10(%rbp)
jne    1248 <cout+0x138>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1243 <cout+0x133>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1227 <cout+0x117>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe17(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11e0 <cout+0xd0>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11cd <cout+0xbd>
jmp    1248 <cout+0x138>
jmp    124d <cout+0x13d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cout>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
cmp    $0x2,%edx
je     11a8 <cout+0x78>
cmp    $0x1,%edx
jne    1216 <cout+0xe6>
test   %ebp,%ebp
jle    1216 <cout+0xe6>
mov    %ebp,%r12d
xor    %r15d,%r15d
lea    0xea0(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%rbx,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1170 <cout+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
add    $0x190,%rbx
cmp    %r12,%r15
jne    1160 <cout+0x30>
jmp    1216 <cout+0xe6>
lea    0xe61(%rip),%rdi
call   1040 <puts@plt>
test   %ebp,%ebp
jle    1216 <cout+0xe6>
mov    %ebp,%r12d
xor    %r15d,%r15d
lea    0xe43(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%rbx,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    11e0 <cout+0xb0>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
add    $0x190,%rbx
cmp    %r12,%r15
jne    11d0 <cout+0xa0>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c" %.2f \09\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [33 x i8] c"\0A\0A The Inverse Of Matrix Is : \0A\0A\00"
@.str.3 = [8 x i8] c" %.4f \09\00"
define void @cout([100 x float]* %0, i32 %1, i32 %2) {
%4 = alloca [100 x float]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store [100 x float]* %0, [100 x float]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %41
11: ; preds = %3
store i32 0, i32* %7
br label %12
12: ; preds = %37, %11
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %40
16: ; preds = %12
store i32 0, i32* %8
br label %17
17: ; preds = %32, %16
%18 = load i32, i32* %8
%19 = load i32, i32* %5
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %35
21: ; preds = %17
%22 = load [100 x float]*, [100 x float]** %4
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [100 x float], [100 x float]* %22, i64 %24
%26 = load i32, i32* %8
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x float], [100 x float]* %25, i64 0, i64 %27
%29 = load float, float* %28
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %30)
br label %32
32: ; preds = %21
%33 = load i32, i32* %8
%34 = add nsw i32 %33, 1
store i32 %34, i32* %8
br label %17
35: ; preds = %17
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %37
37: ; preds = %35
%38 = load i32, i32* %7
%39 = add nsw i32 %38, 1
store i32 %39, i32* %7
br label %12
40: ; preds = %12
br label %76
41: ; preds = %3
%42 = load i32, i32* %6
%43 = icmp eq i32 %42, 2
br i1 %43, label %44, label %75
44: ; preds = %41
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %7
br label %46
46: ; preds = %71, %44
%47 = load i32, i32* %7
%48 = load i32, i32* %5
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %74
50: ; preds = %46
store i32 0, i32* %8
br label %51
51: ; preds = %66, %50
%52 = load i32, i32* %8
%53 = load i32, i32* %5
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %69
55: ; preds = %51
%56 = load [100 x float]*, [100 x float]** %4
%57 = load i32, i32* %7
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [100 x float], [100 x float]* %56, i64 %58
%60 = load i32, i32* %8
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [100 x float], [100 x float]* %59, i64 0, i64 %61
%63 = load float, float* %62
%64 = fpext float %63 to double
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %64)
br label %66
66: ; preds = %55
%67 = load i32, i32* %8
%68 = add nsw i32 %67, 1
store i32 %68, i32* %8
br label %51
69: ; preds = %51
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %71
71: ; preds = %69
%72 = load i32, i32* %7
%73 = add nsw i32 %72, 1
store i32 %73, i32* %7
br label %46
74: ; preds = %46
br label %75
75: ; preds = %74, %41
br label %76
76: ; preds = %75, %40
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c" %.2f \09\00"
@.str.3 = [8 x i8] c" %.4f \09\00"
@str = [32 x i8] c"\0A\0A The Inverse Of Matrix Is : \0A\00"
define void @cout([100 x float]* nocapture %0, i32 %1, i32 %2) {
switch i32 %2, label %41 [
i32 1, label %4
i32 2, label %22
]
4: ; preds = %3
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %41
6: ; preds = %4
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %18, %6
%9 = phi i64 [ 0, %6 ], [ %20, %18 ]
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %16, %10 ]
%12 = getelementptr inbounds [100 x float], [100 x float]* %0, i64 %9, i64 %11
%13 = load float, float* %12
%14 = fpext float %13 to double
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %14)
%16 = add nuw nsw i64 %11, 1
%17 = icmp eq i64 %16, %7
br i1 %17, label %18, label %10
18: ; preds = %10
%19 = tail call i32 @putchar(i32 10)
%20 = add nuw nsw i64 %9, 1
%21 = icmp eq i64 %20, %7
br i1 %21, label %41, label %8
22: ; preds = %3
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%24 = icmp sgt i32 %1, 0
br i1 %24, label %25, label %41
25: ; preds = %22
%26 = zext i32 %1 to i64
br label %27
27: ; preds = %37, %25
%28 = phi i64 [ 0, %25 ], [ %39, %37 ]
br label %29
29: ; preds = %27, %29
%30 = phi i64 [ 0, %27 ], [ %35, %29 ]
%31 = getelementptr inbounds [100 x float], [100 x float]* %0, i64 %28, i64 %30
%32 = load float, float* %31
%33 = fpext float %32 to double
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %33)
%35 = add nuw nsw i64 %30, 1
%36 = icmp eq i64 %35, %26
br i1 %36, label %37, label %29
37: ; preds = %29
%38 = tail call i32 @putchar(i32 10)
%39 = add nuw nsw i64 %28, 1
%40 = icmp eq i64 %39, %26
br i1 %40, label %41, label %27
41: ; preds = %37, %18, %22, %4, %3
ret void
}