#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 st_mode;
  int /*<<< orphan*/ st_atime;
  scalar_t__ st_size;
  int /*<<< orphan*/ st_gid;
  int /*<<< orphan*/ st_uid;
  scalar_t__ st_nlink;
};
struct passwd {
  char *pw_name;
};
struct group {
  char *gr_name;
};

/* Variables and functions */
#define S_IFBLK 134
#define S_IFCHR 133
#define S_IFDIR 132
#define S_IFIFO 131
#define S_IFLNK 130
int S_IFMT;
#define S_IFREG 129
#define S_IFSOCK 128
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
struct group *getgrgid(int /*<<< orphan*/);
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int strlen(char *);
void printinfo(struct stat sb) {
  switch (sb.st_mode & S_IFMT) {
  case S_IFBLK:
    fprintf(stdout, "b");
    break;
  case S_IFCHR:
    fprintf(stdout, "c");
    break;
  case S_IFDIR:
    fprintf(stdout, "d");
    break;
  case S_IFIFO:
    fprintf(stdout, "p");
    break;
  case S_IFLNK:
    fprintf(stdout, "l");
    break;
  case S_IFREG:
    fprintf(stdout, "-");
    break;
  case S_IFSOCK:
    fprintf(stdout, "s");
    break;
  default:
    break;
  }
  if (sb.st_mode & S_IRUSR) {
    fprintf(stdout, "r");
  } else {
    fprintf(stdout, "-");
  }
  if (sb.st_mode & S_IWUSR) {
    fprintf(stdout, "w");
  } else {
    fprintf(stdout, "-");
  }
  if (sb.st_mode & S_IXUSR) {
    fprintf(stdout, "x");
  } else {
    fprintf(stdout, "-");
  }
  if (sb.st_mode & S_IRGRP) {
    fprintf(stdout, "r");
  } else {
    fprintf(stdout, "-");
  }
  if (sb.st_mode & S_IWGRP) {
    fprintf(stdout, "w");
  } else {
    fprintf(stdout, "-");
  }
  if (sb.st_mode & S_IXGRP) {
    fprintf(stdout, "x");
  } else {
    fprintf(stdout, "-");
  }
  if (sb.st_mode & S_IROTH) {
    fprintf(stdout, "r");
  } else {
    fprintf(stdout, "-");
  }
  if (sb.st_mode & S_IWOTH) {
    fprintf(stdout, "w");
  } else {
    fprintf(stdout, "-");
  }
  if (sb.st_mode & S_IXOTH) {
    fprintf(stdout, "x ");
  } else {
    fprintf(stdout, "- ");
  }
  fprintf(stdout, "%ld ", (long)sb.st_nlink);
  struct passwd *uid = getpwuid(sb.st_uid);
  struct group *gid = getgrgid(sb.st_gid);
  fprintf(stdout, "%s %s ", uid->pw_name, gid->gr_name);
  fprintf(stdout, "%lld ", (long long)sb.st_size);
  char *time = ctime(&sb.st_atime);
  time[strlen(time) - 1] = '\0';
  fprintf(stdout, "%s ", time);
}


