#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*/ bin_sear(char, char *, char *, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char, char);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 3) {
    fputs("./a.out <key> <sequence>\n", stderr);
    exit(0);
  }
  char l, u;
  if (!bin_sear(argv[1][0], argv[2], &l, &u))
    printf("%c, %c\n", l, u);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     117c <main+0x3c>
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
lea    0xe90(%rip),%rdi
call   1040 <fputs@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    0x10(%rcx),%rsi
lea    -0x11(%rbp),%rdx
lea    -0x12(%rbp),%rcx
movsbl %al,%edi
call   1050 <bin_sear@plt>
cmp    $0x0,%eax
jne    11bd <main+0x7d>
mov    -0x11(%rbp),%al
lea    0xe69(%rip),%rdi
movsbl %al,%esi
movsbl -0x12(%rbp),%edx
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x3,%edi
jne    1181 <main+0x41>
mov    0x8(%rsi),%rax
mov    0x10(%rsi),%rsi
movsbl (%rax),%edi
lea    0x7(%rsp),%rdx
lea    0x6(%rsp),%rcx
call   1050 <bin_sear@plt>
test   %eax,%eax
jne    117a <main+0x3a>
movsbl 0x7(%rsp),%esi
movsbl 0x6(%rsp),%edx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%esi
lea    0xe6f(%rip),%rdi
call   1040 <fputs@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"./a.out <key> <sequence>\0A\00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"%c, %c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 3
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 @exit(i32 0)
unreachable
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
%23 = call i32 @bin_sear(i8 signext %19, i8* %22, i8* %6, i8* %7)
%24 = icmp ne i32 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %14
%26 = load i8, i8* %6
%27 = load i8, i8* %7
%28 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8 signext %26, i8 signext %27)
br label %29
29: ; preds = %25, %14
%30 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [26 x i8] c"./a.out <key> <sequence>\0A\00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"%c, %c\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8
%4 = alloca i8
%5 = icmp eq i32 %0, 3
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = load i8, i8* %12
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @bin_sear(i8 signext %13, i8* %15, i8* %3, i8* %4)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %10
%19 = load i8, i8* %3
%20 = load i8, i8* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8 signext %19, i8 signext %20)
br label %22
22: ; preds = %18, %10
%23 = call i32 @exit(i32 0)
unreachable
}