#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*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void show_info(const char *fname) {
  printf("Usage: %s [OPTIONS]\n"
         "Generate a pseudorandom password. Uses /dev/urandom as pseudorandom "
         "source.\n",
         fname);
  fputc('\n', stdout);
  printf(
      "OPTIONS:\n"
      "   -L      enable lower case characters in output\n"
      "   -U      enable upper case characters in output\n"
      "   -D      enable digit characters in output\n"
      "   -P      enable punctuation characters in output\n"
      "   -N      enable no characters. dummy option to override default "
      "behavior when\n"
      "           no other character set options will be specified in the case "
      "that it is\n"
      "           desired for the output to be composed of characters "
      "specified in the\n"
      "           include list only using the -e option\n"
      "\n"
      "   -f      fast character set mode, used to control which characters\n"
      "           will be included in the password produced, use a numerical "
      "option\n"
      "           from the table below (see: Fast character set mode options). "
      "Fast \n"
      "           character set mode options will be override by any of the "
      "above character\n"
      "           mode switches when used together simultaneously\n"
      "\n"
      "   -l      password length in characters\n"
      "   -c      password count to be generated\n"
      "   -p      optional prefix to be prepended to password produced\n"
      "   -n      no prefix substitution -- when this option is specified\n"
      "           the total length will be equal to prefix length, plus length "
      "specified\n"
      "           via the -l option\n"
      "   -h      display this help and exit\n"
      "   -e      excludes any characters in the string given as argument\n"
      "   -i      specifies additional characters to include in character set\n"
      "\n"
      "   -d      dump symbol table\n"
      "   -C      enable colorful text output\n"
      "\n"
      "Without specifying any options, default parameters will be used\n"
      "Default parameters are fast character mode 3 and a length of 6, "
      "equivalent to\n"
      "%s -f3 -l6. Default behavior can be overridden by specifying the "
      "desired options\n",
      fname);
  fputc('\n', stdout);
  printf(
      "-f Fast character set mode options: \n"
      "   1   only lowercase alphabetic characters will be used, equivalent to "
      "-L\n"
      "   2   lowercase and uppercase alphabetic characters, equivalent to "
      "-LU\n"
      "   3   lowercase/uppercase and numeric characters, equivalent to -LUD\n"
      "   4   alphanumeric plus special characters. Unless an exclude list\n"
      "       is specified, the result will be the use of all printable "
      "non-whitespace\n"
      "       ASCII characters. equivalent  -LUDP\n");
  fputc('\n', stdout);
  printf(
      "Examples:\n"
      "   %s -f1 -l42\tProduce a password of length 42 using only\n"
      "\t\t\tlowercase alphabetic characters\n"
      "\t\t\te.g. crtgjazxwckmkyswgfqplojohplmfsdjamgljacwfh\n"
      "\n"
      "   %s -l8 -pfoo-\tProduce password of length 8, with prefix \"foo-\".\n"
      "\t\t\te.g. foo-lOdk.\n"
      "\n"
      "   %s -l8 -pfoo- -n\tProduces password of length 8 with prefix "
      "\"foo-\".\n"
      "\t\t\tNo prefix substitution\n"
      "\t\t\te.g. foo-n2M2zKP4\n"
      "\n"
      "   %s -f3 -i'!@#$'\tProduces default length (6) character password "
      "using\n"
      "\t\t\talphanumeric characters plus !@#$ as special chars\n"
      "\t\t\te.g. 4idFiV\n"
      "\n"
      "   %s -l8 -N -i01\tProduces 8 character password consisting of 1 and 0 "
      "only\n"
      "\t\t\te.g. 10101100\n",
      fname, fname, fname, fname, fname);
}


