#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 */
typedef int /*<<< orphan*/ time_t;
struct stat {
  int st_mode;
  int /*<<< orphan*/ st_size;
  int /*<<< orphan*/ st_rdev;
  int /*<<< orphan*/ st_mtime;
  int /*<<< orphan*/ st_gid;
  int /*<<< orphan*/ st_uid;
};

/* Variables and functions */
scalar_t__ MAJOR(int /*<<< orphan*/);
scalar_t__ MINOR(int /*<<< orphan*/);
#define S_IFBLK 131
#define S_IFCHR 130
#define S_IFLNK 129
int S_IFMT;
#define S_IFREG 128
int /*<<< orphan*/ group2str(int /*<<< orphan*/, char *);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ const *);
scalar_t__ lstat(char const *, struct stat *);
int /*<<< orphan*/ mode2str(int, char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *, ...);
int readlink(char const *, char *, int);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
char *strrchr(char const *, char);
int /*<<< orphan*/ user2str(int /*<<< orphan*/, char *);
int listfile_long(const char *path, int flags) {
  struct stat s;
  char date[32];
  char mode[16];
  char user[16];
  char group[16];
  const char *name;
  name = strrchr(path, '/');
  if (name == 0) {
    name = path;
  } else {
    name++;
  }
  if (lstat(path, &s) < 0) {
    return -1;
  }
  mode2str(s.st_mode, mode);
  user2str(s.st_uid, user);
  group2str(s.st_gid, group);
  strftime(date, 32, "%Y-%m-%d %H:%M", localtime((const time_t *)&s.st_mtime));
  date[31] = 0;
  switch (s.st_mode & S_IFMT) {
  case S_IFBLK:
  case S_IFCHR:
    printf("%s %-8s %-8s %3d, %3d %s %s\n", mode, user, group,
           (int)MAJOR(s.st_rdev), (int)MINOR(s.st_rdev), date, name);
    break;
  case S_IFREG:
    printf("%s %-8s %-8s %8lld %s %s\n", mode, user, group, s.st_size, date,
           name);
    break;
  case S_IFLNK: {
    char linkto[256];
    int len;
    len = readlink(path, linkto, 256);
    if (len < 0)
      return -1;
    if (len > 255) {
      linkto[252] = '.';
      linkto[253] = '.';
      linkto[254] = '.';
      linkto[255] = 0;
    } else {
      linkto[len] = 0;
    }
    printf("%s %-8s %-8s          %s %s -> %s\n", mode, user, group, date, name,
           linkto);
    break;
  }
  default:
    printf("%s %-8s %-8s          %s %s\n", mode, user, group, date, name);
  }
  return 0;
}


