#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 */
struct Graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_edge(struct Graph *, int, int);
void set_heirarchy(struct Graph *graph) {
  add_edge(graph, 0, 1);
  add_edge(graph, 0, 2);
  add_edge(graph, 0, 3);
  add_edge(graph, 0, 4);
  add_edge(graph, 1, 5);
  add_edge(graph, 1, 6);
  add_edge(graph, 1, 7);
  add_edge(graph, 1, 8);
  add_edge(graph, 4, 9);
  add_edge(graph, 4, 10);
  add_edge(graph, 4, 11);
  add_edge(graph, 9, 12);
  add_edge(graph, 9, 13);
}


x86 assembly (clang, -O0):
<set_heirarchy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x6,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x7,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x8,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x9,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0xa,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0xb,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9,%esi
mov    $0xc,%edx
call   1030 <add_edge@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9,%esi
mov    $0xd,%edx
call   1030 <add_edge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_heirarchy>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x6,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x7,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x8,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x9,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0xa,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0xb,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0xc,%edx
call   1030 <add_edge@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0xd,%edx
pop    %rbx
jmp    1030 <add_edge@plt>

LLVM IR (-O0):
%struct.Graph = type { i32 }
define void @set_heirarchy(%struct.Graph* %0) {
%2 = alloca %struct.Graph*
store %struct.Graph* %0, %struct.Graph** %2
%3 = load %struct.Graph*, %struct.Graph** %2
%4 = call i32 @add_edge(%struct.Graph* %3, i32 0, i32 1)
%5 = load %struct.Graph*, %struct.Graph** %2
%6 = call i32 @add_edge(%struct.Graph* %5, i32 0, i32 2)
%7 = load %struct.Graph*, %struct.Graph** %2
%8 = call i32 @add_edge(%struct.Graph* %7, i32 0, i32 3)
%9 = load %struct.Graph*, %struct.Graph** %2
%10 = call i32 @add_edge(%struct.Graph* %9, i32 0, i32 4)
%11 = load %struct.Graph*, %struct.Graph** %2
%12 = call i32 @add_edge(%struct.Graph* %11, i32 1, i32 5)
%13 = load %struct.Graph*, %struct.Graph** %2
%14 = call i32 @add_edge(%struct.Graph* %13, i32 1, i32 6)
%15 = load %struct.Graph*, %struct.Graph** %2
%16 = call i32 @add_edge(%struct.Graph* %15, i32 1, i32 7)
%17 = load %struct.Graph*, %struct.Graph** %2
%18 = call i32 @add_edge(%struct.Graph* %17, i32 1, i32 8)
%19 = load %struct.Graph*, %struct.Graph** %2
%20 = call i32 @add_edge(%struct.Graph* %19, i32 4, i32 9)
%21 = load %struct.Graph*, %struct.Graph** %2
%22 = call i32 @add_edge(%struct.Graph* %21, i32 4, i32 10)
%23 = load %struct.Graph*, %struct.Graph** %2
%24 = call i32 @add_edge(%struct.Graph* %23, i32 4, i32 11)
%25 = load %struct.Graph*, %struct.Graph** %2
%26 = call i32 @add_edge(%struct.Graph* %25, i32 9, i32 12)
%27 = load %struct.Graph*, %struct.Graph** %2
%28 = call i32 @add_edge(%struct.Graph* %27, i32 9, i32 13)
ret void
}

LLVM IR (-O2):
%struct.Graph = type { i32 }
define void @set_heirarchy(%struct.Graph* %0) {
%2 = tail call i32 @add_edge(%struct.Graph* %0, i32 0, i32 1)
%3 = tail call i32 @add_edge(%struct.Graph* %0, i32 0, i32 2)
%4 = tail call i32 @add_edge(%struct.Graph* %0, i32 0, i32 3)
%5 = tail call i32 @add_edge(%struct.Graph* %0, i32 0, i32 4)
%6 = tail call i32 @add_edge(%struct.Graph* %0, i32 1, i32 5)
%7 = tail call i32 @add_edge(%struct.Graph* %0, i32 1, i32 6)
%8 = tail call i32 @add_edge(%struct.Graph* %0, i32 1, i32 7)
%9 = tail call i32 @add_edge(%struct.Graph* %0, i32 1, i32 8)
%10 = tail call i32 @add_edge(%struct.Graph* %0, i32 4, i32 9)
%11 = tail call i32 @add_edge(%struct.Graph* %0, i32 4, i32 10)
%12 = tail call i32 @add_edge(%struct.Graph* %0, i32 4, i32 11)
%13 = tail call i32 @add_edge(%struct.Graph* %0, i32 9, i32 12)
%14 = tail call i32 @add_edge(%struct.Graph* %0, i32 9, i32 13)
ret void
}