#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*/ assert(int, char *);
int search_binary(int *, int, int, int);
int search_linear(int *, int, int /*<<< orphan*/, int);
void jlibc_search_run_tests() {
  int the_array[10] = {1, 8, 25, 32, 37, 42, 55, 69, 90, 97};
  assert(search_binary(the_array, 1, 0, 9) == 0, "search_binary #1 failed");
  assert(search_binary(the_array, 8, 0, 9) == 1, "search_binary #2 failed");
  assert(search_binary(the_array, 25, 0, 9) == 2, "search_binary #3 failed");
  assert(search_binary(the_array, 32, 0, 9) == 3, "search_binary #4 failed");
  assert(search_binary(the_array, 37, 0, 9) == 4, "search_binary #5 failed");
  assert(search_binary(the_array, 42, 0, 9) == 5, "search_binary #6 failed");
  assert(search_binary(the_array, 55, 0, 9) == 6, "search_binary #7 failed");
  assert(search_binary(the_array, 69, 0, 9) == 7, "search_binary #8 failed");
  assert(search_binary(the_array, 90, 0, 9) == 8, "search_binary #9 failed");
  assert(search_binary(the_array, 97, 0, 9) == 9, "search_binary #9 failed");
  assert(search_binary(the_array, 32, 1, 8) == 3, "search_binary #10 failed");
  assert(search_linear(the_array, 1, 0, 9) == 0, "search_linear #1 failed");
  assert(search_linear(the_array, 8, 0, 9) == 1, "search_linear #2 failed");
  assert(search_linear(the_array, 25, 0, 9) == 2, "search_linear #3 failed");
  assert(search_linear(the_array, 32, 0, 9) == 3, "search_linear #4 failed");
  assert(search_linear(the_array, 37, 0, 9) == 4, "search_linear #5 failed");
  assert(search_linear(the_array, 42, 0, 9) == 5, "search_linear #6 ailed");
  assert(search_linear(the_array, 55, 0, 9) == 6, "search_linear #7 failed");
  assert(search_linear(the_array, 69, 0, 9) == 7, "search_linear #8 failed");
  assert(search_linear(the_array, 90, 0, 9) == 8, "search_linear #9 failed");
  assert(search_binary(the_array, 97, 0, 9) == 9, "search_binary #9 failed");
  assert(search_binary(the_array, 32, 1, 8) == 3, "search_linear #10 failed");
}


