#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 */
typedef int time_t;

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int date(int *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ getargs(int, char *const *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stderr;
int main(int argc, char *const argv[]) {
  int err;
  time_t curr_time = 0;
  getargs(argc, argv);
  err = date(&curr_time);
  if (err < 0) {
    fprintf(stderr, "error: failed to update file timestamps\n");
    return (EXIT_FAILURE);
  }
  printf("%d seconds since Epoch\n", curr_time);
  return (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)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <getargs@plt>
lea    -0x18(%rbp),%rdi
call   1050 <date@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    11a5 <main+0x65>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
lea    0xe71(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e3d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11c0 <main+0x80>
mov    -0x18(%rbp),%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
call   1060 <getargs@plt>
lea    0x4(%rsp),%rdi
call   1050 <date@plt>
test   %eax,%eax
js     1175 <main+0x35>
mov    0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e5d(%rip),%rax
jmp    1191 <main+0x51>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
lea    0xe7b(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"error: failed to update file timestamps\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [24 x i8] c"%d seconds since Epoch\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @getargs(i32 %8, i8** %9)
%11 = call i32 @date(i32* %7)
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%17 = load i32, i32* @EXIT_FAILURE
store i32 %17, i32* %3
br label %22
18: ; preds = %2
%19 = load i32, i32* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @EXIT_SUCCESS
store i32 %21, i32* %3
br label %22
22: ; preds = %18, %14
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"error: failed to update file timestamps\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [24 x i8] c"%d seconds since Epoch\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = tail call i32 @getargs(i32 %0, i8** %1)
%6 = call i32 @date(i32* %3)
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %14
11: ; preds = %2
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %8
%15 = phi i32* [ @EXIT_FAILURE, %8 ], [ @EXIT_SUCCESS, %11 ]
%16 = load i32, i32* %15
ret i32 %16
}