#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 *strchr(char *, char);
int main(int argc, char *argv[]) {
  printf("%s\n", strchr("azertyuiop", 'a'));
  printf("%s\n", strchr("azertyuiop", 'z'));
  printf("%s\n", strchr("azertyuiop", 'e'));
  printf("%s\n", strchr("azertyuiop", 'r'));
  printf("%s\n", strchr("azertyuiop", 't'));
  printf("%s\n", strchr("azertyuiop", 'y'));
  printf("%s\n", strchr("azertyuiop", 'u'));
  printf("%s\n", strchr("azertyuiop", 'i'));
  printf("%s\n", strchr("azertyuiop", 'o'));
  printf("%s\n", strchr("azertyuiop", 'p'));
  printf("%p\n", strchr("azertyu", 'p'));
  printf("%p\n", strchr("", 'p'));
  printf("%s\n", strchr("adrien", 'a'));
  printf("%p\n", strchr("toto", 'c'));
  printf("%s\n", strchr("tata", 'a'));
  printf("%s\n", strchr("azpodfpqzeojkfpisdjfqsdpio?f,", '?'));
  printf(
      "%s\n",
      strchr("azpodfpqzeojkfpisdjfqsdpioezdqfsofhqsjkld=fhlqsdhfoqsdifhqsdkl="
             "fhqsdljfisdfuosdpfgiqsjdgojzprjhgiosqhposjqdfgosdjqfpjqzio?"
             "fiosdjfsdiqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"
             "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqf,",
             '\0'));
  printf("%p\n", strchr("qefvgodshfqio", ' '));
  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    0xec7(%rip),%rdi
mov    $0x61,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x7a,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe87(%rip),%rdi
mov    $0x65,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xe6f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe67(%rip),%rdi
mov    $0x72,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xe4f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe47(%rip),%rdi
mov    $0x74,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xe2f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe27(%rip),%rdi
mov    $0x79,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xe0f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe07(%rip),%rdi
mov    $0x75,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xdef(%rip),%rdi
call   1040 <printf@plt>
lea    0xde7(%rip),%rdi
mov    $0x69,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xdcf(%rip),%rdi
call   1040 <printf@plt>
lea    0xdc7(%rip),%rdi
mov    $0x6f,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xdaf(%rip),%rdi
call   1040 <printf@plt>
lea    0xda7(%rip),%rdi
mov    $0x70,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xd8f(%rip),%rdi
call   1040 <printf@plt>
lea    0xd96(%rip),%rdi
mov    $0x70,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xd7e(%rip),%rdi
call   1040 <printf@plt>
lea    0xd75(%rip),%rdi
mov    $0x70,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xd5e(%rip),%rdi
call   1040 <printf@plt>
lea    0xd5e(%rip),%rdi
mov    $0x61,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xd2f(%rip),%rdi
call   1040 <printf@plt>
lea    0xd45(%rip),%rdi
mov    $0x63,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xd1e(%rip),%rdi
call   1040 <printf@plt>
lea    0xd2a(%rip),%rdi
mov    $0x61,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xcef(%rip),%rdi
call   1040 <printf@plt>
lea    0xd0f(%rip),%rdi
mov    $0x3f,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xccf(%rip),%rdi
call   1040 <printf@plt>
lea    0xd0d(%rip),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xcb2(%rip),%rdi
call   1040 <printf@plt>
lea    0xdda(%rip),%rdi
mov    $0x20,%esi
call   1030 <strchr@plt>
mov    %rax,%rsi
lea    0xca1(%rip),%rdi
call   1040 <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    0xee2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeaa(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe9c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe80(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe72(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe64(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe57(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xe40(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xe2f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe3e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf1c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [11 x i8] c"azertyuiop\00"
@.str.2 = [4 x i8] c"%p\0A\00"
@.str.3 = [8 x i8] c"azertyu\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [7 x i8] c"adrien\00"
@.str.6 = [5 x i8] c"toto\00"
@.str.7 = [5 x i8] c"tata\00"
@.str.8 = [30 x i8] c"azpodfpqzeojkfpisdjfqsdpio?f,\00"
@.str.9 = [234 x i8] c"azpodfpqzeojkfpisdjfqsdpioezdqfsofhqsjkld=fhlqsdhfoqsdifhqsdkl=fhqsdljfisdfuosdpfgiqsjdgojzprjhgiosqhposjqdfgosdjqfpjqzio?fiosdjfsdiqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqf,\00"
@.str.10 = [14 x i8] c"qefvgodshfqio\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* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 97)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 122)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 101)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 114)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 116)
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 121)
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 117)
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 105)
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 111)
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext 112)
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %24)
%26 = call i8* @strchr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8 signext 112)
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %26)
%28 = call i8* @strchr(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8 signext 112)
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %28)
%30 = call i8* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8 signext 97)
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %30)
%32 = call i8* @strchr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8 signext 99)
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %32)
%34 = call i8* @strchr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8 signext 97)
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %34)
%36 = call i8* @strchr(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i8 signext 63)
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %36)
%38 = call i8* @strchr(i8* getelementptr inbounds ([234 x i8], [234 x i8]* @.str.9, i64 0, i64 0), i8 signext 0)
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %38)
%40 = call i8* @strchr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8 signext 32)
%41 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %40)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [11 x i8] c"azertyuiop\00"
@.str.2 = [4 x i8] c"%p\0A\00"
@.str.5 = [7 x i8] c"adrien\00"
@.str.7 = [5 x i8] c"tata\00"
@.str.8 = [30 x i8] c"azpodfpqzeojkfpisdjfqsdpio?f,\00"
@.str.9 = [234 x i8] c"azpodfpqzeojkfpisdjfqsdpioezdqfsofhqsjkld=fhlqsdhfoqsdifhqsdkl=fhqsdljfisdfuosdpfgiqsjdgojzprjhgiosqhposjqdfgosdjqfpjqzio?fiosdjfsdiqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqf,\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 1))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 2))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 3))
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 4))
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 5))
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 6))
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 7))
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 8))
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 9))
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* null)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* null)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%16 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* null)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 1))
%18 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 26))
%19 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([234 x i8], [234 x i8]* @.str.9, i64 0, i64 233))
%20 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* null)
ret i32 0
}