#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*/ enoughtParametersCheck(char *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *extractQuery(char *);
int /*<<< orphan*/ free(char *);
char parseParameters(char **);
int /*<<< orphan*/ resetConfiguration();
int /*<<< orphan*/ search(char *, int, char **);
int main(int argc, char *argv[]) {
  char *q = NULL;
  char c;
  short k;
  enoughtParametersCheck(argv[0], argc);
  resetConfiguration();
  c = parseParameters(argv);
  q = extractQuery(argv[c + 1]);
  search(q, (argc - c - 2), &argv[c + 2]);
  free(q);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%esi
call   1070 <enoughtParametersCheck@plt>
mov    $0x0,%al
call   1060 <resetConfiguration@plt>
mov    -0x10(%rbp),%rdi
call   1090 <parseParameters@plt>
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rax
movsbl -0x19(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <extractQuery@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
movsbl -0x19(%rbp),%eax
sub    %eax,%esi
sub    $0x2,%esi
mov    -0x10(%rbp),%rdx
movsbl -0x19(%rbp),%eax
add    $0x2,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1050 <search@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%r12
mov    %edi,%r14d
mov    (%rsi),%rdi
mov    %r14d,%esi
call   1070 <enoughtParametersCheck@plt>
xor    %eax,%eax
call   1060 <resetConfiguration@plt>
mov    %r12,%rdi
call   1090 <parseParameters@plt>
movsbl %al,%ebx
movsbq %bl,%r13
mov    0x8(%r12,%r13,8),%rdi
call   1040 <extractQuery@plt>
mov    %rax,%r15
neg    %ebx
lea    (%r14,%rbx,1),%esi
add    $0xfffffffe,%esi
lea    (%r12,%r13,8),%rdx
add    $0x10,%rdx
mov    %rax,%rdi
call   1050 <search@plt>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i16
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i32, i32* %4
%13 = call i32 @enoughtParametersCheck(i8* %11, i32 %12)
%14 = call i32 (...) @resetConfiguration()
%15 = load i8**, i8*** %5
%16 = call signext i8 @parseParameters(i8** %15)
store i8 %16, i8* %7
%17 = load i8**, i8*** %5
%18 = load i8, i8* %7
%19 = sext i8 %18 to i32
%20 = add nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8*, i8** %17, i64 %21
%23 = load i8*, i8** %22
%24 = call i8* @extractQuery(i8* %23)
store i8* %24, i8** %6
%25 = load i8*, i8** %6
%26 = load i32, i32* %4
%27 = load i8, i8* %7
%28 = sext i8 %27 to i32
%29 = sub nsw i32 %26, %28
%30 = sub nsw i32 %29, 2
%31 = load i8**, i8*** %5
%32 = load i8, i8* %7
%33 = sext i8 %32 to i32
%34 = add nsw i32 %33, 2
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8*, i8** %31, i64 %35
%37 = call i32 @search(i8* %25, i32 %30, i8** %36)
%38 = load i8*, i8** %6
%39 = call i32 @free(i8* %38)
%40 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @enoughtParametersCheck(i8* %3, i32 %0)
%5 = tail call i32 (...) @resetConfiguration()
%6 = tail call signext i8 @parseParameters(i8** %1)
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i8* @extractQuery(i8* %11)
%13 = add i32 %0, -2
%14 = sub i32 %13, %7
%15 = add nsw i32 %7, 2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
%18 = tail call i32 @search(i8* %12, i32 %14, i8** %17)
%19 = tail call i32 @free(i8* %12)
%20 = tail call i32 @exit(i32 0)
unreachable
}