#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 tm {
  char const *const tm_year;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char const *const, char const *const);
int /*<<< orphan*/ puts(char *);
void usage(const char *const options, const struct tm *const localtime) {
  const char *const licence =
      "clock - print time in various formats\n"
      "\nCopyright (C) 2012-%d Georges Boumis\n"
      "This program comes with ABSOLUTELY NO WARRANTY;\n"
      "This is free software, and you are welcome to redistribute it\n"
      "under certain conditions;";
  const char *const usage =
      "Usage: clock [-%s]\n"
      "\t-h\tshows this message.\n"
      "\t-t\tdefault. show full date. d/m/yyyy h:m:s\n"
      "\t-f\tuse 24h instead of 12h. does not work with -b\n"
      "\t-b\tbinary clock. hhhhh:mmmmmm:ssssss\n"
      "\t-x\thexadecimal clock. hh:mm:ss\n"
      "\t-o\toctal clock. hh:mm:ss\n"
      "\t-l\tlong format. instead of \":\" use newlines.\n";
  printf(licence, localtime->tm_year);
  puts("\n");
  printf(usage, options);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xf92(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
lea    0x108a(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rsi
lea    0xf64(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
mov    (%rsi),%rsi
lea    0xed2(%rip),%rdi
call   1040 <printf@plt>
lea    0x10b0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8e(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
%struct.tm = type { i8* }
@.str = [212 x i8] c"clock - print time in various formats\0A\0ACopyright (C) 2012-%d Georges Boumis\0AThis program comes with ABSOLUTELY NO WARRANTY;\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions;\00"
@.str.1 = [280 x i8] c"Usage: clock [-%s]\0A\09-h\09shows this message.\0A\09-t\09default. show full date. d/m/yyyy h:m:s\0A\09-f\09use 24h instead of 12h. does not work with -b\0A\09-b\09binary clock. hhhhh:mmmmmm:ssssss\0A\09-x\09hexadecimal clock. hh:mm:ss\0A\09-o\09octal clock. hh:mm:ss\0A\09-l\09long format. instead of \22:\22 use newlines.\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @usage(i8* %0, %struct.tm* %1) {
%3 = alloca i8*
%4 = alloca %struct.tm*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store %struct.tm* %1, %struct.tm** %4
store i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([280 x i8], [280 x i8]* @.str.1, i64 0, i64 0), i8** %6
%7 = load %struct.tm*, %struct.tm** %4
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 0
%9 = load i8*, i8** %8
%10 = call i32 @printf(i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i32 0, i32 0), i8* %9)
%11 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = load i8*, i8** %3
%13 = call i32 @printf(i8* getelementptr inbounds ([280 x i8], [280 x i8]* @.str.1, i32 0, i32 0), i8* %12)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i8* }
@.str = [212 x i8] c"clock - print time in various formats\0A\0ACopyright (C) 2012-%d Georges Boumis\0AThis program comes with ABSOLUTELY NO WARRANTY;\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions;\00"
@.str.1 = [280 x i8] c"Usage: clock [-%s]\0A\09-h\09shows this message.\0A\09-t\09default. show full date. d/m/yyyy h:m:s\0A\09-f\09use 24h instead of 12h. does not work with -b\0A\09-b\09binary clock. hhhhh:mmmmmm:ssssss\0A\09-x\09hexadecimal clock. hh:mm:ss\0A\09-o\09octal clock. hh:mm:ss\0A\09-l\09long format. instead of \22:\22 use newlines.\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @usage(i8* %0, %struct.tm* nocapture %1) {
%3 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%4 = load i8*, i8** %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @printf(i8* getelementptr inbounds ([280 x i8], [280 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}