#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;
  scalar_t__ st_uid;
  scalar_t__ st_gid;
  int /*<<< orphan*/ st_mtime;
};

/* Variables and functions */
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
scalar_t__ S_ISDIR(int);
scalar_t__ S_ISLNK(int);
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
int /*<<< orphan*/ get_name(scalar_t__);
int /*<<< orphan*/ getfilesize(struct stat);
int /*<<< orphan*/ getfilesize_with_h(struct stat, int /*<<< orphan*/, int);
int /*<<< orphan*/ getmodifiedtime(int /*<<< orphan*/);
int /*<<< orphan*/ getnumoflinks(struct stat);
int /*<<< orphan*/ write(int, char *, int);
void printinginfo(struct stat fileStat, char **argv, int direct, int harg) {
  if (S_ISLNK(fileStat.st_mode))
    write(1, "l", 1);
  else if (S_ISDIR(fileStat.st_mode))
    write(1, "d", 1);
  else
    write(1, "-", 1);
  write(1, ((fileStat.st_mode & S_IRUSR) ? "r" : "-"), 1);
  write(1, ((fileStat.st_mode & S_IWUSR) ? "w" : "-"), 1);
  write(1, ((fileStat.st_mode & S_IXUSR) ? "x" : "-"), 1);
  write(1, ((fileStat.st_mode & S_IRGRP) ? "r" : "-"), 1);
  write(1, ((fileStat.st_mode & S_IWGRP) ? "w" : "-"), 1);
  write(1, ((fileStat.st_mode & S_IXGRP) ? "x" : "-"), 1);
  write(1, ((fileStat.st_mode & S_IROTH) ? "r" : "-"), 1);
  write(1, ((fileStat.st_mode & S_IWOTH) ? "w" : "-"), 1);
  write(1, ((fileStat.st_mode & S_IXOTH) ? "x" : "-"), 1);
  write(1, " ", 1);
  getnumoflinks(fileStat);
  write(1, " ", 1);
  if (fileStat.st_uid == 0)
    write(1, "root ", 5);
  else
    get_name(fileStat.st_uid);
  if (fileStat.st_gid == 0)
    write(1, "root ", 5);
  else
    get_name(fileStat.st_gid);
  char *size;
  if (harg == 1)
    getfilesize_with_h(fileStat, 0, 1);
  else
    getfilesize(fileStat);
  write(1, " ", 1);
  char *f, toprint[17];
  getmodifiedtime(fileStat.st_mtime);
}


