#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*/ addEdge(struct graph **, int, int);
void buildgraph(struct graph *grp) {
  addEdge(&grp, 0, 5);
  addEdge(&grp, 0, 2);
  addEdge(&grp, 1, 0);
  addEdge(&grp, 2, 5);
  addEdge(&grp, 3, 1);
  addEdge(&grp, 3, 4);
  addEdge(&grp, 4, 2);
  addEdge(&grp, 5, 4);
}


x86 assembly (clang, -O0):
<buildgraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1030 <addEdge@plt>
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <addEdge@plt>
lea    -0x8(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <addEdge@plt>
lea    -0x8(%rbp),%rdi
mov    $0x2,%esi
mov    $0x5,%edx
call   1030 <addEdge@plt>
lea    -0x8(%rbp),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
call   1030 <addEdge@plt>
lea    -0x8(%rbp),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <addEdge@plt>
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
call   1030 <addEdge@plt>
lea    -0x8(%rbp),%rdi
mov    $0x5,%esi
mov    $0x4,%edx
call   1030 <addEdge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildgraph>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x5,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x2,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x4,%edx
call   1030 <addEdge@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.graph = type { i32 }
define void @buildgraph(%struct.graph* %0) {
%2 = alloca %struct.graph*
store %struct.graph* %0, %struct.graph** %2
%3 = call i32 @addEdge(%struct.graph** %2, i32 0, i32 5)
%4 = call i32 @addEdge(%struct.graph** %2, i32 0, i32 2)
%5 = call i32 @addEdge(%struct.graph** %2, i32 1, i32 0)
%6 = call i32 @addEdge(%struct.graph** %2, i32 2, i32 5)
%7 = call i32 @addEdge(%struct.graph** %2, i32 3, i32 1)
%8 = call i32 @addEdge(%struct.graph** %2, i32 3, i32 4)
%9 = call i32 @addEdge(%struct.graph** %2, i32 4, i32 2)
%10 = call i32 @addEdge(%struct.graph** %2, i32 5, i32 4)
ret void
}

LLVM IR (-O2):
%struct.graph = type { i32 }
define void @buildgraph(%struct.graph* %0) {
%2 = alloca %struct.graph*
store %struct.graph* %0, %struct.graph** %2
%3 = call i32 @addEdge(%struct.graph** %2, i32 0, i32 5)
%4 = call i32 @addEdge(%struct.graph** %2, i32 0, i32 2)
%5 = call i32 @addEdge(%struct.graph** %2, i32 1, i32 0)
%6 = call i32 @addEdge(%struct.graph** %2, i32 2, i32 5)
%7 = call i32 @addEdge(%struct.graph** %2, i32 3, i32 1)
%8 = call i32 @addEdge(%struct.graph** %2, i32 3, i32 4)
%9 = call i32 @addEdge(%struct.graph** %2, i32 4, i32 2)
%10 = call i32 @addEdge(%struct.graph** %2, i32 5, i32 4)
ret void
}