#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 tm {
  int dummy;
};
struct stat {
  int st_uid;
  int st_gid;
  int st_mode;
  scalar_t__ st_size;
  scalar_t__ st_nlink;
  scalar_t__ st_blocks;
  scalar_t__ st_ino;
  int /*<<< orphan*/ st_mtime;
};
struct passwd {
  int /*<<< orphan*/ pw_name;
};
struct group {
  int /*<<< orphan*/ gr_name;
};
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
scalar_t__ S_ISDIR(int);
int S_ISGID;
scalar_t__ S_ISLNK(int);
int S_ISUID;
int S_ISVTX;
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
struct group *getgrgid(int);
struct passwd *getpwuid(int);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ myprintf(char *, ...);
int readlink(char const *, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int print_ls(const char *file_name, struct stat file) {
  struct passwd *passwd = getpwuid(file.st_uid);
  struct group *group = getgrgid(file.st_gid);
  char mtime[255];
  struct tm *time;
  char user_to_print[255];
  char group_to_print[255];
  if (!passwd->pw_name) {
    sprintf(user_to_print, "%d", file.st_uid);
    fprintf(stdout, "%s", user_to_print);
  } else {
    strcpy(user_to_print, passwd->pw_name);
  }
  if (!group->gr_name) {
    sprintf(group_to_print, "%d", file.st_gid);
    fprintf(stdout, "%s", group_to_print);
  } else {
    strcpy(group_to_print, group->gr_name);
  }
  time = localtime(&file.st_mtime);
  strftime(mtime, 1000, "%b %d %H:%M", time);
  myprintf(" %ld %4.0f ", (long)file.st_ino, (double)file.st_blocks);
  myprintf((S_ISDIR(file.st_mode)) ? "d" : "-");
  myprintf((file.st_mode & S_IRUSR) ? "r" : "-");
  myprintf((file.st_mode & S_IWUSR) ? "w" : "-");
  if (file.st_mode & S_IXUSR) {
    if (file.st_mode & S_ISUID)
      myprintf("s");
    else
      myprintf("x");
  } else if (file.st_mode & S_ISUID) {
    myprintf("S");
  } else
    myprintf("-");
  myprintf((file.st_mode & S_IRGRP) ? "r" : "-");
  myprintf((file.st_mode & S_IWGRP) ? "w" : "-");
  if (file.st_mode & S_IXGRP) {
    if (file.st_mode & S_ISGID)
      myprintf("s");
    else
      myprintf("x");
  } else if (file.st_mode & S_ISGID) {
    myprintf("S");
  } else
    myprintf("-");
  myprintf((file.st_mode & S_IROTH) ? "r" : "-");
  myprintf((file.st_mode & S_IWOTH) ? "w" : "-");
  if (file.st_mode & S_IXOTH) {
    if (file.st_mode & S_ISVTX)
      myprintf("t");
    else
      myprintf("x");
  } else if (file.st_mode & S_ISVTX) {
    myprintf("T");
  } else
    myprintf("-");
  myprintf(" %3ld %s %8s %12.0f %s %s", (long)file.st_nlink, user_to_print,
           group_to_print, (double)file.st_size, mtime, file_name);
  if (S_ISLNK(file.st_mode)) {
    char buffer[4096];
    int count = readlink(file_name, buffer, sizeof(buffer));
    if (count >= 0) {
      buffer[count] = '\0';
      myprintf(" -> %s\n", buffer);
    }
  } else {
    myprintf("\n");
  }
  return 1;
}


x86 assembly (clang, -O0):
<print_ls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1340,%rsp
lea    0x10(%rbp),%rax
mov    %rax,-0x1340(%rbp)
mov    %rdi,-0x8(%rbp)
mov    (%rax),%edi
call   1070 <getpwuid@plt>
mov    %rax,%rcx
mov    -0x1340(%rbp),%rax
mov    %rcx,-0x10(%rbp)
mov    0x4(%rax),%edi
call   1090 <getgrgid@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1235 <print_ls+0x85>
mov    -0x1340(%rbp),%rax
lea    -0x230(%rbp),%rdi
mov    (%rax),%edx
lea    0xdf1(%rip),%rsi
call   10d0 <sprintf@plt>
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
lea    -0x230(%rbp),%rdx
lea    0xe15(%rip),%rsi
call   10b0 <fprintf@plt>
jmp    1247 <print_ls+0x97>
lea    -0x230(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1292 <print_ls+0xe2>
mov    -0x1340(%rbp),%rax
lea    -0x330(%rbp),%rdi
mov    0x4(%rax),%edx
lea    0xd94(%rip),%rsi
call   10d0 <sprintf@plt>
mov    0x2d10(%rip),%rax
mov    (%rax),%edi
lea    -0x330(%rbp),%rdx
lea    0xdb8(%rip),%rsi
call   10b0 <fprintf@plt>
jmp    12a4 <print_ls+0xf4>
lea    -0x330(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1040 <strcpy@plt>
mov    -0x1340(%rbp),%rdi
add    $0x30,%rdi
call   1030 <localtime@plt>
mov    %rax,-0x128(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x128(%rbp),%rcx
mov    $0x3e8,%esi
lea    0xd2e(%rip),%rdx
call   10c0 <strftime@plt>
mov    -0x1340(%rbp),%rax
mov    0x28(%rax),%rsi
cvtsi2sdq 0x20(%rax),%xmm0
lea    0xd1d(%rip),%rdi
mov    $0x1,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%edi
call   1080 <S_ISDIR@plt>
mov    %rax,%rcx
lea    0xd09(%rip),%rdi
lea    0xce8(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%ecx
mov    0x2c57(%rip),%rax
and    (%rax),%ecx
lea    0xcd9(%rip),%rdi
lea    0xcd4(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%ecx
mov    0x2c58(%rip),%rax
and    (%rax),%ecx
lea    0xcaa(%rip),%rdi
lea    0xca7(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x2c41(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     13e4 <print_ls+0x234>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x2c1d(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     13d1 <print_ls+0x221>
lea    0xc7c(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    13df <print_ls+0x22f>
lea    0xc49(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    1426 <print_ls+0x276>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x2bdb(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1413 <print_ls+0x263>
lea    0xc1c(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    1421 <print_ls+0x271>
lea    0xc01(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    1426 <print_ls+0x276>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%ecx
mov    0x2b69(%rip),%rax
and    (%rax),%ecx
lea    0xbdb(%rip),%rdi
lea    0xbd6(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%ecx
mov    0x2b62(%rip),%rax
and    (%rax),%ecx
lea    0xbac(%rip),%rdi
lea    0xba9(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x2b23(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     14e2 <print_ls+0x332>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x2af7(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     14cf <print_ls+0x31f>
lea    0xb7e(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    14dd <print_ls+0x32d>
lea    0xb4b(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    1524 <print_ls+0x374>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x2ab5(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1511 <print_ls+0x361>
lea    0xb1e(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    151f <print_ls+0x36f>
lea    0xb03(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    1524 <print_ls+0x374>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%ecx
mov    0x2a63(%rip),%rax
and    (%rax),%ecx
lea    0xadd(%rip),%rdi
lea    0xad8(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%ecx
mov    0x2a14(%rip),%rax
and    (%rax),%ecx
lea    0xaae(%rip),%rdi
lea    0xaab(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x2a4d(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     15e0 <print_ls+0x430>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x2a39(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     15cd <print_ls+0x41d>
lea    0xa64(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    15db <print_ls+0x42b>
lea    0xa4d(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    1622 <print_ls+0x472>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%eax
mov    0x29f7(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     160f <print_ls+0x45f>
lea    0xa24(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    161d <print_ls+0x46d>
lea    0xa05(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    1622 <print_ls+0x472>
mov    -0x1340(%rbp),%rax
mov    0x18(%rax),%rsi
lea    -0x230(%rbp),%rdx
lea    -0x330(%rbp),%rcx
cvtsi2sdq 0x10(%rax),%xmm0
lea    -0x120(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0x9d6(%rip),%rdi
mov    $0x1,%al
call   10a0 <myprintf@plt>
mov    -0x1340(%rbp),%rax
mov    0x8(%rax),%edi
call   1050 <S_ISLNK@plt>
cmp    $0x0,%rax
je     16c4 <print_ls+0x514>
mov    -0x8(%rbp),%rdi
lea    -0x1330(%rbp),%rsi
mov    $0x1000,%edx
call   1060 <readlink@plt>
mov    %eax,-0x1334(%rbp)
cmpl   $0x0,-0x1334(%rbp)
jl     16bf <print_ls+0x50f>
movslq -0x1334(%rbp),%rax
movb   $0x0,-0x1330(%rbp,%rax,1)
lea    -0x1330(%rbp),%rsi
lea    0x98b(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
jmp    16d2 <print_ls+0x522>
lea    0x97e(%rip),%rdi
mov    $0x0,%al
call   10a0 <myprintf@plt>
mov    $0x1,%eax
add    $0x1340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ls>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1318,%rsp
mov    %rdi,0x8(%rsp)
mov    0x1350(%rsp),%ebp
mov    %ebp,%edi
call   1070 <getpwuid@plt>
mov    %rax,%rbx
mov    0x1354(%rsp),%r14d
mov    %r14d,%edi
call   1090 <getgrgid@plt>
mov    %rax,%r12
mov    (%rbx),%esi
test   %esi,%esi
je     11ff <print_ls+0x4f>
lea    0x110(%rsp),%rdi
call   1040 <strcpy@plt>
jmp    1230 <print_ls+0x80>
lea    0xdfa(%rip),%rsi
lea    0x110(%rsp),%rbx
mov    %rbx,%rdi
mov    %ebp,%edx
call   10d0 <sprintf@plt>
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
lea    0xe18(%rip),%rsi
mov    %rbx,%rdx
call   10b0 <fprintf@plt>
lea    0x1350(%rsp),%rbp
mov    (%r12),%esi
test   %esi,%esi
je     124c <print_ls+0x9c>
lea    0x10(%rsp),%rdi
call   1040 <strcpy@plt>
jmp    127b <print_ls+0xcb>
lea    0xdad(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14d,%edx
call   10d0 <sprintf@plt>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
lea    0xdcd(%rip),%rsi
mov    %rbx,%rdx
call   10b0 <fprintf@plt>
lea    0x30(%rbp),%rdi
call   1030 <localtime@plt>
lea    0xd78(%rip),%rdx
lea    0x210(%rsp),%rdi
mov    $0x3e8,%esi
mov    %rax,%rcx
call   10c0 <strftime@plt>
mov    0x28(%rbp),%rsi
cvtsi2sdq 0x20(%rbp),%xmm0
lea    0xd5e(%rip),%rdi
mov    $0x1,%al
call   10a0 <myprintf@plt>
mov    0x8(%rbp),%edi
call   1080 <S_ISDIR@plt>
test   %rax,%rax
lea    0xd51(%rip),%r14
lea    0xd30(%rip),%rdi
cmove  %r14,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x2cad(%rip),%rax
mov    (%rax),%eax
and    0x8(%rbp),%eax
lea    0xd2e(%rip),%r12
mov    %r12,%rdi
cmove  %r14,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x2cbc(%rip),%rax
mov    (%rax),%eax
and    0x8(%rbp),%eax
lea    0xd0f(%rip),%r13
mov    %r13,%rdi
cmove  %r14,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x8(%rbp),%eax
mov    0x2cb0(%rip),%rcx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    0x2c9d(%rip),%rdx
and    (%rdx),%eax
lea    0xce5(%rip),%rdx
lea    0xcfe(%rip),%r15
mov    %r15,%rax
cmove  %rdx,%rax
lea    0xcd2(%rip),%rbx
mov    %rbx,%rdi
cmove  %r14,%rdi
test   %ecx,%ecx
cmovne %rax,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x2c34(%rip),%rax
mov    (%rax),%eax
and    0x8(%rbp),%eax
mov    %r12,%rdi
cmove  %r14,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x2c42(%rip),%rax
mov    (%rax),%eax
and    0x8(%rbp),%eax
mov    %r13,%rdi
cmove  %r14,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x8(%rbp),%eax
mov    0x2c15(%rip),%rcx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    0x2bfa(%rip),%rdx
and    (%rdx),%eax
lea    0xc6a(%rip),%rax
cmove  %rax,%r15
cmove  %r14,%rbx
test   %ecx,%ecx
cmovne %r15,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x2bc2(%rip),%rax
mov    (%rax),%eax
and    0x8(%rbp),%eax
cmove  %r14,%r12
mov    %r12,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x2b88(%rip),%rax
mov    (%rax),%eax
and    0x8(%rbp),%eax
cmove  %r14,%r13
mov    %r13,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x8(%rbp),%eax
mov    0x2bd3(%rip),%rcx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    0x2bd0(%rip),%rdx
and    (%rdx),%eax
lea    0xc04(%rip),%rax
lea    0xbf9(%rip),%rdx
cmove  %rdx,%rax
lea    0xbf4(%rip),%rdi
cmove  %r14,%rdi
test   %ecx,%ecx
cmovne %rax,%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    0x18(%rbp),%rsi
cvtsi2sdq 0x10(%rbp),%xmm0
lea    0xbd4(%rip),%rdi
lea    0x110(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x210(%rsp),%r8
mov    0x8(%rsp),%rbx
mov    %rbx,%r9
mov    $0x1,%al
call   10a0 <myprintf@plt>
mov    0x8(%rbp),%edi
call   1050 <S_ISLNK@plt>
test   %rax,%rax
je     14c1 <print_ls+0x311>
lea    0x310(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x1000,%edx
call   1060 <readlink@plt>
test   %eax,%eax
js     14cf <print_ls+0x31f>
mov    %eax,%eax
movb   $0x0,0x310(%rsp,%rax,1)
lea    0xb93(%rip),%rdi
lea    0x310(%rsp),%rsi
xor    %eax,%eax
call   10a0 <myprintf@plt>
jmp    14cf <print_ls+0x31f>
lea    0xb81(%rip),%rdi
xor    %eax,%eax
call   10a0 <myprintf@plt>
mov    $0x1,%eax
add    $0x1318,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i64, i64, i64, i64, i32 }
%struct.passwd = type { i32 }
%struct.group = type { i32 }
%struct.tm = type { i32 }
@.str = [3 x i8] c"%d\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [12 x i8] c"%b %d %H:%M\00"
@.str.3 = [12 x i8] c" %ld %4.0f \00"
@.str.4 = [2 x i8] c"d\00"
@.str.5 = [2 x i8] c"-\00"
@S_IRUSR = global i32 0
@.str.6 = [2 x i8] c"r\00"
@S_IWUSR = global i32 0
@.str.7 = [2 x i8] c"w\00"
@S_IXUSR = global i32 0
@S_ISUID = global i32 0
@.str.8 = [2 x i8] c"s\00"
@.str.9 = [2 x i8] c"x\00"
@.str.10 = [2 x i8] c"S\00"
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_ISGID = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@S_ISVTX = global i32 0
@.str.11 = [2 x i8] c"t\00"
@.str.12 = [2 x i8] c"T\00"
@.str.13 = [26 x i8] c" %3ld %s %8s %12.0f %s %s\00"
@.str.14 = [8 x i8] c" -> %s\0A\00"
@.str.15 = [2 x i8] c"\0A\00"
define i32 @print_ls(i8* %0, %struct.stat* byval(%struct.stat) align 8 %1) {
%3 = alloca i8*
%4 = alloca %struct.passwd*
%5 = alloca %struct.group*
%6 = alloca [255 x i8]
%7 = alloca %struct.tm*
%8 = alloca [255 x i8]
%9 = alloca [255 x i8]
%10 = alloca [4096 x i8]
%11 = alloca i32
store i8* %0, i8** %3
%12 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 0
%13 = load i32, i32* %12
%14 = call %struct.passwd* @getpwuid(i32 %13)
store %struct.passwd* %14, %struct.passwd** %4
%15 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 1
%16 = load i32, i32* %15
%17 = call %struct.group* @getgrgid(i32 %16)
store %struct.group* %17, %struct.group** %5
%18 = load %struct.passwd*, %struct.passwd** %4
%19 = getelementptr inbounds %struct.passwd, %struct.passwd* %18, i32 0, i32 0
%20 = load i32, i32* %19
%21 = icmp ne i32 %20, 0
br i1 %21, label %30, label %22
22: ; preds = %2
%23 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%24 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 0
%25 = load i32, i32* %24
%26 = call i32 @sprintf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = load i32, i32* @stdout
%28 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%29 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %28)
br label %36
30: ; preds = %2
%31 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%32 = load %struct.passwd*, %struct.passwd** %4
%33 = getelementptr inbounds %struct.passwd, %struct.passwd* %32, i32 0, i32 0
%34 = load i32, i32* %33
%35 = call i32 @strcpy(i8* %31, i32 %34)
br label %36
36: ; preds = %30, %22
%37 = load %struct.group*, %struct.group** %5
%38 = getelementptr inbounds %struct.group, %struct.group* %37, i32 0, i32 0
%39 = load i32, i32* %38
%40 = icmp ne i32 %39, 0
br i1 %40, label %49, label %41
41: ; preds = %36
%42 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%43 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 1
%44 = load i32, i32* %43
%45 = call i32 @sprintf(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %44)
%46 = load i32, i32* @stdout
%47 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%48 = call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %47)
br label %55
49: ; preds = %36
%50 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%51 = load %struct.group*, %struct.group** %5
%52 = getelementptr inbounds %struct.group, %struct.group* %51, i32 0, i32 0
%53 = load i32, i32* %52
%54 = call i32 @strcpy(i8* %50, i32 %53)
br label %55
55: ; preds = %49, %41
%56 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 7
%57 = call %struct.tm* @localtime(i32* %56)
store %struct.tm* %57, %struct.tm** %7
%58 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%59 = load %struct.tm*, %struct.tm** %7
%60 = call i32 @strftime(i8* %58, i32 1000, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %struct.tm* %59)
%61 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 6
%62 = load i64, i64* %61
%63 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 5
%64 = load i64, i64* %63
%65 = sitofp i64 %64 to double
%66 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i64 %62, double %65)
%67 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%68 = load i32, i32* %67
%69 = call i64 @S_ISDIR(i32 %68)
%70 = icmp ne i64 %69, 0
%71 = zext i1 %70 to i64
%72 = select i1 %70, 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.5, i64 0, i64 0)
%73 = call i32 (i8*, ...) @myprintf(i8* %72)
%74 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%75 = load i32, i32* %74
%76 = load i32, i32* @S_IRUSR
%77 = and i32 %75, %76
%78 = icmp ne i32 %77, 0
%79 = zext i1 %78 to i64
%80 = select i1 %78, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0)
%81 = call i32 (i8*, ...) @myprintf(i8* %80)
%82 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%83 = load i32, i32* %82
%84 = load i32, i32* @S_IWUSR
%85 = and i32 %83, %84
%86 = icmp ne i32 %85, 0
%87 = zext i1 %86 to i64
%88 = select i1 %86, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0)
%89 = call i32 (i8*, ...) @myprintf(i8* %88)
%90 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%91 = load i32, i32* %90
%92 = load i32, i32* @S_IXUSR
%93 = and i32 %91, %92
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %106
95: ; preds = %55
%96 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%97 = load i32, i32* %96
%98 = load i32, i32* @S_ISUID
%99 = and i32 %97, %98
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %103
101: ; preds = %95
%102 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %105
103: ; preds = %95
%104 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %105
105: ; preds = %103, %101
br label %117
106: ; preds = %55
%107 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%108 = load i32, i32* %107
%109 = load i32, i32* @S_ISUID
%110 = and i32 %108, %109
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %106
%113 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %116
114: ; preds = %106
%115 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %116
116: ; preds = %114, %112
br label %117
117: ; preds = %116, %105
%118 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%119 = load i32, i32* %118
%120 = load i32, i32* @S_IRGRP
%121 = and i32 %119, %120
%122 = icmp ne i32 %121, 0
%123 = zext i1 %122 to i64
%124 = select i1 %122, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0)
%125 = call i32 (i8*, ...) @myprintf(i8* %124)
%126 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%127 = load i32, i32* %126
%128 = load i32, i32* @S_IWGRP
%129 = and i32 %127, %128
%130 = icmp ne i32 %129, 0
%131 = zext i1 %130 to i64
%132 = select i1 %130, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0)
%133 = call i32 (i8*, ...) @myprintf(i8* %132)
%134 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%135 = load i32, i32* %134
%136 = load i32, i32* @S_IXGRP
%137 = and i32 %135, %136
%138 = icmp ne i32 %137, 0
br i1 %138, label %139, label %150
139: ; preds = %117
%140 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%141 = load i32, i32* %140
%142 = load i32, i32* @S_ISGID
%143 = and i32 %141, %142
%144 = icmp ne i32 %143, 0
br i1 %144, label %145, label %147
145: ; preds = %139
%146 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %149
147: ; preds = %139
%148 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %149
149: ; preds = %147, %145
br label %161
150: ; preds = %117
%151 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%152 = load i32, i32* %151
%153 = load i32, i32* @S_ISGID
%154 = and i32 %152, %153
%155 = icmp ne i32 %154, 0
br i1 %155, label %156, label %158
156: ; preds = %150
%157 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %160
158: ; preds = %150
%159 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %160
160: ; preds = %158, %156
br label %161
161: ; preds = %160, %149
%162 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%163 = load i32, i32* %162
%164 = load i32, i32* @S_IROTH
%165 = and i32 %163, %164
%166 = icmp ne i32 %165, 0
%167 = zext i1 %166 to i64
%168 = select i1 %166, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0)
%169 = call i32 (i8*, ...) @myprintf(i8* %168)
%170 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%171 = load i32, i32* %170
%172 = load i32, i32* @S_IWOTH
%173 = and i32 %171, %172
%174 = icmp ne i32 %173, 0
%175 = zext i1 %174 to i64
%176 = select i1 %174, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0)
%177 = call i32 (i8*, ...) @myprintf(i8* %176)
%178 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%179 = load i32, i32* %178
%180 = load i32, i32* @S_IXOTH
%181 = and i32 %179, %180
%182 = icmp ne i32 %181, 0
br i1 %182, label %183, label %194
183: ; preds = %161
%184 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%185 = load i32, i32* %184
%186 = load i32, i32* @S_ISVTX
%187 = and i32 %185, %186
%188 = icmp ne i32 %187, 0
br i1 %188, label %189, label %191
189: ; preds = %183
%190 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %193
191: ; preds = %183
%192 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %193
193: ; preds = %191, %189
br label %205
194: ; preds = %161
%195 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%196 = load i32, i32* %195
%197 = load i32, i32* @S_ISVTX
%198 = and i32 %196, %197
%199 = icmp ne i32 %198, 0
br i1 %199, label %200, label %202
200: ; preds = %194
%201 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %204
202: ; preds = %194
%203 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %204
204: ; preds = %202, %200
br label %205
205: ; preds = %204, %193
%206 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 4
%207 = load i64, i64* %206
%208 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%209 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%210 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 3
%211 = load i64, i64* %210
%212 = sitofp i64 %211 to double
%213 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%214 = load i8*, i8** %3
%215 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i64 %207, i8* %208, i8* %209, double %212, i8* %213, i8* %214)
%216 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 2
%217 = load i32, i32* %216
%218 = call i64 @S_ISLNK(i32 %217)
%219 = icmp ne i64 %218, 0
br i1 %219, label %220, label %233
220: ; preds = %205
%221 = load i8*, i8** %3
%222 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%223 = call i32 @readlink(i8* %221, i8* %222, i32 4096)
store i32 %223, i32* %11
%224 = load i32, i32* %11
%225 = icmp sge i32 %224, 0
br i1 %225, label %226, label %232
226: ; preds = %220
%227 = load i32, i32* %11
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %228
store i8 0, i8* %229
%230 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%231 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i8* %230)
br label %232
232: ; preds = %226, %220
br label %235
233: ; preds = %205
%234 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %235
235: ; preds = %233, %232
ret i32 1
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i64, i64, i64, i64, i32 }
%struct.passwd = type { i32 }
%struct.group = type { i32 }
%struct.tm = type { i32 }
@.str = [3 x i8] c"%d\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [12 x i8] c"%b %d %H:%M\00"
@.str.3 = [12 x i8] c" %ld %4.0f \00"
@.str.4 = [2 x i8] c"d\00"
@.str.5 = [2 x i8] c"-\00"
@S_IRUSR = global i32 0
@.str.6 = [2 x i8] c"r\00"
@S_IWUSR = global i32 0
@.str.7 = [2 x i8] c"w\00"
@S_IXUSR = global i32 0
@S_ISUID = global i32 0
@.str.8 = [2 x i8] c"s\00"
@.str.9 = [2 x i8] c"x\00"
@.str.10 = [2 x i8] c"S\00"
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_ISGID = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@S_ISVTX = global i32 0
@.str.11 = [2 x i8] c"t\00"
@.str.12 = [2 x i8] c"T\00"
@.str.13 = [26 x i8] c" %3ld %s %8s %12.0f %s %s\00"
@.str.14 = [8 x i8] c" -> %s\0A\00"
@.str.15 = [2 x i8] c"\0A\00"
define i32 @print_ls(i8* %0, %struct.stat* byval(%struct.stat) align 8 %1) {
%3 = alloca [255 x i8]
%4 = alloca [255 x i8]
%5 = alloca [255 x i8]
%6 = alloca [4096 x i8]
%7 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call %struct.passwd* @getpwuid(i32 %8)
%10 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 1
%11 = load i32, i32* %10
%12 = tail call %struct.group* @getgrgid(i32 %11)
%13 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%16 = getelementptr inbounds %struct.passwd, %struct.passwd* %9, i64 0, i32 0
%17 = load i32, i32* %16
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %2
%20 = call i32 @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%21 = load i32, i32* @stdout
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %25
23: ; preds = %2
%24 = call i32 @strcpy(i8* %14, i32 %17)
br label %25
25: ; preds = %23, %19
%26 = getelementptr inbounds %struct.group, %struct.group* %12, i64 0, i32 0
%27 = load i32, i32* %26
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %25
%30 = call i32 @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%31 = load i32, i32* @stdout
%32 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %15)
br label %35
33: ; preds = %25
%34 = call i32 @strcpy(i8* %15, i32 %27)
br label %35
35: ; preds = %33, %29
%36 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 7
%37 = call %struct.tm* @localtime(i32* %36)
%38 = call i32 @strftime(i8* %13, i32 1000, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %struct.tm* %37)
%39 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 6
%40 = load i64, i64* %39
%41 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 5
%42 = load i64, i64* %41
%43 = sitofp i64 %42 to double
%44 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i64 %40, double %43)
%45 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 2
%46 = load i32, i32* %45
%47 = call i64 @S_ISDIR(i32 %46)
%48 = icmp eq i64 %47, 0
%49 = select i1 %48, 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.4, i64 0, i64 0)
%50 = call i32 (i8*, ...) @myprintf(i8* %49)
%51 = load i32, i32* %45
%52 = load i32, i32* @S_IRUSR
%53 = and i32 %52, %51
%54 = icmp eq i32 %53, 0
%55 = select i1 %54, 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.6, i64 0, i64 0)
%56 = call i32 (i8*, ...) @myprintf(i8* %55)
%57 = load i32, i32* %45
%58 = load i32, i32* @S_IWUSR
%59 = and i32 %58, %57
%60 = icmp eq i32 %59, 0
%61 = select i1 %60, 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)
%62 = call i32 (i8*, ...) @myprintf(i8* %61)
%63 = load i32, i32* %45
%64 = load i32, i32* @S_IXUSR
%65 = and i32 %64, %63
%66 = icmp eq i32 %65, 0
%67 = load i32, i32* @S_ISUID
%68 = and i32 %67, %63
%69 = icmp eq i32 %68, 0
%70 = select i1 %69, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0)
%71 = select i1 %69, 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.10, i64 0, i64 0)
%72 = select i1 %66, i8* %71, i8* %70
%73 = call i32 (i8*, ...) @myprintf(i8* %72)
%74 = load i32, i32* %45
%75 = load i32, i32* @S_IRGRP
%76 = and i32 %75, %74
%77 = icmp eq i32 %76, 0
%78 = select i1 %77, 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.6, i64 0, i64 0)
%79 = call i32 (i8*, ...) @myprintf(i8* %78)
%80 = load i32, i32* %45
%81 = load i32, i32* @S_IWGRP
%82 = and i32 %81, %80
%83 = icmp eq i32 %82, 0
%84 = select i1 %83, 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)
%85 = call i32 (i8*, ...) @myprintf(i8* %84)
%86 = load i32, i32* %45
%87 = load i32, i32* @S_IXGRP
%88 = and i32 %87, %86
%89 = icmp eq i32 %88, 0
%90 = load i32, i32* @S_ISGID
%91 = and i32 %90, %86
%92 = icmp eq i32 %91, 0
%93 = select i1 %92, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0)
%94 = select i1 %92, 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.10, i64 0, i64 0)
%95 = select i1 %89, i8* %94, i8* %93
%96 = call i32 (i8*, ...) @myprintf(i8* %95)
%97 = load i32, i32* %45
%98 = load i32, i32* @S_IROTH
%99 = and i32 %98, %97
%100 = icmp eq i32 %99, 0
%101 = select i1 %100, 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.6, i64 0, i64 0)
%102 = call i32 (i8*, ...) @myprintf(i8* %101)
%103 = load i32, i32* %45
%104 = load i32, i32* @S_IWOTH
%105 = and i32 %104, %103
%106 = icmp eq i32 %105, 0
%107 = select i1 %106, 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)
%108 = call i32 (i8*, ...) @myprintf(i8* %107)
%109 = load i32, i32* %45
%110 = load i32, i32* @S_IXOTH
%111 = and i32 %110, %109
%112 = icmp eq i32 %111, 0
%113 = load i32, i32* @S_ISVTX
%114 = and i32 %113, %109
%115 = icmp eq i32 %114, 0
%116 = select i1 %115, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0)
%117 = select i1 %115, 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.12, i64 0, i64 0)
%118 = select i1 %112, i8* %117, i8* %116
%119 = call i32 (i8*, ...) @myprintf(i8* %118)
%120 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 4
%121 = load i64, i64* %120
%122 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 3
%123 = load i64, i64* %122
%124 = sitofp i64 %123 to double
%125 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i64 %121, i8* %14, i8* %15, double %124, i8* %13, i8* %0)
%126 = load i32, i32* %45
%127 = call i64 @S_ISLNK(i32 %126)
%128 = icmp eq i64 %127, 0
br i1 %128, label %138, label %129
129: ; preds = %35
%130 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%131 = call i32 @readlink(i8* %0, i8* %130, i32 4096)
%132 = icmp sgt i32 %131, -1
br i1 %132, label %133, label %137
133: ; preds = %129
%134 = zext i32 %131 to i64
%135 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %134
store i8 0, i8* %135
%136 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i8* %130)
br label %137
137: ; preds = %133, %129
br label %140
138: ; preds = %35
%139 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %140
140: ; preds = %138, %137
ret i32 1
}