#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 graphGet(int, int);
int /*<<< orphan*/ graphInit(int);
int /*<<< orphan*/ graphSet(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int i, j;
  graphInit(8);
  graphSet(0, 2);
  graphSet(1, 4);
  graphSet(2, 5);
  graphSet(3, 6);
  graphSet(0, 4);
  graphSet(6, 0);
  graphSet(1, 3);
  for (i = 0; i < 8; ++i) {
    for (j = 0; j < 8; ++j) {
      printf("%i ", graphGet(i, j));
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1050 <graphInit@plt>
xor    %edi,%edi
mov    $0x2,%esi
call   1060 <graphSet@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1060 <graphSet@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1060 <graphSet@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1060 <graphSet@plt>
xor    %edi,%edi
mov    $0x4,%esi
call   1060 <graphSet@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1060 <graphSet@plt>
mov    $0x1,%edi
mov    $0x3,%esi
call   1060 <graphSet@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1220 <main+0xe0>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1204 <main+0xc4>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <graphGet@plt>
mov    %eax,%esi
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d1 <main+0x91>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c0 <main+0x80>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x8,%edi
call   1060 <graphInit@plt>
xor    %edi,%edi
mov    $0x2,%esi
call   1070 <graphSet@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1070 <graphSet@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1070 <graphSet@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1070 <graphSet@plt>
xor    %edi,%edi
mov    $0x4,%esi
call   1070 <graphSet@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1070 <graphSet@plt>
mov    $0x1,%edi
mov    $0x3,%esi
call   1070 <graphSet@plt>
lea    0xe3c(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%edi
xor    %esi,%esi
call   1050 <graphGet@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    $0x1,%esi
call   1050 <graphGet@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    $0x2,%esi
call   1050 <graphGet@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    $0x3,%esi
call   1050 <graphGet@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    $0x4,%esi
call   1050 <graphGet@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    $0x5,%esi
call   1050 <graphGet@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    $0x6,%esi
call   1050 <graphGet@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    $0x7,%esi
call   1050 <graphGet@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    11d0 <main+0x80>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @graphInit(i32 8)
%5 = call i32 @graphSet(i32 0, i32 2)
%6 = call i32 @graphSet(i32 1, i32 4)
%7 = call i32 @graphSet(i32 2, i32 5)
%8 = call i32 @graphSet(i32 3, i32 6)
%9 = call i32 @graphSet(i32 0, i32 4)
%10 = call i32 @graphSet(i32 6, i32 0)
%11 = call i32 @graphSet(i32 1, i32 3)
store i32 0, i32* %2
br label %12
12: ; preds = %29, %0
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 8
br i1 %14, label %15, label %32
15: ; preds = %12
store i32 0, i32* %3
br label %16
16: ; preds = %24, %15
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 8
br i1 %18, label %19, label %27
19: ; preds = %16
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = call i32 @graphGet(i32 %20, i32 %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %19
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %16
27: ; preds = %16
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %29
29: ; preds = %27
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %12
32: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i \00"
define i32 @main() {
%1 = tail call i32 @graphInit(i32 8)
%2 = tail call i32 @graphSet(i32 0, i32 2)
%3 = tail call i32 @graphSet(i32 1, i32 4)
%4 = tail call i32 @graphSet(i32 2, i32 5)
%5 = tail call i32 @graphSet(i32 3, i32 6)
%6 = tail call i32 @graphSet(i32 0, i32 4)
%7 = tail call i32 @graphSet(i32 6, i32 0)
%8 = tail call i32 @graphSet(i32 1, i32 3)
br label %9
9: ; preds = %0, %9
%10 = phi i32 [ 0, %0 ], [ %28, %9 ]
%11 = tail call i32 @graphGet(i32 %10, i32 0)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = tail call i32 @graphGet(i32 %10, i32 1)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = tail call i32 @graphGet(i32 %10, i32 2)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = tail call i32 @graphGet(i32 %10, i32 3)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = tail call i32 @graphGet(i32 %10, i32 4)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = tail call i32 @graphGet(i32 %10, i32 5)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = tail call i32 @graphGet(i32 %10, i32 6)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = tail call i32 @graphGet(i32 %10, i32 7)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = tail call i32 @putchar(i32 10)
%28 = add nuw nsw i32 %10, 1
%29 = icmp eq i32 %28, 8
br i1 %29, label %30, label %9
30: ; preds = %9
ret i32 0
}