x86 assembly (clang, -O0):
<jlibc_search_run_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xea4(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe90(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x19,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe7c(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe68(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x25,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe54(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x2a,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe40(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x37,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe2c(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x45,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe18(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5a,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe04(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x61,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xdd8(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1040 <search_binary@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xdc1(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xdae(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd9a(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x19,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd86(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd72(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x25,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd5e(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x2a,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd4a(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x37,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd35(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x45,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd21(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5a,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
cmp    $0x8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd0d(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x61,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xbf1(%rip),%rsi
call   1050 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1040 <search_binary@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xcca(%rip),%rsi
call   1050 <assert@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jlibc_search_run_tests>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    0xee2(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
lea    0xea8(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
lea    0xe97(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xe86(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
lea    0xe75(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x25,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
lea    0xe64(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x2a,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
lea    0xe53(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x37,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
lea    0xe42(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x45,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xe31(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x5a,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
lea    0xe20(%rip),%r14
mov    %r14,%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
mov    %r14,%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
lea    0xde4(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
lea    0xdd5(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
lea    0xdc4(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xdb3(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
lea    0xda2(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x25,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
lea    0xd91(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x2a,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
lea    0xd80(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x37,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
lea    0xd6e(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x45,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xd5d(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x5a,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1030 <search_linear@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
lea    0xd4c(%rip),%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
xor    %edx,%edx
mov    $0x9,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
mov    %r14,%rsi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1040 <search_binary@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
lea    0xd13(%rip),%rsi
call   1050 <assert@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.jlibc_search_run_tests.the_array = [10 x i32] [i32 1, i32 8, i32 25, i32 32, i32 37, i32 42, i32 55, i32 69, i32 90, i32 97]
@.str = [24 x i8] c"search_binary failed\00"
@.str.1 = [24 x i8] c"search_binary failed\00"
@.str.2 = [24 x i8] c"search_binary failed\00"
@.str.3 = [24 x i8] c"search_binary failed\00"
@.str.4 = [24 x i8] c"search_binary failed\00"
@.str.5 = [24 x i8] c"search_binary failed\00"
@.str.6 = [24 x i8] c"search_binary failed\00"
@.str.7 = [24 x i8] c"search_binary failed\00"
@.str.8 = [24 x i8] c"search_binary failed\00"
@.str.9 = [25 x i8] c"search_binary failed\00"
@.str.10 = [24 x i8] c"search_linear failed\00"
@.str.11 = [24 x i8] c"search_linear failed\00"
@.str.12 = [24 x i8] c"search_linear failed\00"
@.str.13 = [24 x i8] c"search_linear failed\00"
@.str.14 = [24 x i8] c"search_linear failed\00"
@.str.15 = [23 x i8] c"search_linear ailed\00"
@.str.16 = [24 x i8] c"search_linear failed\00"
@.str.17 = [24 x i8] c"search_linear failed\00"
@.str.18 = [24 x i8] c"search_linear failed\00"
@.str.19 = [25 x i8] c"search_linear failed\00"
define void @jlibc_search_run_tests() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @search_binary(i32* %3, i32 1, i32 0, i32 9)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%9 = call i32 @search_binary(i32* %8, i32 8, i32 0, i32 9)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%14 = call i32 @search_binary(i32* %13, i32 25, i32 0, i32 9)
%15 = icmp eq i32 %14, 2
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%19 = call i32 @search_binary(i32* %18, i32 32, i32 0, i32 9)
%20 = icmp eq i32 %19, 3
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%24 = call i32 @search_binary(i32* %23, i32 37, i32 0, i32 9)
%25 = icmp eq i32 %24, 4
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%28 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%29 = call i32 @search_binary(i32* %28, i32 42, i32 0, i32 9)
%30 = icmp eq i32 %29, 5
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%34 = call i32 @search_binary(i32* %33, i32 55, i32 0, i32 9)
%35 = icmp eq i32 %34, 6
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%38 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%39 = call i32 @search_binary(i32* %38, i32 69, i32 0, i32 9)
%40 = icmp eq i32 %39, 7
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%43 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%44 = call i32 @search_binary(i32* %43, i32 90, i32 0, i32 9)
%45 = icmp eq i32 %44, 8
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%49 = call i32 @search_binary(i32* %48, i32 97, i32 0, i32 9)
%50 = icmp eq i32 %49, 9
%51 = zext i1 %50 to i32
%52 = call i32 @assert(i32 %51, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%53 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%54 = call i32 @search_binary(i32* %53, i32 32, i32 1, i32 8)
%55 = icmp eq i32 %54, 3
%56 = zext i1 %55 to i32
%57 = call i32 @assert(i32 %56, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%58 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%59 = call i32 @search_linear(i32* %58, i32 1, i32 0, i32 9)
%60 = icmp eq i32 %59, 0
%61 = zext i1 %60 to i32
%62 = call i32 @assert(i32 %61, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%63 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%64 = call i32 @search_linear(i32* %63, i32 8, i32 0, i32 9)
%65 = icmp eq i32 %64, 1
%66 = zext i1 %65 to i32
%67 = call i32 @assert(i32 %66, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%68 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%69 = call i32 @search_linear(i32* %68, i32 25, i32 0, i32 9)
%70 = icmp eq i32 %69, 2
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
%73 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%74 = call i32 @search_linear(i32* %73, i32 32, i32 0, i32 9)
%75 = icmp eq i32 %74, 3
%76 = zext i1 %75 to i32
%77 = call i32 @assert(i32 %76, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%78 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%79 = call i32 @search_linear(i32* %78, i32 37, i32 0, i32 9)
%80 = icmp eq i32 %79, 4
%81 = zext i1 %80 to i32
%82 = call i32 @assert(i32 %81, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%83 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%84 = call i32 @search_linear(i32* %83, i32 42, i32 0, i32 9)
%85 = icmp eq i32 %84, 5
%86 = zext i1 %85 to i32
%87 = call i32 @assert(i32 %86, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
%88 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%89 = call i32 @search_linear(i32* %88, i32 55, i32 0, i32 9)
%90 = icmp eq i32 %89, 6
%91 = zext i1 %90 to i32
%92 = call i32 @assert(i32 %91, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0))
%93 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%94 = call i32 @search_linear(i32* %93, i32 69, i32 0, i32 9)
%95 = icmp eq i32 %94, 7
%96 = zext i1 %95 to i32
%97 = call i32 @assert(i32 %96, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
%98 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%99 = call i32 @search_linear(i32* %98, i32 90, i32 0, i32 9)
%100 = icmp eq i32 %99, 8
%101 = zext i1 %100 to i32
%102 = call i32 @assert(i32 %101, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0))
%103 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%104 = call i32 @search_binary(i32* %103, i32 97, i32 0, i32 9)
%105 = icmp eq i32 %104, 9
%106 = zext i1 %105 to i32
%107 = call i32 @assert(i32 %106, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%108 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%109 = call i32 @search_binary(i32* %108, i32 32, i32 1, i32 8)
%110 = icmp eq i32 %109, 3
%111 = zext i1 %110 to i32
%112 = call i32 @assert(i32 %111, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.jlibc_search_run_tests.the_array = [10 x i32] [i32 1, i32 8, i32 25, i32 32, i32 37, i32 42, i32 55, i32 69, i32 90, i32 97]
@.str = [24 x i8] c"search_binary failed\00"
@.str.1 = [24 x i8] c"search_binary failed\00"
@.str.2 = [24 x i8] c"search_binary failed\00"
@.str.3 = [24 x i8] c"search_binary failed\00"
@.str.4 = [24 x i8] c"search_binary failed\00"
@.str.5 = [24 x i8] c"search_binary failed\00"
@.str.6 = [24 x i8] c"search_binary failed\00"
@.str.7 = [24 x i8] c"search_binary failed\00"
@.str.8 = [24 x i8] c"search_binary failed\00"
@.str.9 = [25 x i8] c"search_binary failed\00"
@.str.10 = [24 x i8] c"search_linear failed\00"
@.str.11 = [24 x i8] c"search_linear failed\00"
@.str.12 = [24 x i8] c"search_linear failed\00"
@.str.13 = [24 x i8] c"search_linear failed\00"
@.str.14 = [24 x i8] c"search_linear failed\00"
@.str.15 = [23 x i8] c"search_linear ailed\00"
@.str.16 = [24 x i8] c"search_linear failed\00"
@.str.17 = [24 x i8] c"search_linear failed\00"
@.str.18 = [24 x i8] c"search_linear failed\00"
@.str.19 = [25 x i8] c"search_linear failed\00"
define void @jlibc_search_run_tests() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @search_binary(i32* %3, i32 1, i32 0, i32 9)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @search_binary(i32* %3, i32 8, i32 0, i32 9)
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @search_binary(i32* %3, i32 25, i32 0, i32 9)
%13 = icmp eq i32 %12, 2
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @search_binary(i32* %3, i32 32, i32 0, i32 9)
%17 = icmp eq i32 %16, 3
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @search_binary(i32* %3, i32 37, i32 0, i32 9)
%21 = icmp eq i32 %20, 4
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 @search_binary(i32* %3, i32 42, i32 0, i32 9)
%25 = icmp eq i32 %24, 5
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%28 = call i32 @search_binary(i32* %3, i32 55, i32 0, i32 9)
%29 = icmp eq i32 %28, 6
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%32 = call i32 @search_binary(i32* %3, i32 69, i32 0, i32 9)
%33 = icmp eq i32 %32, 7
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%36 = call i32 @search_binary(i32* %3, i32 90, i32 0, i32 9)
%37 = icmp eq i32 %36, 8
%38 = zext i1 %37 to i32
%39 = call i32 @assert(i32 %38, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%40 = call i32 @search_binary(i32* %3, i32 97, i32 0, i32 9)
%41 = icmp eq i32 %40, 9
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%44 = call i32 @search_binary(i32* %3, i32 32, i32 1, i32 8)
%45 = icmp eq i32 %44, 3
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%48 = call i32 @search_linear(i32* %3, i32 1, i32 0, i32 9)
%49 = icmp eq i32 %48, 0
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%52 = call i32 @search_linear(i32* %3, i32 8, i32 0, i32 9)
%53 = icmp eq i32 %52, 1
%54 = zext i1 %53 to i32
%55 = call i32 @assert(i32 %54, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%56 = call i32 @search_linear(i32* %3, i32 25, i32 0, i32 9)
%57 = icmp eq i32 %56, 2
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
%60 = call i32 @search_linear(i32* %3, i32 32, i32 0, i32 9)
%61 = icmp eq i32 %60, 3
%62 = zext i1 %61 to i32
%63 = call i32 @assert(i32 %62, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%64 = call i32 @search_linear(i32* %3, i32 37, i32 0, i32 9)
%65 = icmp eq i32 %64, 4
%66 = zext i1 %65 to i32
%67 = call i32 @assert(i32 %66, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%68 = call i32 @search_linear(i32* %3, i32 42, i32 0, i32 9)
%69 = icmp eq i32 %68, 5
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
%72 = call i32 @search_linear(i32* %3, i32 55, i32 0, i32 9)
%73 = icmp eq i32 %72, 6
%74 = zext i1 %73 to i32
%75 = call i32 @assert(i32 %74, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0))
%76 = call i32 @search_linear(i32* %3, i32 69, i32 0, i32 9)
%77 = icmp eq i32 %76, 7
%78 = zext i1 %77 to i32
%79 = call i32 @assert(i32 %78, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
%80 = call i32 @search_linear(i32* %3, i32 90, i32 0, i32 9)
%81 = icmp eq i32 %80, 8
%82 = zext i1 %81 to i32
%83 = call i32 @assert(i32 %82, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0))
%84 = call i32 @search_binary(i32* %3, i32 97, i32 0, i32 9)
%85 = icmp eq i32 %84, 9
%86 = zext i1 %85 to i32
%87 = call i32 @assert(i32 %86, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%88 = call i32 @search_binary(i32* %3, i32 32, i32 1, i32 8)
%89 = icmp eq i32 %88, 3
%90 = zext i1 %89 to i32
%91 = call i32 @assert(i32 %90, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
ret void
}