#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 */
struct graph *adjacencyMatrix(int, int);
int /*<<< orphan*/ beginTraversal(struct graph *);
int /*<<< orphan*/ printGraph(struct graph *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int v, e;
  printf("Enter number of vertices and edges in the graph : ");
  scanf("%d%d", &v, &e);
  struct graph *g = adjacencyMatrix(v, e);
  printGraph(g);
  int i;
  beginTraversal(g);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xea1(%rip),%rdi
call   1050 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1060 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <adjacencyMatrix@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <printGraph@plt>
mov    -0x10(%rbp),%rdi
call   1030 <beginTraversal@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xea4(%rip),%rdi
call   1050 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1060 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1040 <adjacencyMatrix@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <printGraph@plt>
mov    %rbx,%rdi
call   1030 <beginTraversal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.graph = type { i32 }
@.str = [51 x i8] c"Enter number of vertices and edges in the graph : \00"
@.str.1 = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.graph*
%4 = alloca i32
%5 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call %struct.graph* @adjacencyMatrix(i32 %7, i32 %8)
store %struct.graph* %9, %struct.graph** %3
%10 = load %struct.graph*, %struct.graph** %3
%11 = call i32 @printGraph(%struct.graph* %10)
%12 = load %struct.graph*, %struct.graph** %3
%13 = call i32 @beginTraversal(%struct.graph* %12)
ret i32 0
}

LLVM IR (-O2):
%struct.graph = type { i32 }
@.str = [51 x i8] c"Enter number of vertices and edges in the graph : \00"
@.str.1 = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call %struct.graph* @adjacencyMatrix(i32 %7, i32 %8)
%10 = call i32 @printGraph(%struct.graph* %9)
%11 = call i32 @beginTraversal(%struct.graph* %9)
ret i32 0
}