#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *const, char *, char const *const,
                           char *, char const *const, char const *const);
int /*<<< orphan*/ *const stderr;
void usage(const char *const exe, FILE *const dest) {
  fprintf(dest,
          "\nUsage: %s [-%s]\n"
          "\nexample 1: %s\n\n"
          "\nexample 2: %s -c zlib -b\n\n"
          " -h          print this message (to stdout) and quit\n"
          " -a          list all supported block sizes (for the host)\n"
          " -t          list test block sizes (for the host)\n"
          " -T          list quick test block sizes (for the host)\n"
          " -c <str>    the name of the compression library to use\n"
          "\n",
          exe, "hatTc:", exe, exe);
  exit(dest == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xeb9(%rip),%rsi
lea    0x1002(%rip),%rcx
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%rax
jne    1178 <usage+0x58>
mov    0x2e6a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1184 <usage+0x64>
mov    0x2e51(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rdx
lea    0xed2(%rip),%rsi
lea    0x101b(%rip),%rcx
mov    %rbx,%rdi
mov    %rdx,%r8
mov    %rdx,%r9
call   1030 <fprintf@plt>
test   %rbx,%rbx
jne    1156 <usage+0x36>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [336 x i8] c"\0AUsage: %s [-%s]\0A\0Aexample 1: %s\0A\0A\0Aexample 2: %s -c zlib -b\0A\0A -h print this message (to stdout) and quit\0A -a list all supported block sizes (for the host)\0A -t list test block sizes (for the host)\0A -T list quick test block sizes (for the host)\0A -c <str> the name of the compression library to use\0A\0A\00"
@.str.1 = [7 x i8] c"hatTc:\00"
@stderr = constant i32* null
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([336 x i8], [336 x i8]* @.str, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8)
%10 = load i32*, i32** %4
%11 = load i32*, i32** @stderr
%12 = icmp eq i32* %10, %11
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i32, i32* @EXIT_FAILURE
br label %17
15: ; preds = %2
%16 = load i32, i32* @EXIT_SUCCESS
br label %17
17: ; preds = %15, %13
%18 = phi i32 [ %14, %13 ], [ %16, %15 ]
%19 = call i32 @exit(i32 %18)
unreachable
}

LLVM IR (-O2):
@.str = [336 x i8] c"\0AUsage: %s [-%s]\0A\0Aexample 1: %s\0A\0A\0Aexample 2: %s -c zlib -b\0A\0A -h print this message (to stdout) and quit\0A -a list all supported block sizes (for the host)\0A -t list test block sizes (for the host)\0A -T list quick test block sizes (for the host)\0A -c <str> the name of the compression library to use\0A\0A\00"
@.str.1 = [7 x i8] c"hatTc:\00"
@stderr = constant i32* null
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0, i32* %1) {
%3 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([336 x i8], [336 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %0)
%4 = icmp eq i32* %1, null
%5 = load i32, i32* @EXIT_FAILURE
%6 = load i32, i32* @EXIT_SUCCESS
%7 = select i1 %4, i32 %5, i32 %6
%8 = tail call i32 @exit(i32 %7)
unreachable
}