#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);
int main(void) {
  char s1[] = "abcde";
  char t1[] = "d";
  char t2[] = "fg";
  printf("%s %s %d\n", s1, t1, any(s1, t1));
  printf("%s %s %d\n", s1, t2, any(s1, t2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xebc(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xeb3(%rip),%ax
mov    %ax,-0xf(%rbp)
mov    0xeab(%rip),%al
mov    %al,-0xd(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0xa(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <any@plt>
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    %eax,%ecx
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
lea    -0xa(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0xf(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xa(%rbp),%rdi
lea    -0xf(%rbp),%rsi
call   1040 <any@plt>
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    %eax,%ecx
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movw   $0x65,0xc(%rsp)
movl   $0x64636261,0x8(%rsp)
64
movw   $0x64,0x6(%rsp)
movb   $0x0,0x4(%rsp)
movw   $0x6766,0x2(%rsp)
lea    0x8(%rsp),%rbx
lea    0x6(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <any@plt>
lea    0xea2(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
call   1030 <printf@plt>
lea    0x2(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <any@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.s1 = [6 x i8] c"abcde\00"
@__const.main.t1 = [2 x i8] c"d\00"
@__const.main.t2 = [3 x i8] c"fg\00"
@.str = [10 x i8] c"%s %s %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca [2 x i8]
%4 = alloca [3 x i8]
store i32 0, i32* %1
%5 = bitcast [6 x i8]* %2 to i8*
%6 = bitcast [2 x i8]* %3 to i8*
%7 = bitcast [3 x i8]* %4 to i8*
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%12 = call i32 @any(i8* %10, i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %12)
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%16 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%17 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%18 = call i32 @any(i8* %16, i8* %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %14, i8* %15, i32 %18)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [6 x i8] c"abcde\00"
@__const.main.t2 = [3 x i8] c"fg\00"
@.str = [10 x i8] c"%s %s %d\0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca i16
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%5 = bitcast i16* %2 to i8*
store i16 100, i16* %2
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%7 = call i32 @any(i8* %4, i8* %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i32 %7)
%9 = call i32 @any(i8* %4, i8* %6)
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6, i32 %9)
ret i32 0
}