int main(int argc, char const *argv[]) {
  int x, n;
  int nums[128];
  while (~scanf("%d%d", &x, &n)) {
    for (int i = 0; i < n; ++i)
      scanf("%d", nums + i);
    printf("%s\n", binary_search(nums, x, n) ? "True" : "False");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb0(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
xor    $0xffffffff,%eax
cmp    $0x0,%eax
je     11f9 <main+0xc9>
movl   $0x0,-0x224(%rbp)
mov    -0x224(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11bb <main+0x8b>
lea    -0x220(%rbp),%rsi
movslq -0x224(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x224(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x224(%rbp)
jmp    1175 <main+0x45>
lea    -0x220(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1040 <binary_search@plt>
mov    %eax,%ecx
lea    0xe36(%rip),%rsi
lea    0xe2a(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1149 <main+0x19>
xor    %eax,%eax
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x218,%rsp
lea    0xeb8(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0xffffffff,%eax
je     11f1 <main+0xc1>
lea    0x10(%rsp),%r14
lea    0xe94(%rip),%rbx
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%r13
jmp    11c0 <main+0x90>
nopw   0x0(%rax,%rax,1)
mov    0xc(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <binary_search@plt>
test   %eax,%eax
lea    0xe6e(%rip),%rdi
lea    0xe6c(%rip),%rax
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0xe52(%rip),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0xffffffff,%eax
je     11f1 <main+0xc1>
mov    0x8(%rsp),%edx
test   %edx,%edx
jle    1180 <main+0x50>
mov    %r14,%rbp
xor    %r15d,%r15d
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
add    $0x1,%r15
movslq 0x8(%rsp),%rdx
add    $0x4,%rbp
cmp    %rdx,%r15
jl     11d0 <main+0xa0>
jmp    1180 <main+0x50>
xor    %eax,%eax
add    $0x218,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [5 x i8] c"True\00"
@.str.4 = [6 x i8] c"False\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [128 x i32]
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %10
10: ; preds = %28, %2
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7)
%12 = xor i32 %11, -1
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %37
14: ; preds = %10
store i32 0, i32* %9
br label %15
15: ; preds = %25, %14
%16 = load i32, i32* %9
%17 = load i32, i32* %7
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %28
19: ; preds = %15
%20 = getelementptr inbounds [128 x i32], [128 x i32]* %8, i64 0, i64 0
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %23)
br label %25
25: ; preds = %19
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 1
store i32 %27, i32* %9
br label %15
28: ; preds = %15
%29 = getelementptr inbounds [128 x i32], [128 x i32]* %8, i64 0, i64 0
%30 = load i32, i32* %6
%31 = load i32, i32* %7
%32 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @binary_search to i32 (i32*, i32, i32, ...)*)(i32* %29, i32 %30, i32 %31)
%33 = icmp ne i32 %32, 0
%34 = zext i1 %33 to i64
%35 = select i1 %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %35)
br label %10
37: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [5 x i8] c"True\00"
@.str.4 = [6 x i8] c"False\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [128 x i32]
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast [128 x i32]* %5 to i8*
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%10 = icmp eq i32 %9, -1
br i1 %10, label %33, label %11
11: ; preds = %2
%12 = getelementptr inbounds [128 x i32], [128 x i32]* %5, i64 0, i64 0
br label %13
13: ; preds = %11, %16
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 0
br i1 %15, label %25, label %16
16: ; preds = %25, %13
%17 = phi i32 [ %14, %13 ], [ %30, %25 ]
%18 = load i32, i32* %3
%19 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @binary_search to i32 (i32*, i32, i32, ...)*)(i32* %12, i32 %18, i32 %17)
%20 = icmp eq i32 %19, 0
%21 = select i1 %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0)
%22 = call i32 @puts(i8* dereferenceable(1) %21)
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%24 = icmp eq i32 %23, -1
br i1 %24, label %33, label %13
25: ; preds = %13, %25
%26 = phi i64 [ %29, %25 ], [ 0, %13 ]
%27 = getelementptr inbounds [128 x i32], [128 x i32]* %5, i64 0, i64 %26
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %27)
%29 = add nuw nsw i64 %26, 1
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = icmp slt i64 %29, %31
br i1 %32, label %25, label %16
33: ; preds = %16, %2
ret i32 0
}