x86 assembly (clang, -O0):
<printinginfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    (%rax),%edi
call   1030 <S_ISLNK@plt>
cmp    $0x0,%rax
je     11c3 <printinginfo+0x43>
mov    $0x1,%edx
lea    0xe49(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    1208 <printinginfo+0x88>
mov    -0x48(%rbp),%rax
mov    (%rax),%edi
call   1060 <S_ISDIR@plt>
cmp    $0x0,%rax
je     11f0 <printinginfo+0x70>
mov    $0x1,%edx
lea    0xe1e(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    1203 <printinginfo+0x83>
mov    $0x1,%edx
lea    0xe08(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    1208 <printinginfo+0x88>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d93(%rip),%rax
and    (%rax),%ecx
lea    0xde6(%rip),%rsi
lea    0xde1(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d8b(%rip),%rax
and    (%rax),%ecx
lea    0xdb6(%rip),%rsi
lea    0xdb3(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d6b(%rip),%rax
and    (%rax),%ecx
lea    0xd86(%rip),%rsi
lea    0xd85(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d13(%rip),%rax
and    (%rax),%ecx
lea    0xd56(%rip),%rsi
lea    0xd51(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2d03(%rip),%rax
and    (%rax),%ecx
lea    0xd26(%rip),%rsi
lea    0xd23(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2cc3(%rip),%rax
and    (%rax),%ecx
lea    0xcf6(%rip),%rsi
lea    0xcf5(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2c7b(%rip),%rax
and    (%rax),%ecx
lea    0xcc6(%rip),%rsi
lea    0xcc1(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2c33(%rip),%rax
and    (%rax),%ecx
lea    0xc96(%rip),%rsi
lea    0xc93(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
mov    0x2c53(%rip),%rax
and    (%rax),%ecx
lea    0xc66(%rip),%rsi
lea    0xc65(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0xc4c(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%rcx
mov    %rcx,(%rsp)
mov    0x8(%rax),%rcx
mov    %rcx,0x8(%rsp)
mov    0x10(%rax),%rcx
mov    %rcx,0x10(%rsp)
mov    0x18(%rax),%rax
mov    %rax,0x18(%rsp)
call   1080 <getnumoflinks@plt>
mov    $0x1,%edx
lea    0xc0e(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    1433 <printinginfo+0x2b3>
mov    $0x1,%edi
lea    0xbe8(%rip),%rsi
mov    $0x5,%edx
call   1040 <write@plt>
jmp    1440 <printinginfo+0x2c0>
mov    -0x48(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <get_name@plt>
mov    -0x48(%rbp),%rax
cmpq   $0x0,0x10(%rax)
jne    146a <printinginfo+0x2ea>
mov    $0x1,%edi
lea    0xbb1(%rip),%rsi
mov    $0x5,%edx
call   1040 <write@plt>
jmp    1477 <printinginfo+0x2f7>
mov    -0x48(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <get_name@plt>
cmpl   $0x1,-0x10(%rbp)
jne    14b8 <printinginfo+0x338>
mov    -0x48(%rbp),%rax
xor    %edi,%edi
mov    $0x1,%esi
mov    (%rax),%rcx
mov    %rcx,(%rsp)
mov    0x8(%rax),%rcx
mov    %rcx,0x8(%rsp)
mov    0x10(%rax),%rcx
mov    %rcx,0x10(%rsp)
mov    0x18(%rax),%rax
mov    %rax,0x18(%rsp)
call   1070 <getfilesize_with_h@plt>
jmp    14e3 <printinginfo+0x363>
mov    -0x48(%rbp),%rax
mov    (%rax),%rcx
mov    %rcx,(%rsp)
mov    0x8(%rax),%rcx
mov    %rcx,0x8(%rsp)
mov    0x10(%rax),%rcx
mov    %rcx,0x10(%rsp)
mov    0x18(%rax),%rax
mov    %rax,0x18(%rsp)
call   1050 <getfilesize@plt>
mov    $0x1,%edx
lea    0xb21(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
mov    -0x48(%rbp),%rax
mov    0x18(%rax),%edi
call   1090 <getmodifiedtime@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printinginfo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edx,0x24(%rsp)
lea    0x60(%rsp),%r13
mov    0x60(%rsp),%ebp
mov    %ebp,%edi
call   1030 <S_ISLNK@plt>
test   %rax,%rax
je     11b0 <printinginfo+0x30>
lea    0xe52(%rip),%rsi
jmp    11cc <printinginfo+0x4c>
mov    %ebp,%edi
call   1060 <S_ISDIR@plt>
test   %rax,%rax
lea    0xe43(%rip),%rax
lea    0xe3a(%rip),%rsi
cmove  %rax,%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xe17(%rip),%r14
lea    0xe12(%rip),%r15
mov    %r15,%rsi
cmove  %r14,%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xdec(%rip),%r12
mov    %r12,%rsi
cmove  %r14,%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2da7(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
lea    0xdc6(%rip),%rbx
mov    %rbx,%rsi
cmove  %r14,%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
mov    %r15,%rsi
cmove  %r14,%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2d56(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
mov    %r12,%rsi
cmove  %r14,%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2d25(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
mov    %rbx,%rsi
cmove  %r14,%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2cec(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
cmove  %r14,%r15
mov    $0x1,%edi
mov    %r15,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2cb3(%rip),%rax
mov    (%rax),%eax
and    %ebp,%eax
cmove  %r14,%r12
mov    $0x1,%edi
mov    %r12,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x2ce2(%rip),%rax
and    (%rax),%ebp
cmove  %r14,%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
lea    0xceb(%rip),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
movups 0x0(%r13),%xmm0
movups 0x10(%r13),%xmm1
movups %xmm1,0x10(%rsp)
movups %xmm0,(%rsp)
call   1080 <getnumoflinks@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x8(%r13),%rdi
test   %rdi,%rdi
je     1371 <printinginfo+0x1f1>
call   10a0 <get_name@plt>
jmp    1387 <printinginfo+0x207>
lea    0xc94(%rip),%rsi
mov    $0x1,%edi
mov    $0x5,%edx
call   1040 <write@plt>
mov    0x10(%r13),%rdi
test   %rdi,%rdi
je     13bd <printinginfo+0x23d>
call   10a0 <get_name@plt>
cmpl   $0x1,0x24(%rsp)
jne    13da <printinginfo+0x25a>
movups 0x0(%r13),%xmm0
movups 0x10(%r13),%xmm1
movups %xmm1,0x10(%rsp)
movups %xmm0,(%rsp)
xor    %edi,%edi
mov    $0x1,%esi
call   1070 <getfilesize_with_h@plt>
jmp    13f2 <printinginfo+0x272>
lea    0xc48(%rip),%rsi
mov    $0x1,%edi
mov    $0x5,%edx
call   1040 <write@plt>
cmpl   $0x1,0x24(%rsp)
je     139c <printinginfo+0x21c>
movups 0x0(%r13),%xmm0
movups 0x10(%r13),%xmm1
movups %xmm1,0x10(%rsp)
movups %xmm0,(%rsp)
call   1050 <getfilesize@plt>
lea    0xc17(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x18(%r13),%edi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <getmodifiedtime@plt>

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

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