#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 stat {
  int /*<<< orphan*/ st_mode;
};
struct dirent {
  char *d_name;
};
typedef int /*<<< orphan*/ fullprefix;
typedef int /*<<< orphan*/ fullpath;
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int FILENAME_MAX;
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
scalar_t__ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ err(int, char *, char const *);
int /*<<< orphan*/ errx(int, char *);
scalar_t__ lstat(char *, struct stat *);
int /*<<< orphan*/ *opendir(char const *);
int /*<<< orphan*/ printf(char *, char const *);
struct dirent *readdir(int /*<<< orphan*/ *);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *, ...);
scalar_t__ strcmp(char *, char *);
void checkdir(const char *path, const char *prefix) {
  DIR *d;
  struct dirent *de;
  struct stat st;
  char fullpath[FILENAME_MAX];
  char fullprefix[FILENAME_MAX];
  if ((d = opendir(path)) == NULL)
    err(1, "opendir(%s)", path);
  while ((de = readdir(d)) != NULL) {
    if (de->d_name[0] == '.') {
      if (de->d_name[1] == '\0')
        continue;
      else if (de->d_name[1] == '.' && de->d_name[2] == '\0')
        continue;
    }
    snprintf(fullpath, sizeof(fullpath), "%s/%s", path, de->d_name);
    if (lstat(fullpath, &st) != 0)
      err(1, "stat(%s)", fullpath);
    if (!S_ISDIR(st.st_mode))
      continue;
    if (strcmp(de->d_name, "cur") == 0)
      printf("+%s ", prefix);
    if (strcmp(de->d_name, "cur") != 0 && strcmp(de->d_name, "new") != 0 &&
        strcmp(de->d_name, "tmp") != 0) {
      if (prefix == NULL)
        snprintf(fullprefix, sizeof(fullprefix), "%s", de->d_name);
      else
        snprintf(fullprefix, sizeof(fullprefix), "%s/%s", prefix, de->d_name);
      checkdir(fullpath, fullprefix);
    }
  }
  if (closedir(d) != 0)
    errx(1, "closedir");
}


