#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 */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
char __VERIFIER_nondet_char();
int main(int argc, char **argv) {
  static char array[1024 * 100];
  char ND = __VERIFIER_nondet_char();
  unsigned int i;
  for (i = 0; i < sizeof(array); i++)
    array[i] = __VERIFIER_nondet_char();
  for (i = 0; i < sizeof(array); i++)
    if (array[i] == ND)
      return i;
ERROR:
  __VERIFIER_error();
  return 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)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_char@plt>
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    $0x19000,%rax
jae    117c <main+0x5c>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_char@plt>
mov    %al,%dl
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
lea    0x2ed5(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1147 <main+0x27>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    $0x19000,%rax
jae    11cc <main+0xac>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
lea    0x2ea2(%rip),%rax
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    11b9 <main+0x99>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11df <main+0xbf>
jmp    11be <main+0x9e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1183 <main+0x63>
jmp    11d1 <main+0xb1>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_char@plt>
mov    %eax,%r14d
lea    0x2f0b(%rip),%rbp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_char@plt>
mov    %al,(%rbx,%rbp,1)
add    $0x1,%rbx
cmp    $0x19000,%rbx
jne    1140 <main+0x20>
mov    $0x4,%ebx
nopl   0x0(%rax)
cmp    %r14b,-0x4(%rbx,%rbp,1)
je     119a <main+0x7a>
cmp    %r14b,-0x3(%rbx,%rbp,1)
je     11a0 <main+0x80>
cmp    %r14b,-0x2(%rbx,%rbp,1)
je     11a6 <main+0x86>
cmp    %r14b,-0x1(%rbx,%rbp,1)
je     11ac <main+0x8c>
cmp    %r14b,(%rbx,%rbp,1)
je     11b0 <main+0x90>
add    $0x5,%rbx
cmp    $0x19004,%rbx
jne    1160 <main+0x40>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_error@plt>
jmp    11b0 <main+0x90>
add    $0xfffffffffffffffc,%rbx
jmp    11b0 <main+0x90>
add    $0xfffffffffffffffd,%rbx
jmp    11b0 <main+0x90>
add    $0xfffffffffffffffe,%rbx
jmp    11b0 <main+0x90>
add    $0xffffffffffffffff,%rbx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@main.array = internal global [102400 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call signext i8 (...) @__VERIFIER_nondet_char()
store i8 %8, i8* %6
store i32 0, i32* %7
br label %9
9: ; preds = %18, %2
%10 = load i32, i32* %7
%11 = zext i32 %10 to i64
%12 = icmp ult i64 %11, 102400
br i1 %12, label %13, label %21
13: ; preds = %9
%14 = call signext i8 (...) @__VERIFIER_nondet_char()
%15 = load i32, i32* %7
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds [102400 x i8], [102400 x i8]* @main.array, i64 0, i64 %16
store i8 %14, i8* %17
br label %18
18: ; preds = %13
%19 = load i32, i32* %7
%20 = add i32 %19, 1
store i32 %20, i32* %7
br label %9
21: ; preds = %9
store i32 0, i32* %7
br label %22
22: ; preds = %38, %21
%23 = load i32, i32* %7
%24 = zext i32 %23 to i64
%25 = icmp ult i64 %24, 102400
br i1 %25, label %26, label %41
26: ; preds = %22
%27 = load i32, i32* %7
%28 = zext i32 %27 to i64
%29 = getelementptr inbounds [102400 x i8], [102400 x i8]* @main.array, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = load i8, i8* %6
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %31, %33
br i1 %34, label %35, label %37
35: ; preds = %26
%36 = load i32, i32* %7
store i32 %36, i32* %3
br label %44
37: ; preds = %26
br label %38
38: ; preds = %37
%39 = load i32, i32* %7
%40 = add i32 %39, 1
store i32 %40, i32* %7
br label %22
41: ; preds = %22
br label %42
42: ; preds = %41
%43 = call i32 (...) @__VERIFIER_error()
store i32 0, i32* %3
br label %44
44: ; preds = %42, %35
%45 = load i32, i32* %3
ret i32 %45
}

LLVM IR (-O2):
@main.array = internal unnamed_addr global [102400 x i8] zeroinitializer
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call signext i8 (...) @__VERIFIER_nondet_char()
br label %4
4: ; preds = %2, %4
%5 = phi i64 [ 0, %2 ], [ %8, %4 ]
%6 = tail call signext i8 (...) @__VERIFIER_nondet_char()
%7 = getelementptr inbounds [102400 x i8], [102400 x i8]* @main.array, i64 0, i64 %5
store i8 %6, i8* %7
%8 = add nuw nsw i64 %5, 1
%9 = icmp eq i64 %8, 102400
br i1 %9, label %10, label %4
10: ; preds = %4, %35
%11 = phi i64 [ %36, %35 ], [ 0, %4 ]
%12 = getelementptr inbounds [102400 x i8], [102400 x i8]* @main.array, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, %3
br i1 %14, label %40, label %15
15: ; preds = %10
%16 = add nuw nsw i64 %11, 1
%17 = getelementptr inbounds [102400 x i8], [102400 x i8]* @main.array, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, %3
br i1 %19, label %40, label %20
20: ; preds = %15
%21 = add nuw nsw i64 %11, 2
%22 = getelementptr inbounds [102400 x i8], [102400 x i8]* @main.array, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, %3
br i1 %24, label %40, label %25
25: ; preds = %20
%26 = add nuw nsw i64 %11, 3
%27 = getelementptr inbounds [102400 x i8], [102400 x i8]* @main.array, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, %3
br i1 %29, label %40, label %30
30: ; preds = %25
%31 = add nuw nsw i64 %11, 4
%32 = getelementptr inbounds [102400 x i8], [102400 x i8]* @main.array, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = icmp eq i8 %33, %3
br i1 %34, label %40, label %35
35: ; preds = %30
%36 = add nuw nsw i64 %11, 5
%37 = icmp eq i64 %36, 102400
br i1 %37, label %38, label %10
38: ; preds = %35
%39 = tail call i32 (...) @__VERIFIER_error()
br label %43
40: ; preds = %30, %25, %20, %15, %10
%41 = phi i64 [ %11, %10 ], [ %16, %15 ], [ %21, %20 ], [ %26, %25 ], [ %31, %30 ]
%42 = trunc i64 %41 to i32
br label %43
43: ; preds = %40, %38
%44 = phi i32 [ 0, %38 ], [ %42, %40 ]
ret i32 %44
}