#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 any(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *, ...);
int main(void) {
  int res = 0;
  char str[8] = "testing";
  char _str[15] = "zzzzzzzzzzzer";
  res = any(str, _str);
  if (res == -1)
    printf("There`s no symbols from \'%s\' in string \'%s\'", _str, str);
  else
    printf("The first occurrence of symbols from \'%s\' in string \'%s\' is in "
           "%d symbol\n",
           _str, str, res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xf36(%rip),%rax
mov    %rax,-0x1f(%rbp)
mov    0xf34(%rip),%eax
mov    %eax,-0x17(%rbp)
mov    0xf2e(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xf26(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x1f(%rbp),%rsi
call   1040 <any@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    119e <main+0x7e>
lea    -0x1f(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
lea    -0x1f(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%ecx
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x676e6974736574,%rax
mov    %rax,(%rsp)
movabs $0x72657a7a7a7a,%rax
mov    %rax,0xf(%rsp)
movabs $0x7a7a7a7a7a7a7a7a,%rax
7a 7a 7a
mov    %rax,0x8(%rsp)
mov    %rsp,%rdi
lea    0x8(%rsp),%rsi
call   1040 <any@plt>
cmp    $0xffffffff,%eax
je     117c <main+0x5c>
lea    0xed2(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1192 <main+0x72>
lea    0xe8c(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [8 x i8] c"testing\00"
@__const.main._str = [15 x i8] c"zzzzzzzzzzzer\00\00"
@.str = [44 x i8] c"There`s no symbols from '%s' in string '%s'\00"
@.str.1 = [74 x i8] c"The first occurrence of symbols from '%s' in string '%s' is in %d symbol\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [8 x i8]
%4 = alloca [15 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
%5 = bitcast [8 x i8]* %3 to i8*
%6 = bitcast [15 x i8]* %4 to i8*
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%9 = call i32 @any(i8* %7, i8* %8)
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %16
12: ; preds = %0
%13 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%14 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%15 = call i32 (i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
br label %21
16: ; preds = %0
%17 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%18 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%19 = load i32, i32* %2
%20 = call i32 (i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i8* %17, i8* %18, i32 %19)
br label %21
21: ; preds = %16, %12
ret i32 0
}

LLVM IR (-O2):
@__const.main._str = [15 x i8] c"zzzzzzzzzzzer\00\00"
@.str = [44 x i8] c"There`s no symbols from '%s' in string '%s'\00"
@.str.1 = [74 x i8] c"The first occurrence of symbols from '%s' in string '%s' is in %d symbol\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca [15 x i8]
%3 = bitcast i64* %1 to i8*
store i64 29113321805538676, i64* %1
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%5 = call i32 @any(i8* %3, i8* %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %3)
br label %11
9: ; preds = %0
%10 = call i32 (i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %3, i32 %5)
br label %11
11: ; preds = %9, %7
ret i32 0
}