#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*/ graphInit(int);
int /*<<< orphan*/ graphPrint(int);
int /*<<< orphan*/ graphSet(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int i;
  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) {
    printf("%i -> ", i);
    graphPrint(i);
    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    11ff <main+0xbf>
mov    -0x8(%rbp),%esi
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <graphPrint@plt>
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1040 <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   %rbx
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    0xe3e(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1040 <graphPrint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   1040 <graphPrint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x2,%edi
call   1040 <graphPrint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3,%edi
call   1040 <graphPrint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x4,%edi
call   1040 <graphPrint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5,%edi
call   1040 <graphPrint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x6,%edi
call   1040 <graphPrint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7,%edi
call   1040 <graphPrint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 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)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0)
%10 = tail call i32 @graphPrint(i32 0)
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
%13 = tail call i32 @graphPrint(i32 1)
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 2)
%16 = tail call i32 @graphPrint(i32 2)
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3)
%19 = tail call i32 @graphPrint(i32 3)
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 4)
%22 = tail call i32 @graphPrint(i32 4)
%23 = tail call i32 @putchar(i32 10)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 5)
%25 = tail call i32 @graphPrint(i32 5)
%26 = tail call i32 @putchar(i32 10)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%28 = tail call i32 @graphPrint(i32 6)
%29 = tail call i32 @putchar(i32 10)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 7)
%31 = tail call i32 @graphPrint(i32 7)
%32 = tail call i32 @putchar(i32 10)
ret i32 0
}