#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 {
  scalar_t__ st_blocks;
  scalar_t__ st_blksize;
  scalar_t__ st_ctime;
  scalar_t__ st_mtime;
  scalar_t__ st_atime;
  scalar_t__ st_size;
  scalar_t__ st_gid;
  scalar_t__ st_uid;
  scalar_t__ st_nlink;
  scalar_t__ st_rdev;
  scalar_t__ st_dev;
  scalar_t__ st_ino;
  scalar_t__ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int stat(char *, struct stat *);
int main(void) {
  struct stat buf;
  if (stat("sl", &buf) == -1) {
    perror("fail to stat");
    exit(1);
  }
  printf("*********sl***********\n");
  printf("permission : %d\n", (int)buf.st_mode);
  printf("inode number : %d\n", (int)buf.st_ino);
  printf("device number : %d\n", (int)buf.st_dev);
  printf("r-device number : %d\n", (int)buf.st_rdev);
  printf("link : %d\n", (int)buf.st_nlink);
  printf("uid : %d\n", (int)buf.st_uid);
  printf("gid : %d\n", (int)buf.st_gid);
  printf("file size : %d\n", (int)buf.st_size);
  printf("access time : %d\n", (int)buf.st_atime);
  printf("motify time : %d\n", (int)buf.st_mtime);
  printf("change time : %d\n", (int)buf.st_ctime);
  printf("buf size : %d\n", (int)buf.st_blksize);
  printf("block size : %d\n", (int)buf.st_blocks);
  if (stat("test.txt", &buf) == -1) {
    perror("fail to stat");
    exit(1);
  }
  printf("*********test.txt***********\n");
  printf("permission : %d\n", (int)buf.st_mode);
  printf("inode number : %d\n", (int)buf.st_ino);
  printf("device number : %d\n", (int)buf.st_dev);
  printf("r-device number : %d\n", (int)buf.st_rdev);
  printf("link : %d\n", (int)buf.st_nlink);
  printf("uid : %d\n", (int)buf.st_uid);
  printf("gid : %d\n", (int)buf.st_gid);
  printf("file size : %d\n", (int)buf.st_size);
  printf("access time : %d\n", (int)buf.st_atime);
  printf("motify time : %d\n", (int)buf.st_mtime);
  printf("change time : %d\n", (int)buf.st_ctime);
  printf("buf size : %d\n", (int)buf.st_blksize);
  printf("block size : %d\n", (int)buf.st_blocks);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x70(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
jne    117e <main+0x3e>
lea    0xe94(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    %eax,%esi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
mov    %eax,%esi
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    %eax,%esi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%rax
mov    %eax,%esi
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rax
mov    %eax,%esi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x50(%rbp),%rax
mov    %eax,%esi
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rax
mov    %eax,%esi
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x60(%rbp),%rax
mov    %eax,%esi
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%rax
mov    %eax,%esi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%rax
mov    %eax,%esi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe50(%rip),%rdi
lea    -0x70(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
jne    12bf <main+0x17f>
lea    0xd53(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%esi
lea    0xd4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%esi
lea    0xd4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    %eax,%esi
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
mov    %eax,%esi
lea    0xd38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    %eax,%esi
lea    0xd2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%rax
mov    %eax,%esi
lea    0xd25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rax
mov    %eax,%esi
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x50(%rbp),%rax
mov    %eax,%esi
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rax
mov    %eax,%esi
lea    0xd15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x60(%rbp),%rax
mov    %eax,%esi
lea    0xd13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%rax
mov    %eax,%esi
lea    0xd11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%rax
mov    %eax,%esi
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
lea    0xea5(%rip),%rdi
mov    %rsp,%rsi
call   1050 <stat@plt>
cmp    $0xffffffff,%eax
je     1375 <main+0x225>
lea    0xf65(%rip),%rdi
call   1030 <puts@plt>
mov    0x60(%rsp),%esi
lea    0xe8d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x58(%rsp),%esi
lea    0xe8c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x50(%rsp),%esi
lea    0xe8f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rsp),%esi
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rsp),%esi
lea    0xe7f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rsp),%esi
lea    0xe78(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rsp),%esi
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rsp),%esi
lea    0xe68(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
lea    0xe66(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
lea    0xe66(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xe66(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xe66(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%esi
lea    0xe64(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe67(%rip),%rdi
mov    %rsp,%rsi
call   1050 <stat@plt>
cmp    $0xffffffff,%eax
je     1375 <main+0x225>
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
mov    0x60(%rsp),%esi
lea    0xd80(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x58(%rsp),%esi
lea    0xd7f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x50(%rsp),%esi
lea    0xd82(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rsp),%esi
lea    0xd6e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rsp),%esi
lea    0xd72(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rsp),%esi
lea    0xd6b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rsp),%esi
lea    0xd63(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rsp),%esi
lea    0xd5b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
lea    0xd59(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
lea    0xd59(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xd59(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xd59(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%esi
lea    0xd57(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret
lea    0xc87(%rip),%rdi
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@.str = [3 x i8] c"sl\00"
@.str.1 = [13 x i8] c"fail to stat\00"
@.str.2 = [24 x i8] c"*********sl***********\0A\00"
@.str.3 = [17 x i8] c"permission : %d\0A\00"
@.str.4 = [19 x i8] c"inode number : %d\0A\00"
@.str.5 = [20 x i8] c"device number : %d\0A\00"
@.str.6 = [22 x i8] c"r-device number : %d\0A\00"
@.str.7 = [11 x i8] c"link : %d\0A\00"
@.str.8 = [10 x i8] c"uid : %d\0A\00"
@.str.9 = [10 x i8] c"gid : %d\0A\00"
@.str.10 = [16 x i8] c"file size : %d\0A\00"
@.str.11 = [18 x i8] c"access time : %d\0A\00"
@.str.12 = [18 x i8] c"motify time : %d\0A\00"
@.str.13 = [18 x i8] c"change time : %d\0A\00"
@.str.14 = [15 x i8] c"buf size : %d\0A\00"
@.str.15 = [17 x i8] c"block size : %d\0A\00"
@.str.16 = [9 x i8] c"test.txt\00"
@.str.17 = [30 x i8] c"*********test.txt***********\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.stat
store i32 0, i32* %1
%3 = call i32 @stat(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %struct.stat* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%10 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 12
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 11
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 10
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 9
%23 = load i64, i64* %22
%24 = trunc i64 %23 to i32
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 8
%27 = load i64, i64* %26
%28 = trunc i64 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 7
%31 = load i64, i64* %30
%32 = trunc i64 %31 to i32
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 6
%35 = load i64, i64* %34
%36 = trunc i64 %35 to i32
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 5
%39 = load i64, i64* %38
%40 = trunc i64 %39 to i32
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 4
%43 = load i64, i64* %42
%44 = trunc i64 %43 to i32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 %44)
%46 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 3
%47 = load i64, i64* %46
%48 = trunc i64 %47 to i32
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %48)
%50 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 2
%51 = load i64, i64* %50
%52 = trunc i64 %51 to i32
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 1
%55 = load i64, i64* %54
%56 = trunc i64 %55 to i32
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i32 %56)
%58 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 0
%59 = load i64, i64* %58
%60 = trunc i64 %59 to i32
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i32 %60)
%62 = call i32 @stat(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), %struct.stat* %2)
%63 = icmp eq i32 %62, -1
br i1 %63, label %64, label %67
64: ; preds = %8
%65 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%66 = call i32 @exit(i32 1)
unreachable
67: ; preds = %8
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0))
%69 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 12
%70 = load i64, i64* %69
%71 = trunc i64 %70 to i32
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %71)
%73 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 11
%74 = load i64, i64* %73
%75 = trunc i64 %74 to i32
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %75)
%77 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 10
%78 = load i64, i64* %77
%79 = trunc i64 %78 to i32
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 9
%82 = load i64, i64* %81
%83 = trunc i64 %82 to i32
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %83)
%85 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 8
%86 = load i64, i64* %85
%87 = trunc i64 %86 to i32
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %87)
%89 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 7
%90 = load i64, i64* %89
%91 = trunc i64 %90 to i32
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %91)
%93 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 6
%94 = load i64, i64* %93
%95 = trunc i64 %94 to i32
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %95)
%97 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 5
%98 = load i64, i64* %97
%99 = trunc i64 %98 to i32
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %99)
%101 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 4
%102 = load i64, i64* %101
%103 = trunc i64 %102 to i32
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 %103)
%105 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 3
%106 = load i64, i64* %105
%107 = trunc i64 %106 to i32
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %107)
%109 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 2
%110 = load i64, i64* %109
%111 = trunc i64 %110 to i32
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %111)
%113 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 1
%114 = load i64, i64* %113
%115 = trunc i64 %114 to i32
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i32 %115)
%117 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 0
%118 = load i64, i64* %117
%119 = trunc i64 %118 to i32
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i32 %119)
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@.str = [3 x i8] c"sl\00"
@.str.1 = [13 x i8] c"fail to stat\00"
@.str.3 = [17 x i8] c"permission : %d\0A\00"
@.str.4 = [19 x i8] c"inode number : %d\0A\00"
@.str.5 = [20 x i8] c"device number : %d\0A\00"
@.str.6 = [22 x i8] c"r-device number : %d\0A\00"
@.str.7 = [11 x i8] c"link : %d\0A\00"
@.str.8 = [10 x i8] c"uid : %d\0A\00"
@.str.9 = [10 x i8] c"gid : %d\0A\00"
@.str.10 = [16 x i8] c"file size : %d\0A\00"
@.str.11 = [18 x i8] c"access time : %d\0A\00"
@.str.12 = [18 x i8] c"motify time : %d\0A\00"
@.str.13 = [18 x i8] c"change time : %d\0A\00"
@.str.14 = [15 x i8] c"buf size : %d\0A\00"
@.str.15 = [17 x i8] c"block size : %d\0A\00"
@.str.16 = [9 x i8] c"test.txt\00"
@str = [23 x i8] c"*********sl***********\00"
@str.18 = [29 x i8] c"*********test.txt***********\00"
define i32 @main() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = call i32 @stat(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%10 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 12
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 11
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 10
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 9
%23 = load i64, i64* %22
%24 = trunc i64 %23 to i32
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 8
%27 = load i64, i64* %26
%28 = trunc i64 %27 to i32
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 7
%31 = load i64, i64* %30
%32 = trunc i64 %31 to i32
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 6
%35 = load i64, i64* %34
%36 = trunc i64 %35 to i32
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 5
%39 = load i64, i64* %38
%40 = trunc i64 %39 to i32
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 4
%43 = load i64, i64* %42
%44 = trunc i64 %43 to i32
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 %44)
%46 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 3
%47 = load i64, i64* %46
%48 = trunc i64 %47 to i32
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %48)
%50 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 2
%51 = load i64, i64* %50
%52 = trunc i64 %51 to i32
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 1
%55 = load i64, i64* %54
%56 = trunc i64 %55 to i32
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i32 %56)
%58 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%59 = load i64, i64* %58
%60 = trunc i64 %59 to i32
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i32 %60)
%62 = call i32 @stat(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), %struct.stat* %1)
%63 = icmp eq i32 %62, -1
br i1 %63, label %64, label %67
64: ; preds = %8
%65 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%66 = tail call i32 @exit(i32 1)
unreachable
67: ; preds = %8
%68 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.18, i64 0, i64 0))
%69 = load i64, i64* %10
%70 = trunc i64 %69 to i32
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %70)
%72 = load i64, i64* %14
%73 = trunc i64 %72 to i32
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %73)
%75 = load i64, i64* %18
%76 = trunc i64 %75 to i32
%77 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %76)
%78 = load i64, i64* %22
%79 = trunc i64 %78 to i32
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %79)
%81 = load i64, i64* %26
%82 = trunc i64 %81 to i32
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %82)
%84 = load i64, i64* %30
%85 = trunc i64 %84 to i32
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %85)
%87 = load i64, i64* %34
%88 = trunc i64 %87 to i32
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %88)
%90 = load i64, i64* %38
%91 = trunc i64 %90 to i32
%92 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %91)
%93 = load i64, i64* %42
%94 = trunc i64 %93 to i32
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 %94)
%96 = load i64, i64* %46
%97 = trunc i64 %96 to i32
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %97)
%99 = load i64, i64* %50
%100 = trunc i64 %99 to i32
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %100)
%102 = load i64, i64* %54
%103 = trunc i64 %102 to i32
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i32 %103)
%105 = load i64, i64* %58
%106 = trunc i64 %105 to i32
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i32 %106)
ret i32 0
}