#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*/ test1();
int /*<<< orphan*/ test2(char *);
int /*<<< orphan*/ test3(char *, char);
int /*<<< orphan*/ test4(char *, char *);
int /*<<< orphan*/ test5();
int /*<<< orphan*/ test6();
int /*<<< orphan*/ test7(int);
int main(void) {
  test1();
  test2("lexicon.txt");
  test2("small.txt");
  test2("allwords.txt");
  test3("lexicon.txt", 'a');
  test3("lexicon.txt", 'A');
  test3("lexicon.txt", 'l');
  test3("lexicon.txt", '$');
  test3("lexicon.txt", 'e');
  test3("allwords.txt", 'M');
  test3("allwords.txt", 'q');
  test3("allwords.txt", '5');
  test4("lexicon.txt", "APPLE");
  test4("lexicon.txt", "Apple");
  test4("lexicon.txt", "apple");
  test4("lexicon.txt", "appl");
  test4("small.txt", "abalone");
  test4("allwords.txt", "interdigitation");
  test4("allwords.txt", "interdigalizing");
  test5();
  test6();
  test7(5);
  test7(20);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test1@plt>
lea    0xe73(%rip),%rdi
call   1090 <test2@plt>
lea    0xe73(%rip),%rdi
call   1090 <test2@plt>
lea    0xe71(%rip),%rdi
call   1090 <test2@plt>
lea    0xe4f(%rip),%rdi
mov    $0x61,%esi
call   1050 <test3@plt>
lea    0xe3e(%rip),%rdi
mov    $0x41,%esi
call   1050 <test3@plt>
lea    0xe2d(%rip),%rdi
mov    $0x6c,%esi
call   1050 <test3@plt>
lea    0xe1c(%rip),%rdi
mov    $0x24,%esi
call   1050 <test3@plt>
lea    0xe0b(%rip),%rdi
mov    $0x65,%esi
call   1050 <test3@plt>
lea    0xe10(%rip),%rdi
mov    $0x4d,%esi
call   1050 <test3@plt>
lea    0xdff(%rip),%rdi
mov    $0x71,%esi
call   1050 <test3@plt>
lea    0xdee(%rip),%rdi
mov    $0x35,%esi
call   1050 <test3@plt>
lea    0xdc7(%rip),%rdi
lea    0xde3(%rip),%rsi
call   1080 <test4@plt>
lea    0xdb4(%rip),%rdi
lea    0xdd6(%rip),%rsi
call   1080 <test4@plt>
lea    0xda1(%rip),%rdi
lea    0xdc9(%rip),%rsi
call   1080 <test4@plt>
lea    0xd8e(%rip),%rdi
lea    0xdbc(%rip),%rsi
call   1080 <test4@plt>
lea    0xd87(%rip),%rdi
lea    0xdae(%rip),%rsi
call   1080 <test4@plt>
lea    0xd7e(%rip),%rdi
lea    0xda3(%rip),%rsi
call   1080 <test4@plt>
lea    0xd6b(%rip),%rdi
lea    0xda0(%rip),%rsi
call   1080 <test4@plt>
mov    $0x0,%al
call   1040 <test5@plt>
mov    $0x0,%al
call   1070 <test6@plt>
mov    $0x5,%edi
call   1030 <test7@plt>
mov    $0x14,%edi
call   1030 <test7@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1060 <test1@plt>
lea    0xe7d(%rip),%rbx
mov    %rbx,%rdi
call   1090 <test2@plt>
lea    0xe7a(%rip),%r14
mov    %r14,%rdi
call   1090 <test2@plt>
lea    0xe75(%rip),%r15
mov    %r15,%rdi
call   1090 <test2@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
call   1050 <test3@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
call   1050 <test3@plt>
mov    %rbx,%rdi
mov    $0x6c,%esi
call   1050 <test3@plt>
mov    %rbx,%rdi
mov    $0x24,%esi
call   1050 <test3@plt>
mov    %rbx,%rdi
mov    $0x65,%esi
call   1050 <test3@plt>
mov    %r15,%rdi
mov    $0x4d,%esi
call   1050 <test3@plt>
mov    %r15,%rdi
mov    $0x71,%esi
call   1050 <test3@plt>
mov    %r15,%rdi
mov    $0x35,%esi
call   1050 <test3@plt>
lea    0xe0b(%rip),%rsi
mov    %rbx,%rdi
call   1080 <test4@plt>
lea    0xe02(%rip),%rsi
mov    %rbx,%rdi
call   1080 <test4@plt>
lea    0xdf9(%rip),%rsi
mov    %rbx,%rdi
call   1080 <test4@plt>
lea    0xdf0(%rip),%rsi
mov    %rbx,%rdi
call   1080 <test4@plt>
lea    0xde6(%rip),%rsi
mov    %r14,%rdi
call   1080 <test4@plt>
lea    0xddf(%rip),%rsi
mov    %r15,%rdi
call   1080 <test4@plt>
lea    0xde0(%rip),%rsi
mov    %r15,%rdi
call   1080 <test4@plt>
xor    %eax,%eax
call   1040 <test5@plt>
xor    %eax,%eax
call   1070 <test6@plt>
mov    $0x5,%edi
call   1030 <test7@plt>
mov    $0x14,%edi
call   1030 <test7@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"lexicon.txt\00"
@.str.1 = [10 x i8] c"small.txt\00"
@.str.2 = [13 x i8] c"allwords.txt\00"
@.str.3 = [6 x i8] c"APPLE\00"
@.str.4 = [6 x i8] c"Apple\00"
@.str.5 = [6 x i8] c"apple\00"
@.str.6 = [5 x i8] c"appl\00"
@.str.7 = [8 x i8] c"abalone\00"
@.str.8 = [16 x i8] c"interdigitation\00"
@.str.9 = [16 x i8] c"interdigalizing\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test1()
%3 = call i32 @test2(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @test2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @test2(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 97)
%7 = call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 65)
%8 = call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 108)
%9 = call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 36)
%10 = call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 101)
%11 = call i32 @test3(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8 signext 77)
%12 = call i32 @test3(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8 signext 113)
%13 = call i32 @test3(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8 signext 53)
%14 = call i32 @test4(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @test4(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @test4(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 @test4(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 @test4(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%19 = call i32 @test4(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 @test4(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%21 = call i32 (...) @test5()
%22 = call i32 (...) @test6()
%23 = call i32 @test7(i32 5)
%24 = call i32 @test7(i32 20)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"lexicon.txt\00"
@.str.1 = [10 x i8] c"small.txt\00"
@.str.2 = [13 x i8] c"allwords.txt\00"
@.str.3 = [6 x i8] c"APPLE\00"
@.str.4 = [6 x i8] c"Apple\00"
@.str.5 = [6 x i8] c"apple\00"
@.str.6 = [5 x i8] c"appl\00"
@.str.7 = [8 x i8] c"abalone\00"
@.str.8 = [16 x i8] c"interdigitation\00"
@.str.9 = [16 x i8] c"interdigalizing\00"
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 @test2(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @test2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @test2(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 97)
%6 = tail call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 65)
%7 = tail call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 108)
%8 = tail call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 36)
%9 = tail call i32 @test3(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 101)
%10 = tail call i32 @test3(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8 signext 77)
%11 = tail call i32 @test3(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8 signext 113)
%12 = tail call i32 @test3(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8 signext 53)
%13 = tail call i32 @test4(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%14 = tail call i32 @test4(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%15 = tail call i32 @test4(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%16 = tail call i32 @test4(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%17 = tail call i32 @test4(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%18 = tail call i32 @test4(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%19 = tail call i32 @test4(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%20 = tail call i32 (...) @test5()
%21 = tail call i32 (...) @test6()
%22 = tail call i32 @test7(i32 5)
%23 = tail call i32 @test7(i32 20)
ret i32 0
}