#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*/ printf(char *, int);
void DFS_util(int graph[9][9], int V, int *visited, int V_count) {
  int vertices = 0;
  visited[V] = 1;
  printf("%d -- ", V);
  for (vertices = 0; vertices < V_count; vertices++) {
    if (visited[vertices] != 1 && graph[V][vertices]) {
      DFS_util(graph, vertices, visited, V_count);
    }
  }
}


x86 assembly (clang, -O0):
<DFS_util>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0xc(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11c3 <DFS_util+0xa3>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
je     11b0 <DFS_util+0x90>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     11b0 <DFS_util+0x90>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <DFS_util@plt>
jmp    11b5 <DFS_util+0x95>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1162 <DFS_util+0x42>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DFS_util>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%ebp
mov    %rdx,%r15
mov    %rdi,%r14
movslq %esi,%rbx
movl   $0x1,(%rdx,%rbx,4)
lea    0xebf(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
test   %ebp,%ebp
jle    1189 <DFS_util+0x69>
mov    %ebp,%r12d
lea    (%rbx,%rbx,8),%rax
lea    (%r14,%rax,4),%rbp
xor    %ebx,%ebx
jmp    1169 <DFS_util+0x49>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r12
je     1189 <DFS_util+0x69>
cmpl   $0x1,(%r15,%rbx,4)
je     1160 <DFS_util+0x40>
cmpl   $0x0,0x0(%rbp,%rbx,4)
je     1160 <DFS_util+0x40>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r15,%rdx
mov    %r12d,%ecx
call   1040 <DFS_util@plt>
jmp    1160 <DFS_util+0x40>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d -- \00"
define void @DFS_util([9 x i32]* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca [9 x i32]*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
store [9 x i32]* %0, [9 x i32]** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
store i32 0, i32* %9
%10 = load i32*, i32** %7
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
store i32 1, i32* %13
%14 = load i32, i32* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %14)
store i32 0, i32* %9
br label %16
16: ; preds = %43, %4
%17 = load i32, i32* %9
%18 = load i32, i32* %8
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %46
20: ; preds = %16
%21 = load i32*, i32** %7
%22 = load i32, i32* %9
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
%25 = load i32, i32* %24
%26 = icmp ne i32 %25, 1
br i1 %26, label %27, label %42
27: ; preds = %20
%28 = load [9 x i32]*, [9 x i32]** %5
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [9 x i32], [9 x i32]* %28, i64 %30
%32 = load i32, i32* %9
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [9 x i32], [9 x i32]* %31, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %42
37: ; preds = %27
%38 = load [9 x i32]*, [9 x i32]** %5
%39 = load i32, i32* %9
%40 = load i32*, i32** %7
%41 = load i32, i32* %8
br label %42
42: ; preds = %37, %27, %20
br label %43
43: ; preds = %42
%44 = load i32, i32* %9
%45 = add nsw i32 %44, 1
store i32 %45, i32* %9
br label %16
46: ; preds = %16
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d -- \00"
define void @DFS_util([9 x i32]* nocapture %0, i32 %1, i32* nocapture %2, i32 %3) {
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %2, i64 %5
store i32 1, i32* %6
%7 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
%8 = icmp sgt i32 %3, 0
br i1 %8, label %9, label %25
9: ; preds = %4
%10 = zext i32 %3 to i64
br label %11
11: ; preds = %9, %22
%12 = phi i64 [ 0, %9 ], [ %23, %22 ]
%13 = getelementptr inbounds i32, i32* %2, i64 %12
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, 1
br i1 %15, label %22, label %16
16: ; preds = %11
%17 = getelementptr inbounds [9 x i32], [9 x i32]* %0, i64 %5, i64 %12
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %16
%21 = trunc i64 %12 to i32
tail call void @DFS_util([9 x i32]* %0, i32 %21, i32* %2, i32 %3)
br label %22
22: ; preds = %11, %16, %20
%23 = add nuw nsw i64 %12, 1
%24 = icmp eq i64 %23, %10
br i1 %24, label %25, label %11
25: ; preds = %22, %4
ret void
}