#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*/ floyds(int **, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int no, a[10][10], i, j;
  printf("Enter the no of elem\n");
  scanf("%d", &no);
  printf("Enter the elem\n");
  for (i = 0; i < no; i++)
    for (j = 0; j < no; j++)
      scanf("%d", &a[i][j]);
  floyds(a, no);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x1b4(%rbp)
mov    -0x1b4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ff <main+0xcf>
movl   $0x0,-0x1b8(%rbp)
mov    -0x1b8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11e6 <main+0xb6>
movslq -0x1b4(%rbp),%rax
lea    -0x1b0(%rbp),%rsi
imul   $0x28,%rax,%rax
add    %rax,%rsi
movslq -0x1b8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe49(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b8(%rbp)
jmp    1194 <main+0x64>
jmp    11eb <main+0xbb>
mov    -0x1b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b4(%rbp)
jmp    117b <main+0x4b>
lea    -0x1b0(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <floyds@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a0,%rsp
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
lea    0xead(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%esi
test   %esi,%esi
jle    11cf <main+0x9f>
lea    0x10(%rsp),%r15
xor    %r12d,%r12d
lea    0xe80(%rip),%r14
jmp    11a0 <main+0x70>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %esi,%rax
add    $0x1,%r12
add    $0x28,%r15
cmp    %rax,%r12
jge    11cf <main+0x9f>
test   %esi,%esi
jle    1190 <main+0x60>
mov    %r15,%r13
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rsi
add    $0x4,%r13
cmp    %rsi,%rbx
jl     11b0 <main+0x80>
jmp    1190 <main+0x60>
lea    0x10(%rsp),%rdi
call   1050 <floyds@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Enter the no of elem\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"Enter the elem\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [10 x [10 x i32]]
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %8
br label %13
13: ; preds = %34, %2
%14 = load i32, i32* %8
%15 = load i32, i32* %6
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %37
17: ; preds = %13
store i32 0, i32* %9
br label %18
18: ; preds = %30, %17
%19 = load i32, i32* %9
%20 = load i32, i32* %6
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %33
22: ; preds = %18
%23 = load i32, i32* %8
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %7, i64 0, i64 %24
%26 = load i32, i32* %9
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [10 x i32], [10 x i32]* %25, i64 0, i64 %27
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %28)
br label %30
30: ; preds = %22
%31 = load i32, i32* %9
%32 = add nsw i32 %31, 1
store i32 %32, i32* %9
br label %18
33: ; preds = %18
br label %34
34: ; preds = %33
%35 = load i32, i32* %8
%36 = add nsw i32 %35, 1
store i32 %36, i32* %8
br label %13
37: ; preds = %13
%38 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %7, i64 0, i64 0
%39 = bitcast [10 x i32]* %38 to i32**
%40 = load i32, i32* %6
%41 = call i32 @floyds(i32** %39, i32 %40)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [21 x i8] c"Enter the no of elem\00"
@str.3 = [15 x i8] c"Enter the elem\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [10 x [10 x i32]]
%5 = bitcast i32* %3 to i8*
%6 = bitcast [10 x [10 x i32]]* %4 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.3, i64 0, i64 0))
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %29
12: ; preds = %2, %24
%13 = phi i32 [ %25, %24 ], [ %10, %2 ]
%14 = phi i64 [ %27, %24 ], [ 0, %2 ]
%15 = icmp sgt i32 %13, 0
br i1 %15, label %16, label %24
16: ; preds = %12, %16
%17 = phi i64 [ %20, %16 ], [ 0, %12 ]
%18 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %4, i64 0, i64 %14, i64 %17
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %18)
%20 = add nuw nsw i64 %17, 1
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = icmp slt i64 %20, %22
br i1 %23, label %16, label %24
24: ; preds = %16, %12
%25 = phi i32 [ %13, %12 ], [ %21, %16 ]
%26 = sext i32 %25 to i64
%27 = add nuw nsw i64 %14, 1
%28 = icmp slt i64 %27, %26
br i1 %28, label %12, label %29
29: ; preds = %24, %2
%30 = phi i32 [ %10, %2 ], [ %25, %24 ]
%31 = bitcast [10 x [10 x i32]]* %4 to i32**
%32 = call i32 @floyds(i32** %31, i32 %30)
ret i32 0
}