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

/* Variables and functions */
int /*<<< orphan*/ LOCK_EX;
int /*<<< orphan*/ LOCK_UN;
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int closedir(int /*<<< orphan*/ *);
int dirfd(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ flock(int, int /*<<< orphan*/);
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
struct dirent *readdir(int /*<<< orphan*/ *);
int /*<<< orphan*/ sscanf(char *, char *, double *);
scalar_t__ stat(char *, struct stat *);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void get_depths(char *path, double *depths, int *nd) {
  struct dirent *entry;
  struct stat file_status;
  char c_depth[6], name[256], dirname[256];
  int n, fd;
  DIR *dir;
  strcpy(dirname, path);
  if (dirname[strlen(dirname) - 1] != '/')
    strcat(dirname, "/");
  dir = opendir(path);
  if (!dir) {
    perror(path);
    exit(1);
  }
  n = 0;
  c_depth[5] = '\0';
  fd = dirfd(dir);
  flock(fd, LOCK_EX);
  while ((entry = readdir(dir)) != NULL) {
    strcpy(name, dirname);
    strcat(name, entry->d_name);
    if ((strcmp(entry->d_name, ".") != 0) && (strcmp(entry->d_name, "..") != 0))
      if (stat(name, &file_status) == 0)
        if (S_ISDIR(file_status.st_mode) && (entry->d_name[0] == 'H')) {
          strncpy(c_depth, entry->d_name + 1, 5);
          sscanf(c_depth, "%lf", &depths[n]);
          n++;
        }
  }
  flock(fd, LOCK_UN);
  if (closedir(dir) == -1) {
    perror(path);
    exit(1);
  }
  if (n < 1) {
    printf("No H-directories found in %s\n", path);
    exit(1);
  }
  *nd = n;
}


x86 assembly (clang, -O0):
<get_depths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x230(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x230(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%eax
cltq
movsbl -0x230(%rbp,%rax,1),%eax
ff
cmp    $0x2f,%eax
je     125c <get_depths+0x5c>
lea    -0x230(%rbp),%rdi
lea    0xda9(%rip),%rsi
call   1110 <strcat@plt>
mov    -0x8(%rbp),%rdi
call   1050 <opendir@plt>
mov    %rax,-0x240(%rbp)
cmpq   $0x0,-0x240(%rbp)
jne    128d <get_depths+0x8d>
mov    -0x8(%rbp),%rdi
call   10f0 <perror@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
movl   $0x0,-0x234(%rbp)
movb   $0x0,-0x29(%rbp)
mov    -0x240(%rbp),%rdi
call   10b0 <dirfd@plt>
mov    %eax,-0x238(%rbp)
mov    -0x238(%rbp),%edi
mov    0x2d2e(%rip),%rax
mov    (%rax),%esi
call   1100 <flock@plt>
mov    -0x240(%rbp),%rdi
call   10d0 <readdir@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     13d3 <get_depths+0x1d3>
lea    -0x130(%rbp),%rdi
lea    -0x230(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1110 <strcat@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0xcf4(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     13ce <get_depths+0x1ce>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0xcd6(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     13ce <get_depths+0x1ce>
lea    -0x130(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   10c0 <stat@plt>
cmp    $0x0,%rax
jne    13c9 <get_depths+0x1c9>
mov    -0x28(%rbp),%edi
call   1080 <S_ISDIR@plt>
cmp    $0x0,%rax
je     13c4 <get_depths+0x1c4>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x48,%eax
jne    13c4 <get_depths+0x1c4>
lea    -0x2e(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
add    $0x1,%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
lea    -0x2e(%rbp),%rdi
mov    -0x10(%rbp),%rdx
movslq -0x234(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xc55(%rip),%rsi
call   10e0 <sscanf@plt>
mov    -0x234(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x234(%rbp)
jmp    13c9 <get_depths+0x1c9>
jmp    13ce <get_depths+0x1ce>
jmp    12c1 <get_depths+0xc1>
mov    -0x238(%rbp),%edi
mov    0x2bf8(%rip),%rax
mov    (%rax),%esi
call   1100 <flock@plt>
mov    -0x240(%rbp),%rdi
call   1090 <closedir@plt>
cmp    $0xffffffff,%eax
jne    140f <get_depths+0x20f>
mov    -0x8(%rbp),%rdi
call   10f0 <perror@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
cmpl   $0x1,-0x234(%rbp)
jge    1436 <get_depths+0x236>
mov    -0x8(%rbp),%rsi
lea    0xbe2(%rip),%rdi
call   1070 <printf@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
mov    -0x234(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x240,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_depths>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x238,%rsp
mov    %rdx,0x28(%rsp)
mov    %rsi,0x20(%rsp)
mov    %rdi,%rbp
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rax,%rbx,1)
je     1250 <get_depths+0x50>
lea    0xdba(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1110 <strcat@plt>
mov    %rbp,%rdi
call   1050 <opendir@plt>
test   %rax,%rax
je     13d2 <get_depths+0x1d2>
mov    %rax,%r12
mov    %rbp,0x18(%rsp)
movb   $0x0,0x17(%rsp)
mov    %rax,%rdi
call   10b0 <dirfd@plt>
mov    %eax,%edi
mov    0x2d69(%rip),%rax
mov    (%rax),%esi
mov    %edi,0xc(%rsp)
call   1100 <flock@plt>
mov    %r12,%rdi
call   10d0 <readdir@plt>
test   %rax,%rax
je     138c <get_depths+0x18c>
mov    %rax,%r13
xor    %eax,%eax
mov    %rax,(%rsp)
lea    0x130(%rsp),%rbp
lea    0x30(%rsp),%r14
lea    0xd4b(%rip),%r15
lea    0xd43(%rip),%rbx
jmp    12e4 <get_depths+0xe4>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   10d0 <readdir@plt>
mov    %rax,%r13
test   %rax,%rax
je     1392 <get_depths+0x192>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    0x0(%r13),%rsi
mov    %rbp,%rdi
call   1110 <strcat@plt>
mov    0x0(%r13),%rdi
mov    %r15,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     12d0 <get_depths+0xd0>
mov    0x0(%r13),%rdi
mov    %rbx,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     12d0 <get_depths+0xd0>
mov    %rbp,%rdi
lea    0x8(%rsp),%rsi
call   10c0 <stat@plt>
test   %rax,%rax
jne    12d0 <get_depths+0xd0>
mov    0x8(%rsp),%edi
call   1080 <S_ISDIR@plt>
test   %rax,%rax
je     12d0 <get_depths+0xd0>
mov    0x0(%r13),%rsi
cmpb   $0x48,(%rsi)
jne    12d0 <get_depths+0xd0>
add    $0x1,%rsi
lea    0x12(%rsp),%rdi
mov    $0x5,%edx
call   1030 <strncpy@plt>
mov    %rbx,%r13
mov    (%rsp),%rbx
movslq %ebx,%rbx
mov    0x20(%rsp),%rax
lea    (%rax,%rbx,8),%rdx
lea    0x12(%rsp),%rdi
lea    0xc8d(%rip),%rsi
call   10e0 <sscanf@plt>
add    $0x1,%ebx
mov    %rbx,(%rsp)
mov    %r13,%rbx
jmp    12d0 <get_depths+0xd0>
xor    %eax,%eax
mov    %rax,(%rsp)
mov    0x2c3f(%rip),%rax
mov    (%rax),%esi
mov    0xc(%rsp),%edi
call   1100 <flock@plt>
mov    %r12,%rdi
call   1090 <closedir@plt>
cmp    $0xffffffff,%eax
je     13d7 <get_depths+0x1d7>
mov    (%rsp),%rcx
test   %ecx,%ecx
jle    13eb <get_depths+0x1eb>
mov    0x28(%rsp),%rax
mov    %ecx,(%rax)
add    $0x238,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbp,%rdi
jmp    13dc <get_depths+0x1dc>
mov    0x18(%rsp),%rdi
call   10f0 <perror@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
lea    0xc17(%rip),%rdi
mov    0x18(%rsp),%rsi
call   1070 <printf@plt>
mov    $0x1,%edi
call   1120 <exit@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.dirent = type { i8* }
@.str = [2 x i8] c"/\00"
@LOCK_EX = global i32 0
@.str.1 = [2 x i8] c".\00"
@.str.2 = [3 x i8] c"..\00"
@.str.3 = [4 x i8] c"%lf\00"
@LOCK_UN = global i32 0
@.str.4 = [30 x i8] c"No H-directories found in %s\0A\00"
define void @get_depths(i8* %0, double* %1, i32* nocapture writeonly %2) {
%4 = alloca %struct.stat
%5 = alloca [6 x i8]
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = bitcast %struct.stat* %4 to i8*
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%12 = call i32 @strcpy(i8* %11, i8* %0)
%13 = call i32 @strlen(i8* %11)
%14 = add nsw i32 %13, -1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 47
br i1 %18, label %21, label %19
19: ; preds = %3
%20 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %3
%22 = call i32* @opendir(i8* %0)
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = call i32 @perror(i8* %0)
%26 = call i32 @exit(i32 1)
unreachable
27: ; preds = %21
%28 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 5
store i8 0, i8* %28
%29 = call i32 @dirfd(i32* %22)
%30 = load i32, i32* @LOCK_EX
%31 = call i32 @flock(i32 %29, i32 %30)
%32 = call %struct.dirent* @readdir(i32* %22)
%33 = icmp eq %struct.dirent* %32, null
br i1 %33, label %72, label %34
34: ; preds = %27
%35 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
br label %36
36: ; preds = %34, %68
%37 = phi %struct.dirent* [ %32, %34 ], [ %70, %68 ]
%38 = phi i32 [ 0, %34 ], [ %69, %68 ]
%39 = call i32 @strcpy(i8* %10, i8* %11)
%40 = getelementptr inbounds %struct.dirent, %struct.dirent* %37, i64 0, i32 0
%41 = load i8*, i8** %40
%42 = call i32 @strcat(i8* %10, i8* %41)
%43 = load i8*, i8** %40
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %68, label %46
46: ; preds = %36
%47 = load i8*, i8** %40
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %68, label %50
50: ; preds = %46
%51 = call i64 @stat(i8* %10, %struct.stat* %4)
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %68
53: ; preds = %50
%54 = load i32, i32* %35
%55 = call i64 @S_ISDIR(i32 %54)
%56 = icmp eq i64 %55, 0
br i1 %56, label %68, label %57
57: ; preds = %53
%58 = load i8*, i8** %40
%59 = load i8, i8* %58
%60 = icmp eq i8 %59, 72
br i1 %60, label %61, label %68
61: ; preds = %57
%62 = getelementptr inbounds i8, i8* %58, i64 1
%63 = call i32 @strncpy(i8* %9, i8* %62, i32 5)
%64 = sext i32 %38 to i64
%65 = getelementptr inbounds double, double* %1, i64 %64
%66 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %65)
%67 = add nsw i32 %38, 1
br label %68
68: ; preds = %50, %61, %57, %53, %46, %36
%69 = phi i32 [ %67, %61 ], [ %38, %57 ], [ %38, %53 ], [ %38, %50 ], [ %38, %46 ], [ %38, %36 ]
%70 = call %struct.dirent* @readdir(i32* %22)
%71 = icmp eq %struct.dirent* %70, null
br i1 %71, label %72, label %36
72: ; preds = %68, %27
%73 = phi i32 [ 0, %27 ], [ %69, %68 ]
%74 = load i32, i32* @LOCK_UN
%75 = call i32 @flock(i32 %29, i32 %74)
%76 = call i32 @closedir(i32* %22)
%77 = icmp eq i32 %76, -1
br i1 %77, label %78, label %81
78: ; preds = %72
%79 = call i32 @perror(i8* %0)
%80 = call i32 @exit(i32 1)
unreachable
81: ; preds = %72
%82 = icmp slt i32 %73, 1
br i1 %82, label %83, label %86
83: ; preds = %81
%84 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%85 = call i32 @exit(i32 1)
unreachable
86: ; preds = %81
store i32 %73, i32* %2
ret void
}