#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 {
  char *st_size;
  char *st_nlink;
  char *st_ino;
  int st_mode;
};

/* 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_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ stat(char *, struct stat *);
int main(int argc, char **argv) {
  if (argc != 2)
    return 1;
  struct stat fstat;
  if (stat(argv[1], &fstat) < 0)
    return 1;
  printf("Information for %s\n", argv[1]);
  printf("---------------------------\n");
  printf("File Size: \t\t%ld bytes\n", fstat.st_size);
  printf("Number of Links: \t%lu\n", fstat.st_nlink);
  printf("File inode: \t\t%lu\n", fstat.st_ino);
  printf("Human Readable File Permissions: \t");
  printf((S_ISDIR(fstat.st_mode)) ? "d" : "-");
  printf((fstat.st_mode & S_IRUSR) ? "r" : "-");
  printf((fstat.st_mode & S_IWUSR) ? "w" : "-");
  printf((fstat.st_mode & S_IXUSR) ? "x" : "-");
  printf((fstat.st_mode & S_ISUID) ? "s" : "");
  printf((fstat.st_mode & S_IRGRP) ? "r" : "-");
  printf((fstat.st_mode & S_IWGRP) ? "w" : "-");
  printf((fstat.st_mode & S_IXGRP) ? "x" : "-");
  printf((fstat.st_mode & S_ISGID) ? "s" : "");
  printf((fstat.st_mode & S_IROTH) ? "r" : "-");
  printf((fstat.st_mode & S_IWOTH) ? "w" : "-");
  printf((fstat.st_mode & S_IXOTH) ? "x" : "-");
  printf("\n\n");
  printf("The file %s a symbolic link\n",
         (S_ISLNK(fstat.st_mode)) ? "is" : "is not");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     116c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    141f <main+0x2df>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x30(%rbp),%rsi
call   1060 <stat@plt>
cmp    $0x0,%rax
jge    1193 <main+0x53>
movl   $0x1,-0x4(%rbp)
jmp    141f <main+0x2df>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
call   1050 <S_ISDIR@plt>
mov    %rax,%rcx
lea    0xe8b(%rip),%rdi
lea    0xe82(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2d6b(%rip),%rax
and    (%rax),%ecx
lea    0xe62(%rip),%rdi
lea    0xe5d(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2d73(%rip),%rax
and    (%rax),%ecx
lea    0xe3a(%rip),%rdi
lea    0xe37(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2d63(%rip),%rax
and    (%rax),%ecx
lea    0xe12(%rip),%rdi
lea    0xe11(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2d33(%rip),%rax
and    (%rax),%ecx
lea    0xde7(%rip),%rdi
lea    0xe0c(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2cdb(%rip),%rax
and    (%rax),%ecx
lea    0xdc2(%rip),%rdi
lea    0xdbd(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2cdb(%rip),%rax
and    (%rax),%ecx
lea    0xd9a(%rip),%rdi
lea    0xd97(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2ca3(%rip),%rax
and    (%rax),%ecx
lea    0xd72(%rip),%rdi
lea    0xd71(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2c6b(%rip),%rax
and    (%rax),%ecx
lea    0xd47(%rip),%rdi
lea    0xd6c(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2c33(%rip),%rax
and    (%rax),%ecx
lea    0xd22(%rip),%rdi
lea    0xd1d(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2bf3(%rip),%rax
and    (%rax),%ecx
lea    0xcfa(%rip),%rdi
lea    0xcf7(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    0x2c2b(%rip),%rax
and    (%rax),%ecx
lea    0xcd2(%rip),%rdi
lea    0xcd1(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
call   1030 <S_ISLNK@plt>
mov    %rax,%rcx
lea    0xcc8(%rip),%rsi
lea    0xcbe(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xc92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x1,%r14d
cmp    $0x2,%edi
jne    13a7 <main+0x257>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0x8(%rsp),%rsi
call   1070 <stat@plt>
test   %rax,%rax
js     13a1 <main+0x251>
mov    0x8(%rbx),%rsi
lea    0xe6e(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf05(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%rsi
lea    0xe60(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%rsi
lea    0xe65(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rsp),%rsi
lea    0xe69(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe6e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%rsp),%edi
call   1060 <S_ISDIR@plt>
test   %rax,%rax
lea    0xec0(%rip),%r13
lea    0xe70(%rip),%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d7d(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
lea    0xe53(%rip),%r15
mov    %r15,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
lea    0xe33(%rip),%r12
mov    %r12,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d81(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
lea    0xe13(%rip),%rbx
mov    %rbx,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
lea    0xdea(%rip),%rax
lea    0xe0a(%rip),%rbp
mov    %rbp,%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2cfe(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
mov    %r15,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d0b(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
mov    %r12,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2ce0(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
mov    %rbx,%rdi
cmove  %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2cb5(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
lea    0xd70(%rip),%rax
cmove  %rax,%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c83(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
cmove  %r13,%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c50(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
cmove  %r13,%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c95(%rip),%rax
mov    (%rax),%eax
and    0x20(%rsp),%eax
cmove  %r13,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd2e(%rip),%rdi
call   1040 <puts@plt>
mov    0x20(%rsp),%edi
call   1030 <S_ISLNK@plt>
test   %rax,%rax
lea    0xd1b(%rip),%rax
lea    0xd11(%rip),%rsi
cmove  %rax,%rsi
lea    0xce9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13a7 <main+0x257>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.stat = type { i8*, i8*, i8*, i32 }
@.str = [20 x i8] c"Information for %s\0A\00"
@.str.2 = [24 x i8] c"File Size: \09\09%ld bytes\0A\00"
@.str.3 = [23 x i8] c"Number of Links: \09%lu\0A\00"
@.str.4 = [19 x i8] c"File inode: \09\09%lu\0A\00"
@.str.5 = [35 x i8] c"Human Readable File Permissions: \09\00"
@.str.6 = [2 x i8] c"d\00"
@.str.7 = [2 x i8] c"-\00"
@S_IRUSR = global i32 0
@.str.8 = [2 x i8] c"r\00"
@S_IWUSR = global i32 0
@.str.9 = [2 x i8] c"w\00"
@S_IXUSR = global i32 0
@.str.10 = [2 x i8] c"x\00"
@S_ISUID = global i32 0
@.str.11 = [2 x i8] c"s\00"
@.str.12 = [1 x i8] zeroinitializer
@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
@.str.14 = [29 x i8] c"The file %s a symbolic link\0A\00"
@.str.15 = [3 x i8] c"is\00"
@.str.16 = [7 x i8] c"is not\00"
@str = [28 x i8] c"---------------------------\00"
@str.17 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = icmp eq i32 %0, 2
br i1 %4, label %5, label %105
5: ; preds = %2
%6 = bitcast %struct.stat* %3 to i8*
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i64 @stat(i8* %8, %struct.stat* %3)
%10 = icmp slt i64 %9, 0
br i1 %10, label %103, label %11
11: ; preds = %5
%12 = load i8*, i8** %7
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%15 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%16 = load i8*, i8** %15
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %16)
%18 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%19 = load i8*, i8** %18
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* %19)
%21 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 2
%22 = load i8*, i8** %21
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %22)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%25 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 3
%26 = load i32, i32* %25
%27 = call i64 @S_ISDIR(i32 %26)
%28 = icmp eq i64 %27, 0
%29 = select i1 %28, 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.6, i64 0, i64 0)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %29)
%31 = load i32, i32* %25
%32 = load i32, i32* @S_IRUSR
%33 = and i32 %32, %31
%34 = icmp eq i32 %33, 0
%35 = select i1 %34, 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.8, i64 0, i64 0)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %35)
%37 = load i32, i32* %25
%38 = load i32, i32* @S_IWUSR
%39 = and i32 %38, %37
%40 = icmp eq i32 %39, 0
%41 = select i1 %40, 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.9, i64 0, i64 0)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %41)
%43 = load i32, i32* %25
%44 = load i32, i32* @S_IXUSR
%45 = and i32 %44, %43
%46 = icmp eq i32 %45, 0
%47 = select i1 %46, 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.10, i64 0, i64 0)
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %47)
%49 = load i32, i32* %25
%50 = load i32, i32* @S_ISUID
%51 = and i32 %50, %49
%52 = icmp eq i32 %51, 0
%53 = select i1 %52, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %53)
%55 = load i32, i32* %25
%56 = load i32, i32* @S_IRGRP
%57 = and i32 %56, %55
%58 = icmp eq i32 %57, 0
%59 = select i1 %58, 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.8, i64 0, i64 0)
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %59)
%61 = load i32, i32* %25
%62 = load i32, i32* @S_IWGRP
%63 = and i32 %62, %61
%64 = icmp eq i32 %63, 0
%65 = select i1 %64, 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.9, i64 0, i64 0)
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %65)
%67 = load i32, i32* %25
%68 = load i32, i32* @S_IXGRP
%69 = and i32 %68, %67
%70 = icmp eq i32 %69, 0
%71 = select i1 %70, 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.10, i64 0, i64 0)
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %71)
%73 = load i32, i32* %25
%74 = load i32, i32* @S_ISGID
%75 = and i32 %74, %73
%76 = icmp eq i32 %75, 0
%77 = select i1 %76, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0)
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %77)
%79 = load i32, i32* %25
%80 = load i32, i32* @S_IROTH
%81 = and i32 %80, %79
%82 = icmp eq i32 %81, 0
%83 = select i1 %82, 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.8, i64 0, i64 0)
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %83)
%85 = load i32, i32* %25
%86 = load i32, i32* @S_IWOTH
%87 = and i32 %86, %85
%88 = icmp eq i32 %87, 0
%89 = select i1 %88, 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.9, i64 0, i64 0)
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %89)
%91 = load i32, i32* %25
%92 = load i32, i32* @S_IXOTH
%93 = and i32 %92, %91
%94 = icmp eq i32 %93, 0
%95 = select i1 %94, 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.10, i64 0, i64 0)
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %95)
%97 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.17, i64 0, i64 0))
%98 = load i32, i32* %25
%99 = call i64 @S_ISLNK(i32 %98)
%100 = icmp eq i64 %99, 0
%101 = select i1 %100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0)
%102 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0), i8* %101)
br label %103
103: ; preds = %5, %11
%104 = phi i32 [ 0, %11 ], [ 1, %5 ]
br label %105
105: ; preds = %2, %103
%106 = phi i32 [ %104, %103 ], [ 1, %2 ]
ret i32 %106
}