#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*/ assert(int);
int containStr(char *, char *);
int /*<<< orphan*/ printf(char *);
int main() {
  assert(1 == containStr("sxxxstr", "str"));
  printf("xx=================================");
  assert(1 == containStr("sxxxstsxstr", "str"));
  assert(1 == containStr("sxxxsstr", "str"));
  assert(1 == containStr("sssssstr", "str"));
  assert(1 == containStr("ssstrsss", "strsss"));
  assert(1 == containStr("ssstrsss", "str"));
  assert(0 == containStr("sssssstr", "ttt"));
  assert(0 == containStr("sssssstr", "ttt"));
  printf("xx=================================");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xef9(%rip),%rsi
call   1050 <containStr@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1050 <containStr@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe94(%rip),%rdi
lea    0xe9b(%rip),%rsi
call   1050 <containStr@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe74(%rip),%rdi
lea    0xe72(%rip),%rsi
call   1050 <containStr@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe54(%rip),%rdi
lea    0xe4f(%rip),%rsi
call   1050 <containStr@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe2b(%rip),%rdi
lea    0xe20(%rip),%rsi
call   1050 <containStr@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xdf9(%rip),%rdi
lea    0xe04(%rip),%rsi
call   1050 <containStr@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xdd3(%rip),%rdi
lea    0xdde(%rip),%rsi
call   1050 <containStr@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xd74(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%rdi
lea    0xf00(%rip),%r12
mov    %r12,%rsi
call   1050 <containStr@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xea5(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    %r12,%rsi
call   1050 <containStr@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xea9(%rip),%rdi
mov    %r12,%rsi
call   1050 <containStr@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe95(%rip),%r15
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <containStr@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe7e(%rip),%rbx
lea    0xe79(%rip),%rsi
mov    %rbx,%rdi
call   1050 <containStr@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <containStr@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe4a(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <containStr@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <containStr@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"sxxxstr\00"
@.str.1 = [4 x i8] c"str\00"
@.str.2 = [36 x i8] c"xx=================================\00"
@.str.3 = [12 x i8] c"sxxxstsxstr\00"
@.str.4 = [9 x i8] c"sxxxsstr\00"
@.str.5 = [9 x i8] c"sssssstr\00"
@.str.6 = [9 x i8] c"ssstrsss\00"
@.str.7 = [7 x i8] c"strsss\00"
@.str.8 = [4 x i8] c"ttt\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @containStr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32 1, %2
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @containStr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32 1, %7
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32 1, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32 1, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%20 = icmp eq i32 1, %19
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32 1, %23
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%28 = icmp eq i32 0, %27
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%32 = icmp eq i32 0, %31
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"sxxxstr\00"
@.str.1 = [4 x i8] c"str\00"
@.str.2 = [36 x i8] c"xx=================================\00"
@.str.3 = [12 x i8] c"sxxxstsxstr\00"
@.str.4 = [9 x i8] c"sxxxsstr\00"
@.str.5 = [9 x i8] c"sssssstr\00"
@.str.6 = [9 x i8] c"ssstrsss\00"
@.str.7 = [7 x i8] c"strsss\00"
@.str.8 = [4 x i8] c"ttt\00"
define i32 @main() {
%1 = tail call i32 @containStr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @containStr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = tail call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32 %14, 1
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = tail call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%19 = icmp eq i32 %18, 1
%20 = zext i1 %19 to i32
%21 = tail call i32 @assert(i32 %20)
%22 = tail call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i32 %22, 1
%24 = zext i1 %23 to i32
%25 = tail call i32 @assert(i32 %24)
%26 = tail call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
%28 = zext i1 %27 to i32
%29 = tail call i32 @assert(i32 %28)
%30 = tail call i32 @containStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = tail call i32 @assert(i32 %32)
%34 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}