#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*/ printf(char *, ...);
int print(int parent[], int n, int graph[9][9]) {
  printf("Edge   Weight\n");
  int i;
  for (i = 1; i < 9; i++)
    printf("%d - %d    %d\n", parent[i], i, graph[i][parent[i]]);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x24(%rbp)
cmpl   $0x9,-0x24(%rbp)
jge    118a <print+0x7a>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
movslq -0x24(%rbp),%rdi
movslq (%rcx,%rdi,4),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1138 <print+0x28>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rdi,%rbx
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
movslq 0x4(%rbx),%rsi
mov    0x24(%r14,%rsi,4),%ecx
lea    0xeb9(%rip),%r15
mov    %r15,%rdi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x8(%rbx),%rsi
mov    0x48(%r14,%rsi,4),%ecx
mov    %r15,%rdi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0xc(%rbx),%rsi
mov    0x6c(%r14,%rsi,4),%ecx
mov    %r15,%rdi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x10(%rbx),%rsi
mov    0x90(%r14,%rsi,4),%ecx
mov    %r15,%rdi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x14(%rbx),%rsi
mov    0xb4(%r14,%rsi,4),%ecx
mov    %r15,%rdi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x18(%rbx),%rsi
mov    0xd8(%r14,%rsi,4),%ecx
mov    %r15,%rdi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x1c(%rbx),%rsi
mov    0xfc(%r14,%rsi,4),%ecx
mov    %r15,%rdi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x20(%rbx),%rsi
mov    0x120(%r14,%rsi,4),%ecx
mov    %r15,%rdi
mov    $0x8,%edx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [15 x i8] c"%d - %d %d\0A\00"
@str = [14 x i8] c"Edge Weight\00"
define i32 @print(i32* nocapture %0, i32 %1, [9 x i32]* nocapture %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 1, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 1, i32 %9)
%11 = getelementptr inbounds i32, i32* %0, i64 2
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 2, i64 %13
%15 = load i32, i32* %14
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 2, i32 %15)
%17 = getelementptr inbounds i32, i32* %0, i64 3
%18 = load i32, i32* %17
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 3, i64 %19
%21 = load i32, i32* %20
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 3, i32 %21)
%23 = getelementptr inbounds i32, i32* %0, i64 4
%24 = load i32, i32* %23
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 4, i64 %25
%27 = load i32, i32* %26
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %24, i32 4, i32 %27)
%29 = getelementptr inbounds i32, i32* %0, i64 5
%30 = load i32, i32* %29
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 5, i64 %31
%33 = load i32, i32* %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %30, i32 5, i32 %33)
%35 = getelementptr inbounds i32, i32* %0, i64 6
%36 = load i32, i32* %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 6, i64 %37
%39 = load i32, i32* %38
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %36, i32 6, i32 %39)
%41 = getelementptr inbounds i32, i32* %0, i64 7
%42 = load i32, i32* %41
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 7, i64 %43
%45 = load i32, i32* %44
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %42, i32 7, i32 %45)
%47 = getelementptr inbounds i32, i32* %0, i64 8
%48 = load i32, i32* %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 8, i64 %49
%51 = load i32, i32* %50
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %48, i32 8, i32 %51)
ret i32 undef
}