#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage_error() {
  printf("Usage: perfect [-{NnIiHhDdAaBb}{MmPp}{FfSs}] < key.txt \n");
  printf("The input is a list of keys, one key per line.\n");
  printf("Only one of NnIiHhDdAa and one of MmPp may be specified.\n");
  printf("  N,n: normal mode, key is any string string (default).\n");
  printf("  I,i: initial hash for ASCII char strings.\n");
  printf("The initial hash must be\n");
  printf("  hash = PHASHSALT;\n");
  printf("  for (i=0; i<keylength; ++i) {\n");
  printf("    hash = (hash ^ key[i]) + ((hash<<26)+(hash>>6));\n");
  printf("  }\n");
  printf("Note that this can be inlined in any user loop that walks\n");
  printf("through the key anyways, eliminating the loop overhead.\n");
  printf("  H,h: Keys are 4-byte integers in hex in this format:\n");
  printf("ffffffff\n");
  printf("This is good for optimizing switch statement compilation.\n");
  printf("  D,d: Same as H,h, except in decimal not hexidecimal\n");
  printf("  A,a: An (A,B) pair is supplied in hex in this format:\n");
  printf("aaa bbb\n");
  printf("  B,b: Same as A,a, except in decimal not hexidecimal\n");
  printf("This mode does nothing but find the values of tab[].\n");
  printf("*A* must be less than the total number of keys.\n");
  printf(
      "  M,m: Minimal perfect hash.  Hash will be in 0..nkeys-1 (default)\n");
  printf("  P,p: Perfect hash.  Hash will be in 0..n-1, where n >= nkeys\n");
  printf("and n is a power of 2.  Will probably use a smaller tab[].");
  printf("  F,f: Fast mode.  Generate the perfect hash fast.\n");
  printf("  S,s: Slow mode.  Spend time finding a good perfect hash.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
call   1030 <printf@plt>
lea    0xf54(%rip),%rdi
call   1030 <printf@plt>
lea    0xf81(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa2(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb0(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xfce(%rip),%rdi
call   1030 <printf@plt>
lea    0xff8(%rip),%rdi
call   1030 <printf@plt>
lea    0xff1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1020(%rip),%rdi
call   1030 <printf@plt>
lea    0x104d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1079(%rip),%rdi
call   1030 <printf@plt>
lea    0x1077(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a6(%rip),%rdi
call   1030 <printf@plt>
lea    0x10d1(%rip),%rdi
call   1030 <printf@plt>
lea    0x10fe(%rip),%rdi
call   1030 <printf@plt>
lea    0x10fb(%rip),%rdi
call   1030 <printf@plt>
lea    0x1126(%rip),%rdi
call   1030 <printf@plt>
lea    0x1150(%rip),%rdi
call   1030 <printf@plt>
lea    0x1175(%rip),%rdi
call   1030 <printf@plt>
lea    0x11ad(%rip),%rdi
call   1030 <printf@plt>
lea    0x11e1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1210(%rip),%rdi
call   1030 <printf@plt>
lea    0x1238(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_error>:
push   %rax
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf52(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfab(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd8(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe0(%rip),%rdi
call   1030 <puts@plt>
lea    0xff4(%rip),%rdi
call   1030 <puts@plt>
lea    0x101d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1015(%rip),%rdi
call   1030 <puts@plt>
lea    0x1043(%rip),%rdi
call   1030 <puts@plt>
lea    0x106f(%rip),%rdi
call   1030 <puts@plt>
lea    0x109a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1097(%rip),%rdi
call   1030 <puts@plt>
lea    0x10c5(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ef(%rip),%rdi
call   1030 <puts@plt>
lea    0x111b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1117(%rip),%rdi
call   1030 <puts@plt>
lea    0x1141(%rip),%rdi
call   1030 <puts@plt>
lea    0x116a(%rip),%rdi
call   1030 <puts@plt>
lea    0x118e(%rip),%rdi
call   1030 <puts@plt>
lea    0x11c5(%rip),%rdi
call   1030 <puts@plt>
lea    0xdb4(%rip),%rdi
call   1040 <printf@plt>
lea    0x11ec(%rip),%rdi
call   1030 <puts@plt>
lea    0x1213(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"Usage: perfect [-{NnIiHhDdAaBb}{MmPp}{FfSs}] < key.txt \0A\00"
@.str.1 = [48 x i8] c"The input is a list of keys, one key per line.\0A\00"
@.str.2 = [58 x i8] c"Only one of NnIiHhDdAa and one of MmPp may be specified.\0A\00"
@.str.3 = [57 x i8] c" N,n: normal mode, key is any string string (default).\0A\00"
@.str.4 = [45 x i8] c" I,i: initial hash for ASCII char strings.\0A\00"
@.str.5 = [26 x i8] c"The initial hash must be\0A\00"
@.str.6 = [21 x i8] c" hash = PHASHSALT;\0A\00"
@.str.7 = [33 x i8] c" for (i=0; i<keylength; ++i) {\0A\00"
@.str.8 = [54 x i8] c" hash = (hash ^ key[i]) + ((hash<<26)+(hash>>6));\0A\00"
@.str.9 = [5 x i8] c" }\0A\00"
@.str.10 = [59 x i8] c"Note that this can be inlined in any user loop that walks\0A\00"
@.str.11 = [57 x i8] c"through the key anyways, eliminating the loop overhead.\0A\00"
@.str.12 = [56 x i8] c" H,h: Keys are 4-byte integers in hex in this format:\0A\00"
@.str.13 = [10 x i8] c"ffffffff\0A\00"
@.str.14 = [59 x i8] c"This is good for optimizing switch statement compilation.\0A\00"
@.str.15 = [55 x i8] c" D,d: Same as H,h, except in decimal not hexidecimal\0A\00"
@.str.16 = [57 x i8] c" A,a: An (A,B) pair is supplied in hex in this format:\0A\00"
@.str.17 = [9 x i8] c"aaa bbb\0A\00"
@.str.18 = [55 x i8] c" B,b: Same as A,a, except in decimal not hexidecimal\0A\00"
@.str.19 = [54 x i8] c"This mode does nothing but find the values of tab[].\0A\00"
@.str.20 = [49 x i8] c"*A* must be less than the total number of keys.\0A\00"
@.str.21 = [68 x i8] c" M,m: Minimal perfect hash. Hash will be in 0..nkeys-1 (default)\0A\00"
@.str.22 = [64 x i8] c" P,p: Perfect hash. Hash will be in 0..n-1, where n >= nkeys\0A\00"
@.str.23 = [59 x i8] c"and n is a power of 2. Will probably use a smaller tab[].\00"
@.str.24 = [52 x i8] c" F,f: Fast mode. Generate the perfect hash fast.\0A\00"
@.str.25 = [60 x i8] c" S,s: Slow mode. Spend time finding a good perfect hash.\0A\00"
define void @usage_error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.24, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.25, i64 0, i64 0))
%27 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.23 = [59 x i8] c"and n is a power of 2. Will probably use a smaller tab[].\00"
@str = [56 x i8] c"Usage: perfect [-{NnIiHhDdAaBb}{MmPp}{FfSs}] < key.txt \00"
@str.26 = [47 x i8] c"The input is a list of keys, one key per line.\00"
@str.27 = [57 x i8] c"Only one of NnIiHhDdAa and one of MmPp may be specified.\00"
@str.28 = [56 x i8] c" N,n: normal mode, key is any string string (default).\00"
@str.29 = [44 x i8] c" I,i: initial hash for ASCII char strings.\00"
@str.30 = [25 x i8] c"The initial hash must be\00"
@str.31 = [20 x i8] c" hash = PHASHSALT;\00"
@str.32 = [32 x i8] c" for (i=0; i<keylength; ++i) {\00"
@str.33 = [53 x i8] c" hash = (hash ^ key[i]) + ((hash<<26)+(hash>>6));\00"
@str.34 = [4 x i8] c" }\00"
@str.35 = [58 x i8] c"Note that this can be inlined in any user loop that walks\00"
@str.36 = [56 x i8] c"through the key anyways, eliminating the loop overhead.\00"
@str.37 = [55 x i8] c" H,h: Keys are 4-byte integers in hex in this format:\00"
@str.38 = [9 x i8] c"ffffffff\00"
@str.39 = [58 x i8] c"This is good for optimizing switch statement compilation.\00"
@str.40 = [54 x i8] c" D,d: Same as H,h, except in decimal not hexidecimal\00"
@str.41 = [56 x i8] c" A,a: An (A,B) pair is supplied in hex in this format:\00"
@str.42 = [8 x i8] c"aaa bbb\00"
@str.43 = [54 x i8] c" B,b: Same as A,a, except in decimal not hexidecimal\00"
@str.44 = [53 x i8] c"This mode does nothing but find the values of tab[].\00"
@str.45 = [48 x i8] c"*A* must be less than the total number of keys.\00"
@str.46 = [67 x i8] c" M,m: Minimal perfect hash. Hash will be in 0..nkeys-1 (default)\00"
@str.47 = [63 x i8] c" P,p: Perfect hash. Hash will be in 0..n-1, where n >= nkeys\00"
@str.48 = [51 x i8] c" F,f: Fast mode. Generate the perfect hash fast.\00"
@str.49 = [59 x i8] c" S,s: Slow mode. Spend time finding a good perfect hash.\00"
define void @usage_error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.26, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.27, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.28, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.29, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.30, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.31, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.32, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.33, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.34, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.35, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.36, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.37, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.38, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.39, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.40, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.41, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.42, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.43, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.44, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.45, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.46, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.47, i64 0, i64 0))
%24 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.23, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.48, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.49, i64 0, i64 0))
%27 = tail call i32 @exit(i32 0)
unreachable
}