#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 Vertex {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ DFS();
int /*<<< orphan*/ addUEdge(int, int);
int /*<<< orphan*/ createGraph(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main(void) {
  int N, E, i, v1, v2, w, s, d;
  extern struct Vertex *AdjacencyList;
  printf("Enter number of vertices\n");
  scanf("%d", &N);
  printf("Enter number of edges\n");
  scanf("%d", &E);
  createGraph(N);
  printf("Enter edges\n");
  while (E != 0) {
    scanf("%d%d", &v1, &v2);
    addUEdge(v1, v2);
    E--;
  }
  DFS();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <createGraph@plt>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     11e8 <main+0x98>
lea    0xe7e(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <addUEdge@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    11af <main+0x5f>
mov    $0x0,%al
call   1070 <DFS@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
lea    0xe96(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe9c(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0xc(%rsp),%edi
call   1050 <createGraph@plt>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,(%rsp)
je     11e3 <main+0x93>
lea    0xe4a(%rip),%r14
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
call   1040 <addUEdge@plt>
addl   $0xffffffff,(%rsp)
jne    11c0 <main+0x70>
xor    %eax,%eax
call   1070 <DFS@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enter number of vertices\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Enter number of edges\0A\00"
@.str.3 = [13 x i8] c"Enter edges\0A\00"
@.str.4 = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %2
%15 = call i32 @createGraph(i32 %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %17
17: ; preds = %20, %0
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32* %5, i32* %6)
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = call i32 @addUEdge(i32 %22, i32 %23)
%25 = load i32, i32* %3
%26 = add nsw i32 %25, -1
store i32 %26, i32* %3
br label %17
27: ; preds = %17
%28 = call i32 (...) @DFS()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.4 = [5 x i8] c"%d%d\00"
@str = [25 x i8] c"Enter number of vertices\00"
@str.5 = [22 x i8] c"Enter number of edges\00"
@str.6 = [12 x i8] c"Enter edges\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%10 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.5, i64 0, i64 0))
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%13 = load i32, i32* %1
%14 = call i32 @createGraph(i32 %13)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.6, i64 0, i64 0))
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 0
br i1 %17, label %26, label %18
18: ; preds = %0, %18
%19 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32* %3, i32* %4)
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = call i32 @addUEdge(i32 %20, i32 %21)
%23 = load i32, i32* %2
%24 = add nsw i32 %23, -1
store i32 %24, i32* %2
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %18
26: ; preds = %18, %0
%27 = call i32 (...) @DFS()
ret i32 0
}