#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*/ DIR;

/* Variables and functions */
scalar_t__ DT_BLK;
scalar_t__ DT_CHR;
scalar_t__ DT_DIR;
scalar_t__ DT_FIFO;
scalar_t__ DT_LNK;
scalar_t__ DT_REG;
scalar_t__ DT_SOCK;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int closedir(int /*<<< orphan*/ *);
scalar_t__ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *, char *);
struct dirent *readdir(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  struct dirent *dirents;
  DIR *dir;
  int status;
  int i;
  for (i = 1; i < argc; i++) {
    dir = opendir(argv[i]);
    if (dir == NULL) {
      perror("opendir(3)");
      exit(EXIT_FAILURE);
    }
    errno = 0;
    while ((dirents = readdir(dir)) != NULL) {
      printf("%s %s\n",
             dirents->d_type == DT_BLK    ? "DT_BLK "
             : dirents->d_type == DT_CHR  ? "DT_CHR "
             : dirents->d_type == DT_DIR  ? "DT_DIR "
             : dirents->d_type == DT_FIFO ? "DT_FIFO"
             : dirents->d_type == DT_LNK  ? "DT_LNK "
             : dirents->d_type == DT_REG  ? "DT_REG "
             : dirents->d_type == DT_SOCK ? "DT_SOCK"
                                          : "DT_UNKNOWN",
             dirents->d_name);
      errno = 0;
    }
    if (errno != 0) {
      perror("readdir(3)");
      exit(EXIT_FAILURE);
    }
    status = closedir(dir);
    if (status < 0) {
      perror("closedir(3)");
      exit(EXIT_FAILURE);
    }
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13bd <main+0x25d>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11c3 <main+0x63>
lea    0xe50(%rip),%rdi
call   1070 <perror@plt>
mov    0x2e04(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    0x2e06(%rip),%rax
movq   $0x0,(%rax)
mov    -0x20(%rbp),%rdi
call   1060 <readdir@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     134f <main+0x1ef>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2dd2(%rip),%rcx
cmp    (%rcx),%rax
jne    120f <main+0xaf>
lea    0xe0c(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    1324 <main+0x1c4>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d9b(%rip),%rcx
cmp    (%rcx),%rax
jne    1236 <main+0xd6>
lea    0xded(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    131c <main+0x1bc>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d94(%rip),%rcx
cmp    (%rcx),%rax
jne    125d <main+0xfd>
lea    0xdce(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    1314 <main+0x1b4>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d2d(%rip),%rcx
cmp    (%rcx),%rax
jne    1284 <main+0x124>
lea    0xdaf(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    130c <main+0x1ac>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d1e(%rip),%rcx
cmp    (%rcx),%rax
jne    12ab <main+0x14b>
lea    0xd90(%rip),%rax
mov    %rax,-0x50(%rbp)
jmp    1304 <main+0x1a4>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d27(%rip),%rcx
cmp    (%rcx),%rax
jne    12d2 <main+0x172>
lea    0xd71(%rip),%rax
mov    %rax,-0x58(%rbp)
jmp    12fc <main+0x19c>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    0x2cb0(%rip),%rax
mov    (%rax),%rsi
lea    0xd60(%rip),%rax
lea    0xd51(%rip),%rcx
cmp    %rsi,%rdx
cmove  %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xcd4(%rip),%rdi
call   1040 <printf@plt>
mov    0x2c8d(%rip),%rax
movq   $0x0,(%rax)
jmp    11d1 <main+0x71>
mov    0x2c7a(%rip),%rax
cmpq   $0x0,(%rax)
je     137a <main+0x21a>
lea    0xcee(%rip),%rdi
call   1070 <perror@plt>
mov    0x2c4d(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    -0x20(%rbp),%rdi
call   1050 <closedir@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    13aa <main+0x24a>
lea    0xcc9(%rip),%rdi
call   1070 <perror@plt>
mov    0x2c1d(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
jmp    13af <main+0x24f>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    117d <main+0x1d>
mov    0x2be4(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,0x10(%rsp)
cmp    $0x2,%edi
jl     12b2 <main+0x152>
mov    %edi,%eax
mov    %rax,0x8(%rsp)
mov    $0x1,%r13d
mov    0x2e40(%rip),%rbp
mov    0x2e31(%rip),%r14
lea    0xe74(%rip),%r12
lea    0xe66(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x10(%rsp),%rax
mov    (%rax,%r13,8),%rdi
call   1030 <opendir@plt>
test   %rax,%rax
je     12c0 <main+0x160>
mov    %rax,%rbx
jmp    11dc <main+0x7c>
nopl   0x0(%rax)
mov    0x8(%rax),%rdx
mov    %r15,%rdi
call   1040 <printf@plt>
movq   $0x0,0x0(%rbp)
mov    %rbx,%rdi
call   1060 <readdir@plt>
test   %rax,%rax
je     1290 <main+0x130>
mov    (%rax),%rcx
mov    %r12,%rsi
cmp    (%r14),%rcx
je     11d0 <main+0x70>
lea    0xe13(%rip),%rsi
mov    0x2daa(%rip),%rdx
cmp    (%rdx),%rcx
je     11d0 <main+0x70>
lea    0xe08(%rip),%rsi
mov    0x2db7(%rip),%rdx
cmp    (%rdx),%rcx
je     11d0 <main+0x70>
lea    0xdfd(%rip),%rsi
mov    0x2d64(%rip),%rdx
cmp    (%rdx),%rcx
je     11d0 <main+0x70>
lea    0xdf2(%rip),%rsi
mov    0x2d69(%rip),%rdx
cmp    (%rdx),%rcx
je     11d0 <main+0x70>
lea    0xde7(%rip),%rsi
mov    0x2d86(%rip),%rdx
cmp    (%rdx),%rcx
je     11d0 <main+0x70>
mov    0x2d26(%rip),%rdx
cmp    (%rdx),%rcx
lea    0xdd6(%rip),%rsi
lea    0xdc7(%rip),%rcx
cmove  %rcx,%rsi
jmp    11d0 <main+0x70>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpq   $0x0,0x0(%rbp)
jne    12c9 <main+0x169>
mov    %rbx,%rdi
call   1050 <closedir@plt>
test   %eax,%eax
js     12d2 <main+0x172>
add    $0x1,%r13
cmp    0x8(%rsp),%r13
jne    11b0 <main+0x50>
mov    0x2cef(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
lea    0xd39(%rip),%rdi
jmp    12d9 <main+0x179>
lea    0xd85(%rip),%rdi
jmp    12d9 <main+0x179>
lea    0xd87(%rip),%rdi
call   1070 <perror@plt>
mov    0x2cdb(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

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

LLVM IR (-O2):
%struct.dirent = type { i64, i8* }
@.str = [11 x i8] c"opendir(3)\00"
@EXIT_FAILURE = global i32 0
@errno = global i64 0
@.str.1 = [7 x i8] c"%s %s\0A\00"
@DT_BLK = global i64 0
@.str.2 = [8 x i8] c"DT_BLK \00"
@DT_CHR = global i64 0
@.str.3 = [8 x i8] c"DT_CHR \00"
@DT_DIR = global i64 0
@.str.4 = [8 x i8] c"DT_DIR \00"
@DT_FIFO = global i64 0
@.str.5 = [8 x i8] c"DT_FIFO\00"
@DT_LNK = global i64 0
@.str.6 = [8 x i8] c"DT_LNK \00"
@DT_REG = global i64 0
@.str.7 = [8 x i8] c"DT_REG \00"
@DT_SOCK = global i64 0
@.str.8 = [8 x i8] c"DT_SOCK\00"
@.str.9 = [11 x i8] c"DT_UNKNOWN\00"
@.str.10 = [11 x i8] c"readdir(3)\00"
@.str.11 = [12 x i8] c"closedir(3)\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %68
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %8
6: ; preds = %60
%7 = icmp eq i64 %63, %5
br i1 %7, label %68, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 1, %4 ], [ %63, %6 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32* @opendir(i8* %11)
%13 = icmp eq i32* %12, null
br i1 %13, label %17, label %14
14: ; preds = %8
store i64 0, i64* @errno
%15 = tail call %struct.dirent* @readdir(i32* %12)
%16 = icmp eq %struct.dirent* %15, null
br i1 %16, label %53, label %21
17: ; preds = %8
%18 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* @EXIT_FAILURE
%20 = tail call i32 @exit(i32 %19)
unreachable
21: ; preds = %14, %46
%22 = phi %struct.dirent* [ %51, %46 ], [ %15, %14 ]
%23 = getelementptr inbounds %struct.dirent, %struct.dirent* %22, i64 0, i32 0
%24 = load i64, i64* %23
%25 = load i64, i64* @DT_BLK
%26 = icmp eq i64 %24, %25
br i1 %26, label %46, label %27
27: ; preds = %21
%28 = load i64, i64* @DT_CHR
%29 = icmp eq i64 %24, %28
br i1 %29, label %46, label %30
30: ; preds = %27
%31 = load i64, i64* @DT_DIR
%32 = icmp eq i64 %24, %31
br i1 %32, label %46, label %33
33: ; preds = %30
%34 = load i64, i64* @DT_FIFO
%35 = icmp eq i64 %24, %34
br i1 %35, label %46, label %36
36: ; preds = %33
%37 = load i64, i64* @DT_LNK
%38 = icmp eq i64 %24, %37
br i1 %38, label %46, label %39
39: ; preds = %36
%40 = load i64, i64* @DT_REG
%41 = icmp eq i64 %24, %40
br i1 %41, label %46, label %42
42: ; preds = %39
%43 = load i64, i64* @DT_SOCK
%44 = icmp eq i64 %24, %43
%45 = select i1 %44, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0)
br label %46
46: ; preds = %27, %33, %42, %39, %36, %30, %21
%47 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), %21 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %27 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), %30 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), %33 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), %36 ], [ %45, %42 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), %39 ]
%48 = getelementptr inbounds %struct.dirent, %struct.dirent* %22, i64 0, i32 1
%49 = load i8*, i8** %48
%50 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %47, i8* %49)
store i64 0, i64* @errno
%51 = tail call %struct.dirent* @readdir(i32* %12)
%52 = icmp eq %struct.dirent* %51, null
br i1 %52, label %53, label %21
53: ; preds = %46, %14
%54 = load i64, i64* @errno
%55 = icmp eq i64 %54, 0
br i1 %55, label %60, label %56
56: ; preds = %53
%57 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%58 = load i32, i32* @EXIT_FAILURE
%59 = tail call i32 @exit(i32 %58)
unreachable
60: ; preds = %53
%61 = tail call i32 @closedir(i32* %12)
%62 = icmp slt i32 %61, 0
%63 = add nuw nsw i64 %9, 1
br i1 %62, label %64, label %6
64: ; preds = %60
%65 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%66 = load i32, i32* @EXIT_FAILURE
%67 = tail call i32 @exit(i32 %66)
unreachable
68: ; preds = %6, %2
%69 = load i32, i32* @EXIT_SUCCESS
%70 = tail call i32 @exit(i32 %69)
unreachable
}