#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 *);
void show_help() {
  printf(
      "\n"
      "grand - generate random characters\n"
      "==================================\n"
      "\n"
      "Usage: grand [-switches] [length]\n"
      "\n"
      "Switches:\n"
      "---------\n"
      " -a     include alphabetic characters\n"
      " -n     include numeric characters\n"
      " -s     include symbol characters\n"
      " -x     generate hexadecimal characters\n"
      " -g     generate a GUID\n"
      " -h|-?  print this help\n"
      "\n"
      "If no arguments are specified, '-an 8' is assumed, which will generate "
      "a\n"
      "random 8-character alphanumeric string.\n"
      "\n"
      "Notes regarding usage:\n"
      "----------------------\n"
      " * Switches can be combined. For example, '-ans' specifies alpha + "
      "numeric\n"
      "   + symbols.\n"
      " * Any argument without a '-' character is assumed to be the output "
      "length.\n"
      " * If '-x' is specified, any other character types (-a,-n,-s) are "
      "ignored.\n"
      " * If '-g' is specified, *all* other arguments are ignored.\n"
      " * GUIDs are always printed in lower-case. Don't whine, convert it to\n"
      "   upper-case if you wish.\n"
      "\n");
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [882 x i8] c"\0Agrand - generate random characters\0A==================================\0A\0AUsage: grand [-switches] [length]\0A\0ASwitches:\0A---------\0A -a include alphabetic characters\0A -n include numeric characters\0A -s include symbol characters\0A -x generate hexadecimal characters\0A -g generate a GUID\0A -h|-? print this help\0A\0AIf no arguments are specified, '-an 8' is assumed, which will generate a\0Arandom 8-character alphanumeric string.\0A\0ANotes regarding usage:\0A----------------------\0A * Switches can be combined. For example, '-ans' specifies alpha + numeric\0A + symbols.\0A * Any argument without a '-' character is assumed to be the output length.\0A * If '-x' is specified, any other character types (-a,-n,-s) are ignored.\0A * If '-g' is specified, *all* other arguments are ignored.\0A * GUIDs are always printed in lower-case. Don't whine, convert it to\0A upper-case if you wish.\0A\0A\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([882 x i8], [882 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [881 x i8] c"\0Agrand - generate random characters\0A==================================\0A\0AUsage: grand [-switches] [length]\0A\0ASwitches:\0A---------\0A -a include alphabetic characters\0A -n include numeric characters\0A -s include symbol characters\0A -x generate hexadecimal characters\0A -g generate a GUID\0A -h|-? print this help\0A\0AIf no arguments are specified, '-an 8' is assumed, which will generate a\0Arandom 8-character alphanumeric string.\0A\0ANotes regarding usage:\0A----------------------\0A * Switches can be combined. For example, '-ans' specifies alpha + numeric\0A + symbols.\0A * Any argument without a '-' character is assumed to be the output length.\0A * If '-x' is specified, any other character types (-a,-n,-s) are ignored.\0A * If '-g' is specified, *all* other arguments are ignored.\0A * GUIDs are always printed in lower-case. Don't whine, convert it to\0A upper-case if you wish.\0A\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([881 x i8], [881 x i8]* @str, i64 0, i64 0))
ret void
}