#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 scalar_t__ time_t;

/* Variables and functions */
int EXIT_FAILURE;
char *ctime(scalar_t__ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
scalar_t__ time(int /*<<< orphan*/ *);
int programDescription() {
  time_t current_time;
  char *c_time_string;
  current_time = time(NULL);
  if (current_time == (time_t)-1) {
    (void)fprintf(stderr, "Failure to compute the current time.");
    return EXIT_FAILURE;
  }
  c_time_string = ctime(&current_time);
  if (c_time_string == NULL) {
    (void)fprintf(stderr, "Failure to convert the current time.");
    return EXIT_FAILURE;
  }
  printf("Created by: Aaron Jones \n");
  printf("Date: %s", c_time_string);
  printf("Description: This program will");
  printf("");
  printf("");
}


x86 assembly (clang, -O0):
<programDescription>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    1186 <programDescription+0x46>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    120e <programDescription+0xce>
lea    -0x10(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11c4 <programDescription+0x84>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
lea    0xe77(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e1e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    120e <programDescription+0xce>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<programDescription>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1070 <time@plt>
mov    %rax,0x8(%rsp)
cmp    $0xffffffffffffffff,%rax
je     11a6 <programDescription+0x56>
lea    0x8(%rsp),%rdi
call   1040 <ctime@plt>
test   %rax,%rax
je     11b8 <programDescription+0x68>
mov    %rax,%rbx
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11d6 <programDescription+0x86>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
lea    0xe4a(%rip),%rsi
jmp    11c8 <programDescription+0x78>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
lea    0xe5d(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2e04(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Failure to compute the current time.\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [37 x i8] c"Failure to convert the current time.\00"
@.str.2 = [26 x i8] c"Created by: Aaron Jones \0A\00"
@.str.3 = [9 x i8] c"Date: %s\00"
@.str.4 = [31 x i8] c"Description: This program will\00"
@.str.5 = [1 x i8] zeroinitializer
define i32 @programDescription() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i8*
%4 = call i64 @time(i32* null)
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = icmp eq i64 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
store i32 %10, i32* %1
br label %26
11: ; preds = %0
%12 = call i8* @ctime(i64* %2)
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* @EXIT_FAILURE
store i32 %18, i32* %1
br label %26
19: ; preds = %11
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%21 = load i8*, i8** %3
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
br label %26
26: ; preds = %19, %15, %7
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Failure to compute the current time.\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [37 x i8] c"Failure to convert the current time.\00"
@.str.3 = [9 x i8] c"Date: %s\00"
@.str.4 = [31 x i8] c"Description: This program will\00"
@str = [25 x i8] c"Created by: Aaron Jones \00"
define i32 @programDescription() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i64 @time(i32* null)
store i64 %3, i64* %1
%4 = icmp eq i64 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
br label %20
9: ; preds = %0
%10 = call i8* @ctime(i64* %1)
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* @EXIT_FAILURE
br label %20
16: ; preds = %9
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %20
20: ; preds = %16, %12, %5
%21 = phi i32 [ %8, %5 ], [ %15, %12 ], [ undef, %16 ]
ret i32 %21
}