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

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, ...);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ *opendir(char const *);
struct dirent *readdir(int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
char *strerror(int /*<<< orphan*/);
int strlen(char const *);
int /*<<< orphan*/ strncmp(char *, char const *, int);
FILE *open_module(const char *name, const char *search_dir) {
  DIR *dir;
  struct dirent *dirent;
  char *path;
  FILE *ret = NULL;
  dir = opendir(search_dir);
  if (!dir) {
    fprintf(stderr, "Opening the directory \"%s\" failed (%s).\n", search_dir,
            strerror(errno));
    return NULL;
  }
  while ((dirent = readdir(dir))) {
    if (!strncmp(dirent->d_name, name, strlen(name)) &&
        ((dirent->d_name[strlen(name)] == '.') ||
         (dirent->d_name[strlen(name)] == '@')) &&
        !strcmp(dirent->d_name + strlen(dirent->d_name) - 5, ".yang")) {
      path = malloc(strlen(search_dir) + 1 + strlen(dirent->d_name) + 1);
      if (!path) {
        fprintf(stderr, "Memory allocation error (%s).\n", strerror(errno));
        break;
      }
      sprintf(path, "%s/%s", search_dir, dirent->d_name);
      ret = fopen(path, "r");
      free(path);
      if (!ret) {
        fprintf(stderr, "Opening file \"%s\" failed (%s).\n", dirent->d_name,
                strerror(errno));
      }
      break;
    }
  }
  closedir(dir);
  return ret;
}


x86 assembly (clang, -O0):
<open_module>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <opendir@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    123a <open_module+0x7a>
mov    0x2de6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x44(%rbp),%edi
mov    -0x40(%rbp),%rdx
mov    %rax,%rcx
lea    0xdda(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movq   $0x0,-0x8(%rbp)
jmp    1422 <open_module+0x262>
jmp    123f <open_module+0x7f>
mov    -0x20(%rbp),%rdi
call   10a0 <readdir@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1411 <open_module+0x251>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x58(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    140c <open_module+0x24c>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
je     12de <open_module+0x11e>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%rax
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x40,%eax
jne    140c <open_module+0x24c>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x70(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
call   1060 <strlen@plt>
mov    -0x70(%rbp),%rdi
cltq
add    %rax,%rdi
add    $0xfffffffffffffffb,%rdi
lea    0xd20(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    140c <open_module+0x24c>
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
call   1060 <strlen@plt>
mov    -0x74(%rbp),%edi
add    %eax,%edi
add    $0x1,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1381 <open_module+0x1c1>
mov    0x2c8b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x78(%rbp)
mov    0x2c77(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x78(%rbp),%edi
mov    %rax,%rdx
lea    0xcba(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1411 <open_module+0x251>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    (%rax),%rcx
lea    0xcb7(%rip),%rsi
call   10d0 <sprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xcad(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x38(%rbp)
jne    1407 <open_module+0x247>
mov    0x2c15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x84(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x80(%rbp)
mov    0x2bf3(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x84(%rbp),%edi
mov    -0x80(%rbp),%rdx
mov    %rax,%rcx
lea    0xc56(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1411 <open_module+0x251>
jmp    123f <open_module+0x7f>
mov    -0x20(%rbp),%rdi
call   1070 <closedir@plt>
mov    -0x38(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_module>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbp
mov    %rdi,%r13
mov    %rsi,%rdi
call   1050 <opendir@plt>
test   %rax,%rax
je     1298 <open_module+0xd8>
mov    %rax,%r12
mov    %rax,%rdi
call   10a0 <readdir@plt>
test   %rax,%rax
je     128b <open_module+0xcb>
mov    %rax,%rbx
mov    %rbp,(%rsp)
lea    0xe25(%rip),%r14
jmp    1245 <open_module+0x85>
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx),%rbp
mov    %rbp,%rdi
call   1060 <strlen@plt>
cltq
lea    (%rax,%rbp,1),%rdi
add    $0xfffffffffffffffb,%rdi
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     12da <open_module+0x11a>
mov    %r12,%rdi
call   10a0 <readdir@plt>
mov    %rax,%rbx
test   %rax,%rax
je     128b <open_module+0xcb>
mov    (%rbx),%r15
mov    %r13,%rdi
call   1060 <strlen@plt>
mov    %r15,%rdi
mov    %r13,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1235 <open_module+0x75>
mov    (%rbx),%rbp
mov    %r13,%rdi
call   1060 <strlen@plt>
cltq
cmpb   $0x2e,0x0(%rbp,%rax,1)
je     1210 <open_module+0x50>
mov    (%rbx),%rbp
mov    %r13,%rdi
call   1060 <strlen@plt>
cltq
cmpb   $0x40,0x0(%rbp,%rax,1)
je     1210 <open_module+0x50>
jmp    1235 <open_module+0x75>
xor    %r14d,%r14d
mov    %r12,%rdi
call   1070 <closedir@plt>
jmp    12c8 <open_module+0x108>
mov    0x2d41(%rip),%rax
mov    (%rax),%ebx
mov    0x2d30(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xd4a(%rip),%rsi
xor    %r14d,%r14d
mov    %ebx,%edi
mov    %rbp,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rsp),%r14
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %eax,%ebp
mov    (%rbx),%rdi
call   1060 <strlen@plt>
lea    (%rax,%rbp,1),%edi
add    $0x2,%edi
call   10b0 <malloc@plt>
test   %rax,%rax
je     1373 <open_module+0x1b3>
mov    %rax,%rbp
mov    (%rbx),%rcx
lea    0xd41(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   10d0 <sprintf@plt>
lea    0xd35(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <fopen@plt>
mov    %rax,%r14
mov    %rbp,%rdi
call   1030 <free@plt>
test   %r14,%r14
jne    128e <open_module+0xce>
mov    0x2c9e(%rip),%rax
mov    (%rax),%ebp
mov    (%rbx),%rbx
mov    0x2c8a(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xcfa(%rip),%rsi
xor    %r14d,%r14d
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    128e <open_module+0xce>
mov    0x2c66(%rip),%rax
mov    (%rax),%ebx
mov    0x2c55(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xc9e(%rip),%rsi
xor    %r14d,%r14d
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    128e <open_module+0xce>

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

LLVM IR (-O2):
%struct.dirent = type { i8* }
@stderr = global i32 0
@.str = [41 x i8] c"Opening the directory \22%s\22 failed (%s).\0A\00"
@errno = global i32 0
@.str.1 = [6 x i8] c".yang\00"
@.str.2 = [31 x i8] c"Memory allocation error (%s).\0A\00"
@.str.3 = [6 x i8] c"%s/%s\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [32 x i8] c"Opening file \22%s\22 failed (%s).\0A\00"
define noalias i32* @open_module(i8* %0, i8* %1) {
%3 = tail call i32* @opendir(i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call %struct.dirent* @readdir(i32* %3)
%7 = icmp eq %struct.dirent* %6, null
br i1 %7, label %70, label %13
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i32, i32* @errno
%11 = tail call i8* @strerror(i32 %10)
%12 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %11)
br label %73
13: ; preds = %5, %67
%14 = phi %struct.dirent* [ %68, %67 ], [ %6, %5 ]
%15 = getelementptr inbounds %struct.dirent, %struct.dirent* %14, i64 0, i32 0
%16 = load i8*, i8** %15
%17 = tail call i32 @strlen(i8* %0)
%18 = tail call i32 @strncmp(i8* %16, i8* %0, i32 %17)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %67
20: ; preds = %13
%21 = load i8*, i8** %15
%22 = tail call i32 @strlen(i8* %0)
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 46
br i1 %26, label %34, label %27
27: ; preds = %20
%28 = load i8*, i8** %15
%29 = tail call i32 @strlen(i8* %0)
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 64
br i1 %33, label %34, label %67
34: ; preds = %27, %20
%35 = load i8*, i8** %15
%36 = tail call i32 @strlen(i8* %35)
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %35, i64 -5
%39 = getelementptr inbounds i8, i8* %38, i64 %37
%40 = tail call i32 @strcmp(i8* %39, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %67
42: ; preds = %34
%43 = tail call i32 @strlen(i8* %1)
%44 = load i8*, i8** %15
%45 = tail call i32 @strlen(i8* %44)
%46 = add i32 %43, 2
%47 = add i32 %46, %45
%48 = tail call i8* @malloc(i32 %47)
%49 = icmp eq i8* %48, null
br i1 %49, label %50, label %55
50: ; preds = %42
%51 = load i32, i32* @stderr
%52 = load i32, i32* @errno
%53 = tail call i8* @strerror(i32 %52)
%54 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %53)
br label %70
55: ; preds = %42
%56 = load i8*, i8** %15
%57 = tail call i32 @sprintf(i8* %48, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %1, i8* %56)
%58 = tail call i32* @fopen(i8* %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%59 = tail call i32 @free(i8* %48)
%60 = icmp eq i32* %58, null
br i1 %60, label %61, label %70
61: ; preds = %55
%62 = load i32, i32* @stderr
%63 = load i8*, i8** %15
%64 = load i32, i32* @errno
%65 = tail call i8* @strerror(i32 %64)
%66 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8* %63, i8* %65)
br label %70
67: ; preds = %34, %27, %13
%68 = tail call %struct.dirent* @readdir(i32* %3)
%69 = icmp eq %struct.dirent* %68, null
br i1 %69, label %70, label %13
70: ; preds = %67, %5, %55, %61, %50
%71 = phi i32* [ %58, %55 ], [ null, %61 ], [ null, %50 ], [ null, %5 ], [ null, %67 ]
%72 = tail call i32 @closedir(i32* %3)
br label %73
73: ; preds = %70, %8
%74 = phi i32* [ %71, %70 ], [ null, %8 ]
ret i32* %74
}