#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*/ err(char *, char *);
scalar_t__ in_dict(unsigned char *, char *);
int /*<<< orphan*/ load_words(unsigned char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  unsigned char filter[(1 << (20 - 3))];
  int i;
  if (argc < 3)
    err("usage: %s dictionary word ...\n", argv[0]);
  for (i = 0; i < (1 << (20 - 3)); i++)
    filter[i] = 0;
  load_words(filter, argv[1]);
  for (i = 2; i < argc; i++) {
    if (in_dict(filter, argv[i]))
      printf("\"%s\" in dictionary\n", argv[i]);
    else
      printf("\"%s\" not in dictionary\n", argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20020,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1176 <main+0x36>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe8f(%rip),%rdi
call   1040 <err@plt>
movl   $0x0,-0x20014(%rbp)
cmpl   $0x20000,-0x20014(%rbp)
jge    11b3 <main+0x73>
movslq -0x20014(%rbp),%rax
movb   $0x0,-0x20010(%rbp,%rax,1)
mov    -0x20014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20014(%rbp)
jmp    1180 <main+0x40>
lea    -0x20010(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1050 <load_words@plt>
movl   $0x2,-0x20014(%rbp)
mov    -0x20014(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1259 <main+0x119>
lea    -0x20010(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x20014(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1060 <in_dict@plt>
cmp    $0x0,%rax
je     1225 <main+0xe5>
mov    -0x10(%rbp),%rax
movslq -0x20014(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe04(%rip),%rdi
call   1030 <printf@plt>
jmp    1240 <main+0x100>
mov    -0x10(%rbp),%rax
movslq -0x20014(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xdf8(%rip),%rdi
call   1030 <printf@plt>
jmp    1245 <main+0x105>
mov    -0x20014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20014(%rbp)
jmp    11d1 <main+0x91>
xor    %eax,%eax
add    $0x20020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20008,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0x2,%edi
jg     117a <main+0x2a>
mov    (%rbx),%rsi
lea    0xe8b(%rip),%rdi
call   1050 <err@plt>
mov    %rsp,%r14
mov    $0x20000,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1060 <load_words@plt>
cmp    $0x3,%ebp
jl     11e8 <main+0x98>
mov    %ebp,%r15d
mov    $0x2,%ebp
mov    %rsp,%r14
lea    0xe84(%rip),%r12
lea    0xe69(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%rbp,8),%rsi
mov    %r14,%rdi
call   1070 <in_dict@plt>
test   %rax,%rax
mov    (%rbx,%rbp,8),%rsi
mov    %r13,%rdi
cmove  %r12,%rdi
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    11c0 <main+0x70>
xor    %eax,%eax
add    $0x20008,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"usage: %s dictionary word ...\0A\00"
@.str.1 = [20 x i8] c"\22%s\22 in dictionary\0A\00"
@.str.2 = [24 x i8] c"\22%s\22 not in dictionary\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [131072 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @err(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %10, %2
store i32 0, i32* %7
br label %16
16: ; preds = %23, %15
%17 = load i32, i32* %7
%18 = icmp slt i32 %17, 131072
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [131072 x i8], [131072 x i8]* %6, i64 0, i64 %21
store i8 0, i8* %22
br label %23
23: ; preds = %19
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %16
26: ; preds = %16
%27 = getelementptr inbounds [131072 x i8], [131072 x i8]* %6, i64 0, i64 0
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32 @load_words(i8* %27, i8* %30)
store i32 2, i32* %7
br label %32
32: ; preds = %60, %26
%33 = load i32, i32* %7
%34 = load i32, i32* %4
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %63
36: ; preds = %32
%37 = getelementptr inbounds [131072 x i8], [131072 x i8]* %6, i64 0, i64 0
%38 = load i8**, i8*** %5
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %38, i64 %40
%42 = load i8*, i8** %41
%43 = call i64 @in_dict(i8* %37, i8* %42)
%44 = icmp ne i64 %43, 0
br i1 %44, label %45, label %52
45: ; preds = %36
%46 = load i8**, i8*** %5
%47 = load i32, i32* %7
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8*, i8** %46, i64 %48
%50 = load i8*, i8** %49
%51 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %50)
br label %59
52: ; preds = %36
%53 = load i8**, i8*** %5
%54 = load i32, i32* %7
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8*, i8** %53, i64 %55
%57 = load i8*, i8** %56
%58 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %57)
br label %59
59: ; preds = %52, %45
br label %60
60: ; preds = %59
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 1
store i32 %62, i32* %7
br label %32
63: ; preds = %32
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"usage: %s dictionary word ...\0A\00"
@.str.1 = [20 x i8] c"\22%s\22 in dictionary\0A\00"
@.str.2 = [24 x i8] c"\22%s\22 not in dictionary\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [131072 x i8]
%4 = getelementptr inbounds [131072 x i8], [131072 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [131072 x i8], [131072 x i8]* %3, i64 0, i64 0
%6 = icmp slt i32 %0, 3
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %1
%9 = tail call i32 @err(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @load_words(i8* %5, i8* %12)
%14 = icmp sgt i32 %0, 2
br i1 %14, label %15, label %28
15: ; preds = %10
%16 = zext i32 %0 to i64
br label %17
17: ; preds = %15, %17
%18 = phi i64 [ 2, %15 ], [ %26, %17 ]
%19 = getelementptr inbounds i8*, i8** %1, i64 %18
%20 = load i8*, i8** %19
%21 = call i64 @in_dict(i8* %5, i8* %20)
%22 = icmp eq i64 %21, 0
%23 = load i8*, i8** %19
%24 = select i1 %22, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0)
%25 = call i32 @printf(i8* %24, i8* %23)
%26 = add nuw nsw i64 %18, 1
%27 = icmp eq i64 %26, %16
br i1 %27, label %28, label %17
28: ; preds = %17, %10
ret i32 0
}