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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stat(char *, struct stat *);
int main(int argc, char *argv[]) {
  if (argc < 2)
    return 1;
  struct stat st;
  stat(argv[1], &st);
  printf("Device ID %d\n", st.st_dev);
  printf("Inode     %d\n", st.st_ino);
  printf("Mode      %o\n", st.st_mode);
  printf("Links     %d\n", st.st_nlink);
  printf("User ID   %d\n", st.st_uid);
  printf("Group ID  %d\n", st.st_gid);
  printf("Dev MA MI %x\n", st.st_rdev);
  printf("Size      %d\n", st.st_size);
  printf("Blocksize %d\n", st.st_blksize);
  printf("Blocks    %d\n", st.st_blocks);
  printf("Acess     %d\n", st.st_atime);
  printf("Modified  %d\n", st.st_mtime);
  printf("Changed   %d\n", st.st_ctime);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    114c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1227 <main+0x107>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x48(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x48(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0x44(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    -0x40(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x3c(%rbp),%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     1213 <main+0xf3>
sub    $0x38,%rsp
mov    0x8(%rsi),%rdi
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    0x1c(%rsp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    0x20(%rsp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    0x24(%rsp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    0x28(%rsp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2c(%rsp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    0x30(%rsp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [14 x i8] c"Device ID %d\0A\00"
@.str.1 = [14 x i8] c"Inode %d\0A\00"
@.str.2 = [14 x i8] c"Mode %o\0A\00"
@.str.3 = [14 x i8] c"Links %d\0A\00"
@.str.4 = [14 x i8] c"User ID %d\0A\00"
@.str.5 = [14 x i8] c"Group ID %d\0A\00"
@.str.6 = [14 x i8] c"Dev MA MI %x\0A\00"
@.str.7 = [14 x i8] c"Size %d\0A\00"
@.str.8 = [14 x i8] c"Blocksize %d\0A\00"
@.str.9 = [14 x i8] c"Blocks %d\0A\00"
@.str.10 = [14 x i8] c"Acess %d\0A\00"
@.str.11 = [14 x i8] c"Modified %d\0A\00"
@.str.12 = [14 x i8] c"Changed %d\0A\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 slt i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %54
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @stat(i8* %13, %struct.stat* %6)
%15 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%19 = load i32, i32* %18
%20 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 2
%22 = load i32, i32* %21
%23 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 3
%25 = load i32, i32* %24
%26 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 4
%28 = load i32, i32* %27
%29 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 5
%31 = load i32, i32* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 6
%34 = load i32, i32* %33
%35 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 7
%37 = load i32, i32* %36
%38 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 8
%40 = load i32, i32* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 9
%43 = load i32, i32* %42
%44 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 %43)
%45 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 10
%46 = load i32, i32* %45
%47 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 %46)
%48 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 11
%49 = load i32, i32* %48
%50 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 12
%52 = load i32, i32* %51
%53 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 %52)
store i32 0, i32* %3
br label %54
54: ; preds = %10, %9
%55 = load i32, i32* %3
ret i32 %55
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [14 x i8] c"Device ID %d\0A\00"
@.str.1 = [14 x i8] c"Inode %d\0A\00"
@.str.2 = [14 x i8] c"Mode %o\0A\00"
@.str.3 = [14 x i8] c"Links %d\0A\00"
@.str.4 = [14 x i8] c"User ID %d\0A\00"
@.str.5 = [14 x i8] c"Group ID %d\0A\00"
@.str.6 = [14 x i8] c"Dev MA MI %x\0A\00"
@.str.7 = [14 x i8] c"Size %d\0A\00"
@.str.8 = [14 x i8] c"Blocksize %d\0A\00"
@.str.9 = [14 x i8] c"Blocks %d\0A\00"
@.str.10 = [14 x i8] c"Acess %d\0A\00"
@.str.11 = [14 x i8] c"Modified %d\0A\00"
@.str.12 = [14 x i8] c"Changed %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = icmp slt i32 %0, 2
br i1 %4, label %49, label %5
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 i32 @stat(i8* %8, %struct.stat* %3)
%10 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%14 = load i32, i32* %13
%15 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 2
%17 = load i32, i32* %16
%18 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 3
%20 = load i32, i32* %19
%21 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 4
%23 = load i32, i32* %22
%24 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %23)
%25 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 5
%26 = load i32, i32* %25
%27 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 6
%29 = load i32, i32* %28
%30 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 7
%32 = load i32, i32* %31
%33 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 8
%35 = load i32, i32* %34
%36 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 9
%38 = load i32, i32* %37
%39 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 10
%41 = load i32, i32* %40
%42 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 11
%44 = load i32, i32* %43
%45 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %44)
%46 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 12
%47 = load i32, i32* %46
%48 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 %47)
br label %49
49: ; preds = %2, %5
%50 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %50
}