#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int stillSorted(char ***run, char *chkstr, int strcount) {
  int i;
  char **target = *run;
  for (i = 0; i < strcount; i++) {
    if (strcmp(target[i], chkstr) == 0) {
      fprintf(stderr,
              "Found %s!. This should never happen on sorted input "
              "data.\nPlease sort the input.\nYou can do this by using the GNU "
              "sort tool: sort -k 14,14 <filename>",
              *target);
      return (0);
    }
  }
  return (1);
}


x86 assembly (clang, -O0):
<stillSorted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11ab <stillSorted+0x8b>
mov    -0x28(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1198 <stillSorted+0x78>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
lea    0xe79(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11b2 <stillSorted+0x92>
jmp    119d <stillSorted+0x7d>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1145 <stillSorted+0x25>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stillSorted>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%r14d
test   %edx,%edx
jle    1178 <stillSorted+0x58>
mov    %rsi,%r15
mov    (%rdi),%r12
mov    %edx,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    (%r12,%rbp,8),%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     115c <stillSorted+0x3c>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1140 <stillSorted+0x20>
jmp    1178 <stillSorted+0x58>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [150 x i8] c"Found %s!. This should never happen on sorted input data.\0APlease sort the input.\0AYou can do this by using the GNU sort tool: sort -k 14,14 <filename>\00"
define i32 @stillSorted(i8*** %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8***
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8**
store i8*** %0, i8**** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%10 = load i8***, i8**** %5
%11 = load i8**, i8*** %10
store i8** %11, i8*** %9
store i32 0, i32* %8
br label %12
12: ; preds = %31, %3
%13 = load i32, i32* %8
%14 = load i32, i32* %7
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %34
16: ; preds = %12
%17 = load i8**, i8*** %9
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = load i8*, i8** %6
%23 = call i64 @strcmp(i8* %21, i8* %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %16
%26 = load i32, i32* @stderr
%27 = load i8**, i8*** %9
%28 = load i8*, i8** %27
%29 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* %28)
store i32 0, i32* %4
br label %35
30: ; preds = %16
br label %31
31: ; preds = %30
%32 = load i32, i32* %8
%33 = add nsw i32 %32, 1
store i32 %33, i32* %8
br label %12
34: ; preds = %12
store i32 1, i32* %4
br label %35
35: ; preds = %34, %25
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [150 x i8] c"Found %s!. This should never happen on sorted input data.\0APlease sort the input.\0AYou can do this by using the GNU sort tool: sort -k 14,14 <filename>\00"
define i32 @stillSorted(i8*** nocapture %0, i8* %1, i32 %2) {
%4 = load i8**, i8*** %0
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %21
6: ; preds = %3
%7 = zext i32 %2 to i64
br label %10
8: ; preds = %10
%9 = icmp eq i64 %16, %7
br i1 %9, label %21, label %10
10: ; preds = %6, %8
%11 = phi i64 [ 0, %6 ], [ %16, %8 ]
%12 = getelementptr inbounds i8*, i8** %4, i64 %11
%13 = load i8*, i8** %12
%14 = tail call i64 @strcmp(i8* %13, i8* %1)
%15 = icmp eq i64 %14, 0
%16 = add nuw nsw i64 %11, 1
br i1 %15, label %17, label %8
17: ; preds = %10
%18 = load i32, i32* @stderr
%19 = load i8*, i8** %4
%20 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %8, %3, %17
%22 = phi i32 [ 0, %17 ], [ 1, %3 ], [ 1, %8 ]
ret i32 %22
}