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


x86 assembly (clang, -O0):
<printMST>:
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   $0x2,-0x24(%rbp)
jge    118a <printMST+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
shl    $0x3,%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 <printMST+0x28>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMST>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
movslq 0x4(%rbx),%rsi
mov    0x8(%r14,%rsi,4),%ecx
lea    0xeba(%rip),%rdi
mov    $0x1,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Edge Weight\0A\00"
@.str.1 = [16 x i8] c"%d - %d %d \0A\00"
define i32 @printMST(i32* %0, i32 %1, [2 x i32]* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca [2 x i32]*
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store [2 x i32]* %2, [2 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, 2
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 [2 x i32]*, [2 x i32]** %7
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [2 x i32], [2 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 [2 x i32], [2 x i32]* %23, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 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 = [16 x i8] c"%d - %d %d \0A\00"
@str = [14 x i8] c"Edge Weight\00"
define i32 @printMST(i32* nocapture %0, i32 %1, [2 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 [2 x i32], [2 x i32]* %2, i64 1, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 1, i32 %9)
ret i32 undef
}