x86 assembly (clang, -O0):
<printinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    (%rax),%eax
mov    0x2e4f(%rip),%rcx
mov    (%rcx),%ecx
and    %ecx,%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x6,%eax
ja     1257 <printinfo+0x107>
mov    -0x20(%rbp),%rax
lea    0xe76(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2dfe(%rip),%rax
mov    (%rax),%edi
lea    0xe79(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    125c <printinfo+0x10c>
mov    0x2de2(%rip),%rax
mov    (%rax),%edi
lea    0xe5f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    125c <printinfo+0x10c>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
lea    0xe45(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    125c <printinfo+0x10c>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
lea    0xe2b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    125c <printinfo+0x10c>
mov    0x2d8e(%rip),%rax
mov    (%rax),%edi
lea    0xe11(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    125c <printinfo+0x10c>
mov    0x2d72(%rip),%rax
mov    (%rax),%edi
lea    0xdf7(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    125c <printinfo+0x10c>
mov    0x2d56(%rip),%rax
mov    (%rax),%edi
lea    0xddd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    125c <printinfo+0x10c>
jmp    125c <printinfo+0x10c>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2d37(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1290 <printinfo+0x140>
mov    0x2d1d(%rip),%rax
mov    (%rax),%edi
lea    0xda6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    12a7 <printinfo+0x157>
mov    0x2d01(%rip),%rax
mov    (%rax),%edi
lea    0xd86(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2d1c(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     12db <printinfo+0x18b>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
lea    0xd5d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    12f2 <printinfo+0x1a2>
mov    0x2cb6(%rip),%rax
mov    (%rax),%edi
lea    0xd3b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2ce1(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1326 <printinfo+0x1d6>
mov    0x2c87(%rip),%rax
mov    (%rax),%edi
lea    0xd14(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    133d <printinfo+0x1ed>
mov    0x2c6b(%rip),%rax
mov    (%rax),%edi
lea    0xcf0(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2c66(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1371 <printinfo+0x221>
mov    0x2c3c(%rip),%rax
mov    (%rax),%edi
lea    0xcc5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1388 <printinfo+0x238>
mov    0x2c20(%rip),%rax
mov    (%rax),%edi
lea    0xca5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2c43(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     13bc <printinfo+0x26c>
mov    0x2bf1(%rip),%rax
mov    (%rax),%edi
lea    0xc7c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13d3 <printinfo+0x283>
mov    0x2bd5(%rip),%rax
mov    (%rax),%edi
lea    0xc5a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2be8(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1407 <printinfo+0x2b7>
mov    0x2ba6(%rip),%rax
mov    (%rax),%edi
lea    0xc33(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    141e <printinfo+0x2ce>
mov    0x2b8a(%rip),%rax
mov    (%rax),%edi
lea    0xc0f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2b7d(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1452 <printinfo+0x302>
mov    0x2b5b(%rip),%rax
mov    (%rax),%edi
lea    0xbe4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1469 <printinfo+0x319>
mov    0x2b3f(%rip),%rax
mov    (%rax),%edi
lea    0xbc4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2b12(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     149d <printinfo+0x34d>
mov    0x2b10(%rip),%rax
mov    (%rax),%edi
lea    0xb9b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14b4 <printinfo+0x364>
mov    0x2af4(%rip),%rax
mov    (%rax),%edi
lea    0xb79(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    0x2b27(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     14e8 <printinfo+0x398>
mov    0x2ac5(%rip),%rax
mov    (%rax),%edi
lea    0xb54(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14ff <printinfo+0x3af>
mov    0x2aa9(%rip),%rax
mov    (%rax),%edi
lea    0xb3b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    0x2a8e(%rip),%rcx
mov    (%rcx),%edi
mov    0x18(%rax),%rdx
lea    0xb1f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    0x14(%rax),%edi
call   1030 <getpwuid@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,-0x8(%rbp)
mov    0x10(%rax),%edi
call   1060 <getgrgid@plt>
mov    %rax,-0x10(%rbp)
mov    0x2a50(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
lea    0xadc(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    0x2a27(%rip),%rcx
mov    (%rcx),%edi
mov    0x8(%rax),%rdx
lea    0xac4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
add    $0x4,%rdi
call   1040 <ctime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    0x29da(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xa73(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printinfo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x40(%rsp),%ebp
mov    0x2e52(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
add    $0xffffff80,%eax
cmp    $0x6,%eax
ja     1192 <printinfo+0x42>
cltq
lea    0xeb1(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
mov    0x2e0f(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xe66(%rip),%r13
lea    0xe63(%rip),%r15
mov    %r15,%rsi
cmove  %r13,%rsi
mov    0x2ddf(%rip),%r14
mov    (%r14),%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xe3b(%rip),%r12
mov    %r12,%rsi
cmove  %r13,%rsi
mov    (%r14),%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xe1a(%rip),%rbx
mov    %rbx,%rsi
cmove  %r13,%rsi
mov    (%r14),%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2da0(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
mov    %r15,%rsi
cmove  %r13,%rsi
mov    (%r14),%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2dac(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
mov    %r12,%rsi
cmove  %r13,%rsi
mov    (%r14),%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2d80(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
cmove  %r13,%rbx
mov    (%r14),%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2d44(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
cmove  %r13,%r15
mov    (%r14),%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2d08(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
cmove  %r13,%r12
mov    (%r14),%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2d4c(%rip),%rax
and    (%rax),%ebp
lea    0xd72(%rip),%rax
lea    0xd68(%rip),%rsi
cmove  %rax,%rsi
mov    (%r14),%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r14),%edi
lea    0x40(%rsp),%rbp
mov    0x18(%rbp),%rdx
lea    0xd4d(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x14(%rbp),%edi
call   1030 <getpwuid@plt>
mov    %rax,%rbx
mov    0x10(%rbp),%edi
call   1060 <getgrgid@plt>
mov    (%r14),%edi
mov    (%rbx),%rdx
mov    (%rax),%rcx
lea    0xd28(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r14),%edi
mov    0x8(%rbp),%rdx
lea    0xd1a(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x4,%rbp
mov    %rbp,%rdi
call   1040 <ctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    (%r14),%edi
lea    0xce7(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32, i64, i32, i32, i64 }
%struct.passwd = type { i8* }
%struct.group = type { i8* }
@S_IFMT = global i32 0
@stdout = global i32 0
@.str = [2 x i8] c"b\00"
@.str.1 = [2 x i8] c"c\00"
@.str.2 = [2 x i8] c"d\00"
@.str.3 = [2 x i8] c"p\00"
@.str.4 = [2 x i8] c"l\00"
@.str.5 = [2 x i8] c"-\00"
@.str.6 = [2 x i8] c"s\00"
@S_IRUSR = global i32 0
@.str.7 = [2 x i8] c"r\00"
@S_IWUSR = global i32 0
@.str.8 = [2 x i8] c"w\00"
@S_IXUSR = global i32 0
@.str.9 = [2 x i8] c"x\00"
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@.str.10 = [3 x i8] c"x \00"
@.str.11 = [3 x i8] c"- \00"
@.str.12 = [5 x i8] c"%ld \00"
@.str.13 = [7 x i8] c"%s %s \00"
@.str.14 = [6 x i8] c"%lld \00"
@.str.15 = [4 x i8] c"%s \00"
define void @printinfo(%struct.stat* byval(%struct.stat) align 8 %0) {
%2 = alloca %struct.passwd*
%3 = alloca %struct.group*
%4 = alloca i8*
%5 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%6 = load i32, i32* %5
%7 = load i32, i32* @S_IFMT
%8 = and i32 %6, %7
switch i32 %8, label %30 [
i32 134, label %9
i32 133, label %12
i32 132, label %15
i32 131, label %18
i32 130, label %21
i32 129, label %24
i32 128, label %27
]
9: ; preds = %1
%10 = load i32, i32* @stdout
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %31
12: ; preds = %1
%13 = load i32, i32* @stdout
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %31
15: ; preds = %1
%16 = load i32, i32* @stdout
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %31
18: ; preds = %1
%19 = load i32, i32* @stdout
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %31
21: ; preds = %1
%22 = load i32, i32* @stdout
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %31
24: ; preds = %1
%25 = load i32, i32* @stdout
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %31
27: ; preds = %1
%28 = load i32, i32* @stdout
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %31
30: ; preds = %1
br label %31
31: ; preds = %30, %27, %24, %21, %18, %15, %12, %9
%32 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%33 = load i32, i32* %32
%34 = load i32, i32* @S_IRUSR
%35 = and i32 %33, %34
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %31
%38 = load i32, i32* @stdout
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %43
40: ; preds = %31
%41 = load i32, i32* @stdout
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %43
43: ; preds = %40, %37
%44 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%45 = load i32, i32* %44
%46 = load i32, i32* @S_IWUSR
%47 = and i32 %45, %46
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %52
49: ; preds = %43
%50 = load i32, i32* @stdout
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %55
52: ; preds = %43
%53 = load i32, i32* @stdout
%54 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %55
55: ; preds = %52, %49
%56 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%57 = load i32, i32* %56
%58 = load i32, i32* @S_IXUSR
%59 = and i32 %57, %58
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %64
61: ; preds = %55
%62 = load i32, i32* @stdout
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %67
64: ; preds = %55
%65 = load i32, i32* @stdout
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %67
67: ; preds = %64, %61
%68 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%69 = load i32, i32* %68
%70 = load i32, i32* @S_IRGRP
%71 = and i32 %69, %70
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %67
%74 = load i32, i32* @stdout
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %79
76: ; preds = %67
%77 = load i32, i32* @stdout
%78 = call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %79
79: ; preds = %76, %73
%80 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%81 = load i32, i32* %80
%82 = load i32, i32* @S_IWGRP
%83 = and i32 %81, %82
%84 = icmp ne i32 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %79
%86 = load i32, i32* @stdout
%87 = call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %91
88: ; preds = %79
%89 = load i32, i32* @stdout
%90 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %91
91: ; preds = %88, %85
%92 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%93 = load i32, i32* %92
%94 = load i32, i32* @S_IXGRP
%95 = and i32 %93, %94
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %100
97: ; preds = %91
%98 = load i32, i32* @stdout
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %103
100: ; preds = %91
%101 = load i32, i32* @stdout
%102 = call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %103
103: ; preds = %100, %97
%104 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%105 = load i32, i32* %104
%106 = load i32, i32* @S_IROTH
%107 = and i32 %105, %106
%108 = icmp ne i32 %107, 0
br i1 %108, label %109, label %112
109: ; preds = %103
%110 = load i32, i32* @stdout
%111 = call i32 (i32, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %115
112: ; preds = %103
%113 = load i32, i32* @stdout
%114 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %115
115: ; preds = %112, %109
%116 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%117 = load i32, i32* %116
%118 = load i32, i32* @S_IWOTH
%119 = and i32 %117, %118
%120 = icmp ne i32 %119, 0
br i1 %120, label %121, label %124
121: ; preds = %115
%122 = load i32, i32* @stdout
%123 = call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %127
124: ; preds = %115
%125 = load i32, i32* @stdout
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %127
127: ; preds = %124, %121
%128 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%129 = load i32, i32* %128
%130 = load i32, i32* @S_IXOTH
%131 = and i32 %129, %130
%132 = icmp ne i32 %131, 0
br i1 %132, label %133, label %136
133: ; preds = %127
%134 = load i32, i32* @stdout
%135 = call i32 (i32, i8*, ...) @fprintf(i32 %134, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
br label %139
136: ; preds = %127
%137 = load i32, i32* @stdout
%138 = call i32 (i32, i8*, ...) @fprintf(i32 %137, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %139
139: ; preds = %136, %133
%140 = load i32, i32* @stdout
%141 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 5
%142 = load i64, i64* %141
%143 = call i32 (i32, i8*, ...) @fprintf(i32 %140, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i64 %142)
%144 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 4
%145 = load i32, i32* %144
%146 = call %struct.passwd* @getpwuid(i32 %145)
store %struct.passwd* %146, %struct.passwd** %2
%147 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 3
%148 = load i32, i32* %147
%149 = call %struct.group* @getgrgid(i32 %148)
store %struct.group* %149, %struct.group** %3
%150 = load i32, i32* @stdout
%151 = load %struct.passwd*, %struct.passwd** %2
%152 = getelementptr inbounds %struct.passwd, %struct.passwd* %151, i32 0, i32 0
%153 = load i8*, i8** %152
%154 = load %struct.group*, %struct.group** %3
%155 = getelementptr inbounds %struct.group, %struct.group* %154, i32 0, i32 0
%156 = load i8*, i8** %155
%157 = call i32 (i32, i8*, ...) @fprintf(i32 %150, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* %153, i8* %156)
%158 = load i32, i32* @stdout
%159 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 2
%160 = load i64, i64* %159
%161 = call i32 (i32, i8*, ...) @fprintf(i32 %158, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i64 %160)
%162 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 1
%163 = call i8* @ctime(i32* %162)
store i8* %163, i8** %4
%164 = load i8*, i8** %4
%165 = load i8*, i8** %4
%166 = call i32 @strlen(i8* %165)
%167 = sub nsw i32 %166, 1
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds i8, i8* %164, i64 %168
store i8 0, i8* %169
%170 = load i32, i32* @stdout
%171 = load i8*, i8** %4
%172 = call i32 (i32, i8*, ...) @fprintf(i32 %170, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i8* %171)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i64, i32, i32, i64 }
%struct.passwd = type { i8* }
%struct.group = type { i8* }
@S_IFMT = global i32 0
@stdout = global i32 0
@.str = [2 x i8] c"b\00"
@.str.1 = [2 x i8] c"c\00"
@.str.2 = [2 x i8] c"d\00"
@.str.3 = [2 x i8] c"p\00"
@.str.4 = [2 x i8] c"l\00"
@.str.5 = [2 x i8] c"-\00"
@.str.6 = [2 x i8] c"s\00"
@S_IRUSR = global i32 0
@.str.7 = [2 x i8] c"r\00"
@S_IWUSR = global i32 0
@.str.8 = [2 x i8] c"w\00"
@S_IXUSR = global i32 0
@.str.9 = [2 x i8] c"x\00"
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@.str.10 = [3 x i8] c"x \00"
@.str.11 = [3 x i8] c"- \00"
@.str.12 = [5 x i8] c"%ld \00"
@.str.13 = [7 x i8] c"%s %s \00"
@.str.14 = [6 x i8] c"%lld \00"
@.str.15 = [4 x i8] c"%s \00"
@reltable.printinfo = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.6 to i64), i64 ptrtoint ([7 x i32]* @reltable.printinfo to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.5 to i64), i64 ptrtoint ([7 x i32]* @reltable.printinfo to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([7 x i32]* @reltable.printinfo to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.3 to i64), i64 ptrtoint ([7 x i32]* @reltable.printinfo to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.2 to i64), i64 ptrtoint ([7 x i32]* @reltable.printinfo to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([7 x i32]* @reltable.printinfo to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.printinfo to i64)) to i32)]
define void @printinfo(%struct.stat* byval(%struct.stat) align 8 %0) {
%2 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = load i32, i32* @S_IFMT
%5 = and i32 %4, %3
%6 = add i32 %5, -128
%7 = icmp ult i32 %6, 7
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = sext i32 %6 to i64
%10 = shl i64 %9, 2
%11 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.printinfo to i8*), i64 %10)
%12 = load i32, i32* @stdout
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* %11)
br label %14
14: ; preds = %1, %8
%15 = load i32, i32* @S_IRUSR
%16 = and i32 %15, %3
%17 = icmp eq i32 %16, 0
%18 = select i1 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0)
%19 = load i32, i32* @stdout
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* %18)
%21 = load i32, i32* @S_IWUSR
%22 = and i32 %21, %3
%23 = icmp eq i32 %22, 0
%24 = select i1 %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0)
%25 = load i32, i32* @stdout
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* %24)
%27 = load i32, i32* @S_IXUSR
%28 = and i32 %27, %3
%29 = icmp eq i32 %28, 0
%30 = select i1 %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0)
%31 = load i32, i32* @stdout
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* %30)
%33 = load i32, i32* @S_IRGRP
%34 = and i32 %33, %3
%35 = icmp eq i32 %34, 0
%36 = select i1 %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0)
%37 = load i32, i32* @stdout
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* %36)
%39 = load i32, i32* @S_IWGRP
%40 = and i32 %39, %3
%41 = icmp eq i32 %40, 0
%42 = select i1 %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0)
%43 = load i32, i32* @stdout
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* %42)
%45 = load i32, i32* @S_IXGRP
%46 = and i32 %45, %3
%47 = icmp eq i32 %46, 0
%48 = select i1 %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0)
%49 = load i32, i32* @stdout
%50 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* %48)
%51 = load i32, i32* @S_IROTH
%52 = and i32 %51, %3
%53 = icmp eq i32 %52, 0
%54 = select i1 %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0)
%55 = load i32, i32* @stdout
%56 = tail call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* %54)
%57 = load i32, i32* @S_IWOTH
%58 = and i32 %57, %3
%59 = icmp eq i32 %58, 0
%60 = select i1 %59, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0)
%61 = load i32, i32* @stdout
%62 = tail call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* %60)
%63 = load i32, i32* @S_IXOTH
%64 = and i32 %63, %3
%65 = icmp eq i32 %64, 0
%66 = select i1 %65, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0)
%67 = load i32, i32* @stdout
%68 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* %66)
%69 = load i32, i32* @stdout
%70 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 5
%71 = load i64, i64* %70
%72 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i64 %71)
%73 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 4
%74 = load i32, i32* %73
%75 = tail call %struct.passwd* @getpwuid(i32 %74)
%76 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 3
%77 = load i32, i32* %76
%78 = tail call %struct.group* @getgrgid(i32 %77)
%79 = load i32, i32* @stdout
%80 = getelementptr inbounds %struct.passwd, %struct.passwd* %75, i64 0, i32 0
%81 = load i8*, i8** %80
%82 = getelementptr inbounds %struct.group, %struct.group* %78, i64 0, i32 0
%83 = load i8*, i8** %82
%84 = tail call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* %81, i8* %83)
%85 = load i32, i32* @stdout
%86 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 2
%87 = load i64, i64* %86
%88 = tail call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i64 %87)
%89 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 1
%90 = call i8* @ctime(i32* %89)
%91 = call i32 @strlen(i8* %90)
%92 = add nsw i32 %91, -1
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i8, i8* %90, i64 %93
store i8 0, i8* %94
%95 = load i32, i32* @stdout
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %95, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i8* %90)
ret void
}