#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*/ exit(int);
int /*<<< orphan*/ printf(char *);
void print_help(int status) {
  printf("HBS Helper - helper binary for the Hierophant Build System.\n");
  printf("--time [seconds_since_Epoch [strftime-format-string]]\n\t(shows "
         "current/translates given Epoch time)\n--dirs-show\n\t(scans stdin, "
         "prints lines with trailing slashes)\n--dirs-hide\n\t(scans stdin, "
         "prints lines without trailing slashes)\n--size "
         "number_of_bytes\n\t(takes a number and reformats it to KB/MB "
         "notation)\n--fast-tar\n\t(outputs a \"--occurrence=1\" string if "
         "local \"tar\" supports it\n--check-uid\n\t(exits with error code == "
         "1 if user is not root)\n--get-files hbs_dir filename [omit_dir1 "
         "omit_dir2 ...]\n\t(scans all subdirs in hbs_dir, returning paths to "
         "files matching\n\t\"filename\", except for those in omit_dir1, "
         "omit_dir2 etc.)\n--grep-files hbs_dir filename string [string2 "
         "...]\n\t(scans all \"filenames\" in hbs_dir for occurences of "
         "\"string\",\n\tprints package name if matched, automatically ignores "
         "extra fields\n\tif \"filename\" == \"FILELIST\")\n--get-pkgdirs "
         "hbs_dir [omit_dir1 omit_dir2 ...]\n\t(scans directory hbs_dir "
         "looking for subdirectories,\n\texcepts those matching omit_dir1, "
         "omit_dir2 etc.)\n--cut-filelists [filelist1 filelist2 filelist3 "
         "...]\n\t(parses filelists, strips mode, username and "
         "group\n\tfields, printing only filenames)\n--print-lines x-y [file1 "
         "file2 ...]\n\t(takes files file1, file2 [...] and prints lines\n\tin "
         "range x-y, eg. lines 3-5)\n--verify-packages [pkg1 pkg2 "
         "...]\n\t(Checks files from pkg1, pkg2 (...) and prints "
         "filenames\n\tof modified files)\n--terminal\n\t(Exits with code 0 if "
         "output is directed to a TTY device,\n\treturns with code 1 "
         "otherwise)\n--realpath [path1 path2 ...]\n\t(returns canonicalized "
         "absolute versions of given pathnames)\n--rm-from-list "
         "list_file\n\t(removes files listed in list_file)\n--rmdir-from-list "
         "list_file\n\t(removes directories listed in list_file)\n");
  exit(status);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_help>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"HBS Helper - helper binary for the Hierophant Build System.\0A\00"
@.str.1 = [1679 x i8] c"--time [seconds_since_Epoch [strftime-format-string]]\0A\09(shows current/translates given Epoch time)\0A--dirs-show\0A\09(scans stdin, prints lines with trailing slashes)\0A--dirs-hide\0A\09(scans stdin, prints lines without trailing slashes)\0A--size number_of_bytes\0A\09(takes a number and reformats it to KB/MB notation)\0A--fast-tar\0A\09(outputs a \22--occurrence=1\22 string if local \22tar\22 supports it\0A--check-uid\0A\09(exits with error code == 1 if user is not root)\0A--get-files hbs_dir filename [omit_dir1 omit_dir2 ...]\0A\09(scans all subdirs in hbs_dir, returning paths to files matching\0A\09\22filename\22, except for those in omit_dir1, omit_dir2 etc.)\0A--grep-files hbs_dir filename string [string2 ...]\0A\09(scans all \22filenames\22 in hbs_dir for occurences of \22string\22,\0A\09prints package name if matched, automatically ignores extra fields\0A\09if \22filename\22 == \22FILELIST\22)\0A--get-pkgdirs hbs_dir [omit_dir1 omit_dir2 ...]\0A\09(scans directory hbs_dir looking for subdirectories,\0A\09excepts those matching omit_dir1, omit_dir2 etc.)\0A--cut-filelists [filelist1 filelist2 filelist3 ...]\0A\09(parses filelists, strips mode, username and group\0A\09fields, printing only filenames)\0A--print-lines x-y [file1 file2 ...]\0A\09(takes files file1, file2 [...] and prints lines\0A\09in range x-y, eg. lines 3-5)\0A--verify-packages [pkg1 pkg2 ...]\0A\09(Checks files from pkg1, pkg2 (...) and prints filenames\0A\09of modified files)\0A--terminal\0A\09(Exits with code 0 if output is directed to a TTY device,\0A\09returns with code 1 otherwise)\0A--realpath [path1 path2 ...]\0A\09(returns canonicalized absolute versions of given pathnames)\0A--rm-from-list list_file\0A\09(removes files listed in list_file)\0A--rmdir-from-list list_file\0A\09(removes directories listed in list_file)\0A\00"
define void @print_help(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([1679 x i8], [1679 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@str = [60 x i8] c"HBS Helper - helper binary for the Hierophant Build System.\00"
@str.2 = [1678 x i8] c"--time [seconds_since_Epoch [strftime-format-string]]\0A\09(shows current/translates given Epoch time)\0A--dirs-show\0A\09(scans stdin, prints lines with trailing slashes)\0A--dirs-hide\0A\09(scans stdin, prints lines without trailing slashes)\0A--size number_of_bytes\0A\09(takes a number and reformats it to KB/MB notation)\0A--fast-tar\0A\09(outputs a \22--occurrence=1\22 string if local \22tar\22 supports it\0A--check-uid\0A\09(exits with error code == 1 if user is not root)\0A--get-files hbs_dir filename [omit_dir1 omit_dir2 ...]\0A\09(scans all subdirs in hbs_dir, returning paths to files matching\0A\09\22filename\22, except for those in omit_dir1, omit_dir2 etc.)\0A--grep-files hbs_dir filename string [string2 ...]\0A\09(scans all \22filenames\22 in hbs_dir for occurences of \22string\22,\0A\09prints package name if matched, automatically ignores extra fields\0A\09if \22filename\22 == \22FILELIST\22)\0A--get-pkgdirs hbs_dir [omit_dir1 omit_dir2 ...]\0A\09(scans directory hbs_dir looking for subdirectories,\0A\09excepts those matching omit_dir1, omit_dir2 etc.)\0A--cut-filelists [filelist1 filelist2 filelist3 ...]\0A\09(parses filelists, strips mode, username and group\0A\09fields, printing only filenames)\0A--print-lines x-y [file1 file2 ...]\0A\09(takes files file1, file2 [...] and prints lines\0A\09in range x-y, eg. lines 3-5)\0A--verify-packages [pkg1 pkg2 ...]\0A\09(Checks files from pkg1, pkg2 (...) and prints filenames\0A\09of modified files)\0A--terminal\0A\09(Exits with code 0 if output is directed to a TTY device,\0A\09returns with code 1 otherwise)\0A--realpath [path1 path2 ...]\0A\09(returns canonicalized absolute versions of given pathnames)\0A--rm-from-list list_file\0A\09(removes files listed in list_file)\0A--rmdir-from-list list_file\0A\09(removes directories listed in list_file)\00"
define void @print_help(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1678 x i8], [1678 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}