x86 assembly (clang, -O0):
<show_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    -0x8(%rbp),%rsi
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
lea    0x1562(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0x16eb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_info>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e91(%rip),%r14
mov    (%r14),%esi
mov    $0xa,%edi
call   1050 <fputc@plt>
lea    0xefe(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%esi
mov    $0xa,%edi
call   1050 <fputc@plt>
lea    0x17b0(%rip),%rdi
call   1030 <puts@plt>
mov    (%r14),%esi
mov    $0xa,%edi
call   1050 <fputc@plt>
lea    0x1545(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %rbx,%r8
mov    %rbx,%r9
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [97 x i8] c"Usage: %s [OPTIONS]\0AGenerate a pseudorandom password. Uses /dev/urandom as pseudorandom source.\0A\00"
@stdout = global i32 0
@.str.1 = [1662 x i8] c"OPTIONS:\0A -L enable lower case characters in output\0A -U enable upper case characters in output\0A -D enable digit characters in output\0A -P enable punctuation characters in output\0A -N enable no characters. dummy option to override default behavior when\0A no other character set options will be specified in the case that it is\0A desired for the output to be composed of characters specified in the\0A include list only using the -e option\0A\0A -f fast character set mode, used to control which characters\0A will be included in the password produced, use a numerical option\0A from the table below (see: Fast character set mode options). Fast \0A character set mode options will be override by any of the above character\0A mode switches when used together simultaneously\0A\0A -l password length in characters\0A -c password count to be generated\0A -p optional prefix to be prepended to password produced\0A -n no prefix substitution -- when this option is specified\0A the total length will be equal to prefix length, plus length specified\0A via the -l option\0A -h display this help and exit\0A -e excludes any characters in the string given as argument\0A -i specifies additional characters to include in character set\0A\0A -d dump symbol table\0A -C enable colorful text output\0A\0AWithout specifying any options, default parameters will be used\0ADefault parameters are fast character mode 3 and a length of 6, equivalent to\0A%s -f3 -l6. Default behavior can be overridden by specifying the desired options\0A\00"
@.str.2 = [446 x i8] c"-f Fast character set mode options: \0A 1 only lowercase alphabetic characters will be used, equivalent to -L\0A 2 lowercase and uppercase alphabetic characters, equivalent to -LU\0A 3 lowercase/uppercase and numeric characters, equivalent to -LUD\0A 4 alphanumeric plus special characters. Unless an exclude list\0A is specified, the result will be the use of all printable non-whitespace\0A ASCII characters. equivalent -LUDP\0A\00"
@.str.3 = [594 x i8] c"Examples:\0A %s -f1 -l42\09Produce a password of length 42 using only\0A\09\09\09lowercase alphabetic characters\0A\09\09\09e.g. crtgjazxwckmkyswgfqplojohplmfsdjamgljacwfh\0A\0A %s -l8 -pfoo-\09Produce password of length 8, with prefix \22foo-\22.\0A\09\09\09e.g. foo-lOdk.\0A\0A %s -l8 -pfoo- -n\09Produces password of length 8 with prefix \22foo-\22.\0A\09\09\09No prefix substitution\0A\09\09\09e.g. foo-n2M2zKP4\0A\0A %s -f3 -i'!@#$'\09Produces default length (6) character password using\0A\09\09\09alphanumeric characters plus !@#$ as special chars\0A\09\09\09e.g. 4idFiV\0A\0A %s -l8 -N -i01\09Produces 8 character password consisting of 1 and 0 only\0A\09\09\09e.g. 10101100\0A\00"
define void @show_info(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fputc(i8 signext 10, i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([1662 x i8], [1662 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fputc(i8 signext 10, i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([446 x i8], [446 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = call i32 @fputc(i8 signext 10, i32 %12)
%14 = load i8*, i8** %2
%15 = load i8*, i8** %2
%16 = load i8*, i8** %2
%17 = load i8*, i8** %2
%18 = load i8*, i8** %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([594 x i8], [594 x i8]* @.str.3, i64 0, i64 0), i8* %14, i8* %15, i8* %16, i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [97 x i8] c"Usage: %s [OPTIONS]\0AGenerate a pseudorandom password. Uses /dev/urandom as pseudorandom source.\0A\00"
@stdout = global i32 0
@.str.1 = [1662 x i8] c"OPTIONS:\0A -L enable lower case characters in output\0A -U enable upper case characters in output\0A -D enable digit characters in output\0A -P enable punctuation characters in output\0A -N enable no characters. dummy option to override default behavior when\0A no other character set options will be specified in the case that it is\0A desired for the output to be composed of characters specified in the\0A include list only using the -e option\0A\0A -f fast character set mode, used to control which characters\0A will be included in the password produced, use a numerical option\0A from the table below (see: Fast character set mode options). Fast \0A character set mode options will be override by any of the above character\0A mode switches when used together simultaneously\0A\0A -l password length in characters\0A -c password count to be generated\0A -p optional prefix to be prepended to password produced\0A -n no prefix substitution -- when this option is specified\0A the total length will be equal to prefix length, plus length specified\0A via the -l option\0A -h display this help and exit\0A -e excludes any characters in the string given as argument\0A -i specifies additional characters to include in character set\0A\0A -d dump symbol table\0A -C enable colorful text output\0A\0AWithout specifying any options, default parameters will be used\0ADefault parameters are fast character mode 3 and a length of 6, equivalent to\0A%s -f3 -l6. Default behavior can be overridden by specifying the desired options\0A\00"
@.str.3 = [594 x i8] c"Examples:\0A %s -f1 -l42\09Produce a password of length 42 using only\0A\09\09\09lowercase alphabetic characters\0A\09\09\09e.g. crtgjazxwckmkyswgfqplojohplmfsdjamgljacwfh\0A\0A %s -l8 -pfoo-\09Produce password of length 8, with prefix \22foo-\22.\0A\09\09\09e.g. foo-lOdk.\0A\0A %s -l8 -pfoo- -n\09Produces password of length 8 with prefix \22foo-\22.\0A\09\09\09No prefix substitution\0A\09\09\09e.g. foo-n2M2zKP4\0A\0A %s -f3 -i'!@#$'\09Produces default length (6) character password using\0A\09\09\09alphanumeric characters plus !@#$ as special chars\0A\09\09\09e.g. 4idFiV\0A\0A %s -l8 -N -i01\09Produces 8 character password consisting of 1 and 0 only\0A\09\09\09e.g. 10101100\0A\00"
@str = [445 x i8] c"-f Fast character set mode options: \0A 1 only lowercase alphabetic characters will be used, equivalent to -L\0A 2 lowercase and uppercase alphabetic characters, equivalent to -LU\0A 3 lowercase/uppercase and numeric characters, equivalent to -LUD\0A 4 alphanumeric plus special characters. Unless an exclude list\0A is specified, the result will be the use of all printable non-whitespace\0A ASCII characters. equivalent -LUDP\00"
define void @show_info(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputc(i8 signext 10, i32 %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([1662 x i8], [1662 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fputc(i8 signext 10, i32 %6)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([445 x i8], [445 x i8]* @str, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = tail call i32 @fputc(i8 signext 10, i32 %9)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([594 x i8], [594 x i8]* @.str.3, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0, i8* %0)
ret void
}