#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*/ printf(char *, int);
int sequential_search(int *, int, int);
char *test_unsuccessful_search_op() {
  int array[] = {56, 43, 145, -67, -90, 0};
  do {
    if (!(sequential_search(array, 6, -66) == -1)) {
      printf("Line number is: %d\n", 46);
      return "error, search was successful";
    }
  } while (0);
  do {
    if (!(sequential_search(array, 6, 456) == -1)) {
      printf("Line number is: %d\n", 47);
      return "error, search was successful";
    }
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_unsuccessful_search_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
mov    $0xffffffbe,%edx
call   1040 <sequential_search@plt>
cmp    $0xffffffff,%eax
je     1186 <test_unsuccessful_search_op+0x66>
lea    0xeac(%rip),%rdi
mov    $0x2e,%esi
call   1030 <printf@plt>
lea    0xeaf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11da <test_unsuccessful_search_op+0xba>
jmp    118b <test_unsuccessful_search_op+0x6b>
jmp    1190 <test_unsuccessful_search_op+0x70>
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
mov    $0x1c8,%edx
call   1040 <sequential_search@plt>
cmp    $0xffffffff,%eax
je     11cd <test_unsuccessful_search_op+0xad>
lea    0xe65(%rip),%rdi
mov    $0x2f,%esi
call   1030 <printf@plt>
lea    0xe68(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11da <test_unsuccessful_search_op+0xba>
jmp    11d2 <test_unsuccessful_search_op+0xb2>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_unsuccessful_search_op>:
sub    $0x18,%rsp
mov    0xee5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
mov    $0xffffffbe,%edx
call   1040 <sequential_search@plt>
mov    $0x2e,%esi
cmp    $0xffffffff,%eax
jne    1173 <test_unsuccessful_search_op+0x53>
mov    %rsp,%rdi
mov    $0x6,%esi
mov    $0x1c8,%edx
call   1040 <sequential_search@plt>
mov    $0x2f,%esi
cmp    $0xffffffff,%eax
je     118b <test_unsuccessful_search_op+0x6b>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
lea    0xea6(%rip),%rax
add    $0x18,%rsp
ret
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_unsuccessful_search_op.array = [6 x i32] [i32 56, i32 43, i32 145, i32 -67, i32 -90, i32 0]
@.str = [20 x i8] c"Line number is: %d\0A\00"
@.str.1 = [29 x i8] c"error, search was successful\00"
define i8* @test_unsuccessful_search_op() {
%1 = alloca i8*
%2 = alloca [6 x i32]
%3 = bitcast [6 x i32]* %2 to i8*
br label %4
4: ; preds = %0
%5 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%6 = call i32 @sequential_search(i32* %5, i32 6, i32 -66)
%7 = icmp eq i32 %6, -1
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 46)
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %20
10: ; preds = %4
br label %11
11: ; preds = %10
br label %12
12: ; preds = %11
%13 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%14 = call i32 @sequential_search(i32* %13, i32 6, i32 456)
%15 = icmp eq i32 %14, -1
br i1 %15, label %18, label %16
16: ; preds = %12
%17 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 47)
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %20
18: ; preds = %12
br label %19
19: ; preds = %18
store i8* null, i8** %1
br label %20
20: ; preds = %19, %16, %8
%21 = load i8*, i8** %1
ret i8* %21
}

LLVM IR (-O2):
@__const.test_unsuccessful_search_op.array = [6 x i32] [i32 56, i32 43, i32 145, i32 -67, i32 -90, i32 0]
@.str = [20 x i8] c"Line number is: %d\0A\00"
@.str.1 = [29 x i8] c"error, search was successful\00"
define i8* @test_unsuccessful_search_op() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @sequential_search(i32* %3, i32 6, i32 -66)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @sequential_search(i32* %3, i32 6, i32 456)
%8 = icmp eq i32 %7, -1
br i1 %8, label %12, label %9
9: ; preds = %6, %0
%10 = phi i32 [ 46, %0 ], [ 47, %6 ]
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %6
%13 = phi i8* [ null, %6 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), %9 ]
ret i8* %13
}