#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 dirent {
  scalar_t__ d_type;
  char *d_name;
};
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ DT_DIR;
scalar_t__ DT_REG;
int EOF;
scalar_t__ chdir(char *);
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *getwd(int /*<<< orphan*/ *);
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ printf(char *, char *, char *);
struct dirent *readdir(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
void scan_dir(char name[]) {
  DIR *d;
  struct dirent *e;
  FILE *f;
  bool garbage;
  int c;
  int size;
  if (chdir(name) != 0) {
    fprintf(stderr, "Failed to chdir() to %s!\n", name);
    return;
  }
  d = opendir(".");
  if (d == NULL) {
    fprintf(stderr, "Failed to opendir() %s!\n", getwd(NULL));
    return;
  }
  while (e = readdir(d)) {
    if (e->d_type == DT_REG) {
      f = fopen(e->d_name, "rb");
      if (f == NULL) {
        fprintf(stderr, "Failed to fopen %s/%s\n", getwd(NULL), e->d_name);
      } else {
        garbage = true;
        size = 0;
        while (true) {
          c = fgetc(f);
          if (c != EOF) {
            size++;
            if (c != '\0') {
              garbage = false;
              break;
            }
          } else {
            break;
          }
        }
        if (garbage == true && size > 0) {
          printf("%s/%s\n", getwd(NULL), e->d_name);
        }
        fclose(f);
      }
    }
    if (e->d_type == DT_DIR) {
      if (strcmp(e->d_name, ".") != 0 && strcmp(e->d_name, "..") != 0) {
        scan_dir(e->d_name);
      }
    }
  }
  closedir(d);
  if (chdir("..") != 0) {
    fprintf(stderr, "Failed to chdir() to ..!\n");
  }
}


x86 assembly (clang, -O0):
<scan_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <chdir@plt>
cmp    $0x0,%rax
je     11ff <scan_dir+0x3f>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe0d(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    1410 <scan_dir+0x250>
lea    0xe48(%rip),%rdi
call   1050 <opendir@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1248 <scan_dir+0x88>
mov    0x2daf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <getwd@plt>
mov    -0x30(%rbp),%edi
mov    %rax,%rdx
lea    0xdde(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    1410 <scan_dir+0x250>
jmp    124d <scan_dir+0x8d>
mov    -0x10(%rbp),%rdi
call   10d0 <readdir@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     13da <scan_dir+0x21a>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d66(%rip),%rcx
cmp    (%rcx),%rax
jne    1370 <scan_dir+0x1b0>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xda9(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12d4 <scan_dir+0x114>
mov    0x2d2b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <getwd@plt>
mov    -0x34(%rbp),%edi
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xd6e(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    136b <scan_dir+0x1ab>
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
call   1080 <fgetc@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    0x2cf0(%rip),%rcx
cmp    (%rcx),%eax
je     1324 <scan_dir+0x164>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     131f <scan_dir+0x15f>
movl   $0x0,-0x24(%rbp)
jmp    132e <scan_dir+0x16e>
jmp    1329 <scan_dir+0x169>
jmp    132e <scan_dir+0x16e>
jmp    12e2 <scan_dir+0x122>
cmpl   $0x1,-0x24(%rbp)
jne    1362 <scan_dir+0x1a2>
cmpl   $0x0,-0x2c(%rbp)
jle    1362 <scan_dir+0x1a2>
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <getwd@plt>
mov    %rax,%rsi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xce9(%rip),%rdi
call   1070 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1370 <scan_dir+0x1b0>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2c4a(%rip),%rcx
cmp    (%rcx),%rax
jne    13d5 <scan_dir+0x215>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcb8(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     13d0 <scan_dir+0x210>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc99(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     13d0 <scan_dir+0x210>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <scan_dir@plt>
jmp    13d5 <scan_dir+0x215>
jmp    124d <scan_dir+0x8d>
mov    -0x10(%rbp),%rdi
call   1090 <closedir@plt>
lea    0xc63(%rip),%rdi
call   1060 <chdir@plt>
cmp    $0x0,%rax
je     1410 <scan_dir+0x250>
mov    0x2bd0(%rip),%rax
mov    (%rax),%edi
lea    0xc47(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_dir>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1060 <chdir@plt>
test   %rax,%rax
je     1200 <scan_dir+0x40>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
lea    0xe18(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <fprintf@plt>
lea    0xe47(%rip),%rdi
call   1050 <opendir@plt>
test   %rax,%rax
je     138e <scan_dir+0x1ce>
mov    %rax,%r12
mov    %rax,%rdi
call   10d0 <readdir@plt>
test   %rax,%rax
je     1350 <scan_dir+0x190>
mov    %rax,%rbx
mov    0x2da5(%rip),%rbp
mov    0x2dae(%rip),%r13
mov    0x2d87(%rip),%r14
jmp    1264 <scan_dir+0xa4>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
call   10d0 <readdir@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1350 <scan_dir+0x190>
mov    (%rbx),%rax
cmp    0x0(%rbp),%rax
jne    1304 <scan_dir+0x144>
mov    0x8(%rbx),%rdi
lea    0xdb7(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     12a7 <scan_dir+0xe7>
mov    %rax,%r15
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1080 <fgetc@plt>
cmp    0x0(%r13),%eax
je     12d7 <scan_dir+0x117>
add    $0xffffffff,%ebp
test   %eax,%eax
je     1290 <scan_dir+0xd0>
jmp    12f5 <scan_dir+0x135>
mov    0x2d22(%rip),%rax
mov    (%rax),%ebp
xor    %edi,%edi
call   10c0 <getwd@plt>
mov    0x8(%rbx),%rcx
mov    %ebp,%edi
mov    0x2d14(%rip),%rbp
lea    0xd6b(%rip),%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    1304 <scan_dir+0x144>
test   %ebp,%ebp
je     12f5 <scan_dir+0x135>
xor    %edi,%edi
call   10c0 <getwd@plt>
mov    0x8(%rbx),%rdx
lea    0xd59(%rip),%rdi
mov    %rax,%rsi
call   1070 <printf@plt>
mov    %r15,%rdi
call   1040 <fclose@plt>
mov    0x2cd4(%rip),%rbp
mov    (%rbx),%rax
cmp    (%r14),%rax
jne    1250 <scan_dir+0x90>
mov    0x8(%rbx),%rdi
lea    0xd33(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1250 <scan_dir+0x90>
mov    0x8(%rbx),%rdi
lea    0xd19(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1250 <scan_dir+0x90>
mov    0x8(%rbx),%rdi
call   1030 <scan_dir@plt>
jmp    1250 <scan_dir+0x90>
mov    %r12,%rdi
call   1090 <closedir@plt>
lea    0xcee(%rip),%rdi
call   1060 <chdir@plt>
test   %rax,%rax
je     13af <scan_dir+0x1ef>
mov    0x2c60(%rip),%rax
mov    (%rax),%edi
lea    0xcd7(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <fprintf@plt>
mov    0x2c3b(%rip),%rax
mov    (%rax),%ebx
xor    %edi,%edi
call   10c0 <getwd@plt>
lea    0xc75(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
jmp    11eb <scan_dir+0x2b>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.dirent = type { i64, i8* }
@stderr = global i32 0
@.str = [26 x i8] c"Failed to chdir() to %s!\0A\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [25 x i8] c"Failed to opendir() %s!\0A\00"
@DT_REG = global i64 0
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [23 x i8] c"Failed to fopen %s/%s\0A\00"
@EOF = global i32 0
@.str.5 = [7 x i8] c"%s/%s\0A\00"
@DT_DIR = global i64 0
@.str.6 = [3 x i8] c"..\00"
@.str.7 = [26 x i8] c"Failed to chdir() to ..!\0A\00"
define void @scan_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca %struct.dirent*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %2
%9 = load i8*, i8** %2
%10 = call i64 @chdir(i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %1
%13 = load i32, i32* @stderr
%14 = load i8*, i8** %2
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %113
16: ; preds = %1
%17 = call i32* @opendir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %17, i32** %3
%18 = load i32*, i32** %3
%19 = icmp eq i32* %18, null
br i1 %19, label %20, label %24
20: ; preds = %16
%21 = load i32, i32* @stderr
%22 = call i8* @getwd(i32* null)
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %22)
br label %113
24: ; preds = %16
br label %25
25: ; preds = %104, %24
%26 = load i32*, i32** %3
%27 = call %struct.dirent* @readdir(i32* %26)
store %struct.dirent* %27, %struct.dirent** %4
%28 = icmp ne %struct.dirent* %27, null
br i1 %28, label %29, label %105
29: ; preds = %25
%30 = load %struct.dirent*, %struct.dirent** %4
%31 = getelementptr inbounds %struct.dirent, %struct.dirent* %30, i32 0, i32 0
%32 = load i64, i64* %31
%33 = load i64, i64* @DT_REG
%34 = icmp eq i64 %32, %33
br i1 %34, label %35, label %81
35: ; preds = %29
%36 = load %struct.dirent*, %struct.dirent** %4
%37 = getelementptr inbounds %struct.dirent, %struct.dirent* %36, i32 0, i32 1
%38 = load i8*, i8** %37
%39 = call i32* @fopen(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %39, i32** %5
%40 = load i32*, i32** %5
%41 = icmp eq i32* %40, null
br i1 %41, label %42, label %49
42: ; preds = %35
%43 = load i32, i32* @stderr
%44 = call i8* @getwd(i32* null)
%45 = load %struct.dirent*, %struct.dirent** %4
%46 = getelementptr inbounds %struct.dirent, %struct.dirent* %45, i32 0, i32 1
%47 = load i8*, i8** %46
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %44, i8* %47)
br label %80
49: ; preds = %35
store i32 1, i32* %6
store i32 0, i32* %8
br label %50
50: ; preds = %49, %64
%51 = load i32*, i32** %5
%52 = call i32 @fgetc(i32* %51)
store i32 %52, i32* %7
%53 = load i32, i32* %7
%54 = load i32, i32* @EOF
%55 = icmp ne i32 %53, %54
br i1 %55, label %56, label %63
56: ; preds = %50
%57 = load i32, i32* %8
%58 = add nsw i32 %57, 1
store i32 %58, i32* %8
%59 = load i32, i32* %7
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %62
61: ; preds = %56
store i32 0, i32* %6
br label %65
62: ; preds = %56
br label %64
63: ; preds = %50
br label %65
64: ; preds = %62
br label %50
65: ; preds = %63, %61
%66 = load i32, i32* %6
%67 = icmp eq i32 %66, 1
br i1 %67, label %68, label %77
68: ; preds = %65
%69 = load i32, i32* %8
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %77
71: ; preds = %68
%72 = call i8* @getwd(i32* null)
%73 = load %struct.dirent*, %struct.dirent** %4
%74 = getelementptr inbounds %struct.dirent, %struct.dirent* %73, i32 0, i32 1
%75 = load i8*, i8** %74
%76 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %72, i8* %75)
br label %77
77: ; preds = %71, %68, %65
%78 = load i32*, i32** %5
%79 = call i32 @fclose(i32* %78)
br label %80
80: ; preds = %77, %42
br label %81
81: ; preds = %80, %29
%82 = load %struct.dirent*, %struct.dirent** %4
%83 = getelementptr inbounds %struct.dirent, %struct.dirent* %82, i32 0, i32 0
%84 = load i64, i64* %83
%85 = load i64, i64* @DT_DIR
%86 = icmp eq i64 %84, %85
br i1 %86, label %87, label %104
87: ; preds = %81
%88 = load %struct.dirent*, %struct.dirent** %4
%89 = getelementptr inbounds %struct.dirent, %struct.dirent* %88, i32 0, i32 1
%90 = load i8*, i8** %89
%91 = call i64 @strcmp(i8* %90, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%92 = icmp ne i64 %91, 0
br i1 %92, label %93, label %103
93: ; preds = %87
%94 = load %struct.dirent*, %struct.dirent** %4
%95 = getelementptr inbounds %struct.dirent, %struct.dirent* %94, i32 0, i32 1
%96 = load i8*, i8** %95
%97 = call i64 @strcmp(i8* %96, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %103
99: ; preds = %93
%100 = load %struct.dirent*, %struct.dirent** %4
%101 = getelementptr inbounds %struct.dirent, %struct.dirent* %100, i32 0, i32 1
%102 = load i8*, i8** %101
br label %103
103: ; preds = %99, %93, %87
br label %104
104: ; preds = %103, %81
br label %25
105: ; preds = %25
%106 = load i32*, i32** %3
%107 = call i32 @closedir(i32* %106)
%108 = call i64 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%109 = icmp ne i64 %108, 0
br i1 %109, label %110, label %113
110: ; preds = %105
%111 = load i32, i32* @stderr
%112 = call i32 (i32, i8*, ...) @fprintf(i32 %111, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %113
113: ; preds = %12, %20, %110, %105
ret void
}

LLVM IR (-O2):
%struct.dirent = type { i64, i8* }
@stderr = global i32 0
@.str = [26 x i8] c"Failed to chdir() to %s!\0A\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [25 x i8] c"Failed to opendir() %s!\0A\00"
@DT_REG = global i64 0
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [23 x i8] c"Failed to fopen %s/%s\0A\00"
@EOF = global i32 0
@.str.5 = [7 x i8] c"%s/%s\0A\00"
@DT_DIR = global i64 0
@.str.6 = [3 x i8] c"..\00"
@.str.7 = [26 x i8] c"Failed to chdir() to ..!\0A\00"
define void @scan_dir(i8* %0) {
%2 = tail call i64 @chdir(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %74
7: ; preds = %1
%8 = tail call i32* @opendir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = tail call %struct.dirent* @readdir(i32* %8)
%12 = icmp eq %struct.dirent* %11, null
br i1 %12, label %67, label %17
13: ; preds = %7
%14 = load i32, i32* @stderr
%15 = tail call i8* @getwd(i32* null)
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %15)
br label %74
17: ; preds = %10, %64
%18 = phi %struct.dirent* [ %65, %64 ], [ %11, %10 ]
%19 = getelementptr inbounds %struct.dirent, %struct.dirent* %18, i64 0, i32 0
%20 = load i64, i64* %19
%21 = load i64, i64* @DT_REG
%22 = icmp eq i64 %20, %21
br i1 %22, label %23, label %49
23: ; preds = %17
%24 = getelementptr inbounds %struct.dirent, %struct.dirent* %18, i64 0, i32 1
%25 = load i8*, i8** %24
%26 = tail call i32* @fopen(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i32* %26, null
br i1 %27, label %28, label %33
28: ; preds = %23
%29 = load i32, i32* @stderr
%30 = tail call i8* @getwd(i32* null)
%31 = load i8*, i8** %24
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %30, i8* %31)
br label %49
33: ; preds = %23, %38
%34 = phi i32 [ %39, %38 ], [ 0, %23 ]
%35 = tail call i32 @fgetc(i32* %26)
%36 = load i32, i32* @EOF
%37 = icmp eq i32 %35, %36
br i1 %37, label %41, label %38
38: ; preds = %33
%39 = add nuw nsw i32 %34, 1
%40 = icmp eq i32 %35, 0
br i1 %40, label %33, label %47
41: ; preds = %33
%42 = icmp eq i32 %34, 0
br i1 %42, label %47, label %43
43: ; preds = %41
%44 = tail call i8* @getwd(i32* null)
%45 = load i8*, i8** %24
%46 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %44, i8* %45)
br label %47
47: ; preds = %38, %43, %41
%48 = tail call i32 @fclose(i32* %26)
br label %49
49: ; preds = %28, %47, %17
%50 = load i64, i64* %19
%51 = load i64, i64* @DT_DIR
%52 = icmp eq i64 %50, %51
br i1 %52, label %53, label %64
53: ; preds = %49
%54 = getelementptr inbounds %struct.dirent, %struct.dirent* %18, i64 0, i32 1
%55 = load i8*, i8** %54
%56 = tail call i64 @strcmp(i8* %55, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%57 = icmp eq i64 %56, 0
br i1 %57, label %64, label %58
58: ; preds = %53
%59 = load i8*, i8** %54
%60 = tail call i64 @strcmp(i8* %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %58
%63 = load i8*, i8** %54
tail call void @scan_dir(i8* %63)
br label %64
64: ; preds = %53, %58, %62, %49
%65 = tail call %struct.dirent* @readdir(i32* %8)
%66 = icmp eq %struct.dirent* %65, null
br i1 %66, label %67, label %17
67: ; preds = %64, %10
%68 = tail call i32 @closedir(i32* %8)
%69 = tail call i64 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%70 = icmp eq i64 %69, 0
br i1 %70, label %74, label %71
71: ; preds = %67
%72 = load i32, i32* @stderr
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %74
74: ; preds = %67, %71, %13, %4
ret void
}