#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 {
  scalar_t__ st_mode;
  scalar_t__ st_gid;
  scalar_t__ st_uid;
};
struct passwd {
  char *pw_name;
};
struct group {
  char *gr_name;
};
struct dirent {
  int /*<<< orphan*/ d_name;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ S_ISDIR(scalar_t__);
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
struct group *getgrgid(scalar_t__);
struct passwd *getpwuid(scalar_t__);
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *, char *, long long, int /*<<< orphan*/,
                          char *);
int readdir_r(int /*<<< orphan*/ *, struct dirent *, struct dirent **);
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned long long);
int stat(int /*<<< orphan*/, struct stat *);
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int main(int argc, char **argv) {
  char *d_to_open = ".";
  DIR *dstream = opendir(d_to_open);
  if (dstream == NULL) {
    perror("opening directory failed");
    exit(2);
  }
  struct dirent d;
  struct dirent *result;
  struct passwd dummy_passwd;
  struct group dummy_group;
  char uidstring[32] = {0};
  char gidstring[32] = {0};
  dummy_passwd.pw_name = uidstring;
  dummy_group.gr_name = gidstring;
  for (;;) {
    int ret = readdir_r(dstream, &d, &result);
    if (ret != 0) {
      perror("readdir_r error");
      exit(3);
    }
    if (!result) {
      break;
    }
    if ((strcmp(d.d_name, ".") != 0) && (strcmp(d.d_name, "..") != 0)) {
      struct stat mystat;
      if ((stat(d.d_name, &mystat) == -1)) {
        perror("stat");
        exit(4);
      }
      char *dir = "";
      if (S_ISDIR(mystat.st_mode))
        dir = "(Directory)";
      errno = 0;
      struct passwd *pw = getpwuid(mystat.st_uid);
      if (pw == NULL) {
        if (errno != 0) {
          perror("getpwuid");
          exit(5);
        } else {
          snprintf(dummy_passwd.pw_name, 32, "%llu",
                   (unsigned long long)mystat.st_uid);
          pw = &dummy_passwd;
        }
      }
      errno = 0;
      struct group *gr = getgrgid(mystat.st_gid);
      if (gr == NULL) {
        if (errno != 0) {
          perror("getgrgid");
          exit(5);
        } else {
          snprintf(dummy_group.gr_name, 32, "%llu",
                   (unsigned long long)mystat.st_gid);
          gr = &dummy_group;
        }
      }
      printf("user: %s, group: %s, mode: %llo, name: %s %s\n", pw->pw_name,
             gr->gr_name, (long long)mystat.st_mode, d.d_name, dir);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe4a(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <opendir@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1212 <main+0x52>
lea    0xdfd(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x2,%edi
call   10e0 <exit@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   10a0 <memset@plt>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   10a0 <memset@plt>
lea    -0x60(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x80(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <readdir_r@plt>
mov    %eax,-0x84(%rbp)
cmpl   $0x0,-0x84(%rbp)
je     127c <main+0xbc>
lea    0xdac(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x3,%edi
call   10e0 <exit@plt>
cmpq   $0x0,-0x30(%rbp)
jne    128c <main+0xcc>
jmp    1459 <main+0x299>
mov    -0x28(%rbp),%edi
lea    0xd94(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
je     1454 <main+0x294>
mov    -0x28(%rbp),%edi
lea    0xd7a(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
je     1454 <main+0x294>
mov    -0x28(%rbp),%edi
lea    -0xa0(%rbp),%rsi
call   10c0 <stat@plt>
cmp    $0xffffffff,%eax
jne    12ec <main+0x12c>
lea    0xd4f(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x4,%edi
call   10e0 <exit@plt>
lea    0xd8e(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    -0xa0(%rbp),%rdi
call   1070 <S_ISDIR@plt>
cmp    $0x0,%rax
je     131e <main+0x15e>
lea    0xd1a(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0x2cbb(%rip),%rax
movq   $0x0,(%rax)
mov    -0x90(%rbp),%rdi
call   1050 <getpwuid@plt>
mov    %rax,-0xb0(%rbp)
cmpq   $0x0,-0xb0(%rbp)
jne    13a0 <main+0x1e0>
mov    0x2c8c(%rip),%rax
cmpq   $0x0,(%rax)
je     1374 <main+0x1b4>
lea    0xcd8(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x5,%edi
call   10e0 <exit@plt>
mov    -0x38(%rbp),%rdi
mov    -0x90(%rbp),%rcx
mov    $0x20,%esi
lea    0xcbb(%rip),%rdx
call   1090 <snprintf@plt>
lea    -0x38(%rbp),%rax
mov    %rax,-0xb0(%rbp)
jmp    13a0 <main+0x1e0>
mov    0x2c39(%rip),%rax
movq   $0x0,(%rax)
mov    -0x98(%rbp),%rdi
call   1080 <getgrgid@plt>
mov    %rax,-0xb8(%rbp)
cmpq   $0x0,-0xb8(%rbp)
jne    1422 <main+0x262>
mov    0x2c0a(%rip),%rax
cmpq   $0x0,(%rax)
je     13f6 <main+0x236>
lea    0xc64(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x5,%edi
call   10e0 <exit@plt>
mov    -0x40(%rbp),%rdi
mov    -0x98(%rbp),%rcx
mov    $0x20,%esi
lea    0xc39(%rip),%rdx
call   1090 <snprintf@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0xb8(%rbp)
jmp    1422 <main+0x262>
mov    -0xb0(%rbp),%rax
mov    (%rax),%rsi
mov    -0xb8(%rbp),%rax
mov    (%rax),%rdx
mov    -0xa0(%rbp),%rcx
mov    -0x28(%rbp),%r8d
mov    -0xa8(%rbp),%r9
lea    0xc05(%rip),%rdi
call   1060 <printf@plt>
jmp    1242 <main+0x82>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
lea    0xe62(%rip),%rdi
call   1040 <opendir@plt>
test   %rax,%rax
je     13d5 <main+0x225>
mov    %rax,%r12
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
lea    0x60(%rsp),%rax
mov    %rax,0x38(%rsp)
lea    0x40(%rsp),%rax
mov    %rax,0x30(%rsp)
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %r12,%rdi
call   1030 <readdir_r@plt>
test   %eax,%eax
jne    1393 <main+0x1e3>
lea    0xe05(%rip),%r15
lea    0x8(%rsp),%rbx
lea    0x10(%rsp),%r14
mov    0x2daa(%rip),%r13
jmp    1295 <main+0xe5>
mov    0x20(%rsp),%rcx
lea    0x40(%rsp),%rdi
mov    $0x20,%esi
lea    0xdf8(%rip),%rdx
call   1090 <snprintf@plt>
lea    0x30(%rsp),%rax
mov    0x0(%r13),%rsi
mov    (%rax),%rdx
mov    0x18(%rsp),%rcx
mov    0x8(%rsp),%r8d
lea    0xde4(%rip),%rdi
mov    %rbp,%r9
call   1060 <printf@plt>
mov    0x2d61(%rip),%r13
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <readdir_r@plt>
test   %eax,%eax
jne    1393 <main+0x1e3>
cmpq   $0x0,0x10(%rsp)
je     137f <main+0x1cf>
mov    0x8(%rsp),%edi
mov    %r15,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     127f <main+0xcf>
mov    0x8(%rsp),%edi
lea    0xd6c(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     127f <main+0xcf>
mov    0x8(%rsp),%edi
lea    0x18(%rsp),%rsi
call   10b0 <stat@plt>
cmp    $0xffffffff,%eax
je     13a9 <main+0x1f9>
mov    0x18(%rsp),%rdi
call   1070 <S_ISDIR@plt>
test   %rax,%rax
lea    0xd3f(%rip),%rbp
lea    0xd88(%rip),%rax
cmove  %rax,%rbp
movq   $0x0,0x0(%r13)
mov    0x28(%rsp),%rdi
call   1050 <getpwuid@plt>
mov    %r13,%rcx
mov    %rax,%r13
test   %rax,%rax
jne    134b <main+0x19b>
cmpq   $0x0,(%rcx)
jne    13bf <main+0x20f>
mov    0x28(%rsp),%rcx
lea    0x60(%rsp),%rdi
mov    $0x20,%esi
lea    0xd0c(%rip),%rdx
call   1090 <snprintf@plt>
lea    0x38(%rsp),%r13
mov    0x2c95(%rip),%rcx
movq   $0x0,(%rcx)
mov    0x20(%rsp),%rdi
call   1080 <getgrgid@plt>
test   %rax,%rax
jne    1258 <main+0xa8>
mov    0x2c74(%rip),%rax
cmpq   $0x0,(%rax)
je     1238 <main+0x88>
lea    0xcce(%rip),%rdi
jmp    13c6 <main+0x216>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc7f(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x3,%edi
call   10d0 <exit@plt>
lea    0xc7c(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x4,%edi
call   10d0 <exit@plt>
lea    0xc77(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x5,%edi
call   10d0 <exit@plt>
lea    0xc24(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x2,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
%struct.passwd = type { i8* }
%struct.group = type { i8* }
%struct.stat = type { i64, i64, i64 }
@.str = [2 x i8] c".\00"
@.str.1 = [25 x i8] c"opening directory failed\00"
@.str.2 = [16 x i8] c"readdir_r error\00"
@.str.3 = [3 x i8] c"..\00"
@.str.4 = [5 x i8] c"stat\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [12 x i8] c"(Directory)\00"
@errno = global i64 0
@.str.7 = [9 x i8] c"getpwuid\00"
@.str.8 = [5 x i8] c"%llu\00"
@.str.9 = [9 x i8] c"getgrgid\00"
@.str.10 = [46 x i8] c"user: %s, group: %s, mode: %llo, name: %s %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca %struct.dirent
%9 = alloca %struct.dirent*
%10 = alloca %struct.passwd
%11 = alloca %struct.group
%12 = alloca [32 x i8]
%13 = alloca [32 x i8]
%14 = alloca i32
%15 = alloca %struct.stat
%16 = alloca i8*
%17 = alloca %struct.passwd*
%18 = alloca %struct.group*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %6
%19 = load i8*, i8** %6
%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 %26
23: ; preds = %2
%24 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 @exit(i32 2)
unreachable
26: ; preds = %2
%27 = bitcast [32 x i8]* %12 to i8*
%28 = bitcast [32 x i8]* %13 to i8*
%29 = getelementptr inbounds [32 x i8], [32 x i8]* %12, i64 0, i64 0
%30 = getelementptr inbounds %struct.passwd, %struct.passwd* %10, i32 0, i32 0
store i8* %29, i8** %30
%31 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%32 = getelementptr inbounds %struct.group, %struct.group* %11, i32 0, i32 0
store i8* %31, i8** %32
br label %33
33: ; preds = %120, %26
%34 = load i32*, i32** %7
%35 = call i32 @readdir_r(i32* %34, %struct.dirent* %8, %struct.dirent** %9)
store i32 %35, i32* %14
%36 = load i32, i32* %14
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %33
%39 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%40 = call i32 @exit(i32 3)
unreachable
41: ; preds = %33
%42 = load %struct.dirent*, %struct.dirent** %9
%43 = icmp ne %struct.dirent* %42, null
br i1 %43, label %45, label %44
44: ; preds = %41
br label %121
45: ; preds = %41
%46 = getelementptr inbounds %struct.dirent, %struct.dirent* %8, i32 0, i32 0
%47 = load i32, i32* %46
%48 = call i64 @strcmp(i32 %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %120
50: ; preds = %45
%51 = getelementptr inbounds %struct.dirent, %struct.dirent* %8, i32 0, i32 0
%52 = load i32, i32* %51
%53 = call i64 @strcmp(i32 %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %120
55: ; preds = %50
%56 = getelementptr inbounds %struct.dirent, %struct.dirent* %8, i32 0, i32 0
%57 = load i32, i32* %56
%58 = call i32 @stat(i32 %57, %struct.stat* %15)
%59 = icmp eq i32 %58, -1
br i1 %59, label %60, label %63
60: ; preds = %55
%61 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%62 = call i32 @exit(i32 4)
unreachable
63: ; preds = %55
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8** %16
%64 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 0
%65 = load i64, i64* %64
%66 = call i64 @S_ISDIR(i64 %65)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %69
68: ; preds = %63
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8** %16
br label %69
69: ; preds = %68, %63
store i64 0, i64* @errno
%70 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 2
%71 = load i64, i64* %70
%72 = call %struct.passwd* @getpwuid(i64 %71)
store %struct.passwd* %72, %struct.passwd** %17
%73 = load %struct.passwd*, %struct.passwd** %17
%74 = icmp eq %struct.passwd* %73, null
br i1 %74, label %75, label %88
75: ; preds = %69
%76 = load i64, i64* @errno
%77 = icmp ne i64 %76, 0
br i1 %77, label %78, label %81
78: ; preds = %75
%79 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%80 = call i32 @exit(i32 5)
unreachable
81: ; preds = %75
%82 = getelementptr inbounds %struct.passwd, %struct.passwd* %10, i32 0, i32 0
%83 = load i8*, i8** %82
%84 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 2
%85 = load i64, i64* %84
%86 = call i32 @snprintf(i8* %83, i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %85)
store %struct.passwd* %10, %struct.passwd** %17
br label %87
87: ; preds = %81
br label %88
88: ; preds = %87, %69
store i64 0, i64* @errno
%89 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 1
%90 = load i64, i64* %89
%91 = call %struct.group* @getgrgid(i64 %90)
store %struct.group* %91, %struct.group** %18
%92 = load %struct.group*, %struct.group** %18
%93 = icmp eq %struct.group* %92, null
br i1 %93, label %94, label %107
94: ; preds = %88
%95 = load i64, i64* @errno
%96 = icmp ne i64 %95, 0
br i1 %96, label %97, label %100
97: ; preds = %94
%98 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%99 = call i32 @exit(i32 5)
unreachable
100: ; preds = %94
%101 = getelementptr inbounds %struct.group, %struct.group* %11, i32 0, i32 0
%102 = load i8*, i8** %101
%103 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 1
%104 = load i64, i64* %103
%105 = call i32 @snprintf(i8* %102, i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %104)
store %struct.group* %11, %struct.group** %18
br label %106
106: ; preds = %100
br label %107
107: ; preds = %106, %88
%108 = load %struct.passwd*, %struct.passwd** %17
%109 = getelementptr inbounds %struct.passwd, %struct.passwd* %108, i32 0, i32 0
%110 = load i8*, i8** %109
%111 = load %struct.group*, %struct.group** %18
%112 = getelementptr inbounds %struct.group, %struct.group* %111, i32 0, i32 0
%113 = load i8*, i8** %112
%114 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 0
%115 = load i64, i64* %114
%116 = getelementptr inbounds %struct.dirent, %struct.dirent* %8, i32 0, i32 0
%117 = load i32, i32* %116
%118 = load i8*, i8** %16
%119 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0), i8* %110, i8* %113, i64 %115, i32 %117, i8* %118)
br label %120
120: ; preds = %107, %50, %45
br label %33
121: ; preds = %44
ret i32 0
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
%struct.passwd = type { i8* }
%struct.stat = type { i64, i64, i64 }
%struct.group = type { i8* }
@.str = [2 x i8] c".\00"
@.str.1 = [25 x i8] c"opening directory failed\00"
@.str.2 = [16 x i8] c"readdir_r error\00"
@.str.3 = [3 x i8] c"..\00"
@.str.4 = [5 x i8] c"stat\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [12 x i8] c"(Directory)\00"
@errno = global i64 0
@.str.7 = [9 x i8] c"getpwuid\00"
@.str.8 = [5 x i8] c"%llu\00"
@.str.9 = [9 x i8] c"getgrgid\00"
@.str.10 = [46 x i8] c"user: %s, group: %s, mode: %llo, name: %s %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.dirent
%4 = alloca %struct.dirent*
%5 = alloca i8*
%6 = bitcast i8** %5 to %struct.passwd*
%7 = alloca i8*
%8 = alloca [32 x i8]
%9 = alloca [32 x i8]
%10 = alloca %struct.stat
%11 = tail call i32* @opendir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = tail call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%15 = tail call i32 @exit(i32 2)
unreachable
16: ; preds = %2
%17 = bitcast %struct.dirent* %3 to i8*
%18 = bitcast %struct.dirent** %4 to i8*
%19 = bitcast i8** %5 to i8*
%20 = bitcast i8** %7 to i8*
%21 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%22 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
store i8* %21, i8** %5
store i8* %22, i8** %7
%23 = call i32 @readdir_r(i32* %11, %struct.dirent* %3, %struct.dirent** %4)
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %31
25: ; preds = %16
%26 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i64 0, i32 0
%27 = bitcast %struct.stat* %10 to i8*
%28 = getelementptr inbounds %struct.stat, %struct.stat* %10, i64 0, i32 0
%29 = getelementptr inbounds %struct.stat, %struct.stat* %10, i64 0, i32 2
%30 = getelementptr inbounds %struct.stat, %struct.stat* %10, i64 0, i32 1
br label %34
31: ; preds = %92, %16
%32 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%33 = call i32 @exit(i32 3)
unreachable
34: ; preds = %25, %92
%35 = load %struct.dirent*, %struct.dirent** %4
%36 = icmp eq %struct.dirent* %35, null
br i1 %36, label %95, label %37
37: ; preds = %34
%38 = load i32, i32* %26
%39 = call i64 @strcmp(i32 %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %92, label %41
41: ; preds = %37
%42 = load i32, i32* %26
%43 = call i64 @strcmp(i32 %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %92, label %45
45: ; preds = %41
%46 = load i32, i32* %26
%47 = call i32 @stat(i32 %46, %struct.stat* %10)
%48 = icmp eq i32 %47, -1
br i1 %48, label %49, label %52
49: ; preds = %45
%50 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%51 = call i32 @exit(i32 4)
unreachable
52: ; preds = %45
%53 = load i64, i64* %28
%54 = call i64 @S_ISDIR(i64 %53)
%55 = icmp eq i64 %54, 0
%56 = select i1 %55, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0)
store i64 0, i64* @errno
%57 = load i64, i64* %29
%58 = call %struct.passwd* @getpwuid(i64 %57)
%59 = icmp eq %struct.passwd* %58, null
br i1 %59, label %60, label %69
60: ; preds = %52
%61 = load i64, i64* @errno
%62 = icmp eq i64 %61, 0
br i1 %62, label %66, label %63
63: ; preds = %60
%64 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%65 = call i32 @exit(i32 5)
unreachable
66: ; preds = %60
%67 = load i64, i64* %29
%68 = call i32 @snprintf(i8* %21, i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %67)
br label %69
69: ; preds = %66, %52
%70 = phi %struct.passwd* [ %6, %66 ], [ %58, %52 ]
store i64 0, i64* @errno
%71 = load i64, i64* %30
%72 = call %struct.group* @getgrgid(i64 %71)
%73 = getelementptr inbounds %struct.group, %struct.group* %72, i64 0, i32 0
%74 = icmp eq %struct.group* %72, null
br i1 %74, label %75, label %84
75: ; preds = %69
%76 = load i64, i64* @errno
%77 = icmp eq i64 %76, 0
br i1 %77, label %81, label %78
78: ; preds = %75
%79 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%80 = call i32 @exit(i32 5)
unreachable
81: ; preds = %75
%82 = load i64, i64* %30
%83 = call i32 @snprintf(i8* %22, i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %82)
br label %84
84: ; preds = %81, %69
%85 = phi i8** [ %7, %81 ], [ %73, %69 ]
%86 = getelementptr inbounds %struct.passwd, %struct.passwd* %70, i64 0, i32 0
%87 = load i8*, i8** %86
%88 = load i8*, i8** %85
%89 = load i64, i64* %28
%90 = load i32, i32* %26
%91 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0), i8* %87, i8* %88, i64 %89, i32 %90, i8* %56)
br label %92
92: ; preds = %37, %41, %84
%93 = call i32 @readdir_r(i32* %11, %struct.dirent* %3, %struct.dirent** %4)
%94 = icmp eq i32 %93, 0
br i1 %94, label %34, label %31
95: ; preds = %34
ret i32 0
}