#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*/ dist(int **, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int a[10][10], i, j, n, flag, temp = 1;
  printf("enter the number of nodes\n");
  scanf("%d", &n);
  printf("enter the matrix 0 for self loop and 999 for no path \n");
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      scanf("%d", &a[i][j]);
    }
  }
  for (i = 1; i <= n; i++) {
    printf("initial record of %d is \n", i);
    for (j = 1; j <= n; j++)
      printf("%d to %d is %d\n", i, j, a[i][j]);
  }
  dist(a, n);
  for (i = 1; i <= n; i++) {
    printf("updated record of %d is \n", i);
    for (j = 1; j <= n; j++) {
      printf("%d to %d is %d\n", i, j, a[i][j]);
    }
  }
  do {
    printf("enter 1 to find shortest path or 0 to exit n");
    scanf("%d", &flag);
    if (flag == 0)
      printf("enter two nodes \n");
    scanf("%d %d", &i, &j);
    printf("%d to %d is %d\n", i, j, a[i][j]);
  } while (flag != 0);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x1b4(%rbp)
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf67(%rip),%rdi
lea    -0x1ac(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
cmp    -0x1ac(%rbp),%eax
jg     1223 <main+0xe3>
movl   $0x1,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
cmp    -0x1ac(%rbp),%eax
jg     120a <main+0xca>
movslq -0x1a4(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
imul   $0x28,%rax,%rax
add    %rax,%rsi
movslq -0x1a8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    11b3 <main+0x73>
jmp    120f <main+0xcf>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1197 <main+0x57>
movl   $0x1,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
cmp    -0x1ac(%rbp),%eax
jg     12d5 <main+0x195>
mov    -0x1a4(%rbp),%esi
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
cmp    -0x1ac(%rbp),%eax
jg     12bc <main+0x17c>
mov    -0x1a4(%rbp),%esi
mov    -0x1a8(%rbp),%edx
movslq -0x1a4(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1a8(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xdcb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    125d <main+0x11d>
jmp    12c1 <main+0x181>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    122d <main+0xed>
lea    -0x1a0(%rbp),%rdi
mov    -0x1ac(%rbp),%esi
call   1040 <dist@plt>
movl   $0x1,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
cmp    -0x1ac(%rbp),%eax
jg     1399 <main+0x259>
mov    -0x1a4(%rbp),%esi
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
cmp    -0x1ac(%rbp),%eax
jg     1380 <main+0x240>
mov    -0x1a4(%rbp),%esi
mov    -0x1a8(%rbp),%edx
movslq -0x1a4(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1a8(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xd07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1321 <main+0x1e1>
jmp    1385 <main+0x245>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    12f1 <main+0x1b1>
jmp    139e <main+0x25e>
lea    0xcf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd25(%rip),%rdi
lea    -0x1b0(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cmpl   $0x0,-0x1b0(%rbp)
jne    13dc <main+0x29c>
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcf2(%rip),%rdi
lea    -0x1a4(%rbp),%rsi
lea    -0x1a8(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x1a4(%rbp),%esi
mov    -0x1a8(%rbp),%edx
movslq -0x1a4(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1a8(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xc42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x1b0(%rbp)
jne    139e <main+0x25e>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
mov    (%rsp),%esi
test   %esi,%esi
jle    120e <main+0xbe>
lea    0x3c(%rsp),%r14
mov    $0x1,%r15d
lea    0xed1(%rip),%r12
jmp    11c0 <main+0x70>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1(%r15),%eax
add    $0x28,%r14
cmp    %esi,%r15d
mov    %eax,%r15d
jge    1206 <main+0xb6>
movl   $0x1,0x4(%rsp)
test   %esi,%esi
jle    11b0 <main+0x60>
mov    $0x2,%ebx
mov    %r14,%rbp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %ebx,0x4(%rsp)
mov    (%rsp),%esi
add    $0x4,%rbp
lea    0x1(%rbx),%eax
add    $0xffffffff,%ebx
cmp    %esi,%ebx
mov    %eax,%ebx
jl     11e0 <main+0x90>
jmp    11b0 <main+0x60>
test   %esi,%esi
jg     135a <main+0x20a>
lea    0x10(%rsp),%r15
mov    %r15,%rdi
call   1050 <dist@plt>
movl   $0x1,0x8(%rsp)
cmpl   $0x0,(%rsp)
jg     12d1 <main+0x181>
lea    0xe40(%rip),%r15
lea    0xc(%rsp),%r13
lea    0xe31(%rip),%rbx
lea    0x8(%rsp),%rbp
lea    0x4(%rsp),%r12
lea    0xdc9(%rip),%r14
jmp    129a <main+0x14a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
movslq 0x8(%rsp),%rsi
movslq 0x4(%rsp),%rdx
lea    (%rsi,%rsi,4),%rax
lea    (%rsp,%rax,8),%rax
add    $0x10,%rax
mov    (%rax,%rdx,4),%ecx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,0xc(%rsp)
je     12ca <main+0x17a>
lea    0xda3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jne    1260 <main+0x110>
lea    0xe04(%rip),%rdi
call   1030 <puts@plt>
jmp    1260 <main+0x110>
xor    %edi,%edi
call   1070 <exit@plt>
mov    $0x1,%r13d
lea    0xd4c(%rip),%r14
lea    0xd35(%rip),%r12
jmp    1308 <main+0x1b8>
nopw   0x0(%rax,%rax,1)
lea    0x1(%r13),%ecx
mov    %ecx,0x8(%rsp)
add    $0x28,%r15
cmp    %eax,%r13d
mov    %ecx,%r13d
jge    122d <main+0xdd>
mov    %r14,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x1,0x4(%rsp)
mov    (%rsp),%eax
test   %eax,%eax
jle    12f0 <main+0x1a0>
mov    $0xb,%ebx
nopl   0x0(%rax)
lea    -0xa(%rbx),%ebp
mov    (%r15,%rbx,4),%ecx
mov    %r12,%rdi
mov    %r13d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    -0x9(%rbx),%eax
mov    %eax,0x4(%rsp)
mov    (%rsp),%eax
add    $0x1,%rbx
cmp    %eax,%ebp
jl     1330 <main+0x1e0>
jmp    12f0 <main+0x1a0>
mov    $0x1,%r13d
lea    0x10(%rsp),%r12
lea    0xc94(%rip),%r14
lea    0xca7(%rip),%r15
jmp    1394 <main+0x244>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1(%r13),%eax
add    $0x28,%r12
cmp    %esi,%r13d
mov    %eax,%r13d
jge    120e <main+0xbe>
mov    %r14,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x1,0x4(%rsp)
mov    (%rsp),%esi
test   %esi,%esi
jle    1380 <main+0x230>
mov    $0xb,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0xa(%rbx),%ebp
mov    (%r12,%rbx,4),%ecx
mov    %r15,%rdi
mov    %r13d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    -0x9(%rbx),%eax
mov    %eax,0x4(%rsp)
mov    (%rsp),%esi
add    $0x1,%rbx
cmp    %esi,%ebp
jl     13c0 <main+0x270>
jmp    1380 <main+0x230>

LLVM IR (-O0):
@.str = [27 x i8] c"enter the number of nodes\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [55 x i8] c"enter the matrix 0 for self loop and 999 for no path \0A\00"
@.str.3 = [26 x i8] c"initial record of %d is \0A\00"
@.str.4 = [16 x i8] c"%d to %d is %d\0A\00"
@.str.5 = [26 x i8] c"updated record of %d is \0A\00"
@.str.6 = [45 x i8] c"enter 1 to find shortest path or 0 to exit n\00"
@.str.7 = [18 x i8] c"enter two nodes \0A\00"
@.str.8 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [10 x i32]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %11
11: ; preds = %32, %0
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %35
15: ; preds = %11
store i32 1, i32* %4
br label %16
16: ; preds = %28, %15
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = icmp sle i32 %17, %18
br i1 %19, label %20, label %31
20: ; preds = %16
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 %22
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %23, i64 0, i64 %25
%27 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %26)
br label %28
28: ; preds = %20
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %16
31: ; preds = %16
br label %32
32: ; preds = %31
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %11
35: ; preds = %11
store i32 1, i32* %3
br label %36
36: ; preds = %62, %35
%37 = load i32, i32* %3
%38 = load i32, i32* %5
%39 = icmp sle i32 %37, %38
br i1 %39, label %40, label %65
40: ; preds = %36
%41 = load i32, i32* %3
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %41)
store i32 1, i32* %4
br label %43
43: ; preds = %58, %40
%44 = load i32, i32* %4
%45 = load i32, i32* %5
%46 = icmp sle i32 %44, %45
br i1 %46, label %47, label %61
47: ; preds = %43
%48 = load i32, i32* %3
%49 = load i32, i32* %4
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 %51
%53 = load i32, i32* %4
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [10 x i32], [10 x i32]* %52, i64 0, i64 %54
%56 = load i32, i32* %55
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %48, i32 %49, i32 %56)
br label %58
58: ; preds = %47
%59 = load i32, i32* %4
%60 = add nsw i32 %59, 1
store i32 %60, i32* %4
br label %43
61: ; preds = %43
br label %62
62: ; preds = %61
%63 = load i32, i32* %3
%64 = add nsw i32 %63, 1
store i32 %64, i32* %3
br label %36
65: ; preds = %36
%66 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 0
%67 = bitcast [10 x i32]* %66 to i32**
%68 = load i32, i32* %5
%69 = call i32 @dist(i32** %67, i32 %68)
store i32 1, i32* %3
br label %70
70: ; preds = %96, %65
%71 = load i32, i32* %3
%72 = load i32, i32* %5
%73 = icmp sle i32 %71, %72
br i1 %73, label %74, label %99
74: ; preds = %70
%75 = load i32, i32* %3
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32 %75)
store i32 1, i32* %4
br label %77
77: ; preds = %92, %74
%78 = load i32, i32* %4
%79 = load i32, i32* %5
%80 = icmp sle i32 %78, %79
br i1 %80, label %81, label %95
81: ; preds = %77
%82 = load i32, i32* %3
%83 = load i32, i32* %4
%84 = load i32, i32* %3
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 %85
%87 = load i32, i32* %4
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [10 x i32], [10 x i32]* %86, i64 0, i64 %88
%90 = load i32, i32* %89
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %82, i32 %83, i32 %90)
br label %92
92: ; preds = %81
%93 = load i32, i32* %4
%94 = add nsw i32 %93, 1
store i32 %94, i32* %4
br label %77
95: ; preds = %77
br label %96
96: ; preds = %95
%97 = load i32, i32* %3
%98 = add nsw i32 %97, 1
store i32 %98, i32* %3
br label %70
99: ; preds = %70
br label %100
100: ; preds = %119, %99
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
%102 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%103 = load i32, i32* %6
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %107
105: ; preds = %100
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
br label %107
107: ; preds = %105, %100
%108 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32* %3, i32* %4)
%109 = load i32, i32* %3
%110 = load i32, i32* %4
%111 = load i32, i32* %3
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 %112
%114 = load i32, i32* %4
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [10 x i32], [10 x i32]* %113, i64 0, i64 %115
%117 = load i32, i32* %116
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %109, i32 %110, i32 %117)
br label %119
119: ; preds = %107
%120 = load i32, i32* %6
%121 = icmp ne i32 %120, 0
br i1 %121, label %100, label %122
122: ; preds = %119
%123 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [26 x i8] c"initial record of %d is \0A\00"
@.str.4 = [16 x i8] c"%d to %d is %d\0A\00"
@.str.5 = [26 x i8] c"updated record of %d is \0A\00"
@.str.6 = [45 x i8] c"enter 1 to find shortest path or 0 to exit n\00"
@.str.8 = [6 x i8] c"%d %d\00"
@str = [26 x i8] c"enter the number of nodes\00"
@str.9 = [54 x i8] c"enter the matrix 0 for self loop and 999 for no path \00"
@str.10 = [17 x i8] c"enter two nodes \00"
define i32 @main() {
%1 = alloca [10 x [10 x i32]]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast [10 x [10 x i32]]* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.9, i64 0, i64 0))
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 1
br i1 %15, label %56, label %16
16: ; preds = %0, %32
%17 = phi i32 [ %33, %32 ], [ %14, %0 ]
%18 = phi i32 [ %34, %32 ], [ 1, %0 ]
store i32 1, i32* %3
%19 = icmp slt i32 %17, 1
br i1 %19, label %32, label %20
20: ; preds = %16
%21 = zext i32 %18 to i64
br label %24
22: ; preds = %32
%23 = icmp slt i32 %33, 1
br i1 %23, label %56, label %36
24: ; preds = %20, %24
%25 = phi i32 [ %29, %24 ], [ 1, %20 ]
%26 = zext i32 %25 to i64
%27 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %21, i64 %26
%28 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %27)
%29 = add nuw nsw i32 %25, 1
store i32 %29, i32* %3
%30 = load i32, i32* %4
%31 = icmp slt i32 %25, %30
br i1 %31, label %24, label %32
32: ; preds = %24, %16
%33 = phi i32 [ %17, %16 ], [ %30, %24 ]
%34 = add nuw nsw i32 %18, 1
%35 = icmp slt i32 %18, %33
br i1 %35, label %16, label %22
36: ; preds = %22, %52
%37 = phi i32 [ %54, %52 ], [ 1, %22 ]
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %37)
store i32 1, i32* %3
%39 = load i32, i32* %4
%40 = icmp slt i32 %39, 1
br i1 %40, label %52, label %41
41: ; preds = %36
%42 = zext i32 %37 to i64
br label %43
43: ; preds = %41, %43
%44 = phi i32 [ %49, %43 ], [ 1, %41 ]
%45 = zext i32 %44 to i64
%46 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %42, i64 %45
%47 = load i32, i32* %46
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %37, i32 %44, i32 %47)
%49 = add nuw nsw i32 %44, 1
store i32 %49, i32* %3
%50 = load i32, i32* %4
%51 = icmp slt i32 %44, %50
br i1 %51, label %43, label %52
52: ; preds = %43, %36
%53 = phi i32 [ %39, %36 ], [ %50, %43 ]
%54 = add nuw nsw i32 %37, 1
%55 = icmp slt i32 %37, %53
br i1 %55, label %36, label %56
56: ; preds = %52, %0, %22
%57 = phi i32 [ %33, %22 ], [ %14, %0 ], [ %53, %52 ]
%58 = bitcast [10 x [10 x i32]]* %1 to i32**
%59 = call i32 @dist(i32** %58, i32 %57)
store i32 1, i32* %2
%60 = load i32, i32* %4
%61 = icmp slt i32 %60, 1
br i1 %61, label %82, label %62
62: ; preds = %56, %78
%63 = phi i32 [ %80, %78 ], [ 1, %56 ]
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32 %63)
store i32 1, i32* %3
%65 = load i32, i32* %4
%66 = icmp slt i32 %65, 1
br i1 %66, label %78, label %67
67: ; preds = %62
%68 = zext i32 %63 to i64
br label %69
69: ; preds = %67, %69
%70 = phi i32 [ %75, %69 ], [ 1, %67 ]
%71 = zext i32 %70 to i64
%72 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %68, i64 %71
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %63, i32 %70, i32 %73)
%75 = add nuw nsw i32 %70, 1
store i32 %75, i32* %3
%76 = load i32, i32* %4
%77 = icmp slt i32 %70, %76
br i1 %77, label %69, label %78
78: ; preds = %69, %62
%79 = phi i32 [ %65, %62 ], [ %76, %69 ]
%80 = add nuw nsw i32 %63, 1
store i32 %80, i32* %2
%81 = icmp slt i32 %63, %79
br i1 %81, label %62, label %82
82: ; preds = %78, %56
br label %83
83: ; preds = %82, %90
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
%85 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%86 = load i32, i32* %5
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %83
%89 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.10, i64 0, i64 0))
br label %90
90: ; preds = %88, %83
%91 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32* %2, i32* %3)
%92 = load i32, i32* %2
%93 = load i32, i32* %3
%94 = sext i32 %92 to i64
%95 = sext i32 %93 to i64
%96 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %94, i64 %95
%97 = load i32, i32* %96
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %92, i32 %93, i32 %97)
%99 = load i32, i32* %5
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %83
101: ; preds = %90
%102 = call i32 @exit(i32 0)
unreachable
}