#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*/ abort();
char *strchr(char *, char);
int main() {
  char *helloWorld = "hello world";
  char *empty = "";
  if (strchr(helloWorld, 'a') != NULL) {
    abort();
  }
  if (strchr("a", 'b') != NULL) {
    abort();
  }
  if (strchr("a", 'A') != NULL) {
    abort();
  }
  if (strchr(empty, '\0') != empty) {
    abort();
  }
  if (strchr(helloWorld, 'h') != helloWorld) {
    abort();
  }
  if (strchr(helloWorld, 'e') != &helloWorld[1]) {
    abort();
  }
  if (strchr(helloWorld, 'l') != &helloWorld[2]) {
    abort();
  }
  if (strchr(helloWorld, 'o') != &helloWorld[4]) {
    abort();
  }
  if (strchr(helloWorld, ' ') != &helloWorld[5]) {
    abort();
  }
  if (strchr(helloWorld, 'w') != &helloWorld[6]) {
    abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x61,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     115d <main+0x3d>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xea8(%rip),%rdi
mov    $0x62,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     117f <main+0x5f>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe86(%rip),%rdi
mov    $0x41,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     11a1 <main+0x81>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <strchr@plt>
cmp    -0x10(%rbp),%rax
je     11bd <main+0x9d>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rdi
mov    $0x68,%esi
call   1040 <strchr@plt>
cmp    -0x8(%rbp),%rax
je     11dc <main+0xbc>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rdi
mov    $0x65,%esi
call   1040 <strchr@plt>
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
je     1202 <main+0xe2>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rdi
mov    $0x6c,%esi
call   1040 <strchr@plt>
mov    -0x8(%rbp),%rcx
add    $0x2,%rcx
cmp    %rcx,%rax
je     1228 <main+0x108>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rdi
mov    $0x6f,%esi
call   1040 <strchr@plt>
mov    -0x8(%rbp),%rcx
add    $0x4,%rcx
cmp    %rcx,%rax
je     124e <main+0x12e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1040 <strchr@plt>
mov    -0x8(%rbp),%rcx
add    $0x5,%rcx
cmp    %rcx,%rax
je     1274 <main+0x154>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rdi
mov    $0x77,%esi
call   1040 <strchr@plt>
mov    -0x8(%rbp),%rcx
add    $0x6,%rcx
cmp    %rcx,%rax
je     129a <main+0x17a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c"a\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = call i8* @strchr(i8* %3, i8 signext 97)
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = call i8* @strchr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8 signext 98)
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %8
%14 = call i8* @strchr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8 signext 65)
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = call i8* @strchr(i8* %19, i8 signext 0)
%21 = load i8*, i8** %2
%22 = icmp ne i8* %20, %21
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %18
%26 = load i8*, i8** %1
%27 = call i8* @strchr(i8* %26, i8 signext 104)
%28 = load i8*, i8** %1
%29 = icmp ne i8* %27, %28
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = call i32 (...) @abort()
unreachable
32: ; preds = %25
%33 = load i8*, i8** %1
%34 = call i8* @strchr(i8* %33, i8 signext 101)
%35 = load i8*, i8** %1
%36 = getelementptr inbounds i8, i8* %35, i64 1
%37 = icmp ne i8* %34, %36
br i1 %37, label %38, label %40
38: ; preds = %32
%39 = call i32 (...) @abort()
unreachable
40: ; preds = %32
%41 = load i8*, i8** %1
%42 = call i8* @strchr(i8* %41, i8 signext 108)
%43 = load i8*, i8** %1
%44 = getelementptr inbounds i8, i8* %43, i64 2
%45 = icmp ne i8* %42, %44
br i1 %45, label %46, label %48
46: ; preds = %40
%47 = call i32 (...) @abort()
unreachable
48: ; preds = %40
%49 = load i8*, i8** %1
%50 = call i8* @strchr(i8* %49, i8 signext 111)
%51 = load i8*, i8** %1
%52 = getelementptr inbounds i8, i8* %51, i64 4
%53 = icmp ne i8* %50, %52
br i1 %53, label %54, label %56
54: ; preds = %48
%55 = call i32 (...) @abort()
unreachable
56: ; preds = %48
%57 = load i8*, i8** %1
%58 = call i8* @strchr(i8* %57, i8 signext 32)
%59 = load i8*, i8** %1
%60 = getelementptr inbounds i8, i8* %59, i64 5
%61 = icmp ne i8* %58, %60
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = call i32 (...) @abort()
unreachable
64: ; preds = %56
%65 = load i8*, i8** %1
%66 = call i8* @strchr(i8* %65, i8 signext 119)
%67 = load i8*, i8** %1
%68 = getelementptr inbounds i8, i8* %67, i64 6
%69 = icmp ne i8* %66, %68
br i1 %69, label %70, label %72
70: ; preds = %64
%71 = call i32 (...) @abort()
unreachable
72: ; preds = %64
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}