#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct stat {
  int st_mode;
  int /*<<< orphan*/ st_mtime;
  int /*<<< orphan*/ st_atime;
  int /*<<< orphan*/ st_ctime;
  scalar_t__ st_blocks;
  scalar_t__ st_size;
  scalar_t__ st_blksize;
  scalar_t__ st_gid;
  scalar_t__ st_uid;
  scalar_t__ st_nlink;
  scalar_t__ st_ino;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
#define S_IFBLK 134
#define S_IFCHR 133
#define S_IFDIR 132
#define S_IFIFO 131
#define S_IFLNK 130
int S_IFMT;
#define S_IFREG 129
#define S_IFSOCK 128
char *ctime(int /*<<< orphan*/ *);
int errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int stat(char *, struct stat *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  struct stat sb;
  int ret;
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <pathname>\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  ret = stat(argv[1], &sb);
  if (ret == -1) {
    printf("ret -1 stat");
    perror("stat error");
    printf("\nerrno:%d\n", errno);
    exit(EXIT_FAILURE);
  }
  printf("ret :%d stat\n", ret);
  printf("File type:                ");
  switch (sb.st_mode & S_IFMT) {
  case S_IFBLK:
    printf("block device\n");
    break;
  case S_IFCHR:
    printf("character device\n");
    break;
  case S_IFDIR:
    printf("directory\n");
    break;
  case S_IFIFO:
    printf("FIFO/pipe\n");
    break;
  case S_IFLNK:
    printf("symlink\n");
    break;
  case S_IFREG:
    printf("regular file\n");
    break;
  case S_IFSOCK:
    printf("socket\n");
    break;
  default:
    printf("unknown?\n");
    break;
  }
  printf("I-node number:            %ld\n", (long)sb.st_ino);
  printf("Mode:                     %lo (octal)\n", (unsigned long)sb.st_mode);
  printf("Link count:               %ld\n", (long)sb.st_nlink);
  printf("Ownership:                UID=%ld   GID=%ld\n", (long)sb.st_uid,
         (long)sb.st_gid);
  printf("Preferred I/O block size: %ld bytes\n", (long)sb.st_blksize);
  printf("File size:                %lld bytes\n", (long long)sb.st_size);
  printf("Blocks allocated:         %lld\n", (long long)sb.st_blocks);
  printf("Last status change:       %s", ctime(&sb.st_ctime));
  printf("Last file access:         %s", ctime(&sb.st_atime));
  printf("Last file modification:   %s", ctime(&sb.st_mtime));
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11aa <main+0x4a>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe85(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x58(%rbp),%rsi
call   1060 <stat@plt>
mov    %eax,-0x5c(%rbp)
cmpl   $0xffffffff,-0x5c(%rbp)
jne    1207 <main+0xa7>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe61(%rip),%rdi
call   1070 <perror@plt>
mov    0x2de7(%rip),%rax
mov    (%rax),%esi
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    -0x5c(%rbp),%esi
lea    0xe43(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x69(%rbp)
call   1040 <printf@plt>
mov    -0x69(%rbp),%al
lea    0xe3d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x58(%rbp),%eax
mov    0x2dac(%rip),%rcx
mov    (%rcx),%ecx
and    %ecx,%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x68(%rbp)
sub    $0x6,%eax
ja     12e3 <main+0x183>
mov    -0x68(%rbp),%rax
lea    0xdab(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12f1 <main+0x191>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12f1 <main+0x191>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12f1 <main+0x191>
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12f1 <main+0x191>
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12f1 <main+0x191>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12f1 <main+0x191>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12f1 <main+0x191>
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x58(%rbp),%rsi
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%rsi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rsi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rsi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x58(%rbp),%rdi
add    $0xc,%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x58(%rbp),%rdi
add    $0x8,%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x58(%rbp),%rdi
add    $0x4,%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
cmp    $0x2,%edi
jne    11c0 <main+0x50>
mov    0x8(%rsi),%rdi
lea    0x8(%rsp),%rsi
call   1070 <stat@plt>
cmp    $0xffffffff,%eax
jne    11e6 <main+0x76>
lea    0xe82(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe80(%rip),%rdi
call   1080 <perror@plt>
mov    0x2e22(%rip),%rax
mov    (%rax),%esi
lea    0xe76(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11d8 <main+0x68>
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xe2d(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
lea    0xe4b(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe49(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movslq 0x8(%rsp),%rbx
mov    0x2dd0(%rip),%rax
mov    (%rax),%eax
and    %ebx,%eax
add    $0xffffff80,%eax
cmp    $0x6,%eax
ja     122e <main+0xbe>
cltq
lea    0xfe7(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1235 <main+0xc5>
lea    0xfce(%rip),%rdi
call   1030 <puts@plt>
mov    0x48(%rsp),%rsi
lea    0xe1b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x40(%rsp),%rsi
lea    0xe3d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x30(%rsp),%rdx
mov    0x38(%rsp),%rsi
lea    0xe44(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%rsp),%rsi
lea    0xe5e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%rsp),%rsi
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rsp),%rsi
lea    0xe83(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x14(%rsp),%rdi
call   1040 <ctime@plt>
lea    0xe8b(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x10(%rsp),%rdi
call   1040 <ctime@plt>
lea    0xe8d(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc(%rsp),%rdi
call   1040 <ctime@plt>
lea    0xe8f(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2ca6(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64 }
@stderr = global i32 0
@.str = [22 x i8] c"Usage: %s <pathname>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [12 x i8] c"ret -1 stat\00"
@.str.2 = [11 x i8] c"stat error\00"
@.str.3 = [11 x i8] c"\0Aerrno:%d\0A\00"
@errno = global i32 0
@.str.4 = [14 x i8] c"ret :%d stat\0A\00"
@.str.5 = [27 x i8] c"File type: \00"
@S_IFMT = global i32 0
@.str.6 = [14 x i8] c"block device\0A\00"
@.str.7 = [18 x i8] c"character device\0A\00"
@.str.8 = [11 x i8] c"directory\0A\00"
@.str.9 = [11 x i8] c"FIFO/pipe\0A\00"
@.str.10 = [9 x i8] c"symlink\0A\00"
@.str.11 = [14 x i8] c"regular file\0A\00"
@.str.12 = [8 x i8] c"socket\0A\00"
@.str.13 = [10 x i8] c"unknown?\0A\00"
@.str.14 = [31 x i8] c"I-node number: %ld\0A\00"
@.str.15 = [39 x i8] c"Mode: %lo (octal)\0A\00"
@.str.16 = [31 x i8] c"Link count: %ld\0A\00"
@.str.17 = [45 x i8] c"Ownership: UID=%ld GID=%ld\0A\00"
@.str.18 = [37 x i8] c"Preferred I/O block size: %ld bytes\0A\00"
@.str.19 = [38 x i8] c"File size: %lld bytes\0A\00"
@.str.20 = [32 x i8] c"Blocks allocated: %lld\0A\00"
@.str.21 = [29 x i8] c"Last status change: %s\00"
@.str.22 = [29 x i8] c"Last file access: %s\00"
@.str.23 = [29 x i8] c"Last file modification: %s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.stat
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %18
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @stat(i8* %21, %struct.stat* %6)
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %32
25: ; preds = %18
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%27 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%28 = load i32, i32* @errno
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = load i32, i32* @EXIT_FAILURE
%31 = call i32 @exit(i32 %30)
unreachable
32: ; preds = %18
%33 = load i32, i32* %7
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%36 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%37 = load i32, i32* %36
%38 = load i32, i32* @S_IFMT
%39 = and i32 %37, %38
switch i32 %39, label %54 [
i32 134, label %40
i32 133, label %42
i32 132, label %44
i32 131, label %46
i32 130, label %48
i32 129, label %50
i32 128, label %52
]
40: ; preds = %32
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
br label %56
42: ; preds = %32
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
br label %56
44: ; preds = %32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
br label %56
46: ; preds = %32
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
br label %56
48: ; preds = %32
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
br label %56
50: ; preds = %32
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
br label %56
52: ; preds = %32
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
br label %56
54: ; preds = %32
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %56
56: ; preds = %54, %52, %50, %48, %46, %44, %42, %40
%57 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 10
%58 = load i64, i64* %57
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i64 %58)
%60 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%61 = load i32, i32* %60
%62 = sext i32 %61 to i64
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0), i64 %62)
%64 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 9
%65 = load i64, i64* %64
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i64 %65)
%67 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 8
%68 = load i64, i64* %67
%69 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 7
%70 = load i64, i64* %69
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0), i64 %68, i64 %70)
%72 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 6
%73 = load i64, i64* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0), i64 %73)
%75 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 5
%76 = load i64, i64* %75
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.19, i64 0, i64 0), i64 %76)
%78 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 4
%79 = load i64, i64* %78
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.20, i64 0, i64 0), i64 %79)
%81 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 3
%82 = call i8* @ctime(i32* %81)
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.21, i64 0, i64 0), i8* %82)
%84 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 2
%85 = call i8* @ctime(i32* %84)
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), i8* %85)
%87 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%88 = call i8* @ctime(i32* %87)
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0), i8* %88)
%90 = load i32, i32* @EXIT_SUCCESS
%91 = call i32 @exit(i32 %90)
unreachable
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64 }
@stderr = global i32 0
@.str = [22 x i8] c"Usage: %s <pathname>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [12 x i8] c"ret -1 stat\00"
@.str.2 = [11 x i8] c"stat error\00"
@.str.3 = [11 x i8] c"\0Aerrno:%d\0A\00"
@errno = global i32 0
@.str.4 = [14 x i8] c"ret :%d stat\0A\00"
@.str.5 = [27 x i8] c"File type: \00"
@S_IFMT = global i32 0
@.str.14 = [31 x i8] c"I-node number: %ld\0A\00"
@.str.15 = [39 x i8] c"Mode: %lo (octal)\0A\00"
@.str.16 = [31 x i8] c"Link count: %ld\0A\00"
@.str.17 = [45 x i8] c"Ownership: UID=%ld GID=%ld\0A\00"
@.str.18 = [37 x i8] c"Preferred I/O block size: %ld bytes\0A\00"
@.str.19 = [38 x i8] c"File size: %lld bytes\0A\00"
@.str.20 = [32 x i8] c"Blocks allocated: %lld\0A\00"
@.str.21 = [29 x i8] c"Last status change: %s\00"
@.str.22 = [29 x i8] c"Last file access: %s\00"
@.str.23 = [29 x i8] c"Last file modification: %s\00"
@EXIT_SUCCESS = global i32 0
@str = [7 x i8] c"socket\00"
@str.24 = [13 x i8] c"regular file\00"
@str.25 = [8 x i8] c"symlink\00"
@str.26 = [10 x i8] c"FIFO/pipe\00"
@str.27 = [10 x i8] c"directory\00"
@str.28 = [17 x i8] c"character device\00"
@str.29 = [13 x i8] c"block device\00"
@str.30 = [9 x i8] c"unknown?\00"
@reltable.main = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @str.24 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @str.25 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @str.26 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @str.27 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @str.28 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @str.29 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32)]
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = icmp eq i32 %0, 2
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @stat(i8* %14, %struct.stat* %3)
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %24
17: ; preds = %12
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%19 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%20 = load i32, i32* @errno
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %20)
%22 = load i32, i32* @EXIT_FAILURE
%23 = tail call i32 @exit(i32 %22)
unreachable
24: ; preds = %12
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%27 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%28 = load i32, i32* %27
%29 = load i32, i32* @S_IFMT
%30 = and i32 %29, %28
%31 = add i32 %30, -128
%32 = icmp ult i32 %31, 7
br i1 %32, label %33, label %37
33: ; preds = %24
%34 = sext i32 %31 to i64
%35 = shl i64 %34, 2
%36 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.main to i8*), i64 %35)
br label %37
37: ; preds = %24, %33
%38 = phi i8* [ %36, %33 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @str.30, i64 0, i64 0), %24 ]
%39 = tail call i32 @puts(i8* dereferenceable(1) %38)
%40 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 10
%41 = load i64, i64* %40
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i64 %41)
%43 = sext i32 %28 to i64
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0), i64 %43)
%45 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 9
%46 = load i64, i64* %45
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i64 %46)
%48 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 8
%49 = load i64, i64* %48
%50 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 7
%51 = load i64, i64* %50
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0), i64 %49, i64 %51)
%53 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 6
%54 = load i64, i64* %53
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0), i64 %54)
%56 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 5
%57 = load i64, i64* %56
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.19, i64 0, i64 0), i64 %57)
%59 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 4
%60 = load i64, i64* %59
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.20, i64 0, i64 0), i64 %60)
%62 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 3
%63 = call i8* @ctime(i32* %62)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.21, i64 0, i64 0), i8* %63)
%65 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 2
%66 = call i8* @ctime(i32* %65)
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), i8* %66)
%68 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%69 = call i8* @ctime(i32* %68)
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0), i8* %69)
%71 = load i32, i32* @EXIT_SUCCESS
%72 = call i32 @exit(i32 %71)
unreachable
}