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

/* Variables and functions */
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
scalar_t__ S_ISDIR(int);
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
struct group *getgrgid(int /*<<< orphan*/);
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
void print_file_details(struct stat fd, char filename[]) {
  printf((S_ISDIR(fd.st_mode)) ? "d" : "-");
  printf((fd.st_mode & S_IRUSR) ? "r" : "-");
  printf((fd.st_mode & S_IWUSR) ? "w" : "-");
  printf((fd.st_mode & S_IXUSR) ? "x" : "-");
  printf((fd.st_mode & S_IRGRP) ? "r" : "-");
  printf((fd.st_mode & S_IWGRP) ? "w" : "-");
  printf((fd.st_mode & S_IXGRP) ? "x" : "-");
  printf((fd.st_mode & S_IROTH) ? "r" : "-");
  printf((fd.st_mode & S_IWOTH) ? "w" : "-");
  printf((fd.st_mode & S_IXOTH) ? "x " : "- ");
  printf("%jd ", (intmax_t)fd.st_size);
  struct passwd *pw = getpwuid(fd.st_uid);
  struct group *gr = getgrgid(fd.st_gid);
  printf("%10s ", (pw != 0) ? pw->pw_name : "unknown");
  printf("%10s ", (gr != 0) ? gr->gr_name : "unknown");
  char buff[16];
  strftime(buff, 20, "%Y-%m-%d %H:%M", localtime(&fd.st_mtime));
  printf("%16s ", buff);
  printf("%-40s\n", filename);
}


