#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 /*<<< orphan*/ st_mtime;
  int /*<<< orphan*/ st_atime;
  int /*<<< orphan*/ st_ctime;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int stat(char *, struct stat *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  struct stat stbuf;
  if (argc < 2) {
    fprintf(stderr, "Uso: %s <pathname>\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  if (stat(argv[1], &stbuf) == -1) {
    fprintf(stderr, "Err.: fsize %s\n", argv[1]);
    exit(EXIT_FAILURE);
  }
  printf("    Last status change: %s", ctime(&stbuf.st_ctime));
  printf("      Last file access: %s", ctime(&stbuf.st_atime));
  printf("Last file modification: %s", ctime(&stbuf.st_mtime));
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    119a <main+0x4a>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe79(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x20(%rbp),%rsi
call   1060 <stat@plt>
cmp    $0xffffffff,%eax
jne    11df <main+0x8f>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe48(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e00(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
lea    -0x20(%rbp),%rdi
add    $0x8,%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xe2e(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
add    $0x4,%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xe2d(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xe30(%rip),%rdi
call   1040 <printf@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     1172 <main+0x22>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xe90(%rip),%rsi
jmp    1197 <main+0x47>
mov    0x8(%rbx),%rdi
mov    %rsp,%rsi
call   1060 <stat@plt>
cmp    $0xffffffff,%eax
jne    11aa <main+0x5a>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xe7d(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e35(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
lea    0x8(%rsp),%rdi
call   1030 <ctime@plt>
lea    0xe69(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
lea    0xe6b(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rsp,%rdi
call   1030 <ctime@plt>
lea    0xe6f(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32 }
@stderr = global i32 0
@.str = [20 x i8] c"Uso: %s <pathname>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [16 x i8] c"Err.: fsize %s\0A\00"
@.str.2 = [27 x i8] c" Last status change: %s\00"
@.str.3 = [27 x i8] c" Last file access: %s\00"
@.str.4 = [27 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
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 %17
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i32 @stat(i8* %20, %struct.stat* %6)
%22 = icmp eq i32 %21, -1
br i1 %22, label %23, label %31
23: ; preds = %17
%24 = load i32, i32* @stderr
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %27)
%29 = load i32, i32* @EXIT_FAILURE
%30 = call i32 @exit(i32 %29)
unreachable
31: ; preds = %17
%32 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 2
%33 = call i8* @ctime(i32* %32)
%34 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %33)
%35 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%36 = call i8* @ctime(i32* %35)
%37 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %36)
%38 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%39 = call i8* @ctime(i32* %38)
%40 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %39)
%41 = load i32, i32* @EXIT_SUCCESS
%42 = call i32 @exit(i32 %41)
unreachable
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32 }
@stderr = global i32 0
@.str = [20 x i8] c"Uso: %s <pathname>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [16 x i8] c"Err.: fsize %s\0A\00"
@.str.2 = [27 x i8] c" Last status change: %s\00"
@.str.3 = [27 x i8] c" Last file access: %s\00"
@.str.4 = [27 x i8] c"Last file modification: %s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 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 %23
17: ; preds = %12
%18 = load i32, i32* @stderr
%19 = load i8*, i8** %13
%20 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = load i32, i32* @EXIT_FAILURE
%22 = tail call i32 @exit(i32 %21)
unreachable
23: ; preds = %12
%24 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 2
%25 = call i8* @ctime(i32* %24)
%26 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %25)
%27 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%28 = call i8* @ctime(i32* %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %28)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%31 = call i8* @ctime(i32* %30)
%32 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %31)
%33 = load i32, i32* @EXIT_SUCCESS
%34 = call i32 @exit(i32 %33)
unreachable
}