x86 assembly (clang, -O0):
<checkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e21(%rip),%rax
mov    (%rax),%ecx
mov    %rcx,-0x60(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x30(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x58(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x38(%rbp)
mov    (%rax),%eax
mov    %rax,-0x50(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    123e <checkdir+0x8e>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xdc7(%rip),%rsi
call   10d0 <err@plt>
jmp    1243 <checkdir+0x93>
mov    -0x18(%rbp),%rdi
call   10b0 <readdir@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     140a <checkdir+0x25a>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    12bd <checkdir+0x10d>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    1286 <checkdir+0xd6>
jmp    1243 <checkdir+0x93>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2e,%eax
jne    12b3 <checkdir+0x103>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    12b3 <checkdir+0x103>
jmp    1243 <checkdir+0x93>
jmp    12b8 <checkdir+0x108>
jmp    12bd <checkdir+0x10d>
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rax
mov    %eax,%esi
mov    -0x8(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    (%rax),%r8
lea    0xd33(%rip),%rdx
mov    $0x0,%al
call   1070 <snprintf@plt>
mov    -0x58(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1090 <lstat@plt>
cmp    $0x0,%rax
je     130c <checkdir+0x15c>
mov    -0x58(%rbp),%rdx
mov    $0x1,%edi
lea    0xd0b(%rip),%rsi
call   10d0 <err@plt>
mov    -0x28(%rbp),%edi
call   1060 <S_ISDIR@plt>
cmp    $0x0,%eax
jne    1322 <checkdir+0x172>
jmp    1243 <checkdir+0x93>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0xceb(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    134f <checkdir+0x19f>
mov    -0x10(%rbp),%rsi
lea    0xcd5(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0xcbe(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     1405 <checkdir+0x255>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0xcaa(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     1405 <checkdir+0x255>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0xc91(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     1405 <checkdir+0x255>
cmpq   $0x0,-0x10(%rbp)
jne    13d5 <checkdir+0x225>
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rax
mov    %eax,%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%rcx
lea    0xc46(%rip),%rdx
mov    $0x0,%al
call   1070 <snprintf@plt>
jmp    13f8 <checkdir+0x248>
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    (%rax),%r8
lea    0xc1b(%rip),%rdx
mov    $0x0,%al
call   1070 <snprintf@plt>
mov    -0x48(%rbp),%rsi
mov    -0x58(%rbp),%rdi
call   10c0 <checkdir@plt>
jmp    1243 <checkdir+0x93>
mov    -0x18(%rbp),%rdi
call   1080 <closedir@plt>
cmp    $0x0,%rax
je     142e <checkdir+0x27e>
mov    $0x1,%edi
lea    0xc03(%rip),%rsi
call   1040 <errx@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkdir>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,-0x48(%rbp)
mov    %rdi,%r12
mov    %rsp,-0x50(%rbp)
mov    0x2e15(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rbx
mov    %rcx,-0x58(%rbp)
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rbx
mov    %rbx,%rsp
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rax,-0x40(%rbp)
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
call   1030 <opendir@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1226 <checkdir+0x76>
lea    0xde7(%rip),%rsi
mov    $0x1,%edi
mov    %r12,%rdx
call   10d0 <err@plt>
mov    %r14,%rdi
call   10b0 <readdir@plt>
test   %rax,%rax
je     138e <checkdir+0x1de>
mov    %rax,%r13
jmp    1274 <checkdir+0xc4>
mov    -0x38(%rbp),%r13
mov    %r13,%rdi
mov    -0x40(%rbp),%rsi
lea    0xdbe(%rip),%rdx
xor    %eax,%eax
call   1070 <snprintf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10c0 <checkdir@plt>
mov    %r14,%rdi
call   10b0 <readdir@plt>
mov    %rax,%r13
test   %rax,%rax
je     138e <checkdir+0x1de>
mov    0x0(%r13),%r8
cmpb   $0x2e,(%r8)
jne    12a0 <checkdir+0xf0>
movzbl 0x1(%r8),%eax
test   %al,%al
je     1260 <checkdir+0xb0>
cmp    $0x2e,%al
jne    12a0 <checkdir+0xf0>
cmpb   $0x0,0x2(%r8)
je     1260 <checkdir+0xb0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    -0x58(%rbp),%rsi
lea    0xd5e(%rip),%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1070 <snprintf@plt>
mov    %rbx,%rdi
lea    -0x30(%rbp),%rsi
call   1090 <lstat@plt>
test   %rax,%rax
je     12dd <checkdir+0x12d>
mov    $0x1,%edi
lea    0xd3d(%rip),%rsi
mov    %rbx,%rdx
call   10d0 <err@plt>
mov    -0x30(%rbp),%edi
call   1060 <S_ISDIR@plt>
test   %eax,%eax
je     1260 <checkdir+0xb0>
mov    0x0(%r13),%rdi
lea    0xd23(%rip),%r15
mov    %r15,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
jne    1315 <checkdir+0x165>
lea    0xd13(%rip),%rdi
mov    -0x48(%rbp),%rsi
call   1050 <printf@plt>
mov    0x0(%r13),%rdi
mov    %r15,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1260 <checkdir+0xb0>
mov    0x0(%r13),%rdi
lea    0xcef(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1260 <checkdir+0xb0>
mov    0x0(%r13),%rdi
lea    0xcda(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1260 <checkdir+0xb0>
mov    0x0(%r13),%r8
mov    -0x48(%rbp),%rcx
test   %rcx,%rcx
jne    123c <checkdir+0x8c>
mov    -0x38(%rbp),%r13
mov    %r13,%rdi
mov    -0x40(%rbp),%rsi
lea    0xc90(%rip),%rdx
mov    %r8,%rcx
xor    %eax,%eax
call   1070 <snprintf@plt>
jmp    1255 <checkdir+0xa5>
mov    %r14,%rdi
call   1080 <closedir@plt>
test   %rax,%rax
je     13ac <checkdir+0x1fc>
lea    0xc8a(%rip),%rsi
mov    $0x1,%edi
call   1040 <errx@plt>
mov    -0x50(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.dirent = type { i8* }
%struct.stat = type { i32 }
@FILENAME_MAX = global i32 0
@.str = [12 x i8] c"opendir(%s)\00"
@.str.1 = [6 x i8] c"%s/%s\00"
@.str.2 = [9 x i8] c"stat(%s)\00"
@.str.3 = [4 x i8] c"cur\00"
@.str.4 = [5 x i8] c"+%s \00"
@.str.5 = [4 x i8] c"new\00"
@.str.6 = [4 x i8] c"tmp\00"
@.str.7 = [3 x i8] c"%s\00"
@.str.8 = [9 x i8] c"closedir\00"
define void @checkdir(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca %struct.dirent*
%7 = alloca %struct.stat
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%11 = load i32, i32* @FILENAME_MAX
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %8
%14 = alloca i8, i64 %12
store i64 %12, i64* %9
%15 = load i32, i32* @FILENAME_MAX
%16 = zext i32 %15 to i64
%17 = alloca i8, i64 %16
store i64 %16, i64* %10
%18 = load i8*, i8** %3
%19 = call i32* @opendir(i8* %18)
store i32* %19, i32** %5
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %24
21: ; preds = %2
%22 = load i8*, i8** %3
%23 = call i32 @err(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %22)
br label %24
24: ; preds = %21, %2
br label %25
25: ; preds = %126, %81, %62, %45, %24
%26 = load i32*, i32** %5
%27 = call %struct.dirent* @readdir(i32* %26)
store %struct.dirent* %27, %struct.dirent** %6
%28 = icmp ne %struct.dirent* %27, null
br i1 %28, label %29, label %127
29: ; preds = %25
%30 = load %struct.dirent*, %struct.dirent** %6
%31 = getelementptr inbounds %struct.dirent, %struct.dirent* %30, i32 0, i32 0
%32 = load i8*, i8** %31
%33 = getelementptr inbounds i8, i8* %32, i64 0
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 46
br i1 %36, label %37, label %65
37: ; preds = %29
%38 = load %struct.dirent*, %struct.dirent** %6
%39 = getelementptr inbounds %struct.dirent, %struct.dirent* %38, i32 0, i32 0
%40 = load i8*, i8** %39
%41 = getelementptr inbounds i8, i8* %40, i64 1
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %37
br label %25
46: ; preds = %37
%47 = load %struct.dirent*, %struct.dirent** %6
%48 = getelementptr inbounds %struct.dirent, %struct.dirent* %47, i32 0, i32 0
%49 = load i8*, i8** %48
%50 = getelementptr inbounds i8, i8* %49, i64 1
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 46
br i1 %53, label %54, label %63
54: ; preds = %46
%55 = load %struct.dirent*, %struct.dirent** %6
%56 = getelementptr inbounds %struct.dirent, %struct.dirent* %55, i32 0, i32 0
%57 = load i8*, i8** %56
%58 = getelementptr inbounds i8, i8* %57, i64 2
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %54
br label %25
63: ; preds = %54, %46
br label %64
64: ; preds = %63
br label %65
65: ; preds = %64, %29
%66 = trunc i64 %12 to i32
%67 = load i8*, i8** %3
%68 = load %struct.dirent*, %struct.dirent** %6
%69 = getelementptr inbounds %struct.dirent, %struct.dirent* %68, i32 0, i32 0
%70 = load i8*, i8** %69
%71 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %14, i32 %66, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %67, i8* %70)
%72 = call i64 @lstat(i8* %14, %struct.stat* %7)
%73 = icmp ne i64 %72, 0
br i1 %73, label %74, label %76
74: ; preds = %65
%75 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %14)
br label %76
76: ; preds = %74, %65
%77 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%78 = load i32, i32* %77
%79 = call i32 @S_ISDIR(i32 %78)
%80 = icmp ne i32 %79, 0
br i1 %80, label %82, label %81
81: ; preds = %76
br label %25
82: ; preds = %76
%83 = load %struct.dirent*, %struct.dirent** %6
%84 = getelementptr inbounds %struct.dirent, %struct.dirent* %83, i32 0, i32 0
%85 = load i8*, i8** %84
%86 = call i64 @strcmp(i8* %85, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %91
88: ; preds = %82
%89 = load i8*, i8** %4
%90 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %89)
br label %91
91: ; preds = %88, %82
%92 = load %struct.dirent*, %struct.dirent** %6
%93 = getelementptr inbounds %struct.dirent, %struct.dirent* %92, i32 0, i32 0
%94 = load i8*, i8** %93
%95 = call i64 @strcmp(i8* %94, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%96 = icmp ne i64 %95, 0
br i1 %96, label %97, label %126
97: ; preds = %91
%98 = load %struct.dirent*, %struct.dirent** %6
%99 = getelementptr inbounds %struct.dirent, %struct.dirent* %98, i32 0, i32 0
%100 = load i8*, i8** %99
%101 = call i64 @strcmp(i8* %100, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%102 = icmp ne i64 %101, 0
br i1 %102, label %103, label %126
103: ; preds = %97
%104 = load %struct.dirent*, %struct.dirent** %6
%105 = getelementptr inbounds %struct.dirent, %struct.dirent* %104, i32 0, i32 0
%106 = load i8*, i8** %105
%107 = call i64 @strcmp(i8* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%108 = icmp ne i64 %107, 0
br i1 %108, label %109, label %126
109: ; preds = %103
%110 = load i8*, i8** %4
%111 = icmp eq i8* %110, null
br i1 %111, label %112, label %118
112: ; preds = %109
%113 = trunc i64 %16 to i32
%114 = load %struct.dirent*, %struct.dirent** %6
%115 = getelementptr inbounds %struct.dirent, %struct.dirent* %114, i32 0, i32 0
%116 = load i8*, i8** %115
%117 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %17, i32 %113, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %116)
br label %125
118: ; preds = %109
%119 = trunc i64 %16 to i32
%120 = load i8*, i8** %4
%121 = load %struct.dirent*, %struct.dirent** %6
%122 = getelementptr inbounds %struct.dirent, %struct.dirent* %121, i32 0, i32 0
%123 = load i8*, i8** %122
%124 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %17, i32 %119, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %120, i8* %123)
br label %125
125: ; preds = %118, %112
br label %126
126: ; preds = %125, %103, %97, %91
br label %25
127: ; preds = %25
%128 = load i32*, i32** %5
%129 = call i64 @closedir(i32* %128)
%130 = icmp ne i64 %129, 0
br i1 %130, label %131, label %133
131: ; preds = %127
%132 = call i32 @errx(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
br label %133
133: ; preds = %131, %127
%134 = load i8*, i8** %8
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.dirent = type { i8* }
@FILENAME_MAX = global i32 0
@.str = [12 x i8] c"opendir(%s)\00"
@.str.1 = [6 x i8] c"%s/%s\00"
@.str.2 = [9 x i8] c"stat(%s)\00"
@.str.3 = [4 x i8] c"cur\00"
@.str.4 = [5 x i8] c"+%s \00"
@.str.5 = [4 x i8] c"new\00"
@.str.6 = [4 x i8] c"tmp\00"
@.str.7 = [3 x i8] c"%s\00"
@.str.8 = [9 x i8] c"closedir\00"
define void @checkdir(i8* %0, i8* %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = load i32, i32* @FILENAME_MAX
%6 = zext i32 %5 to i64
%7 = tail call i8* @llvm.stacksave()
%8 = alloca i8, i64 %6
%9 = load i32, i32* @FILENAME_MAX
%10 = zext i32 %9 to i64
%11 = alloca i8, i64 %10
%12 = tail call i32* @opendir(i8* %0)
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %16
16: ; preds = %14, %2
%17 = call %struct.dirent* @readdir(i32* %12)
%18 = icmp eq %struct.dirent* %17, null
br i1 %18, label %73, label %19
19: ; preds = %16
%20 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%21 = icmp eq i8* %1, null
br label %22
22: ; preds = %19, %70
%23 = phi %struct.dirent* [ %17, %19 ], [ %71, %70 ]
%24 = getelementptr inbounds %struct.dirent, %struct.dirent* %23, i64 0, i32 0
%25 = load i8*, i8** %24
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, 46
br i1 %27, label %28, label %35
28: ; preds = %22
%29 = getelementptr inbounds i8, i8* %25, i64 1
%30 = load i8, i8* %29
switch i8 %30, label %35 [
i8 0, label %70
i8 46, label %31
]
31: ; preds = %28
%32 = getelementptr inbounds i8, i8* %25, i64 2
%33 = load i8, i8* %32
%34 = icmp eq i8 %33, 0
br i1 %34, label %70, label %35
35: ; preds = %28, %31, %22
%36 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %8, i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %25)
%37 = call i64 @lstat(i8* %8, %struct.stat* %3)
%38 = icmp eq i64 %37, 0
br i1 %38, label %41, label %39
39: ; preds = %35
%40 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %8)
br label %41
41: ; preds = %39, %35
%42 = load i32, i32* %20
%43 = call i32 @S_ISDIR(i32 %42)
%44 = icmp eq i32 %43, 0
br i1 %44, label %70, label %45
45: ; preds = %41
%46 = load i8*, i8** %24
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %1)
br label %51
51: ; preds = %49, %45
%52 = load i8*, i8** %24
%53 = call i64 @strcmp(i8* %52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %70, label %55
55: ; preds = %51
%56 = load i8*, i8** %24
%57 = call i64 @strcmp(i8* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %70, label %59
59: ; preds = %55
%60 = load i8*, i8** %24
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %70, label %63
63: ; preds = %59
%64 = load i8*, i8** %24
br i1 %21, label %65, label %67
65: ; preds = %63
%66 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %11, i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %64)
br label %69
67: ; preds = %63
%68 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %11, i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %64)
br label %69
69: ; preds = %67, %65
br label %70
70: ; preds = %51, %55, %59, %69, %31, %41, %28
%71 = call %struct.dirent* @readdir(i32* %12)
%72 = icmp eq %struct.dirent* %71, null
br i1 %72, label %73, label %22
73: ; preds = %70, %16
%74 = call i64 @closedir(i32* %12)
%75 = icmp eq i64 %74, 0
br i1 %75, label %78, label %76
76: ; preds = %73
%77 = call i32 @errx(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
br label %78
78: ; preds = %76, %73
ret void
}