#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 */
scalar_t__ issub(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
int main() {
  char *sub[] = {"", " ", "the", "first", "motor", "fast", "tor."};
  char *text[] = {"the first motor", ""};
  for (int i = 0; i < 6; i++)
    for (int j = 0; j < 2; j++)
      printf("issub(\"%s\", \"%s\") = %s\n", sub[i], text[j],
             (issub(sub[i], text[j]) ? "true" : "false"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0x2c86(%rip),%rsi
mov    $0x38,%edx
call   1040 <memcpy@plt>
mov    0x2cb5(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2cb2(%rip),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x54(%rbp)
cmpl   $0x6,-0x54(%rbp)
jge    120b <main+0xdb>
movl   $0x0,-0x58(%rbp)
cmpl   $0x2,-0x58(%rbp)
jge    11f8 <main+0xc8>
movslq -0x54(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rax
mov    %rax,-0x68(%rbp)
movslq -0x58(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rax
mov    %rax,-0x60(%rbp)
movslq -0x54(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rdi
movslq -0x58(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rsi
call   1050 <issub@plt>
mov    -0x68(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    %rax,%rdi
lea    0xe74(%rip),%rcx
lea    0xe68(%rip),%rax
cmp    $0x0,%rdi
cmovne %rax,%rcx
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1182 <main+0x52>
jmp    11fd <main+0xcd>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1171 <main+0x41>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xf06(%rip),%r14
lea    0xed8(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <issub@plt>
test   %rax,%rax
lea    0xef0(%rip),%rbp
lea    0xee4(%rip),%rbx
mov    %rbx,%rcx
cmove  %rbp,%rcx
lea    0xebe(%rip),%r15
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r14,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0xe65(%rip),%r13
mov    %r13,%rdi
mov    %r12,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1030 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0xe1a(%rip),%r13
mov    %r13,%rdi
mov    %r12,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1030 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0xdd1(%rip),%r13
mov    %r13,%rdi
mov    %r12,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1030 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0xd99(%rip),%r13
mov    %r13,%rdi
mov    %r12,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1030 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0xd3d(%rip),%r13
mov    %r13,%rdi
mov    %r12,%rsi
call   1040 <issub@plt>
test   %rax,%rax
mov    %rbx,%rcx
cmove  %rbp,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1030 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1040 <issub@plt>
test   %rax,%rax
cmove  %rbp,%rbx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c" \00"
@.str.2 = [4 x i8] c"the\00"
@.str.3 = [6 x i8] c"first\00"
@.str.4 = [6 x i8] c"motor\00"
@.str.5 = [5 x i8] c"fast\00"
@.str.6 = [5 x i8] c"tor.\00"
@__const.main.sub = [7 x i8*] [i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0)]
@.str.7 = [16 x i8] c"the first motor\00"
@__const.main.text = [2 x i8*] [i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i32 0, i32 0)]
@.str.8 = [24 x i8] c"issub(\22%s\22, \22%s\22) = %s\0A\00"
@.str.9 = [5 x i8] c"true\00"
@.str.10 = [6 x i8] c"false\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i8*]
%3 = alloca [2 x i8*]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [7 x i8*]* %2 to i8*
%7 = bitcast [2 x i8*]* %3 to i8*
store i32 0, i32* %4
br label %8
8: ; preds = %41, %0
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 6
br i1 %10, label %11, label %44
11: ; preds = %8
store i32 0, i32* %5
br label %12
12: ; preds = %37, %11
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 2
br i1 %14, label %15, label %40
15: ; preds = %12
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [7 x i8*], [7 x i8*]* %2, i64 0, i64 %17
%19 = load i8*, i8** %18
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 %21
%23 = load i8*, i8** %22
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [7 x i8*], [7 x i8*]* %2, i64 0, i64 %25
%27 = load i8*, i8** %26
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 %29
%31 = load i8*, i8** %30
%32 = call i64 @issub(i8* %27, i8* %31)
%33 = icmp ne i64 %32, 0
%34 = zext i1 %33 to i64
%35 = select i1 %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0)
%36 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* %19, i8* %23, i8* %35)
br label %37
37: ; preds = %15
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %12
40: ; preds = %12
br label %41
41: ; preds = %40
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %8
44: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c" \00"
@.str.2 = [4 x i8] c"the\00"
@.str.3 = [6 x i8] c"first\00"
@.str.4 = [6 x i8] c"motor\00"
@.str.5 = [5 x i8] c"fast\00"
@.str.7 = [16 x i8] c"the first motor\00"
@.str.8 = [24 x i8] c"issub(\22%s\22, \22%s\22) = %s\0A\00"
@.str.9 = [5 x i8] c"true\00"
@.str.10 = [6 x i8] c"false\00"
define i32 @main() {
%1 = tail call i64 @issub(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%5 = tail call i64 @issub(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = tail call i64 @issub(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %11)
%13 = tail call i64 @issub(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = tail call i64 @issub(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
%19 = select i1 %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %19)
%21 = tail call i64 @issub(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
%23 = select i1 %22, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %23)
%25 = tail call i64 @issub(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
%27 = select i1 %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %27)
%29 = tail call i64 @issub(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
%31 = select i1 %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%32 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %31)
%33 = tail call i64 @issub(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
%35 = select i1 %34, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%36 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %35)
%37 = tail call i64 @issub(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
%39 = select i1 %38, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%40 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %39)
%41 = tail call i64 @issub(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
%43 = select i1 %42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%44 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %43)
%45 = tail call i64 @issub(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
%47 = select i1 %46, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0)
%48 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %47)
ret i32 0
}