x86 assembly (clang, -O0):
<print_file_details>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    %rdi,-0x8(%rbp)
mov    (%rax),%edi
call   1060 <S_ISDIR@plt>
mov    %rax,%rcx
lea    0xe7d(%rip),%rdi
lea    0xe74(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2e00(%rip),%rax
and    (%rax),%ecx
lea    0xe51(%rip),%rdi
lea    0xe4c(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2dfd(%rip),%rax
and    (%rax),%ecx
lea    0xe26(%rip),%rdi
lea    0xe23(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2de2(%rip),%rax
and    (%rax),%ecx
lea    0xdfb(%rip),%rdi
lea    0xdfa(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d8f(%rip),%rax
and    (%rax),%ecx
lea    0xdd0(%rip),%rdi
lea    0xdcb(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d84(%rip),%rax
and    (%rax),%ecx
lea    0xda5(%rip),%rdi
lea    0xda2(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d49(%rip),%rax
and    (%rax),%ecx
lea    0xd7a(%rip),%rdi
lea    0xd79(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d06(%rip),%rax
and    (%rax),%ecx
lea    0xd4f(%rip),%rdi
lea    0xd4a(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2cc3(%rip),%rax
and    (%rax),%ecx
lea    0xd24(%rip),%rdi
lea    0xd21(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
mov    0x2ce8(%rip),%rax
and    (%rax),%ecx
lea    0xd04(%rip),%rdi
lea    0xcfa(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
mov    0xc(%rax),%edi
call   1040 <getpwuid@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%edi
call   1070 <getgrgid@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1372 <print_file_details+0x212>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
jmp    1382 <print_file_details+0x222>
lea    0xca2(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    1382 <print_file_details+0x222>
mov    -0x40(%rbp),%rsi
lea    0xc88(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpq   $0x0,-0x18(%rbp)
je     13af <print_file_details+0x24f>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
jmp    13bf <print_file_details+0x25f>
lea    0xc65(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    13bf <print_file_details+0x25f>
mov    -0x48(%rbp),%rsi
lea    0xc4b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rdi
lea    -0x30(%rbp),%rax
mov    %rax,-0x50(%rbp)
add    $0x4,%rdi
call   1030 <localtime@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%ecx
mov    $0x14,%esi
lea    0xc2b(%rip),%rdx
call   1080 <strftime@plt>
lea    -0x30(%rbp),%rsi
lea    0xc2a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xc1e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_file_details>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%r14
mov    0x50(%rsp),%ebp
mov    %ebp,%edi
call   1060 <S_ISDIR@plt>
test   %rax,%rax
lea    0xe7c(%rip),%r13
lea    0xe73(%rip),%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e09(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xe5a(%rip),%r15
mov    %r15,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xe3c(%rip),%r12
mov    %r12,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xe1e(%rip),%rbx
mov    %rbx,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
mov    %r15,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2dc0(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
mov    %r12,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d97(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
cmove  %r13,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d66(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
cmove  %r13,%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d35(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
cmove  %r13,%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d6c(%rip),%rax
and    (%rax),%ebp
lea    0xd88(%rip),%rax
lea    0xd7e(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x60(%rsp),%rsi
lea    0xd6d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x5c(%rsp),%edi
call   1040 <getpwuid@plt>
mov    %rax,%rbp
mov    0x58(%rsp),%edi
call   1070 <getgrgid@plt>
mov    %rax,%r15
lea    0xd52(%rip),%rbx
mov    %rbx,%rsi
test   %rbp,%rbp
je     12d5 <print_file_details+0x175>
mov    0x0(%rbp),%rsi
lea    0x50(%rsp),%rbp
lea    0xd34(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r15,%r15
je     12f0 <print_file_details+0x190>
mov    (%r15),%rbx
lea    0xd1e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x4,%rbp
mov    %rbp,%rdi
call   1030 <localtime@plt>
lea    0xd0f(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %eax,%ecx
call   1080 <strftime@plt>
lea    0xd05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcfa(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i64 }
%struct.passwd = type { i8* }
%struct.group = type { i8* }
@.str = [2 x i8] c"d\00"
@.str.1 = [2 x i8] c"-\00"
@S_IRUSR = global i32 0
@.str.2 = [2 x i8] c"r\00"
@S_IWUSR = global i32 0
@.str.3 = [2 x i8] c"w\00"
@S_IXUSR = global i32 0
@.str.4 = [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.5 = [3 x i8] c"x \00"
@.str.6 = [3 x i8] c"- \00"
@.str.7 = [5 x i8] c"%jd \00"
@.str.8 = [6 x i8] c"%10s \00"
@.str.9 = [8 x i8] c"unknown\00"
@.str.10 = [15 x i8] c"%Y-%m-%d %H:%M\00"
@.str.11 = [6 x i8] c"%16s \00"
@.str.12 = [7 x i8] c"%-40s\0A\00"
define void @print_file_details(%struct.stat* byval(%struct.stat) align 8 %0, i8* %1) {
%3 = alloca i8*
%4 = alloca %struct.passwd*
%5 = alloca %struct.group*
%6 = alloca [16 x i8]
store i8* %1, i8** %3
%7 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%13 = call i32 (i8*, ...) @printf(i8* %12)
%14 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%15 = load i32, i32* %14
%16 = load i32, i32* @S_IRUSR
%17 = and i32 %15, %16
%18 = icmp ne i32 %17, 0
%19 = zext i1 %18 to i64
%20 = select i1 %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%21 = call i32 (i8*, ...) @printf(i8* %20)
%22 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%23 = load i32, i32* %22
%24 = load i32, i32* @S_IWUSR
%25 = and i32 %23, %24
%26 = icmp ne i32 %25, 0
%27 = zext i1 %26 to i64
%28 = select i1 %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%29 = call i32 (i8*, ...) @printf(i8* %28)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%31 = load i32, i32* %30
%32 = load i32, i32* @S_IXUSR
%33 = and i32 %31, %32
%34 = icmp ne i32 %33, 0
%35 = zext i1 %34 to i64
%36 = select i1 %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%37 = call i32 (i8*, ...) @printf(i8* %36)
%38 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%39 = load i32, i32* %38
%40 = load i32, i32* @S_IRGRP
%41 = and i32 %39, %40
%42 = icmp ne i32 %41, 0
%43 = zext i1 %42 to i64
%44 = select i1 %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%45 = call i32 (i8*, ...) @printf(i8* %44)
%46 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%47 = load i32, i32* %46
%48 = load i32, i32* @S_IWGRP
%49 = and i32 %47, %48
%50 = icmp ne i32 %49, 0
%51 = zext i1 %50 to i64
%52 = select i1 %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%53 = call i32 (i8*, ...) @printf(i8* %52)
%54 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%55 = load i32, i32* %54
%56 = load i32, i32* @S_IXGRP
%57 = and i32 %55, %56
%58 = icmp ne i32 %57, 0
%59 = zext i1 %58 to i64
%60 = select i1 %58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%61 = call i32 (i8*, ...) @printf(i8* %60)
%62 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%63 = load i32, i32* %62
%64 = load i32, i32* @S_IROTH
%65 = and i32 %63, %64
%66 = icmp ne i32 %65, 0
%67 = zext i1 %66 to i64
%68 = select i1 %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%69 = call i32 (i8*, ...) @printf(i8* %68)
%70 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%71 = load i32, i32* %70
%72 = load i32, i32* @S_IWOTH
%73 = and i32 %71, %72
%74 = icmp ne i32 %73, 0
%75 = zext i1 %74 to i64
%76 = select i1 %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%77 = call i32 (i8*, ...) @printf(i8* %76)
%78 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%79 = load i32, i32* %78
%80 = load i32, i32* @S_IXOTH
%81 = and i32 %79, %80
%82 = icmp ne i32 %81, 0
%83 = zext i1 %82 to i64
%84 = select i1 %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0)
%85 = call i32 (i8*, ...) @printf(i8* %84)
%86 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 4
%87 = load i64, i64* %86
%88 = inttoptr i64 %87 to i8*
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %88)
%90 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 3
%91 = load i32, i32* %90
%92 = call %struct.passwd* @getpwuid(i32 %91)
store %struct.passwd* %92, %struct.passwd** %4
%93 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 2
%94 = load i32, i32* %93
%95 = call %struct.group* @getgrgid(i32 %94)
store %struct.group* %95, %struct.group** %5
%96 = load %struct.passwd*, %struct.passwd** %4
%97 = icmp ne %struct.passwd* %96, null
br i1 %97, label %98, label %102
98: ; preds = %2
%99 = load %struct.passwd*, %struct.passwd** %4
%100 = getelementptr inbounds %struct.passwd, %struct.passwd* %99, i32 0, i32 0
%101 = load i8*, i8** %100
br label %103
102: ; preds = %2
br label %103
103: ; preds = %102, %98
%104 = phi i8* [ %101, %98 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %102 ]
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* %104)
%106 = load %struct.group*, %struct.group** %5
%107 = icmp ne %struct.group* %106, null
br i1 %107, label %108, label %112
108: ; preds = %103
%109 = load %struct.group*, %struct.group** %5
%110 = getelementptr inbounds %struct.group, %struct.group* %109, i32 0, i32 0
%111 = load i8*, i8** %110
br label %113
112: ; preds = %103
br label %113
113: ; preds = %112, %108
%114 = phi i8* [ %111, %108 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %112 ]
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* %114)
%116 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%117 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 1
%118 = call i32 @localtime(i32* %117)
%119 = call i32 @strftime(i8* %116, i32 20, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %118)
%120 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* %120)
%122 = load i8*, i8** %3
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* %122)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i32, i64 }
%struct.passwd = type { i8* }
%struct.group = type { i8* }
@.str = [2 x i8] c"d\00"
@.str.1 = [2 x i8] c"-\00"
@S_IRUSR = global i32 0
@.str.2 = [2 x i8] c"r\00"
@S_IWUSR = global i32 0
@.str.3 = [2 x i8] c"w\00"
@S_IXUSR = global i32 0
@.str.4 = [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.5 = [3 x i8] c"x \00"
@.str.6 = [3 x i8] c"- \00"
@.str.7 = [5 x i8] c"%jd \00"
@.str.8 = [6 x i8] c"%10s \00"
@.str.9 = [8 x i8] c"unknown\00"
@.str.10 = [15 x i8] c"%Y-%m-%d %H:%M\00"
@.str.11 = [6 x i8] c"%16s \00"
@.str.12 = [7 x i8] c"%-40s\0A\00"
define void @print_file_details(%struct.stat* byval(%struct.stat) align 8 %0, i8* %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i64 @S_ISDIR(i32 %5)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8)
%10 = load i32, i32* @S_IRUSR
%11 = and i32 %10, %5
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %13)
%15 = load i32, i32* @S_IWUSR
%16 = and i32 %15, %5
%17 = icmp eq i32 %16, 0
%18 = select i1 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %18)
%20 = load i32, i32* @S_IXUSR
%21 = and i32 %20, %5
%22 = icmp eq i32 %21, 0
%23 = select i1 %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %23)
%25 = load i32, i32* @S_IRGRP
%26 = and i32 %25, %5
%27 = icmp eq i32 %26, 0
%28 = select i1 %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %28)
%30 = load i32, i32* @S_IWGRP
%31 = and i32 %30, %5
%32 = icmp eq i32 %31, 0
%33 = select i1 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %33)
%35 = load i32, i32* @S_IXGRP
%36 = and i32 %35, %5
%37 = icmp eq i32 %36, 0
%38 = select i1 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %38)
%40 = load i32, i32* @S_IROTH
%41 = and i32 %40, %5
%42 = icmp eq i32 %41, 0
%43 = select i1 %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %43)
%45 = load i32, i32* @S_IWOTH
%46 = and i32 %45, %5
%47 = icmp eq i32 %46, 0
%48 = select i1 %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0)
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %48)
%50 = load i32, i32* @S_IXOTH
%51 = and i32 %50, %5
%52 = icmp eq i32 %51, 0
%53 = select i1 %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %53)
%55 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 4
%56 = load i64, i64* %55
%57 = inttoptr i64 %56 to i8*
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %57)
%59 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 3
%60 = load i32, i32* %59
%61 = tail call %struct.passwd* @getpwuid(i32 %60)
%62 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 2
%63 = load i32, i32* %62
%64 = tail call %struct.group* @getgrgid(i32 %63)
%65 = icmp eq %struct.passwd* %61, null
br i1 %65, label %69, label %66
66: ; preds = %2
%67 = getelementptr inbounds %struct.passwd, %struct.passwd* %61, i64 0, i32 0
%68 = load i8*, i8** %67
br label %69
69: ; preds = %2, %66
%70 = phi i8* [ %68, %66 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %2 ]
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* %70)
%72 = icmp eq %struct.group* %64, null
br i1 %72, label %76, label %73
73: ; preds = %69
%74 = getelementptr inbounds %struct.group, %struct.group* %64, i64 0, i32 0
%75 = load i8*, i8** %74
br label %76
76: ; preds = %69, %73
%77 = phi i8* [ %75, %73 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %69 ]
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* %77)
%79 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%80 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 1
%81 = call i32 @localtime(i32* %80)
%82 = call i32 @strftime(i8* %79, i32 20, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %81)
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* %79)
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* %1)
ret void
}