#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 *, ...);
scalar_t__ strlen(char *);
void usage(char *message) {
  if (strlen(message) > 0) {
    printf("%s: %s\n", "genkeys", message);
  }
  printf("Usage: %s [options]\n", "genkeys");
  printf("\n"
         "\t-r \tInput dictionary file, one word per line\n"
         "\t-f \tOutput pass+hash filename\n"
         "\t-n \tOutput index filename\n"
         "\t-h \tLast 2 hash bytes to filter with (optional)\n"
         "\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    1158 <usage+0x38>
mov    -0x8(%rbp),%rdx
lea    0xeb6(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    0xea2(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
test   %rax,%rax
jle    1156 <usage+0x26>
lea    0xebb(%rip),%rdi
lea    0xebc(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    0xea4(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb3(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [8 x i8] c"genkeys\00"
@.str.2 = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.3 = [156 x i8] c"\0A\09-r \09Input dictionary file, one word per line\0A\09-f \09Output pass+hash filename\0A\09-n \09Output index filename\0A\09-h \09Last 2 hash bytes to filter with (optional)\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [8 x i8] c"genkeys\00"
@.str.2 = [21 x i8] c"Usage: %s [options]\0A\00"
@str = [155 x i8] c"\0A\09-r \09Input dictionary file, one word per line\0A\09-f \09Output pass+hash filename\0A\09-n \09Output index filename\0A\09-h \09Last 2 hash bytes to filter with (optional)\0A\00"
define void @usage(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([155 x i8], [155 x i8]* @str, i64 0, i64 0))
ret void
}