x86 assembly (clang, -O0):
<listfile_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x88(%rbp)
jne    11f5 <listfile_long+0x45>
mov    -0x10(%rbp),%rax
mov    %rax,-0x88(%rbp)
jmp    1207 <listfile_long+0x57>
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1090 <lstat@plt>
cmp    $0x0,%rax
jge    122a <listfile_long+0x7a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1449 <listfile_long+0x299>
mov    -0x30(%rbp),%edi
lea    -0x60(%rbp),%rsi
call   10d0 <mode2str@plt>
mov    -0x1c(%rbp),%edi
lea    -0x70(%rbp),%rsi
call   1050 <user2str@plt>
mov    -0x20(%rbp),%edi
lea    -0x80(%rbp),%rsi
call   10b0 <group2str@plt>
lea    -0x24(%rbp),%rdi
call   1030 <localtime@plt>
mov    %eax,%ecx
lea    0xda0(%rip),%rdx
lea    -0x50(%rbp),%rdi
mov    $0x20,%esi
call   10c0 <strftime@plt>
movb   $0x0,-0x31(%rbp)
mov    -0x30(%rbp),%eax
mov    0x2d64(%rip),%rcx
mov    (%rcx),%ecx
and    %ecx,%eax
mov    %eax,-0x198(%rbp)
sub    $0x80,%eax
je     1342 <listfile_long+0x192>
jmp    1296 <listfile_long+0xe6>
mov    -0x198(%rbp),%eax
sub    $0x81,%eax
je     1374 <listfile_long+0x1c4>
jmp    12ac <listfile_long+0xfc>
mov    -0x198(%rbp),%eax
add    $0xffffff7e,%eax
sub    $0x1,%eax
ja     141d <listfile_long+0x26d>
jmp    12c5 <listfile_long+0x115>
lea    -0x60(%rbp),%rax
mov    %rax,-0x1b8(%rbp)
lea    -0x70(%rbp),%rax
mov    %rax,-0x1b0(%rbp)
lea    -0x80(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
mov    -0x28(%rbp),%edi
call   1080 <MAJOR@plt>
mov    %eax,-0x19c(%rbp)
mov    -0x28(%rbp),%edi
call   10a0 <MINOR@plt>
mov    -0x1b8(%rbp),%rsi
mov    -0x1b0(%rbp),%rdx
mov    -0x1a8(%rbp),%rcx
mov    -0x19c(%rbp),%r8d
mov    %eax,%r9d
lea    -0x50(%rbp),%r10
mov    -0x88(%rbp),%rax
lea    0xce2(%rip),%rdi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1442 <listfile_long+0x292>
lea    -0x60(%rbp),%rsi
lea    -0x70(%rbp),%rdx
lea    -0x80(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
lea    -0x50(%rbp),%r9
mov    -0x88(%rbp),%rax
lea    0xcc8(%rip),%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1442 <listfile_long+0x292>
mov    -0x10(%rbp),%rdi
lea    -0x190(%rbp),%rsi
mov    $0x100,%edx
call   1040 <readlink@plt>
mov    %eax,-0x194(%rbp)
cmpl   $0x0,-0x194(%rbp)
jge    13a8 <listfile_long+0x1f8>
movl   $0xffffffff,-0x4(%rbp)
jmp    1449 <listfile_long+0x299>
cmpl   $0xff,-0x194(%rbp)
jle    13d9 <listfile_long+0x229>
movb   $0x2e,-0x94(%rbp)
movb   $0x2e,-0x93(%rbp)
movb   $0x2e,-0x92(%rbp)
movb   $0x0,-0x91(%rbp)
jmp    13e8 <listfile_long+0x238>
movslq -0x194(%rbp),%rax
movb   $0x0,-0x190(%rbp,%rax,1)
lea    -0x60(%rbp),%rsi
lea    -0x70(%rbp),%rdx
lea    -0x80(%rbp),%rcx
lea    -0x50(%rbp),%r8
mov    -0x88(%rbp),%r9
lea    -0x190(%rbp),%rax
lea    0xc39(%rip),%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1442 <listfile_long+0x292>
lea    -0x60(%rbp),%rsi
lea    -0x70(%rbp),%rdx
lea    -0x80(%rbp),%rcx
lea    -0x50(%rbp),%r8
mov    -0x88(%rbp),%r9
lea    0xc2e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listfile_long>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x188,%rsp
mov    %rdi,%rbp
mov    $0x2f,%esi
call   1070 <strrchr@plt>
lea    0x1(%rax),%rbx
test   %rax,%rax
cmove  %rbp,%rbx
lea    0x18(%rsp),%rsi
mov    %rbp,%rdi
call   1090 <lstat@plt>
mov    $0xffffffff,%r14d
test   %rax,%rax
js     136f <listfile_long+0x1bf>
mov    0x18(%rsp),%edi
lea    0x50(%rsp),%rsi
call   10d0 <mode2str@plt>
mov    0x2c(%rsp),%edi
lea    0x40(%rsp),%rsi
call   1050 <user2str@plt>
mov    0x28(%rsp),%edi
lea    0x30(%rsp),%rsi
call   10b0 <group2str@plt>
lea    0x24(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xdd4(%rip),%rdx
lea    0x60(%rsp),%r15
mov    %r15,%rdi
mov    $0x20,%esi
mov    %eax,%ecx
call   10c0 <strftime@plt>
movb   $0x0,0x7f(%rsp)
mov    0x2d94(%rip),%rax
mov    (%rax),%eax
and    0x18(%rsp),%eax
lea    -0x82(%rax),%ecx
cmp    $0x2,%ecx
jb     12ba <listfile_long+0x10a>
cmp    $0x80,%eax
je     1300 <listfile_long+0x150>
cmp    $0x81,%eax
jne    1330 <listfile_long+0x180>
lea    0x80(%rsp),%r15
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x100,%edx
call   1040 <readlink@plt>
test   %eax,%eax
js     136f <listfile_long+0x1bf>
cmp    $0x100,%eax
jb     1339 <listfile_long+0x189>
movw   $0x2e2e,0x17c(%rsp)
movb   $0x2e,0x17e(%rsp)
2e
mov    $0xff,%eax
jmp    133b <listfile_long+0x18b>
mov    0x20(%rsp),%edi
call   1080 <MAJOR@plt>
mov    %rax,%rbp
mov    0x20(%rsp),%edi
call   10a0 <MINOR@plt>
mov    %rbx,0x8(%rsp)
mov    %r15,(%rsp)
lea    0xd30(%rip),%rdi
xor    %r14d,%r14d
lea    0x50(%rsp),%rsi
lea    0x40(%rsp),%rdx
lea    0x30(%rsp),%rcx
mov    %ebp,%r8d
mov    %eax,%r9d
xor    %eax,%eax
call   1060 <printf@plt>
jmp    136f <listfile_long+0x1bf>
mov    0x1c(%rsp),%r8d
mov    %rbx,(%rsp)
lea    0xd1c(%rip),%rdi
xor    %r14d,%r14d
lea    0x50(%rsp),%rsi
lea    0x40(%rsp),%rdx
lea    0x30(%rsp),%rcx
lea    0x60(%rsp),%r9
xor    %eax,%eax
call   1060 <printf@plt>
jmp    136f <listfile_long+0x1bf>
lea    0xd32(%rip),%rdi
jmp    134e <listfile_long+0x19e>
mov    %eax,%eax
movb   $0x0,0x80(%rsp,%rax,1)
mov    %r15,(%rsp)
lea    0xcf8(%rip),%rdi
xor    %r14d,%r14d
lea    0x50(%rsp),%rsi
lea    0x40(%rsp),%rdx
lea    0x30(%rsp),%rcx
lea    0x60(%rsp),%r8
mov    %rbx,%r9
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14d,%eax
add    $0x188,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i32, i32 }
@.str = [15 x i8] c"%Y-%m-%d %H:%M\00"
@S_IFMT = global i32 0
@.str.1 = [29 x i8] c"%s %-8s %-8s %3d, %3d %s %s\0A\00"
@.str.2 = [26 x i8] c"%s %-8s %-8s %8lld %s %s\0A\00"
@.str.3 = [35 x i8] c"%s %-8s %-8s %s %s -> %s\0A\00"
@.str.4 = [29 x i8] c"%s %-8s %-8s %s %s\0A\00"
define i32 @listfile_long(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.stat
%7 = alloca [32 x i8]
%8 = alloca [16 x i8]
%9 = alloca [16 x i8]
%10 = alloca [16 x i8]
%11 = alloca i8*
%12 = alloca [256 x i8]
%13 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%14 = load i8*, i8** %4
%15 = call i8* @strrchr(i8* %14, i8 signext 47)
store i8* %15, i8** %11
%16 = load i8*, i8** %11
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = load i8*, i8** %4
store i8* %19, i8** %11
br label %23
20: ; preds = %2
%21 = load i8*, i8** %11
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %11
br label %23
23: ; preds = %20, %18
%24 = load i8*, i8** %4
%25 = call i64 @lstat(i8* %24, %struct.stat* %6)
%26 = icmp slt i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %23
store i32 -1, i32* %3
br label %109
28: ; preds = %23
%29 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%30 = load i32, i32* %29
%31 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%32 = call i32 @mode2str(i32 %30, i8* %31)
%33 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 5
%34 = load i32, i32* %33
%35 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%36 = call i32 @user2str(i32 %34, i8* %35)
%37 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 4
%38 = load i32, i32* %37
%39 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%40 = call i32 @group2str(i32 %38, i8* %39)
%41 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%42 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 3
%43 = call i32 @localtime(i32* %42)
%44 = call i32 @strftime(i8* %41, i32 32, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %43)
%45 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 31
store i8 0, i8* %45
%46 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%47 = load i32, i32* %46
%48 = load i32, i32* @S_IFMT
%49 = and i32 %47, %48
switch i32 %49, label %101 [
i32 131, label %50
i32 130, label %50
i32 128, label %65
i32 129, label %74
]
50: ; preds = %28, %28
%51 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%52 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%53 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%54 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 2
%55 = load i32, i32* %54
%56 = call i64 @MAJOR(i32 %55)
%57 = trunc i64 %56 to i32
%58 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 2
%59 = load i32, i32* %58
%60 = call i64 @MINOR(i32 %59)
%61 = trunc i64 %60 to i32
%62 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%63 = load i8*, i8** %11
%64 = call i32 (i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %51, i8* %52, i8* %53, i32 %57, i32 %61, i8* %62, i8* %63)
br label %108
65: ; preds = %28
%66 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%67 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%68 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%69 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%70 = load i32, i32* %69
%71 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%72 = load i8*, i8** %11
%73 = call i32 (i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %66, i8* %67, i8* %68, i32 %70, i8* %71, i8* %72)
br label %108
74: ; preds = %28
%75 = load i8*, i8** %4
%76 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%77 = call i32 @readlink(i8* %75, i8* %76, i32 256)
store i32 %77, i32* %13
%78 = load i32, i32* %13
%79 = icmp slt i32 %78, 0
br i1 %79, label %80, label %81
80: ; preds = %74
store i32 -1, i32* %3
br label %109
81: ; preds = %74
%82 = load i32, i32* %13
%83 = icmp sgt i32 %82, 255
br i1 %83, label %84, label %89
84: ; preds = %81
%85 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 252
store i8 46, i8* %85
%86 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 253
store i8 46, i8* %86
%87 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 254
store i8 46, i8* %87
%88 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 255
store i8 0, i8* %88
br label %93
89: ; preds = %81
%90 = load i32, i32* %13
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 %91
store i8 0, i8* %92
br label %93
93: ; preds = %89, %84
%94 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%95 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%96 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%97 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%98 = load i8*, i8** %11
%99 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%100 = call i32 (i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i8* %94, i8* %95, i8* %96, i8* %97, i8* %98, i8* %99)
br label %108
101: ; preds = %28
%102 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%103 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%104 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%105 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%106 = load i8*, i8** %11
%107 = call i32 (i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %102, i8* %103, i8* %104, i8* %105, i8* %106)
br label %108
108: ; preds = %101, %93, %65, %50
store i32 0, i32* %3
br label %109
109: ; preds = %108, %80, %27
%110 = load i32, i32* %3
ret i32 %110
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i32, i32, i32 }
@.str = [15 x i8] c"%Y-%m-%d %H:%M\00"
@S_IFMT = global i32 0
@.str.1 = [29 x i8] c"%s %-8s %-8s %3d, %3d %s %s\0A\00"
@.str.2 = [26 x i8] c"%s %-8s %-8s %8lld %s %s\0A\00"
@.str.3 = [35 x i8] c"%s %-8s %-8s %s %s -> %s\0A\00"
@.str.4 = [29 x i8] c"%s %-8s %-8s %s %s\0A\00"
define i32 @listfile_long(i8* %0, i32 %1) {
%3 = alloca %struct.stat
%4 = alloca [32 x i8]
%5 = alloca [16 x i8]
%6 = alloca [16 x i8]
%7 = alloca [16 x i8]
%8 = alloca [256 x i8]
%9 = bitcast %struct.stat* %3 to i8*
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%14 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%15 = icmp eq i8* %14, null
%16 = getelementptr inbounds i8, i8* %14, i64 1
%17 = select i1 %15, i8* %0, i8* %16
%18 = call i64 @lstat(i8* %0, %struct.stat* %3)
%19 = icmp slt i64 %18, 0
br i1 %19, label %69, label %20
20: ; preds = %2
%21 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%22 = load i32, i32* %21
%23 = call i32 @mode2str(i32 %22, i8* %11)
%24 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 5
%25 = load i32, i32* %24
%26 = call i32 @user2str(i32 %25, i8* %12)
%27 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 4
%28 = load i32, i32* %27
%29 = call i32 @group2str(i32 %28, i8* %13)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 3
%31 = call i32 @localtime(i32* %30)
%32 = call i32 @strftime(i8* %10, i32 32, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 31
store i8 0, i8* %33
%34 = load i32, i32* %21
%35 = load i32, i32* @S_IFMT
%36 = and i32 %35, %34
switch i32 %36, label %66 [
i32 131, label %37
i32 130, label %37
i32 128, label %46
i32 129, label %50
]
37: ; preds = %20, %20
%38 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 2
%39 = load i32, i32* %38
%40 = call i64 @MAJOR(i32 %39)
%41 = trunc i64 %40 to i32
%42 = load i32, i32* %38
%43 = call i64 @MINOR(i32 %42)
%44 = trunc i64 %43 to i32
%45 = call i32 (i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %12, i8* %13, i32 %41, i32 %44, i8* %10, i8* %17)
br label %69
46: ; preds = %20
%47 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%48 = load i32, i32* %47
%49 = call i32 (i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %11, i8* %12, i8* %13, i32 %48, i8* %10, i8* %17)
br label %69
50: ; preds = %20
%51 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%52 = call i32 @readlink(i8* %0, i8* %51, i32 256)
%53 = icmp slt i32 %52, 0
br i1 %53, label %68, label %54
54: ; preds = %50
%55 = icmp ugt i32 %52, 255
br i1 %55, label %56, label %60
56: ; preds = %54
%57 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 252
store i8 46, i8* %57
%58 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 253
store i8 46, i8* %58
%59 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 254
store i8 46, i8* %59
br label %62
60: ; preds = %54
%61 = zext i32 %52 to i64
br label %62
62: ; preds = %60, %56
%63 = phi i64 [ %61, %60 ], [ 255, %56 ]
%64 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 %63
store i8 0, i8* %64
%65 = call i32 (i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i8* %11, i8* %12, i8* %13, i8* %10, i8* %17, i8* %51)
br label %69
66: ; preds = %20
%67 = call i32 (i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %11, i8* %12, i8* %13, i8* %10, i8* %17)
br label %69
68: ; preds = %50
br label %69
69: ; preds = %37, %46, %66, %62, %68, %2
%70 = phi i32 [ -1, %2 ], [ -1, %68 ], [ 0, %62 ], [ 0, %66 ], [ 0, %46 ], [ 0, %37 ]
ret i32 %70
}