#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 */
char *basename(char *const);
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *const restrict proc_name) {
  printf(
      "Usage: %s [-hagq] [-L <unsigned int>] [-l <unsigned int>] "
      "[-c <Char set>] [-f[filename.txt]]\n\n"
      "\tOptions:\n\n"
      "\t-h\tHelp menu\n\n"
      "\t-a\tCreate passwords starting from length = 0 to specified length; "
      "Overrides -L\n\n"
      "\t-g\tDisplay only the estimated filesize\n\n"
      "\t-q\tQuiet; Do not output time statistics\n\n"
      "\t-L\tSet minimum password length; Can't be larger than max length\n\n"
      "\t-l\tSet maximum password length (DEFAULT: 8)\n\n"
      "\t-c\tChoose character set (DEFAULT: NUM)\n"
      "\t\tu UPPER\n"
      "\t\tl LOWER\n"
      "\t\tp ALPHA\n"
      "\t\ta ALNUM\n"
      "\t\tw NUM + LOWER\n"
      "\t\te NUM + UPPER\n"
      "\t\ts ALNUM + SYMBOL\n\n"
      "\t-f\tWrite output to a specifed file (must be txt); Optional "
      "argument, must be called using -f[filename.txt]\n",
      basename(proc_name));
}


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

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

LLVM IR (-O0):
@.str = [637 x i8] c"Usage: %s [-hagq] [-L <unsigned int>] [-l <unsigned int>] [-c <Char set>] [-f[filename.txt]]\0A\0A\09Options:\0A\0A\09-h\09Help menu\0A\0A\09-a\09Create passwords starting from length = 0 to specified length; Overrides -L\0A\0A\09-g\09Display only the estimated filesize\0A\0A\09-q\09Quiet; Do not output time statistics\0A\0A\09-L\09Set minimum password length; Can't be larger than max length\0A\0A\09-l\09Set maximum password length (DEFAULT: 8)\0A\0A\09-c\09Choose character set (DEFAULT: NUM)\0A\09\09u UPPER\0A\09\09l LOWER\0A\09\09p ALPHA\0A\09\09a ALNUM\0A\09\09w NUM + LOWER\0A\09\09e NUM + UPPER\0A\09\09s ALNUM + SYMBOL\0A\0A\09-f\09Write output to a specifed file (must be txt); Optional argument, must be called using -f[filename.txt]\0A\00"
define void @print_usage(i8* noalias %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @basename(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([637 x i8], [637 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [637 x i8] c"Usage: %s [-hagq] [-L <unsigned int>] [-l <unsigned int>] [-c <Char set>] [-f[filename.txt]]\0A\0A\09Options:\0A\0A\09-h\09Help menu\0A\0A\09-a\09Create passwords starting from length = 0 to specified length; Overrides -L\0A\0A\09-g\09Display only the estimated filesize\0A\0A\09-q\09Quiet; Do not output time statistics\0A\0A\09-L\09Set minimum password length; Can't be larger than max length\0A\0A\09-l\09Set maximum password length (DEFAULT: 8)\0A\0A\09-c\09Choose character set (DEFAULT: NUM)\0A\09\09u UPPER\0A\09\09l LOWER\0A\09\09p ALPHA\0A\09\09a ALNUM\0A\09\09w NUM + LOWER\0A\09\09e NUM + UPPER\0A\09\09s ALNUM + SYMBOL\0A\0A\09-f\09Write output to a specifed file (must be txt); Optional argument, must be called using -f[filename.txt]\0A\00"
define void @print_usage(i8* noalias %0) {
%2 = tail call i8* @basename(i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([637 x i8], [637 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}