#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 *, char *);
char *strpbrk(char *, char *);
int main(int argc, char *argv[]) {
  printf("toto => %s\n", strpbrk("toto", "t"));
  printf("toto => %s\n", strpbrk("toto", "o"));
  printf("toto => %s\n", strpbrk("toto", ""));
  printf(" => %s\n", strpbrk("", "sdfsdf"));
  printf(" => %s\n", strpbrk("", ""));
  printf("abcdefghijkl => %s\n", strpbrk("abcdefghijkl", "ejc"));
  printf("abcdefghijkl => %s\n", strpbrk("abcdefghijkl", "j"));
  printf("abcdefghijkl => %s\n", strpbrk("abcdefghijkl", "l"));
  printf("abcdefghijkl => %s\n", strpbrk("abcdefghijkl", "a"));
  printf("abcdefghijkl => %s\n", strpbrk("i", "abcdefghijkl"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xecf(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
lea    0xea9(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8b(%rip),%rdi
lea    0xea5(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
lea    0xe69(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe68(%rip),%rsi
mov    %rsi,%rdi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xe4f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe4b(%rip),%rdi
lea    0xe51(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xe21(%rip),%rdi
call   1030 <printf@plt>
lea    0xe29(%rip),%rdi
lea    0xe33(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xdff(%rip),%rdi
call   1030 <printf@plt>
lea    0xe07(%rip),%rdi
lea    0xe0b(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xddd(%rip),%rdi
call   1030 <printf@plt>
lea    0xde5(%rip),%rdi
lea    0xdf1(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xdbb(%rip),%rdi
call   1030 <printf@plt>
lea    0xdd8(%rip),%rdi
lea    0xdbc(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,%rsi
lea    0xd99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rbx
lea    0xeea(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xed3(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xeac(%rip),%rbx
lea    0xebb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeaa(%rip),%r14
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
lea    0xe87(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"toto => %s\0A\00"
@.str.1 = [5 x i8] c"toto\00"
@.str.2 = [2 x i8] c"t\00"
@.str.3 = [2 x i8] c"o\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [8 x i8] c" => %s\0A\00"
@.str.6 = [7 x i8] c"sdfsdf\00"
@.str.7 = [20 x i8] c"abcdefghijkl => %s\0A\00"
@.str.8 = [13 x i8] c"abcdefghijkl\00"
@.str.9 = [4 x i8] c"ejc\00"
@.str.10 = [2 x i8] c"j\00"
@.str.11 = [2 x i8] c"l\00"
@.str.12 = [2 x i8] c"a\00"
@.str.13 = [2 x i8] c"i\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i8* @strpbrk(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i8* @strpbrk(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i8* @strpbrk(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i8* @strpbrk(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* %12)
%14 = call i8* @strpbrk(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* %14)
%16 = call i8* @strpbrk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %16)
%18 = call i8* @strpbrk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %18)
%20 = call i8* @strpbrk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %20)
%22 = call i8* @strpbrk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %22)
%24 = call i8* @strpbrk(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"toto => %s\0A\00"
@.str.1 = [5 x i8] c"toto\00"
@.str.5 = [8 x i8] c" => %s\0A\00"
@.str.7 = [20 x i8] c"abcdefghijkl => %s\0A\00"
@.str.8 = [13 x i8] c"abcdefghijkl\00"
@.str.13 = [2 x i8] c"i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 1))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* null)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* null)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* null)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 2))
%9 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 9))
%10 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 11))
%11 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}