#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage() {
  fputs("Usage: srdsgrep [-v][-h][-c][-m <max>][-r][-l <blockLength>][-b "
        "<keyBegin>][-e <keyEnd>] [-x] key [ sorted_file ... ]\n",
        stderr);
  fputs("  sorted raw data set grep\n", stderr);
  fputs("  -v     verbose output\n", stderr);
  fputs("  -h     print usage\n", stderr);
  fputs("  -c     print count matches - not matching contents\n", stderr);
  fputs("  -m <v> stop reading file after N matches. default is no stop.\n",
        stderr);
  fputs("  -B <v> bufferSize in kBytes\n", stderr);
  fputs("  -r     sorted file is reversed (descending) order\n", stderr);
  fputs("  -l <v> length of each binary block in bytes\n", stderr);
  fputs("  -b <v> key's begin offset inside block\n", stderr);
  fputs("  -e <v> key's end offset inside block\n", stderr);
  fputs("  -x     key (or key file content) is hexadecimal, e.g. FFAA01\n",
        stderr);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xf3e(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xf45(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    0xf49(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%esi
lea    0xf4a(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%esi
lea    0xf6b(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%esi
lea    0xf97(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%esi
lea    0xfa1(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%esi
lea    0xfc1(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%esi
lea    0xfdb(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%esi
lea    0xff0(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%esi
lea    0x1003(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf48(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf56(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf61(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf69(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf91(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xfc4(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xfd5(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xffc(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0x101d(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0x1039(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0x1053(%rip),%rdi
pop    %rbx
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [119 x i8] c"Usage: srdsgrep [-v][-h][-c][-m <max>][-r][-l <blockLength>][-b <keyBegin>][-e <keyEnd>] [-x] key [ sorted_file ... ]\0A\00"
@stderr = global i32 0
@.str.1 = [28 x i8] c" sorted raw data set grep\0A\00"
@.str.2 = [25 x i8] c" -v verbose output\0A\00"
@.str.3 = [22 x i8] c" -h print usage\0A\00"
@.str.4 = [54 x i8] c" -c print count matches - not matching contents\0A\00"
@.str.5 = [65 x i8] c" -m <v> stop reading file after N matches. default is no stop.\0A\00"
@.str.6 = [31 x i8] c" -B <v> bufferSize in kBytes\0A\00"
@.str.7 = [53 x i8] c" -r sorted file is reversed (descending) order\0A\00"
@.str.8 = [47 x i8] c" -l <v> length of each binary block in bytes\0A\00"
@.str.9 = [42 x i8] c" -b <v> key's begin offset inside block\0A\00"
@.str.10 = [40 x i8] c" -e <v> key's end offset inside block\0A\00"
@.str.11 = [64 x i8] c" -x key (or key file content) is hexadecimal, e.g. FFAA01\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stderr
%8 = call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stderr
%10 = call i32 @fputs(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fputs(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @stderr
%14 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @stderr
%16 = call i32 @fputs(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @stderr
%18 = call i32 @fputs(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @stderr
%20 = call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @stderr
%22 = call i32 @fputs(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @stderr
%24 = call i32 @fputs(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.11, i64 0, i64 0), i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [119 x i8] c"Usage: srdsgrep [-v][-h][-c][-m <max>][-r][-l <blockLength>][-b <keyBegin>][-e <keyEnd>] [-x] key [ sorted_file ... ]\0A\00"
@stderr = global i32 0
@.str.1 = [28 x i8] c" sorted raw data set grep\0A\00"
@.str.2 = [25 x i8] c" -v verbose output\0A\00"
@.str.3 = [22 x i8] c" -h print usage\0A\00"
@.str.4 = [54 x i8] c" -c print count matches - not matching contents\0A\00"
@.str.5 = [65 x i8] c" -m <v> stop reading file after N matches. default is no stop.\0A\00"
@.str.6 = [31 x i8] c" -B <v> bufferSize in kBytes\0A\00"
@.str.7 = [53 x i8] c" -r sorted file is reversed (descending) order\0A\00"
@.str.8 = [47 x i8] c" -l <v> length of each binary block in bytes\0A\00"
@.str.9 = [42 x i8] c" -b <v> key's begin offset inside block\0A\00"
@.str.10 = [40 x i8] c" -e <v> key's end offset inside block\0A\00"
@.str.11 = [64 x i8] c" -x key (or key file content) is hexadecimal, e.g. FFAA01\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stderr
%10 = tail call i32 @fputs(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stderr
%12 = tail call i32 @fputs(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @stderr
%14 = tail call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @stderr
%16 = tail call i32 @fputs(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @stderr
%18 = tail call i32 @fputs(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @stderr
%20 = tail call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @stderr
%22 = tail call i32 @fputs(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @stderr
%24 = tail call i32 @fputs(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.11, i64 0, i64 0), i32 %23)
ret void
}