#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 *, ...);
void help(const char *prog) {
  printf("%s:\n", prog);
  printf("\t-h\t\thelp\n");
  printf("\t-a <val>\tcompute number of samples above <val>\n");
  printf("\t-b <val>\tcompute number of samples below <val>\n");
  printf("\t-p <0-100>\tcompute approximate percentile\n");
  printf("\t-i <val>\tcompute approximate inverse quantile at <val>\n");
  printf("\t-C\t\tcalculate difference between cumulative histograms\n");
  printf("\t[hist1 [hist2 [...]]]\n\n");
  printf("If no hists are specified, stdin is read\n");
  printf("\n\nExample:\n\n");
  printf("\tcurl url |\n\t  jq -r .stat._value |\n\t  %s -i 0.2 -p 0 -p 100 -p "
         "99 -p 99.999 -p 50\n\n",
         prog);
  printf("\tThis will fetch the document at URL, extract the b64 encoded "
         "histogram\n");
  printf("\tprinting the inverse quantile at 0.2 (seconds)\n");
  printf("\tand the p0, p50, p99, p99.999, and p100\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfa9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x102b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x104e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
lea    0xf64(%rip),%rdi
call   1030 <puts@plt>
lea    0xf83(%rip),%rdi
call   1030 <puts@plt>
lea    0xfaf(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdb(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe7(%rip),%rdi
call   1030 <puts@plt>
lea    0x1004(%rip),%rdi
call   1030 <puts@plt>
lea    0xe5d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xff3(%rip),%rdi
call   1030 <puts@plt>
lea    0x102f(%rip),%rdi
call   1030 <puts@plt>
lea    0x1053(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s:\0A\00"
@.str.1 = [11 x i8] c"\09-h\09\09help\0A\00"
@.str.2 = [49 x i8] c"\09-a <val>\09compute number of samples above <val>\0A\00"
@.str.3 = [49 x i8] c"\09-b <val>\09compute number of samples below <val>\0A\00"
@.str.4 = [44 x i8] c"\09-p <0-100>\09compute approximate percentile\0A\00"
@.str.5 = [57 x i8] c"\09-i <val>\09compute approximate inverse quantile at <val>\0A\00"
@.str.6 = [57 x i8] c"\09-C\09\09calculate difference between cumulative histograms\0A\00"
@.str.7 = [25 x i8] c"\09[hist1 [hist2 [...]]]\0A\0A\00"
@.str.8 = [42 x i8] c"If no hists are specified, stdin is read\0A\00"
@.str.9 = [13 x i8] c"\0A\0AExample:\0A\0A\00"
@.str.10 = [85 x i8] c"\09curl url |\0A\09 jq -r .stat._value |\0A\09 %s -i 0.2 -p 0 -p 100 -p 99 -p 99.999 -p 50\0A\0A\00"
@.str.11 = [73 x i8] c"\09This will fetch the document at URL, extract the b64 encoded histogram\0A\00"
@.str.12 = [49 x i8] c"\09printing the inverse quantile at 0.2 (seconds)\0A\00"
@.str.13 = [42 x i8] c"\09and the p0, p50, p99, p99.999, and p100\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%14 = load i8*, i8** %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.10, i64 0, i64 0), i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.11, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s:\0A\00"
@.str.10 = [85 x i8] c"\09curl url |\0A\09 jq -r .stat._value |\0A\09 %s -i 0.2 -p 0 -p 100 -p 99 -p 99.999 -p 50\0A\0A\00"
@str = [10 x i8] c"\09-h\09\09help\00"
@str.14 = [48 x i8] c"\09-a <val>\09compute number of samples above <val>\00"
@str.15 = [48 x i8] c"\09-b <val>\09compute number of samples below <val>\00"
@str.16 = [43 x i8] c"\09-p <0-100>\09compute approximate percentile\00"
@str.17 = [56 x i8] c"\09-i <val>\09compute approximate inverse quantile at <val>\00"
@str.18 = [56 x i8] c"\09-C\09\09calculate difference between cumulative histograms\00"
@str.19 = [24 x i8] c"\09[hist1 [hist2 [...]]]\0A\00"
@str.20 = [41 x i8] c"If no hists are specified, stdin is read\00"
@str.21 = [12 x i8] c"\0A\0AExample:\0A\00"
@str.22 = [72 x i8] c"\09This will fetch the document at URL, extract the b64 encoded histogram\00"
@str.23 = [48 x i8] c"\09printing the inverse quantile at 0.2 (seconds)\00"
@str.24 = [41 x i8] c"\09and the p0, p50, p99, p99.999, and p100\00"
define void @help(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.14, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.15, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.16, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.17, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.18, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.19, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.20, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.21, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str.10, i64 0, i64 0), i8* %0)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.22, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.23, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.24, i64 0, i64 0))
ret void
}