#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 binary_search_first(int *, int, int);
int binary_search_first_bigger(int *, int, int);
int binary_search_first_bigger_r(int *, int, int);
int binary_search_first_r(int *, int, int);
int binary_search_last(int *, int, int);
int binary_search_last_r(int *, int, int);
int binary_search_last_smaller(int *, int, int);
int binary_search_last_smaller_r(int *, int, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int arr[10] = {1, 4, 5, 9, 12, 14, 19, 19, 31, 36};
  int idx;
  printf("Test Array:\n");
  for (idx = 0; idx < 10; idx++)
    printf("%8d", arr[idx]);
  printf("\n");
  idx = binary_search_first(arr, 10, 19);
  if (idx != -1)
    printf("first 19 at %d\n", idx);
  else
    printf("19 not in arr \n");
  idx = binary_search_first_r(arr, 10, 19);
  if (idx != -1)
    printf("first 19 at %d\n", idx);
  else
    printf("19 not in arr \n");
  idx = binary_search_last(arr, 10, 19);
  if (idx != -1)
    printf("last 19 at %d\n", idx);
  else
    printf("19 not in arr \n");
  idx = binary_search_last_r(arr, 10, 19);
  if (idx != -1)
    printf("last 19 at %d\n", idx);
  else
    printf("19 not in arr \n");
  idx = binary_search_first_bigger(arr, 10, 12);
  if (idx != -1)
    printf("first bigger 12 at %d\n", idx);
  else
    printf("12 not in arr \n");
  idx = binary_search_first_bigger_r(arr, 10, 12);
  if (idx != -1)
    printf("first bigger 12 at %d\n", idx);
  else
    printf("12 not in arr \n");
  idx = binary_search_last_smaller(arr, 10, 12);
  if (idx != -1)
    printf("last smaller 12 at %d\n", idx);
  else
    printf("12 not in arr \n");
  idx = binary_search_last_smaller_r(arr, 10, 12);
  if (idx != -1)
    printf("last smaller 12 at %d\n", idx);
  else
    printf("12 not in arr \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe46(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    1207 <main+0x67>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11d9 <main+0x39>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0x13,%edx
call   10c0 <binary_search_first@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     124b <main+0xab>
mov    -0x34(%rbp),%esi
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1259 <main+0xb9>
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0x13,%edx
call   1070 <binary_search_first_r@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     128f <main+0xef>
mov    -0x34(%rbp),%esi
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129d <main+0xfd>
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0x13,%edx
call   10b0 <binary_search_last@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     12d3 <main+0x133>
mov    -0x34(%rbp),%esi
lea    0xd92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12e1 <main+0x141>
lea    0xd6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0x13,%edx
call   1080 <binary_search_last_r@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     1317 <main+0x177>
mov    -0x34(%rbp),%esi
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1325 <main+0x185>
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   1090 <binary_search_first_bigger@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     135b <main+0x1bb>
mov    -0x34(%rbp),%esi
lea    0xd19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1369 <main+0x1c9>
lea    0xd1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   10a0 <binary_search_first_bigger_r@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     139f <main+0x1ff>
mov    -0x34(%rbp),%esi
lea    0xcd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13ad <main+0x20d>
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   1040 <binary_search_last_smaller@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     13e3 <main+0x243>
mov    -0x34(%rbp),%esi
lea    0xcb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13f1 <main+0x251>
lea    0xc95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   1060 <binary_search_last_smaller_r@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     1427 <main+0x287>
mov    -0x34(%rbp),%esi
lea    0xc74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1435 <main+0x295>
lea    0xc51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xe64(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xe48(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe2c(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3d(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1f,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x24,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
mov    $0x13,%edx
call   10d0 <binary_search_first@plt>
cmp    $0xffffffff,%eax
je     12b4 <main+0x104>
lea    0xd83(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12c0 <main+0x110>
lea    0xdca(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
mov    $0x13,%edx
call   1080 <binary_search_first_r@plt>
cmp    $0xffffffff,%eax
je     12e9 <main+0x139>
lea    0xd4e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12f5 <main+0x145>
lea    0xd95(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
mov    $0x13,%edx
call   10c0 <binary_search_last@plt>
cmp    $0xffffffff,%eax
je     131e <main+0x16e>
lea    0xd29(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    132a <main+0x17a>
lea    0xd60(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
mov    $0x13,%edx
call   1090 <binary_search_last_r@plt>
cmp    $0xffffffff,%eax
je     1353 <main+0x1a3>
lea    0xcf4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    135f <main+0x1af>
lea    0xd2b(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   10a0 <binary_search_first_bigger@plt>
cmp    $0xffffffff,%eax
je     1388 <main+0x1d8>
lea    0xcce(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1394 <main+0x1e4>
lea    0xd05(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   10b0 <binary_search_first_bigger_r@plt>
cmp    $0xffffffff,%eax
je     13bd <main+0x20d>
lea    0xc99(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13c9 <main+0x219>
lea    0xcd0(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   1060 <binary_search_last_smaller@plt>
cmp    $0xffffffff,%eax
je     13f2 <main+0x242>
lea    0xc7b(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13fe <main+0x24e>
lea    0xc9b(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   1070 <binary_search_last_smaller_r@plt>
cmp    $0xffffffff,%eax
je     1427 <main+0x277>
lea    0xc46(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1433 <main+0x283>
lea    0xc66(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [10 x i32] [i32 1, i32 4, i32 5, i32 9, i32 12, i32 14, i32 19, i32 19, i32 31, i32 36]
@.str = [13 x i8] c"Test Array:\0A\00"
@.str.1 = [4 x i8] c"%8d\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [16 x i8] c"first 19 at %d\0A\00"
@.str.4 = [16 x i8] c"19 not in arr \0A\00"
@.str.5 = [15 x i8] c"last 19 at %d\0A\00"
@.str.6 = [23 x i8] c"first bigger 12 at %d\0A\00"
@.str.7 = [16 x i8] c"12 not in arr \0A\00"
@.str.8 = [23 x i8] c"last smaller 12 at %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [10 x i32]* %2 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %9
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %6
18: ; preds = %6
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%21 = call i32 @binary_search_first(i32* %20, i32 10, i32 19)
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = icmp ne i32 %22, -1
br i1 %23, label %24, label %27
24: ; preds = %18
%25 = load i32, i32* %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %25)
br label %29
27: ; preds = %18
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %29
29: ; preds = %27, %24
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%31 = call i32 @binary_search_first_r(i32* %30, i32 10, i32 19)
store i32 %31, i32* %3
%32 = load i32, i32* %3
%33 = icmp ne i32 %32, -1
br i1 %33, label %34, label %37
34: ; preds = %29
%35 = load i32, i32* %3
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %35)
br label %39
37: ; preds = %29
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %39
39: ; preds = %37, %34
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%41 = call i32 @binary_search_last(i32* %40, i32 10, i32 19)
store i32 %41, i32* %3
%42 = load i32, i32* %3
%43 = icmp ne i32 %42, -1
br i1 %43, label %44, label %47
44: ; preds = %39
%45 = load i32, i32* %3
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %45)
br label %49
47: ; preds = %39
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %49
49: ; preds = %47, %44
%50 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%51 = call i32 @binary_search_last_r(i32* %50, i32 10, i32 19)
store i32 %51, i32* %3
%52 = load i32, i32* %3
%53 = icmp ne i32 %52, -1
br i1 %53, label %54, label %57
54: ; preds = %49
%55 = load i32, i32* %3
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %55)
br label %59
57: ; preds = %49
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %59
59: ; preds = %57, %54
%60 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%61 = call i32 @binary_search_first_bigger(i32* %60, i32 10, i32 12)
store i32 %61, i32* %3
%62 = load i32, i32* %3
%63 = icmp ne i32 %62, -1
br i1 %63, label %64, label %67
64: ; preds = %59
%65 = load i32, i32* %3
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %65)
br label %69
67: ; preds = %59
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
br label %69
69: ; preds = %67, %64
%70 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%71 = call i32 @binary_search_first_bigger_r(i32* %70, i32 10, i32 12)
store i32 %71, i32* %3
%72 = load i32, i32* %3
%73 = icmp ne i32 %72, -1
br i1 %73, label %74, label %77
74: ; preds = %69
%75 = load i32, i32* %3
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %75)
br label %79
77: ; preds = %69
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
br label %79
79: ; preds = %77, %74
%80 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%81 = call i32 @binary_search_last_smaller(i32* %80, i32 10, i32 12)
store i32 %81, i32* %3
%82 = load i32, i32* %3
%83 = icmp ne i32 %82, -1
br i1 %83, label %84, label %87
84: ; preds = %79
%85 = load i32, i32* %3
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %85)
br label %89
87: ; preds = %79
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
br label %89
89: ; preds = %87, %84
%90 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%91 = call i32 @binary_search_last_smaller_r(i32* %90, i32 10, i32 12)
store i32 %91, i32* %3
%92 = load i32, i32* %3
%93 = icmp ne i32 %92, -1
br i1 %93, label %94, label %97
94: ; preds = %89
%95 = load i32, i32* %3
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %95)
br label %99
97: ; preds = %89
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
br label %99
99: ; preds = %97, %94
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [10 x i32] [i32 1, i32 4, i32 5, i32 9, i32 12, i32 14, i32 19, i32 19, i32 31, i32 36]
@.str.1 = [4 x i8] c"%8d\00"
@.str.3 = [16 x i8] c"first 19 at %d\0A\00"
@.str.5 = [15 x i8] c"last 19 at %d\0A\00"
@.str.6 = [23 x i8] c"first bigger 12 at %d\0A\00"
@.str.8 = [23 x i8] c"last smaller 12 at %d\0A\00"
@str = [12 x i8] c"Test Array:\00"
@str.12 = [15 x i8] c"19 not in arr \00"
@str.16 = [15 x i8] c"12 not in arr \00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 4)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 9)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 12)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 14)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 19)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 19)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 31)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 36)
%15 = tail call i32 @putchar(i32 10)
%16 = call i32 @binary_search_first(i32* %4, i32 10, i32 19)
%17 = icmp eq i32 %16, -1
br i1 %17, label %20, label %18
18: ; preds = %0
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %16)
br label %22
20: ; preds = %0
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.12, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
%23 = call i32 @binary_search_first_r(i32* %4, i32 10, i32 19)
%24 = icmp eq i32 %23, -1
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %23)
br label %29
27: ; preds = %22
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.12, i64 0, i64 0))
br label %29
29: ; preds = %27, %25
%30 = call i32 @binary_search_last(i32* %4, i32 10, i32 19)
%31 = icmp eq i32 %30, -1
br i1 %31, label %34, label %32
32: ; preds = %29
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %30)
br label %36
34: ; preds = %29
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.12, i64 0, i64 0))
br label %36
36: ; preds = %34, %32
%37 = call i32 @binary_search_last_r(i32* %4, i32 10, i32 19)
%38 = icmp eq i32 %37, -1
br i1 %38, label %41, label %39
39: ; preds = %36
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %37)
br label %43
41: ; preds = %36
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.12, i64 0, i64 0))
br label %43
43: ; preds = %41, %39
%44 = call i32 @binary_search_first_bigger(i32* %4, i32 10, i32 12)
%45 = icmp eq i32 %44, -1
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %44)
br label %50
48: ; preds = %43
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.16, i64 0, i64 0))
br label %50
50: ; preds = %48, %46
%51 = call i32 @binary_search_first_bigger_r(i32* %4, i32 10, i32 12)
%52 = icmp eq i32 %51, -1
br i1 %52, label %55, label %53
53: ; preds = %50
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %51)
br label %57
55: ; preds = %50
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.16, i64 0, i64 0))
br label %57
57: ; preds = %55, %53
%58 = call i32 @binary_search_last_smaller(i32* %4, i32 10, i32 12)
%59 = icmp eq i32 %58, -1
br i1 %59, label %62, label %60
60: ; preds = %57
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %58)
br label %64
62: ; preds = %57
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.16, i64 0, i64 0))
br label %64
64: ; preds = %62, %60
%65 = call i32 @binary_search_last_smaller_r(i32* %4, i32 10, i32 12)
%66 = icmp eq i32 %65, -1
br i1 %66, label %69, label %67
67: ; preds = %64
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %65)
br label %71
69: ; preds = %64
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.16, i64 0, i64 0))
br label %71
71: ; preds = %69, %67
ret i32 0
}