#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(const char *program) {
  fprintf(stderr,
          "Usage:  %s [-DGUchrt] [-c 1|2|3|4] [-bgu name] "
          "[-p name=value]\n"
          "\t[(-S|-s name) value overwrite]\n\n"
          "Options:\n"
          "  -D\t\t\t\tDump environ\n"
          "  -G name\t\t\tgetenv(NULL)\n"
          "  -S value overwrite\t\tsetenv(NULL, value, overwrite)\n"
          "  -U\t\t\t\tunsetenv(NULL)\n"
          "  -b name\t\t\tblank the 'name=$name' entry, corrupting it\n"
          "  -c 1|2|3|4\t\t\tClear environ variable using method:\n"
          "\t\t\t\t1 - set environ to NULL pointer\n"
          "\t\t\t\t2 - set environ[0] to NULL pointer\n"
          "\t\t\t\t3 - set environ to calloc()'d NULL-terminated array\n"
          "\t\t\t\t4 - set environ to static NULL-terminated array\n"
          "  -g name\t\t\tgetenv(name)\n"
          "  -h\t\t\t\tHelp\n"
          "  -p name=value\t\t\tputenv(name=value)\n"
          "  -r\t\t\t\treplace environ with { \"FOO=bar\", NULL }\n"
          "  -s name value overwrite\tsetenv(name, value, overwrite)\n"
          "  -t\t\t\t\tOutput is suitable for testing (no newlines)\n"
          "  -u name\t\t\tunsetenv(name)\n",
          basename(program));
  return;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <basename@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
call   1040 <basename@plt>
lea    0xeca(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [780 x i8] c"Usage: %s [-DGUchrt] [-c 1|2|3|4] [-bgu name] [-p name=value]\0A\09[(-S|-s name) value overwrite]\0A\0AOptions:\0A -D\09\09\09\09Dump environ\0A -G name\09\09\09getenv(NULL)\0A -S value overwrite\09\09setenv(NULL, value, overwrite)\0A -U\09\09\09\09unsetenv(NULL)\0A -b name\09\09\09blank the 'name=$name' entry, corrupting it\0A -c 1|2|3|4\09\09\09Clear environ variable using method:\0A\09\09\09\091 - set environ to NULL pointer\0A\09\09\09\092 - set environ[0] to NULL pointer\0A\09\09\09\093 - set environ to calloc()'d NULL-terminated array\0A\09\09\09\094 - set environ to static NULL-terminated array\0A -g name\09\09\09getenv(name)\0A -h\09\09\09\09Help\0A -p name=value\09\09\09putenv(name=value)\0A -r\09\09\09\09replace environ with { \22FOO=bar\22, NULL }\0A -s name value overwrite\09setenv(name, value, overwrite)\0A -t\09\09\09\09Output is suitable for testing (no newlines)\0A -u name\09\09\09unsetenv(name)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i8* @basename(i8* %4)
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([780 x i8], [780 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [780 x i8] c"Usage: %s [-DGUchrt] [-c 1|2|3|4] [-bgu name] [-p name=value]\0A\09[(-S|-s name) value overwrite]\0A\0AOptions:\0A -D\09\09\09\09Dump environ\0A -G name\09\09\09getenv(NULL)\0A -S value overwrite\09\09setenv(NULL, value, overwrite)\0A -U\09\09\09\09unsetenv(NULL)\0A -b name\09\09\09blank the 'name=$name' entry, corrupting it\0A -c 1|2|3|4\09\09\09Clear environ variable using method:\0A\09\09\09\091 - set environ to NULL pointer\0A\09\09\09\092 - set environ[0] to NULL pointer\0A\09\09\09\093 - set environ to calloc()'d NULL-terminated array\0A\09\09\09\094 - set environ to static NULL-terminated array\0A -g name\09\09\09getenv(name)\0A -h\09\09\09\09Help\0A -p name=value\09\09\09putenv(name=value)\0A -r\09\09\09\09replace environ with { \22FOO=bar\22, NULL }\0A -s name value overwrite\09setenv(name, value, overwrite)\0A -t\09\09\09\09Output is suitable for testing (no newlines)\0A -u name\09\09\09unsetenv(name)\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @basename(i8* %0)
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([780 x i8], [780 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}