#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *const);
int /*<<< orphan*/ puts(char *);
void usage(const char *const progname) {
  printf("%s:\n", progname);
  puts("\tSmall console program that specifically sorts and selects "
       "timestamped\n"
       "\tfile/directory sets based on a retention scheme, in order to remove "
       "them\n"
       "\tand stay on a strict and predictable retention schedule.\n\n"
       "\tFilenames are piped in (one per line.  Spaces are interpreted as "
       "being\n"
       "\tembedded in the filename. Filenames with embedded newlines are not\n"
       "\taccepted).\n\n"
       "\tFilenames ordinarily are expected to have an embedded timestamp, "
       "though\n"
       "\tthis behavior can be changed through the -s option.\n\n"
       "\t-0              Use a null character to separate output instead of "
       "newline\n"
       "\t                (for better input into xargs)\n"
       "\t-d [selector]   Add a daily selector to the list\n"
       "\t-w [selector]   Add a weekly selector to the list\n"
       "\t-m [selector]   Add a monthly selector to the list\n"
       "\t-y [selector]   Add a yearly selector to the list\n"
       "\t-f [formatter]  Specify the time formatter (normally defaults to\n"
       "\t                \"%Y-%m-%d\"). If -s is used, this formatter may not "
       "have\n"
       "\t                slashes.\n"
       "\t-h              Display this help menu.\n"
       "\t-k              Output files to keep instead of ones to remove.\n"
       "\t-r              Output files to remove instead of ones to keep.\n"
       "\t-s              Take the timestamp as a separate string, specified "
       "first on\n"
       "\t                the line and separated from the actual filename by a "
       "slash (like\n"
       "\t                timestamp/filename, or timestamp//path/to/file for "
       "an absolute\n"
       "\t                path).\n\n"
       "\tretain   Copyright (C) 2015  Taylor C. Richberger <taywee@gmx.com>\n"
       "\tThis program comes with ABSOLUTELY NO WARRANTY.  This is free\n"
       "\tsoftware, and you are welcome to redistribute it under the terms\n"
       "\tof the GNU General Public License as published by the Free Software\n"
       "\tFoundation, either version 3 of the License, or (at your option)\n"
       "\tany later version.");
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"%s:\0A\00"
@.str.1 = [1763 x i8] c"\09Small console program that specifically sorts and selects timestamped\0A\09file/directory sets based on a retention scheme, in order to remove them\0A\09and stay on a strict and predictable retention schedule.\0A\0A\09Filenames are piped in (one per line. Spaces are interpreted as being\0A\09embedded in the filename. Filenames with embedded newlines are not\0A\09accepted).\0A\0A\09Filenames ordinarily are expected to have an embedded timestamp, though\0A\09this behavior can be changed through the -s option.\0A\0A\09-0 Use a null character to separate output instead of newline\0A\09 (for better input into xargs)\0A\09-d [selector] Add a daily selector to the list\0A\09-w [selector] Add a weekly selector to the list\0A\09-m [selector] Add a monthly selector to the list\0A\09-y [selector] Add a yearly selector to the list\0A\09-f [formatter] Specify the time formatter (normally defaults to\0A\09 \22%Y-%m-%d\22). If -s is used, this formatter may not have\0A\09 slashes.\0A\09-h Display this help menu.\0A\09-k Output files to keep instead of ones to remove.\0A\09-r Output files to remove instead of ones to keep.\0A\09-s Take the timestamp as a separate string, specified first on\0A\09 the line and separated from the actual filename by a slash (like\0A\09 timestamp/filename, or timestamp//path/to/file for an absolute\0A\09 path).\0A\0A\09retain Copyright (C) 2015 Taylor C. Richberger <taywee@gmx.com>\0A\09This program comes with ABSOLUTELY NO WARRANTY. This is free\0A\09software, and you are welcome to redistribute it under the terms\0A\09of the GNU General Public License as published by the Free Software\0A\09Foundation, either version 3 of the License, or (at your option)\0A\09any later version.\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([1763 x i8], [1763 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s:\0A\00"
@.str.1 = [1763 x i8] c"\09Small console program that specifically sorts and selects timestamped\0A\09file/directory sets based on a retention scheme, in order to remove them\0A\09and stay on a strict and predictable retention schedule.\0A\0A\09Filenames are piped in (one per line. Spaces are interpreted as being\0A\09embedded in the filename. Filenames with embedded newlines are not\0A\09accepted).\0A\0A\09Filenames ordinarily are expected to have an embedded timestamp, though\0A\09this behavior can be changed through the -s option.\0A\0A\09-0 Use a null character to separate output instead of newline\0A\09 (for better input into xargs)\0A\09-d [selector] Add a daily selector to the list\0A\09-w [selector] Add a weekly selector to the list\0A\09-m [selector] Add a monthly selector to the list\0A\09-y [selector] Add a yearly selector to the list\0A\09-f [formatter] Specify the time formatter (normally defaults to\0A\09 \22%Y-%m-%d\22). If -s is used, this formatter may not have\0A\09 slashes.\0A\09-h Display this help menu.\0A\09-k Output files to keep instead of ones to remove.\0A\09-r Output files to remove instead of ones to keep.\0A\09-s Take the timestamp as a separate string, specified first on\0A\09 the line and separated from the actual filename by a slash (like\0A\09 timestamp/filename, or timestamp//path/to/file for an absolute\0A\09 path).\0A\0A\09retain Copyright (C) 2015 Taylor C. Richberger <taywee@gmx.com>\0A\09This program comes with ABSOLUTELY NO WARRANTY. This is free\0A\09software, and you are welcome to redistribute it under the terms\0A\09of the GNU General Public License as published by the Free Software\0A\09Foundation, either version 3 of the License, or (at your option)\0A\09any later version.\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1763 x i8], [1763 x i8]* @.str.1, i64 0, i64 0))
ret void
}