#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("Determine k value to minimize RMSE on known transactions. Usage:");
  u("  cd FEATURES && knnHpSearch2 PARAMS");
  u("where");
  u("  FEATURES is a directory containing the input files");
  u("  FEATURES/features.csv is a file contain features");
  u("  FEATURES/dates.csv is a file containing dates");
  u("  FEATURES/SALE-AMOUNT-log.csv is a file containing log(sale prices)");
  u("  FEATURES/knnHpSearch2-obsOBSCache.txt is a file contains a KnnCache");
  u("  PARAMS are the command line parameters");
  u(" ");
  u("PARAMS:");
  u(" --obs OBS   Observation set id; must be 1A or 2R for now");
  u(" --cache     Write and read estimated prices to "
    "FEATURES/knnHpSearch2-obsOBS-cache.txt");
  u(" ");
  u("DESCRIPTION");
  u(" For every test transaction in 2000, 2001, ..., 2009, "
    "determine error using");
  u(" k=1, 2, ..., 100");
  u(" Calculate RMSE using these transaction errors");
  u(" Determine k that minimizes the RMSE");
  u(" Write results to  ../analysis/knnHpSearch2-obsOBS.k-rmse.csv");
  u(" Write log file to ../analysis/knnHpSearch2-obsOBS.log");
  u(" Write cache file to knnHpSearch2-obsOBS-cache.txt");
  u(" ");
  u("EXAMPLE");
  u(" cd obs1/features");
  u(" knnHpSearch2 --obs 1A");
  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    0xee4(%rip),%rdi
