#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);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ u(char *);
void usage(char *msg) {
  if (msg) {
    printf("\nCommand line error: %s\n", msg);
  }
  u("");
  u("Read features.csv and write a shard of a knn cache to stdout. Usage:");
  u("  cd FEATURES && knnCacheCreateShard params > output/file");
  u("where");
  u("  FEATURES is a directory containing the input file features.csv");
  u("  features.csv is a file in CSV format that contains a header");
  u("     all features are used, the header is ignored but required");
  u(" ");
  u("Params:");
  u("");
  u(" --obs OBS   Observation set id; must be 1A for now");
  u(" --shared N  Number of shard to create; must be in 1, 2, ..., 100");
  u(" ");
  u("DESCRIPTION");
  u(" For every test transaction in SHARD, determine distance to all other "
    "features");
  u(" Write output file with the indices of the nearest 256 neighbors.");
  u(" The test transactions are those in years 2000, ..., 2009");
  u(" Run knnCacheMergeShards to merge the 100 shard files into one big cache "
    "file");
  u(" ");
  u("EXAMPLE");
  u(" cd obs1/features");
  u(" knnCacheCreateShard --obs 1A --shard 23 > shard-23.txt");
  u("  Creates shard 23");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1157 <usage+0x27>
mov    -0x8(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
call   1040 <u@plt>
lea    0xeaf(%rip),%rdi
call   1040 <u@plt>
lea    0xee8(%rip),%rdi
call   1040 <u@plt>
lea    0xf16(%rip),%rdi
call   1040 <u@plt>
lea    0xf10(%rip),%rdi
call   1040 <u@plt>
lea    0xf45(%rip),%rdi
call   1040 <u@plt>
lea    0xf77(%rip),%rdi
call   1040 <u@plt>
lea    0xfaa(%rip),%rdi
call   1040 <u@plt>
lea    0xfa0(%rip),%rdi
call   1040 <u@plt>
lea    0xe4e(%rip),%rdi
call   1040 <u@plt>
lea    0xf90(%rip),%rdi
call   1040 <u@plt>
lea    0xfb8(%rip),%rdi
call   1040 <u@plt>
lea    0xf6e(%rip),%rdi
call   1040 <u@plt>
lea    0xfe2(%rip),%rdi
call   1040 <u@plt>
lea    0xfe2(%rip),%rdi
call   1040 <u@plt>
lea    0x1025(%rip),%rdi
call   1040 <u@plt>
lea    0x105b(%rip),%rdi
call   1040 <u@plt>
lea    0x1089(%rip),%rdi
call   1040 <u@plt>
lea    0xf26(%rip),%rdi
call   1040 <u@plt>
lea    0x10bf(%rip),%rdi
call   1040 <u@plt>
lea    0x10bb(%rip),%rdi
call   1040 <u@plt>
lea    0x10c1(%rip),%rdi
call   1040 <u@plt>
lea    0x10ed(%rip),%rdi
call   1040 <u@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1148 <usage+0x18>
mov    %rdi,%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    0xec9(%rip),%r14
mov    %r14,%rdi
call   1040 <u@plt>
lea    0xebb(%rip),%rdi
call   1040 <u@plt>
lea    0xef4(%rip),%rdi
call   1040 <u@plt>
lea    0xf22(%rip),%rdi
call   1040 <u@plt>
lea    0xf1c(%rip),%rdi
call   1040 <u@plt>
lea    0xf51(%rip),%rdi
call   1040 <u@plt>
lea    0xf83(%rip),%rdi
call   1040 <u@plt>
lea    0xfb6(%rip),%rbx
mov    %rbx,%rdi
call   1040 <u@plt>
lea    0xfa9(%rip),%rdi
call   1040 <u@plt>
mov    %r14,%rdi
call   1040 <u@plt>
lea    0xf9d(%rip),%rdi
call   1040 <u@plt>
lea    0xfc5(%rip),%rdi
call   1040 <u@plt>
mov    %rbx,%rdi
call   1040 <u@plt>
lea    0xff3(%rip),%rdi
call   1040 <u@plt>
lea    0xff3(%rip),%rdi
call   1040 <u@plt>
lea    0x1036(%rip),%rdi
call   1040 <u@plt>
lea    0x106c(%rip),%rdi
call   1040 <u@plt>
lea    0x109a(%rip),%rdi
call   1040 <u@plt>
mov    %rbx,%rdi
call   1040 <u@plt>
lea    0x10d4(%rip),%rdi
call   1040 <u@plt>
lea    0x10d0(%rip),%rdi
call   1040 <u@plt>
lea    0x10d6(%rip),%rdi
call   1040 <u@plt>
lea    0x1102(%rip),%rdi
call   1040 <u@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"\0ACommand line error: %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [69 x i8] c"Read features.csv and write a shard of a knn cache to stdout. Usage:\00"
@.str.3 = [58 x i8] c" cd FEATURES && knnCacheCreateShard params > output/file\00"
@.str.4 = [6 x i8] c"where\00"
@.str.5 = [65 x i8] c" FEATURES is a directory containing the input file features.csv\00"
@.str.6 = [62 x i8] c" features.csv is a file in CSV format that contains a header\00"
@.str.7 = [63 x i8] c" all features are used, the header is ignored but required\00"
@.str.8 = [2 x i8] c" \00"
@.str.9 = [8 x i8] c"Params:\00"
@.str.10 = [52 x i8] c" --obs OBS Observation set id; must be 1A for now\00"
@.str.11 = [66 x i8] c" --shared N Number of shard to create; must be in 1, 2, ..., 100\00"
@.str.12 = [12 x i8] c"DESCRIPTION\00"
@.str.13 = [79 x i8] c" For every test transaction in SHARD, determine distance to all other features\00"
@.str.14 = [66 x i8] c" Write output file with the indices of the nearest 256 neighbors.\00"
@.str.15 = [58 x i8] c" The test transactions are those in years 2000, ..., 2009\00"
@.str.16 = [78 x i8] c" Run knnCacheMergeShards to merge the 100 shard files into one big cache file\00"
@.str.17 = [8 x i8] c"EXAMPLE\00"
@.str.18 = [18 x i8] c" cd obs1/features\00"
@.str.19 = [56 x i8] c" knnCacheCreateShard --obs 1A --shard 23 > shard-23.txt\00"
@.str.20 = [19 x i8] c" Creates shard 23\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 @u(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @u(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @u(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @u(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @u(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @u(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 @u(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 @u(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 @u(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @u(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0))
%20 = call i32 @u(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.11, i64 0, i64 0))
%21 = call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%22 = call i32 @u(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
%23 = call i32 @u(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.13, i64 0, i64 0))
%24 = call i32 @u(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.14, i64 0, i64 0))
%25 = call i32 @u(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.15, i64 0, i64 0))
%26 = call i32 @u(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.16, i64 0, i64 0))
%27 = call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%28 = call i32 @u(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%29 = call i32 @u(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0))
%30 = call i32 @u(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.19, i64 0, i64 0))
%31 = call i32 @u(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0))
%32 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"\0ACommand line error: %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [69 x i8] c"Read features.csv and write a shard of a knn cache to stdout. Usage:\00"
@.str.3 = [58 x i8] c" cd FEATURES && knnCacheCreateShard params > output/file\00"
@.str.4 = [6 x i8] c"where\00"
@.str.5 = [65 x i8] c" FEATURES is a directory containing the input file features.csv\00"
@.str.6 = [62 x i8] c" features.csv is a file in CSV format that contains a header\00"
@.str.7 = [63 x i8] c" all features are used, the header is ignored but required\00"
@.str.8 = [2 x i8] c" \00"
@.str.9 = [8 x i8] c"Params:\00"
@.str.10 = [52 x i8] c" --obs OBS Observation set id; must be 1A for now\00"
@.str.11 = [66 x i8] c" --shared N Number of shard to create; must be in 1, 2, ..., 100\00"
@.str.12 = [12 x i8] c"DESCRIPTION\00"
@.str.13 = [79 x i8] c" For every test transaction in SHARD, determine distance to all other features\00"
@.str.14 = [66 x i8] c" Write output file with the indices of the nearest 256 neighbors.\00"
@.str.15 = [58 x i8] c" The test transactions are those in years 2000, ..., 2009\00"
@.str.16 = [78 x i8] c" Run knnCacheMergeShards to merge the 100 shard files into one big cache file\00"
@.str.17 = [8 x i8] c"EXAMPLE\00"
@.str.18 = [18 x i8] c" cd obs1/features\00"
@.str.19 = [56 x i8] c" knnCacheCreateShard --obs 1A --shard 23 > shard-23.txt\00"
@.str.20 = [19 x i8] c" Creates shard 23\00"
define void @usage(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @u(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @u(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @u(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @u(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @u(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 @u(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.6, i64 0, i64 0))
%12 = tail call i32 @u(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0))
%13 = tail call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%14 = tail call i32 @u(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%15 = tail call i32 @u(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 @u(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0))
%17 = tail call i32 @u(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.11, i64 0, i64 0))
%18 = tail call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%19 = tail call i32 @u(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
%20 = tail call i32 @u(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.13, i64 0, i64 0))
%21 = tail call i32 @u(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.14, i64 0, i64 0))
%22 = tail call i32 @u(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.15, i64 0, i64 0))
%23 = tail call i32 @u(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.16, i64 0, i64 0))
%24 = tail call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%25 = tail call i32 @u(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%26 = tail call i32 @u(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0))
%27 = tail call i32 @u(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.19, i64 0, i64 0))
%28 = tail call i32 @u(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0))
%29 = tail call i32 @exit(i32 1)
unreachable
}