#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*/ add_edge(int, int);
int /*<<< orphan*/ add_vertex(char);
int /*<<< orphan*/ dfs();
int /*<<< orphan*/ printf(char *);
int main(int arvc, char *argc[]) {
  add_vertex('a');
  add_vertex('b');
  add_vertex('c');
  add_vertex('d');
  add_vertex('e');
  add_edge(0, 1);
  add_edge(1, 2);
  add_edge(0, 3);
  add_edge(3, 4);
  printf("Visits: ");
  dfs();
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x61,%edi
call   1050 <add_vertex@plt>
mov    $0x62,%edi
call   1050 <add_vertex@plt>
mov    $0x63,%edi
call   1050 <add_vertex@plt>
mov    $0x64,%edi
call   1050 <add_vertex@plt>
mov    $0x65,%edi
call   1050 <add_vertex@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <add_edge@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <add_edge@plt>
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <add_edge@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <add_edge@plt>
lea    0xe3b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <dfs@plt>
lea    0xe31(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
call   1060 <add_vertex@plt>
mov    $0x62,%edi
call   1060 <add_vertex@plt>
mov    $0x63,%edi
call   1060 <add_vertex@plt>
mov    $0x64,%edi
call   1060 <add_vertex@plt>
mov    $0x65,%edi
call   1060 <add_vertex@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <add_edge@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <add_edge@plt>
xor    %edi,%edi
mov    $0x3,%esi
call   1040 <add_edge@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <add_edge@plt>
lea    0xe40(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <dfs@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Visits: \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @add_vertex(i8 signext 97)
%7 = call i32 @add_vertex(i8 signext 98)
%8 = call i32 @add_vertex(i8 signext 99)
%9 = call i32 @add_vertex(i8 signext 100)
%10 = call i32 @add_vertex(i8 signext 101)
%11 = call i32 @add_edge(i32 0, i32 1)
%12 = call i32 @add_edge(i32 1, i32 2)
%13 = call i32 @add_edge(i32 0, i32 3)
%14 = call i32 @add_edge(i32 3, i32 4)
%15 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (...) @dfs()
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Visits: \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @add_vertex(i8 signext 97)
%4 = tail call i32 @add_vertex(i8 signext 98)
%5 = tail call i32 @add_vertex(i8 signext 99)
%6 = tail call i32 @add_vertex(i8 signext 100)
%7 = tail call i32 @add_vertex(i8 signext 101)
%8 = tail call i32 @add_edge(i32 0, i32 1)
%9 = tail call i32 @add_edge(i32 1, i32 2)
%10 = tail call i32 @add_edge(i32 0, i32 3)
%11 = tail call i32 @add_edge(i32 3, i32 4)
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 (...) @dfs()
%14 = tail call i32 @putchar(i32 10)
ret i32 0
}