#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*/ free(void *);
int /*<<< orphan*/ init_array(int, int **);
int /*<<< orphan*/ kernel_floyd_warshall(int, int **);
scalar_t__ polybench_alloc_data(int, int);
int /*<<< orphan*/ print_array(int, int **);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  int n = 2800;
  int(*path)[2800 + 0][2800 + 0];
  path = (int(*)[2800 + 0][2800 + 0])
      polybench_alloc_data((2800 + 0) * (2800 + 0), sizeof(int));
  ;
  init_array(n, *path);
  ;
  kernel_floyd_warshall(n, *path);
  ;
  ;
  if (argc > 42 && !strcmp(argv[0], ""))
    print_array(n, *path);
  free((void *)path);
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xaf0,-0x14(%rbp)
mov    $0x77a100,%edi
mov    $0x4,%esi
call   1080 <polybench_alloc_data@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1060 <init_array@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1050 <kernel_floyd_warshall@plt>
cmpl   $0x2a,-0x8(%rbp)
jle    11da <main+0x7a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe40(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    11da <main+0x7a>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1040 <print_array@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    $0x77a100,%edi
mov    $0x4,%esi
call   1070 <polybench_alloc_data@plt>
mov    %rax,%rbx
mov    $0xaf0,%edi
mov    %rax,%rsi
call   1060 <init_array@plt>
mov    $0xaf0,%edi
mov    %rbx,%rsi
call   1050 <kernel_floyd_warshall@plt>
cmp    $0x2b,%ebp
jl     119f <main+0x4f>
mov    (%r14),%rax
cmpb   $0x0,(%rax)
jne    119f <main+0x4f>
mov    $0xaf0,%edi
mov    %rbx,%rsi
call   1040 <print_array@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [2800 x [2800 x i32]]*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 2800, i32* %6
%8 = call i64 @polybench_alloc_data(i32 7840000, i32 4)
%9 = inttoptr i64 %8 to [2800 x [2800 x i32]]*
store [2800 x [2800 x i32]]* %9, [2800 x [2800 x i32]]** %7
%10 = load i32, i32* %6
%11 = load [2800 x [2800 x i32]]*, [2800 x [2800 x i32]]** %7
%12 = getelementptr inbounds [2800 x [2800 x i32]], [2800 x [2800 x i32]]* %11, i64 0, i64 0
%13 = bitcast [2800 x i32]* %12 to i32**
%14 = call i32 @init_array(i32 %10, i32** %13)
%15 = load i32, i32* %6
%16 = load [2800 x [2800 x i32]]*, [2800 x [2800 x i32]]** %7
%17 = getelementptr inbounds [2800 x [2800 x i32]], [2800 x [2800 x i32]]* %16, i64 0, i64 0
%18 = bitcast [2800 x i32]* %17 to i32**
%19 = call i32 @kernel_floyd_warshall(i32 %15, i32** %18)
%20 = load i32, i32* %4
%21 = icmp sgt i32 %20, 42
br i1 %21, label %22, label %34
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = load i8*, i8** %24
%26 = call i32 @strcmp(i8* %25, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%27 = icmp ne i32 %26, 0
br i1 %27, label %34, label %28
28: ; preds = %22
%29 = load i32, i32* %6
%30 = load [2800 x [2800 x i32]]*, [2800 x [2800 x i32]]** %7
%31 = getelementptr inbounds [2800 x [2800 x i32]], [2800 x [2800 x i32]]* %30, i64 0, i64 0
%32 = bitcast [2800 x i32]* %31 to i32**
%33 = call i32 @print_array(i32 %29, i32** %32)
br label %34
34: ; preds = %28, %22, %2
%35 = load [2800 x [2800 x i32]]*, [2800 x [2800 x i32]]** %7
%36 = bitcast [2800 x [2800 x i32]]* %35 to i8*
%37 = call i32 @free(i8* %36)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i64 @polybench_alloc_data(i32 7840000, i32 4)
%4 = inttoptr i64 %3 to i32**
%5 = tail call i32 @init_array(i32 2800, i32** %4)
%6 = tail call i32 @kernel_floyd_warshall(i32 2800, i32** %4)
%7 = icmp sgt i32 %0, 42
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = tail call i32 @print_array(i32 2800, i32** %4)
br label %14
14: ; preds = %12, %8, %2
%15 = inttoptr i64 %3 to i8*
%16 = tail call i32 @free(i8* %15)
ret i32 0
}