#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();
int /*<<< orphan*/ *strpbrk(char *, char *);
int main() {
  char *haystack = "The quick brown fox jumps over the lazy dog";
  if (strpbrk(haystack, "") != NULL) {
    abort();
  }
  if (strpbrk("", haystack) != NULL) {
    abort();
  }
  if (strpbrk("", "") != NULL) {
    abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeed(%rip),%rsi
call   1040 <strpbrk@plt>
cmp    $0x0,%rax
je     1154 <main+0x34>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1040 <strpbrk@plt>
cmp    $0x0,%rax
je     1175 <main+0x55>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xeaf(%rip),%rsi
mov    %rsi,%rdi
call   1040 <strpbrk@plt>
cmp    $0x0,%rax
je     1195 <main+0x75>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xefc(%rip),%rsi
call   1040 <strpbrk@plt>
test   %rax,%rax
jne    1169 <main+0x49>
lea    0xeeb(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <strpbrk@plt>
test   %rax,%rax
jne    1169 <main+0x49>
lea    0xed3(%rip),%rdi
mov    %rdi,%rsi
call   1040 <strpbrk@plt>
test   %rax,%rax
jne    1169 <main+0x49>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"The quick brown fox jumps over the lazy dog\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32* @strpbrk(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = load i8*, i8** %1
%9 = call i32* @strpbrk(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %7
%14 = call i32* @strpbrk(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp ne i32* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"The quick brown fox jumps over the lazy dog\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32* @strpbrk(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32* @strpbrk(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32* @strpbrk(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
ret i32 0
}