#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 */
float log(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float A[30][30];
  float E[30][30];
  float V[30];
  int i, j, n, k, flag = 0;
  n = 3;
  printf("Enter the Table :\n");
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      printf(" A[%d][%d] :\n", i + 1, j + 1);
      scanf("%f", &A[i][j]);
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      E[i][j] = log(100.0 / A[i][j]);
    }
    V[i] = 50000;
  }
  V[0] = 0;
  for (k = 0; k < n - 1; k++) {
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        if (i != j) {
          if (V[i] > V[j] + E[i][j])
            V[i] = V[j] + E[i][j];
        }
      }
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (i != j) {
        if (V[i] > V[j] + E[i][j]) {
          flag = 1;
          printf("There is a negative cycle in the graph.\nHence One can get "
                 "profit by doing this process.");
          break;
        }
      }
    }
    if (flag == 1)
      break;
  }
  if (flag == 0) {
    printf("There is no negative cycle in the graph.\nHence We can't get "
           "profit by doing this process.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1cd0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1cc4(%rbp)
movl   $0x3,-0x1cbc(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1cb4(%rbp)
mov    -0x1cb4(%rbp),%eax
cmp    -0x1cbc(%rbp),%eax
jge    1218 <main+0xe8>
movl   $0x0,-0x1cb8(%rbp)
mov    -0x1cb8(%rbp),%eax
cmp    -0x1cbc(%rbp),%eax
jge    11ff <main+0xcf>
mov    -0x1cb4(%rbp),%esi
add    $0x1,%esi
mov    -0x1cb8(%rbp),%edx
add    $0x1,%edx
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x1cb4(%rbp),%rax
lea    -0xe20(%rbp),%rsi
imul   $0x78,%rax,%rax
add    %rax,%rsi
movslq -0x1cb8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe4b(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1cb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cb8(%rbp)
jmp    118a <main+0x5a>
jmp    1204 <main+0xd4>
mov    -0x1cb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cb4(%rbp)
jmp    116e <main+0x3e>
movl   $0x0,-0x1cb4(%rbp)
mov    -0x1cb4(%rbp),%eax
cmp    -0x1cbc(%rbp),%eax
jge    12e7 <main+0x1b7>
movl   $0x0,-0x1cb8(%rbp)
mov    -0x1cb8(%rbp),%eax
cmp    -0x1cbc(%rbp),%eax
jge    12bb <main+0x18b>
movslq -0x1cb4(%rbp),%rcx
lea    -0xe20(%rbp),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1cb8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd8b(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1050 <log@plt>
movslq -0x1cb4(%rbp),%rcx
lea    -0x1c30(%rbp),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1cb8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1cb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cb8(%rbp)
jmp    123e <main+0x10e>
movslq -0x1cb4(%rbp),%rax
movss  0xd36(%rip),%xmm0
movss  %xmm0,-0x1cb0(%rbp,%rax,4)
ff ff
mov    -0x1cb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cb4(%rbp)
jmp    1222 <main+0xf2>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1cb0(%rbp)
ff
movl   $0x0,-0x1cc0(%rbp)
mov    -0x1cc0(%rbp),%eax
mov    -0x1cbc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1438 <main+0x308>
movl   $0x0,-0x1cb4(%rbp)
mov    -0x1cb4(%rbp),%eax
cmp    -0x1cbc(%rbp),%eax
jge    141f <main+0x2ef>
movl   $0x0,-0x1cb8(%rbp)
mov    -0x1cb8(%rbp),%eax
cmp    -0x1cbc(%rbp),%eax
jge    1406 <main+0x2d6>
mov    -0x1cb4(%rbp),%eax
cmp    -0x1cb8(%rbp),%eax
je     13ed <main+0x2bd>
movslq -0x1cb4(%rbp),%rax
movss  -0x1cb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x1cb8(%rbp),%rax
movss  -0x1cb0(%rbp,%rax,4),%xmm1
ff ff
movslq -0x1cb4(%rbp),%rcx
lea    -0x1c30(%rbp),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1cb8(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm1
ucomiss %xmm1,%xmm0
jbe    13e8 <main+0x2b8>
movslq -0x1cb8(%rbp),%rax
movss  -0x1cb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x1cb4(%rbp),%rcx
lea    -0x1c30(%rbp),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1cb8(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
movslq -0x1cb4(%rbp),%rax
movss  %xmm0,-0x1cb0(%rbp,%rax,4)
ff ff
jmp    13ed <main+0x2bd>
jmp    13f2 <main+0x2c2>
mov    -0x1cb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cb8(%rbp)
jmp    1339 <main+0x209>
jmp    140b <main+0x2db>
mov    -0x1cb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cb4(%rbp)
jmp    131d <main+0x1ed>
jmp    1424 <main+0x2f4>
mov    -0x1cc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cc0(%rbp)
jmp    12fc <main+0x1cc>
movl   $0x0,-0x1cb4(%rbp)
mov    -0x1cb4(%rbp),%eax
cmp    -0x1cbc(%rbp),%eax
jge    1532 <main+0x402>
movl   $0x0,-0x1cb8(%rbp)
mov    -0x1cb8(%rbp),%eax
cmp    -0x1cbc(%rbp),%eax
jge    1507 <main+0x3d7>
mov    -0x1cb4(%rbp),%eax
cmp    -0x1cb8(%rbp),%eax
je     14ee <main+0x3be>
movslq -0x1cb4(%rbp),%rax
movss  -0x1cb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x1cb8(%rbp),%rax
movss  -0x1cb0(%rbp,%rax,4),%xmm1
ff ff
movslq -0x1cb4(%rbp),%rcx
lea    -0x1c30(%rbp),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1cb8(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm1
ucomiss %xmm1,%xmm0
jbe    14e9 <main+0x3b9>
movl   $0x1,-0x1cc4(%rbp)
lea    0xb57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1507 <main+0x3d7>
jmp    14ee <main+0x3be>
jmp    14f3 <main+0x3c3>
mov    -0x1cb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cb8(%rbp)
jmp    145e <main+0x32e>
cmpl   $0x1,-0x1cc4(%rbp)
jne    1519 <main+0x3e9>
jmp    1532 <main+0x402>
jmp    151e <main+0x3ee>
mov    -0x1cb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cb4(%rbp)
jmp    1442 <main+0x312>
cmpl   $0x0,-0x1cc4(%rbp)
jne    154d <main+0x41d>
lea    0xb46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1cd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xe38,%rsp
lea    0xf7e(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaf(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea2(%rip),%rbx
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x98(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x9c(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xa0(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x110(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x114(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x118(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd4f(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  0x24(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xd31(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  %xmm0,0x1c(%rsp)
movss  0x28(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xd0d(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  %xmm0,0x18(%rsp)
movss  0x98(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xce6(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  %xmm0,0x14(%rsp)
movss  0x9c(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xcbf(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  0xa0(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xc9e(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  %xmm0,0xc(%rsp)
movss  0x110(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xc77(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  %xmm0,0x10(%rsp)
movss  0x114(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xc50(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  %xmm0,0x8(%rsp)
movss  0x118(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xc29(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movss  0xc20(%rip),%xmm0
movss  0x1c(%rsp),%xmm5
movaps %xmm5,%xmm1
addss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
minss  %xmm2,%xmm1
movss  0x18(%rsp),%xmm6
movaps %xmm6,%xmm2
addss  %xmm0,%xmm2
minss  %xmm1,%xmm2
movaps %xmm2,%xmm1
movss  0x14(%rsp),%xmm11
addss  %xmm11,%xmm1
minss  %xmm0,%xmm1
movss  0xc(%rsp),%xmm9
movaps %xmm9,%xmm3
addss  %xmm0,%xmm3
minss  %xmm1,%xmm3
movaps %xmm3,%xmm1
addss  %xmm5,%xmm1
movaps %xmm5,%xmm8
minss  %xmm2,%xmm1
movss  0x10(%rsp),%xmm7
addss  %xmm7,%xmm2
minss  %xmm0,%xmm2
movaps %xmm3,%xmm4
movss  0x8(%rsp),%xmm5
addss  %xmm5,%xmm4
minss  %xmm2,%xmm4
movaps %xmm4,%xmm0
addss  %xmm6,%xmm0
movaps %xmm6,%xmm10
minss  %xmm1,%xmm0
movaps %xmm11,%xmm2
addss  %xmm0,%xmm2
movaps %xmm2,%xmm1
movaps %xmm2,%xmm11
minss  %xmm3,%xmm1
movaps %xmm7,%xmm3
addss  %xmm0,%xmm3
movaps %xmm3,%xmm2
minss  %xmm4,%xmm2
addss  %xmm9,%xmm4
minss  %xmm1,%xmm4
addss  %xmm4,%xmm5
movaps %xmm5,%xmm1
minss  %xmm2,%xmm1
ucomiss %xmm5,%xmm1
lea    0xb6e(%rip),%rax
lea    0xbbf(%rip),%rdi
cmova  %rax,%rdi
ucomiss %xmm3,%xmm1
cmova  %rax,%rdi
movaps %xmm9,%xmm2
addss  %xmm1,%xmm2
ucomiss %xmm2,%xmm4
cmova  %rax,%rdi
ucomiss %xmm11,%xmm4
cmova  %rax,%rdi
movaps %xmm10,%xmm2
addss  %xmm1,%xmm2
ucomiss %xmm2,%xmm0
cmova  %rax,%rdi
movaps %xmm8,%xmm1
addss  %xmm4,%xmm1
ucomiss %xmm1,%xmm0
cmova  %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xe38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter the Table :\0A\00"
@.str.1 = [14 x i8] c" A[%d][%d] :\0A\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [88 x i8] c"There is a negative cycle in the graph.\0AHence One can get profit by doing this process.\00"
@.str.4 = [90 x i8] c"There is no negative cycle in the graph.\0AHence We can't get profit by doing this process.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x [30 x float]]
%3 = alloca [30 x [30 x float]]
%4 = alloca [30 x float]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %9
store i32 3, i32* %7
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
br label %11
11: ; preds = %37, %0
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %40
15: ; preds = %11
store i32 0, i32* %6
br label %16
16: ; preds = %33, %15
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %36
20: ; preds = %16
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %24)
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %2, i64 0, i64 %27
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [30 x float], [30 x float]* %28, i64 0, i64 %30
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %31)
br label %33
33: ; preds = %20
%34 = load i32, i32* %6
%35 = add nsw i32 %34, 1
store i32 %35, i32* %6
br label %16
36: ; preds = %16
br label %37
37: ; preds = %36
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %11
40: ; preds = %11
store i32 0, i32* %5
br label %41
41: ; preds = %74, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %7
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %77
45: ; preds = %41
store i32 0, i32* %6
br label %46
46: ; preds = %67, %45
%47 = load i32, i32* %6
%48 = load i32, i32* %7
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %70
50: ; preds = %46
%51 = load i32, i32* %5
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %2, i64 0, i64 %52
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [30 x float], [30 x float]* %53, i64 0, i64 %55
%57 = load float, float* %56
%58 = fpext float %57 to double
%59 = fdiv double 1.000000e+02, %58
%60 = call float @log(double %59)
%61 = load i32, i32* %5
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %3, i64 0, i64 %62
%64 = load i32, i32* %6
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [30 x float], [30 x float]* %63, i64 0, i64 %65
store float %60, float* %66
br label %67
67: ; preds = %50
%68 = load i32, i32* %6
%69 = add nsw i32 %68, 1
store i32 %69, i32* %6
br label %46
70: ; preds = %46
%71 = load i32, i32* %5
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [30 x float], [30 x float]* %4, i64 0, i64 %72
store float 5.000000e+04, float* %73
br label %74
74: ; preds = %70
%75 = load i32, i32* %5
%76 = add nsw i32 %75, 1
store i32 %76, i32* %5
br label %41
77: ; preds = %41
%78 = getelementptr inbounds [30 x float], [30 x float]* %4, i64 0, i64 0
store float 0.000000e+00, float* %78
store i32 0, i32* %8
br label %79
79: ; preds = %142, %77
%80 = load i32, i32* %8
%81 = load i32, i32* %7
%82 = sub nsw i32 %81, 1
%83 = icmp slt i32 %80, %82
br i1 %83, label %84, label %145
84: ; preds = %79
store i32 0, i32* %5
br label %85
85: ; preds = %138, %84
%86 = load i32, i32* %5
%87 = load i32, i32* %7
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %141
89: ; preds = %85
store i32 0, i32* %6
br label %90
90: ; preds = %134, %89
%91 = load i32, i32* %6
%92 = load i32, i32* %7
%93 = icmp slt i32 %91, %92
br i1 %93, label %94, label %137
94: ; preds = %90
%95 = load i32, i32* %5
%96 = load i32, i32* %6
%97 = icmp ne i32 %95, %96
br i1 %97, label %98, label %133
98: ; preds = %94
%99 = load i32, i32* %5
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [30 x float], [30 x float]* %4, i64 0, i64 %100
%102 = load float, float* %101
%103 = load i32, i32* %6
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [30 x float], [30 x float]* %4, i64 0, i64 %104
%106 = load float, float* %105
%107 = load i32, i32* %5
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %3, i64 0, i64 %108
%110 = load i32, i32* %6
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [30 x float], [30 x float]* %109, i64 0, i64 %111
%113 = load float, float* %112
%114 = fadd float %106, %113
%115 = fcmp ogt float %102, %114
br i1 %115, label %116, label %132
116: ; preds = %98
%117 = load i32, i32* %6
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [30 x float], [30 x float]* %4, i64 0, i64 %118
%120 = load float, float* %119
%121 = load i32, i32* %5
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %3, i64 0, i64 %122
%124 = load i32, i32* %6
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [30 x float], [30 x float]* %123, i64 0, i64 %125
%127 = load float, float* %126
%128 = fadd float %120, %127
%129 = load i32, i32* %5
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [30 x float], [30 x float]* %4, i64 0, i64 %130
store float %128, float* %131
br label %132
132: ; preds = %116, %98
br label %133
133: ; preds = %132, %94
br label %134
134: ; preds = %133
%135 = load i32, i32* %6
%136 = add nsw i32 %135, 1
store i32 %136, i32* %6
br label %90
137: ; preds = %90
br label %138
138: ; preds = %137
%139 = load i32, i32* %5
%140 = add nsw i32 %139, 1
store i32 %140, i32* %5
br label %85
141: ; preds = %85
br label %142
142: ; preds = %141
%143 = load i32, i32* %8
%144 = add nsw i32 %143, 1
store i32 %144, i32* %8
br label %79
145: ; preds = %79
store i32 0, i32* %5
br label %146
146: ; preds = %189, %145
%147 = load i32, i32* %5
%148 = load i32, i32* %7
%149 = icmp slt i32 %147, %148
br i1 %149, label %150, label %192
150: ; preds = %146
store i32 0, i32* %6
br label %151
151: ; preds = %181, %150
%152 = load i32, i32* %6
%153 = load i32, i32* %7
%154 = icmp slt i32 %152, %153
br i1 %154, label %155, label %184
155: ; preds = %151
%156 = load i32, i32* %5
%157 = load i32, i32* %6
%158 = icmp ne i32 %156, %157
br i1 %158, label %159, label %180
159: ; preds = %155
%160 = load i32, i32* %5
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [30 x float], [30 x float]* %4, i64 0, i64 %161
%163 = load float, float* %162
%164 = load i32, i32* %6
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [30 x float], [30 x float]* %4, i64 0, i64 %165
%167 = load float, float* %166
%168 = load i32, i32* %5
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %3, i64 0, i64 %169
%171 = load i32, i32* %6
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [30 x float], [30 x float]* %170, i64 0, i64 %172
%174 = load float, float* %173
%175 = fadd float %167, %174
%176 = fcmp ogt float %163, %175
br i1 %176, label %177, label %179
177: ; preds = %159
store i32 1, i32* %9
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.3, i64 0, i64 0))
br label %184
179: ; preds = %159
br label %180
180: ; preds = %179, %155
br label %181
181: ; preds = %180
%182 = load i32, i32* %6
%183 = add nsw i32 %182, 1
store i32 %183, i32* %6
br label %151
184: ; preds = %177, %151
%185 = load i32, i32* %9
%186 = icmp eq i32 %185, 1
br i1 %186, label %187, label %188
187: ; preds = %184
br label %192
188: ; preds = %184
br label %189
189: ; preds = %188
%190 = load i32, i32* %5
%191 = add nsw i32 %190, 1
store i32 %191, i32* %5
br label %146
192: ; preds = %187, %146
%193 = load i32, i32* %9
%194 = icmp eq i32 %193, 0
br i1 %194, label %195, label %197
195: ; preds = %192
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.4, i64 0, i64 0))
br label %197
197: ; preds = %195, %192
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c" A[%d][%d] :\0A\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [88 x i8] c"There is a negative cycle in the graph.\0AHence One can get profit by doing this process.\00"
@.str.4 = [90 x i8] c"There is no negative cycle in the graph.\0AHence We can't get profit by doing this process.\00"
@str = [18 x i8] c"Enter the Table :\00"
define i32 @main() {
%1 = alloca [30 x [30 x float]]
%2 = bitcast [30 x [30 x float]]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 1)
%5 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 2)
%8 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 0, i64 1
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 3)
%11 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 0, i64 2
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1)
%14 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 1, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %14)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 2)
%17 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 1, i64 1
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 3)
%20 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 1, i64 2
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %20)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 1)
%23 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 2, i64 0
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %23)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 2)
%26 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 2, i64 1
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %26)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 3)
%29 = getelementptr inbounds [30 x [30 x float]], [30 x [30 x float]]* %1, i64 0, i64 2, i64 2
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %29)
%31 = load float, float* %5
%32 = fpext float %31 to double
%33 = fdiv double 1.000000e+02, %32
%34 = call float @log(double %33)
%35 = load float, float* %8
%36 = fpext float %35 to double
%37 = fdiv double 1.000000e+02, %36
%38 = call float @log(double %37)
%39 = load float, float* %11
%40 = fpext float %39 to double
%41 = fdiv double 1.000000e+02, %40
%42 = call float @log(double %41)
%43 = load float, float* %14
%44 = fpext float %43 to double
%45 = fdiv double 1.000000e+02, %44
%46 = call float @log(double %45)
%47 = load float, float* %17
%48 = fpext float %47 to double
%49 = fdiv double 1.000000e+02, %48
%50 = call float @log(double %49)
%51 = load float, float* %20
%52 = fpext float %51 to double
%53 = fdiv double 1.000000e+02, %52
%54 = call float @log(double %53)
%55 = load float, float* %23
%56 = fpext float %55 to double
%57 = fdiv double 1.000000e+02, %56
%58 = call float @log(double %57)
%59 = load float, float* %26
%60 = fpext float %59 to double
%61 = fdiv double 1.000000e+02, %60
%62 = call float @log(double %61)
%63 = load float, float* %29
%64 = fpext float %63 to double
%65 = fdiv double 1.000000e+02, %64
%66 = call float @log(double %65)
%67 = fadd float %38, 5.000000e+04
%68 = fcmp olt float %67, 0.000000e+00
%69 = select i1 %68, float %67, float 0.000000e+00
%70 = fadd float %42, 5.000000e+04
%71 = fcmp ogt float %69, %70
%72 = select i1 %71, float %70, float %69
%73 = fadd float %72, %46
%74 = fcmp olt float %73, 5.000000e+04
%75 = select i1 %74, float %73, float 5.000000e+04
%76 = fadd float %54, 5.000000e+04
%77 = fcmp ogt float %75, %76
%78 = select i1 %77, float %76, float %75
%79 = fadd float %72, %58
%80 = fcmp olt float %79, 5.000000e+04
%81 = select i1 %80, float %79, float 5.000000e+04
%82 = fadd float %78, %62
%83 = fcmp ogt float %81, %82
%84 = select i1 %83, float %82, float %81
%85 = fadd float %78, %38
%86 = fcmp ogt float %72, %85
%87 = select i1 %86, float %85, float %72
%88 = fadd float %84, %42
%89 = fcmp ogt float %87, %88
%90 = select i1 %89, float %88, float %87
%91 = fadd float %90, %46
%92 = fcmp ogt float %78, %91
%93 = select i1 %92, float %91, float %78
%94 = fadd float %84, %54
%95 = fcmp ogt float %93, %94
%96 = select i1 %95, float %94, float %93
%97 = fadd float %90, %58
%98 = fcmp ogt float %84, %97
%99 = select i1 %98, float %97, float %84
%100 = fadd float %96, %62
%101 = fcmp ogt float %99, %100
%102 = select i1 %101, float %100, float %99
%103 = fadd float %96, %38
%104 = fcmp ogt float %90, %103
%105 = fadd float %102, %42
%106 = fcmp ogt float %90, %105
%107 = select i1 %104, i1 true, i1 %106
%108 = fadd float %90, %46
%109 = fcmp ogt float %96, %108
%110 = select i1 %107, i1 true, i1 %109
%111 = fadd float %102, %54
%112 = fcmp ogt float %96, %111
%113 = select i1 %110, i1 true, i1 %112
%114 = fadd float %90, %58
%115 = fcmp ogt float %102, %114
%116 = select i1 %113, i1 true, i1 %115
%117 = fadd float %96, %62
%118 = fcmp ogt float %102, %117
%119 = select i1 %116, i1 true, i1 %118
%120 = select i1 %119, i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.4, i64 0, i64 0)
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %120)
ret i32 0
}