call   1040 <u@plt>
lea    0xefd(%rip),%rdi
call   1040 <u@plt>
lea    0xef7(%rip),%rdi
call   1040 <u@plt>
lea    0xf20(%rip),%rdi
call   1040 <u@plt>
lea    0xf47(%rip),%rdi
call   1040 <u@plt>
lea    0xf6b(%rip),%rdi
call   1040 <u@plt>
lea    0xfa4(%rip),%rdi
call   1040 <u@plt>
lea    0xfde(%rip),%rdi
call   1040 <u@plt>
lea    0xffb(%rip),%rdi
call   1040 <u@plt>
lea    0xff1(%rip),%rdi
call   1040 <u@plt>
lea    0xfed(%rip),%rdi
call   1040 <u@plt>
lea    0x101b(%rip),%rdi
call   1040 <u@plt>
lea    0xfcb(%rip),%rdi
call   1040 <u@plt>
lea    0x105a(%rip),%rdi
call   1040 <u@plt>
lea    0x105a(%rip),%rdi
call   1040 <u@plt>
lea    0x109a(%rip),%rdi
call   1040 <u@plt>
lea    0x10a0(%rip),%rdi
call   1040 <u@plt>
lea    0x10c3(%rip),%rdi
call   1040 <u@plt>
lea    0x10dc(%rip),%rdi
call   1040 <u@plt>
lea    0x110e(%rip),%rdi
call   1040 <u@plt>
lea    0x1139(%rip),%rdi
call   1040 <u@plt>
lea    0xf5f(%rip),%rdi
call   1040 <u@plt>
lea    0x1154(%rip),%rdi
call   1040 <u@plt>
lea    0x1150(%rip),%rdi
call   1040 <u@plt>
lea    0x1156(%rip),%rdi
call   1040 <u@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
test   %rdi,%rdi
je     1145 <usage+0x15>
mov    %rdi,%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
call   1040 <u@plt>
lea    0xec1(%rip),%rdi
call   1040 <u@plt>
lea    0xef6(%rip),%rdi
call   1040 <u@plt>
lea    0xf0f(%rip),%rdi
call   1040 <u@plt>
lea    0xf09(%rip),%rdi
call   1040 <u@plt>
lea    0xf32(%rip),%rdi
call   1040 <u@plt>
lea    0xf59(%rip),%rdi
call   1040 <u@plt>
lea    0xf7d(%rip),%rdi
call   1040 <u@plt>
lea    0xfb6(%rip),%rdi
call   1040 <u@plt>
lea    0xff0(%rip),%rdi
call   1040 <u@plt>
lea    0x100d(%rip),%rbx
mov    %rbx,%rdi
call   1040 <u@plt>
lea    0x1000(%rip),%rdi
call   1040 <u@plt>
lea    0xffc(%rip),%rdi
call   1040 <u@plt>
lea    0x102a(%rip),%rdi
call   1040 <u@plt>
mov    %rbx,%rdi
call   1040 <u@plt>
lea    0x106d(%rip),%rdi
call   1040 <u@plt>
lea    0x106d(%rip),%rdi
call   1040 <u@plt>
lea    0x10ad(%rip),%rdi
call   1040 <u@plt>
lea    0x10b3(%rip),%rdi
call   1040 <u@plt>
lea    0x10d6(%rip),%rdi
call   1040 <u@plt>
lea    0x10ef(%rip),%rdi
call   1040 <u@plt>
lea    0x1121(%rip),%rdi
call   1040 <u@plt>
lea    0x114c(%rip),%rdi
call   1040 <u@plt>
mov    %rbx,%rdi
call   1040 <u@plt>
lea    0x116b(%rip),%rdi
call   1040 <u@plt>
lea    0x1167(%rip),%rdi
call   1040 <u@plt>
lea    0x116d(%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 = [65 x i8] c"Determine k value to minimize RMSE on known transactions. Usage:\00"
@.str.3 = [37 x i8] c" cd FEATURES && knnHpSearch2 PARAMS\00"
@.str.4 = [6 x i8] c"where\00"
@.str.5 = [53 x i8] c" FEATURES is a directory containing the input files\00"
@.str.6 = [51 x i8] c" FEATURES/features.csv is a file contain features\00"
@.str.7 = [48 x i8] c" FEATURES/dates.csv is a file containing dates\00"
@.str.8 = [69 x i8] c" FEATURES/SALE-AMOUNT-log.csv is a file containing log(sale prices)\00"
@.str.9 = [70 x i8] c" FEATURES/knnHpSearch2-obsOBSCache.txt is a file contains a KnnCache\00"
@.str.10 = [41 x i8] c" PARAMS are the command line parameters\00"
@.str.11 = [2 x i8] c" \00"
@.str.12 = [8 x i8] c"PARAMS:\00"
@.str.13 = [58 x i8] c" --obs OBS Observation set id; must be 1A or 2R for now\00"
@.str.14 = [87 x i8] c" --cache Write and read estimated prices to FEATURES/knnHpSearch2-obsOBS-cache.txt\00"
@.str.15 = [12 x i8] c"DESCRIPTION\00"
@.str.16 = [76 x i8] c" For every test transaction in 2000, 2001, ..., 2009, determine error using\00"
@.str.17 = [18 x i8] c" k=1, 2, ..., 100\00"
@.str.18 = [47 x i8] c" Calculate RMSE using these transaction errors\00"
@.str.19 = [37 x i8] c" Determine k that minimizes the RMSE\00"
@.str.20 = [62 x i8] c" Write results to ../analysis/knnHpSearch2-obsOBS.k-rmse.csv\00"
@.str.21 = [55 x i8] c" Write log file to ../analysis/knnHpSearch2-obsOBS.log\00"
@.str.22 = [51 x i8] c" Write cache file to knnHpSearch2-obsOBS-cache.txt\00"
@.str.23 = [8 x i8] c"EXAMPLE\00"
@.str.24 = [18 x i8] c" cd obs1/features\00"
@.str.25 = [23 x i8] c" knnHpSearch2 --obs 1A\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 ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @u(i8* getelementptr inbounds ([37 x i8], [37 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 ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @u(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 @u(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 @u(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 @u(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 @u(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%20 = call i32 @u(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%21 = call i32 @u(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.13, i64 0, i64 0))
%22 = call i32 @u(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.14, i64 0, i64 0))
%23 = call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%24 = call i32 @u(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
%25 = call i32 @u(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.16, i64 0, i64 0))
%26 = call i32 @u(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0))
%27 = call i32 @u(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.18, i64 0, i64 0))
%28 = call i32 @u(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.19, i64 0, i64 0))
%29 = call i32 @u(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.20, i64 0, i64 0))
%30 = call i32 @u(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.21, i64 0, i64 0))
%31 = call i32 @u(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.22, i64 0, i64 0))
%32 = call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%33 = call i32 @u(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0))
%34 = call i32 @u(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.24, i64 0, i64 0))
%35 = call i32 @u(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0))
%36 = 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 = [65 x i8] c"Determine k value to minimize RMSE on known transactions. Usage:\00"
@.str.3 = [37 x i8] c" cd FEATURES && knnHpSearch2 PARAMS\00"
@.str.4 = [6 x i8] c"where\00"
@.str.5 = [53 x i8] c" FEATURES is a directory containing the input files\00"
@.str.6 = [51 x i8] c" FEATURES/features.csv is a file contain features\00"
@.str.7 = [48 x i8] c" FEATURES/dates.csv is a file containing dates\00"
@.str.8 = [69 x i8] c" FEATURES/SALE-AMOUNT-log.csv is a file containing log(sale prices)\00"
@.str.9 = [70 x i8] c" FEATURES/knnHpSearch2-obsOBSCache.txt is a file contains a KnnCache\00"
@.str.10 = [41 x i8] c" PARAMS are the command line parameters\00"
@.str.11 = [2 x i8] c" \00"
@.str.12 = [8 x i8] c"PARAMS:\00"
@.str.13 = [58 x i8] c" --obs OBS Observation set id; must be 1A or 2R for now\00"
@.str.14 = [87 x i8] c" --cache Write and read estimated prices to FEATURES/knnHpSearch2-obsOBS-cache.txt\00"
@.str.15 = [12 x i8] c"DESCRIPTION\00"
@.str.16 = [76 x i8] c" For every test transaction in 2000, 2001, ..., 2009, determine error using\00"
@.str.17 = [18 x i8] c" k=1, 2, ..., 100\00"
@.str.18 = [47 x i8] c" Calculate RMSE using these transaction errors\00"
@.str.19 = [37 x i8] c" Determine k that minimizes the RMSE\00"
@.str.20 = [62 x i8] c" Write results to ../analysis/knnHpSearch2-obsOBS.k-rmse.csv\00"
@.str.21 = [55 x i8] c" Write log file to ../analysis/knnHpSearch2-obsOBS.log\00"
@.str.22 = [51 x i8] c" Write cache file to knnHpSearch2-obsOBS-cache.txt\00"
@.str.23 = [8 x i8] c"EXAMPLE\00"
@.str.24 = [18 x i8] c" cd obs1/features\00"
@.str.25 = [23 x i8] c" knnHpSearch2 --obs 1A\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 ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @u(i8* getelementptr inbounds ([37 x i8], [37 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 ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 @u(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0))
%12 = tail call i32 @u(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%13 = tail call i32 @u(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.8, i64 0, i64 0))
%14 = tail call i32 @u(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0))
%15 = tail call i32 @u(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0))
%16 = tail call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%17 = tail call i32 @u(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%18 = tail call i32 @u(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.13, i64 0, i64 0))
%19 = tail call i32 @u(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.14, i64 0, i64 0))
%20 = tail call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%21 = tail call i32 @u(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
%22 = tail call i32 @u(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.16, i64 0, i64 0))
%23 = tail call i32 @u(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0))
%24 = tail call i32 @u(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.18, i64 0, i64 0))
%25 = tail call i32 @u(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.19, i64 0, i64 0))
%26 = tail call i32 @u(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.20, i64 0, i64 0))
%27 = tail call i32 @u(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.21, i64 0, i64 0))
%28 = tail call i32 @u(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.22, i64 0, i64 0))
%29 = tail call i32 @u(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%30 = tail call i32 @u(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0))
%31 = tail call i32 @u(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.24, i64 0, i64 0))
%32 = tail call i32 @u(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0))
%33 = tail call i32 @exit(i32 1)
unreachable
}