#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 /*<<< orphan*/ free(char *);
int /*<<< orphan*/ mystrcat(char *, char *);
scalar_t__ mystrcmp(char *, char *);
char *mystrcpy(char *, char *);
char *mystrdup(char *);
int mystrlen(char *);
char *mystrstr(char *, char *);
int /*<<< orphan*/ printf(char *);
int strcmp(char *, char *);
int main() {
  char s1[64], *s2;
  mystrcpy(s1, "Hello world");
  assert(!strcmp(s1, "Hello world"));
  assert(strcmp(s1, "Hello worl"));
  assert(strcmp(s1, "Hello worldgggg"));
  mystrcpy(s1, "");
  assert(!strcmp(mystrcpy(s1, ""), ""));
  assert(mystrlen("Hello world") == 11);
  assert(mystrlen("Hello world") == 11);
  assert(mystrlen("Hello world") == 11);
  assert(mystrlen("Hello world") == 11);
  s2 = mystrdup("Hello world");
  assert(!strcmp(s2, "Hello world"));
  s2[0] = 'Y';
  assert(!strcmp(s2, "Yello world"));
  free(s2);
  mystrcpy(s1, "Purdue");
  mystrcat(s1, " University");
  assert(!strcmp(s1, "Purdue University"));
  mystrcat(s1, "");
  assert(!strcmp(s1, "Purdue University"));
  mystrcpy(s1, "The quick brown fox jumps over the lazy dog");
  s2 = mystrstr(s1, "jumps");
  assert(!strcmp(s2, "jumps over the lazy dog"));
  assert(mystrstr(s1, "Hello") == NULL);
  assert(mystrstr("jumps", s1) == NULL);
  s2 = mystrstr(s1, "");
  assert(s2 == s1);
  assert(mystrcmp("abcd", "dabc") < 0);
  assert(mystrcmp("dab", "abcd") > 0);
  assert(mystrcmp("dab", "dab") == 0);
  printf("Seems to be OK\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe46(%rip),%rsi
call   10c0 <mystrcpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xe36(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    -0x50(%rbp),%rdi
lea    0xe20(%rip),%rsi
call   1080 <strcmp@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    -0x50(%rbp),%rdi
lea    0xe14(%rip),%rsi
call   1080 <strcmp@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    -0x50(%rbp),%rdi
lea    0xe87(%rip),%rsi
call   10c0 <mystrcpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xe77(%rip),%rsi
call   10c0 <mystrcpy@plt>
mov    %rax,%rdi
lea    0xe68(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xda9(%rip),%rdi
call   10b0 <mystrlen@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xd8d(%rip),%rdi
call   10b0 <mystrlen@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xd71(%rip),%rdi
call   10b0 <mystrlen@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xd55(%rip),%rdi
call   10b0 <mystrlen@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xd39(%rip),%rdi
call   1070 <mystrdup@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
lea    0xd25(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
mov    -0x58(%rbp),%rax
movb   $0x59,(%rax)
mov    -0x58(%rbp),%rdi
lea    0xd23(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
lea    -0x50(%rbp),%rdi
lea    0xd04(%rip),%rsi
call   10c0 <mystrcpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xd01(%rip),%rsi
call   10a0 <mystrcat@plt>
lea    -0x50(%rbp),%rdi
lea    0xceb(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    -0x50(%rbp),%rdi
lea    0xd30(%rip),%rsi
call   10a0 <mystrcat@plt>
lea    -0x50(%rbp),%rdi
lea    0xcb9(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    -0x50(%rbp),%rdi
lea    0xca9(%rip),%rsi
call   10c0 <mystrcpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xcc5(%rip),%rsi
call   1050 <mystrstr@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
lea    0xc99(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    -0x50(%rbp),%rdi
lea    0xc95(%rip),%rsi
call   1050 <mystrstr@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    -0x50(%rbp),%rsi
lea    0xc6e(%rip),%rdi
call   1050 <mystrstr@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    -0x50(%rbp),%rdi
lea    0xc76(%rip),%rsi
call   1050 <mystrstr@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
lea    -0x50(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xc31(%rip),%rdi
lea    0xc2f(%rip),%rsi
call   1040 <mystrcmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xc17(%rip),%rdi
lea    0xc06(%rip),%rsi
call   1040 <mystrcmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xbf3(%rip),%rsi
mov    %rsi,%rdi
call   1040 <mystrcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <assert@plt>
lea    0xbd7(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xe6e(%rip),%r12
mov    %rsp,%r15
mov    %r15,%rdi
mov    %r12,%rsi
call   10c0 <mystrcpy@plt>
movabs $0x6f77206f6c6c6548,%rax
20 77 6f
xor    (%rsp),%rax
mov    0x8(%rsp),%ecx
xor    $0x646c72,%rcx
xor    %edi,%edi
or     %rax,%rcx
sete   %dil
call   1090 <assert@plt>
lea    0xe3e(%rip),%rsi
mov    %r15,%rdi
call   1080 <strcmp@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xe33(%rip),%rsi
mov    %r15,%rdi
call   1080 <strcmp@plt>
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xea6(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   10c0 <mystrcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   10c0 <mystrcpy@plt>
xor    %edi,%edi
cmpb   $0x0,(%rax)
sete   %dil
call   1090 <assert@plt>
mov    %r12,%rdi
call   10b0 <mystrlen@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
call   1090 <assert@plt>
mov    %r12,%rdi
call   10b0 <mystrlen@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
call   1090 <assert@plt>
mov    %r12,%rdi
call   10b0 <mystrlen@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
call   1090 <assert@plt>
mov    %r12,%rdi
call   10b0 <mystrlen@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
call   1090 <assert@plt>
mov    %r12,%rdi
call   1070 <mystrdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1080 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
movb   $0x59,(%rbx)
lea    0xd84(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
lea    0xd6c(%rip),%rsi
mov    %r15,%rdi
call   10c0 <mystrcpy@plt>
lea    0xd6a(%rip),%rsi
mov    %r15,%rdi
call   10a0 <mystrcat@plt>
movzwl 0x10(%rsp),%eax
movd   %eax,%xmm0
pcmpeqb 0xcf1(%rip),%xmm0
movdqa (%rsp),%xmm1
pcmpeqb 0xcf4(%rip),%xmm1
pand   %xmm0,%xmm1
pmovmskb %xmm1,%eax
xor    %edi,%edi
cmp    $0xffff,%eax
sete   %dil
call   1090 <assert@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   10a0 <mystrcat@plt>
movzwl 0x10(%rsp),%eax
movd   %eax,%xmm0
pcmpeqb 0xcb0(%rip),%xmm0
movdqa 0xcb8(%rip),%xmm1
pcmpeqb (%rsp),%xmm1
pand   %xmm0,%xmm1
pmovmskb %xmm1,%eax
xor    %edi,%edi
cmp    $0xffff,%eax
sete   %dil
call   1090 <assert@plt>
lea    0xcf0(%rip),%rsi
mov    %r15,%rdi
call   10c0 <mystrcpy@plt>
lea    0xd0d(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <mystrstr@plt>
lea    0xce3(%rip),%rsi
mov    %rax,%rdi
call   1080 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1090 <assert@plt>
lea    0xce5(%rip),%rsi
mov    %r15,%rdi
call   1060 <mystrstr@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1090 <assert@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <mystrstr@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1090 <assert@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1060 <mystrstr@plt>
xor    %edi,%edi
cmp    %r15,%rax
sete   %dil
call   1090 <assert@plt>
lea    0xc9c(%rip),%r14
lea    0xc9a(%rip),%rsi
mov    %r14,%rdi
call   1040 <mystrcmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1090 <assert@plt>
lea    0xc85(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <mystrcmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1090 <assert@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1040 <mystrcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1090 <assert@plt>
lea    0xc50(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [11 x i8] c"Hello worl\00"
@.str.2 = [16 x i8] c"Hello worldgggg\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [12 x i8] c"Yello world\00"
@.str.5 = [7 x i8] c"Purdue\00"
@.str.6 = [12 x i8] c" University\00"
@.str.7 = [18 x i8] c"Purdue University\00"
@.str.8 = [44 x i8] c"The quick brown fox jumps over the lazy dog\00"
@.str.9 = [6 x i8] c"jumps\00"
@.str.10 = [24 x i8] c"jumps over the lazy dog\00"
@.str.11 = [6 x i8] c"Hello\00"
@.str.12 = [5 x i8] c"abcd\00"
@.str.13 = [5 x i8] c"dabc\00"
@.str.14 = [4 x i8] c"dab\00"
@.str.15 = [16 x i8] c"Seems to be OK\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%5 = call i8* @mystrcpy(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%7 = call i32 @strcmp(i8* %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%13 = call i32 @strcmp(i8* %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @assert(i32 %13)
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%16 = call i32 @strcmp(i8* %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @assert(i32 %16)
%18 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%19 = call i8* @mystrcpy(i8* %18, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%20 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%21 = call i8* @mystrcpy(i8* %20, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = call i32 @mystrlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%28 = icmp eq i32 %27, 11
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = call i32 @mystrlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%32 = icmp eq i32 %31, 11
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = call i32 @mystrlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%36 = icmp eq i32 %35, 11
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = call i32 @mystrlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%40 = icmp eq i32 %39, 11
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = call i8* @mystrdup(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %43, i8** %3
%44 = load i8*, i8** %3
%45 = call i32 @strcmp(i8* %44, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%46 = icmp ne i32 %45, 0
%47 = xor i1 %46, true
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
%50 = load i8*, i8** %3
%51 = getelementptr inbounds i8, i8* %50, i64 0
store i8 89, i8* %51
%52 = load i8*, i8** %3
%53 = call i32 @strcmp(i8* %52, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%54 = icmp ne i32 %53, 0
%55 = xor i1 %54, true
%56 = zext i1 %55 to i32
%57 = call i32 @assert(i32 %56)
%58 = load i8*, i8** %3
%59 = call i32 @free(i8* %58)
%60 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%61 = call i8* @mystrcpy(i8* %60, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%62 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%63 = call i32 @mystrcat(i8* %62, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%64 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%65 = call i32 @strcmp(i8* %64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%66 = icmp ne i32 %65, 0
%67 = xor i1 %66, true
%68 = zext i1 %67 to i32
%69 = call i32 @assert(i32 %68)
%70 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%71 = call i32 @mystrcat(i8* %70, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%72 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%73 = call i32 @strcmp(i8* %72, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%74 = icmp ne i32 %73, 0
%75 = xor i1 %74, true
%76 = zext i1 %75 to i32
%77 = call i32 @assert(i32 %76)
%78 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%79 = call i8* @mystrcpy(i8* %78, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%80 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%81 = call i8* @mystrstr(i8* %80, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
store i8* %81, i8** %3
%82 = load i8*, i8** %3
%83 = call i32 @strcmp(i8* %82, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%84 = icmp ne i32 %83, 0
%85 = xor i1 %84, true
%86 = zext i1 %85 to i32
%87 = call i32 @assert(i32 %86)
%88 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%89 = call i8* @mystrstr(i8* %88, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%90 = icmp eq i8* %89, null
%91 = zext i1 %90 to i32
%92 = call i32 @assert(i32 %91)
%93 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%94 = call i8* @mystrstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %93)
%95 = icmp eq i8* %94, null
%96 = zext i1 %95 to i32
%97 = call i32 @assert(i32 %96)
%98 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%99 = call i8* @mystrstr(i8* %98, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
store i8* %99, i8** %3
%100 = load i8*, i8** %3
%101 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%102 = icmp eq i8* %100, %101
%103 = zext i1 %102 to i32
%104 = call i32 @assert(i32 %103)
%105 = call i64 @mystrcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%106 = icmp slt i64 %105, 0
%107 = zext i1 %106 to i32
%108 = call i32 @assert(i32 %107)
%109 = call i64 @mystrcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%110 = icmp sgt i64 %109, 0
%111 = zext i1 %110 to i32
%112 = call i32 @assert(i32 %111)
%113 = call i64 @mystrcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%114 = icmp eq i64 %113, 0
%115 = zext i1 %114 to i32
%116 = call i32 @assert(i32 %115)
%117 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [11 x i8] c"Hello worl\00"
@.str.2 = [16 x i8] c"Hello worldgggg\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [12 x i8] c"Yello world\00"
@.str.5 = [7 x i8] c"Purdue\00"
@.str.6 = [12 x i8] c" University\00"
@.str.7 = [18 x i8] c"Purdue University\00"
@.str.8 = [44 x i8] c"The quick brown fox jumps over the lazy dog\00"
@.str.9 = [6 x i8] c"jumps\00"
@.str.10 = [24 x i8] c"jumps over the lazy dog\00"
@.str.11 = [6 x i8] c"Hello\00"
@.str.12 = [5 x i8] c"abcd\00"
@.str.13 = [5 x i8] c"dabc\00"
@.str.14 = [4 x i8] c"dab\00"
@str = [15 x i8] c"Seems to be OK\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = call i8* @mystrcpy(i8* %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @bcmp(i8* dereferenceable(12) %2, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 12)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i32 @strcmp(i8* %2, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @assert(i32 %8)
%10 = call i32 @strcmp(i8* %2, i8* dereferenceable(16) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @assert(i32 %10)
%12 = call i8* @mystrcpy(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%13 = call i8* @mystrcpy(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = call i32 @mystrlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%19 = icmp eq i32 %18, 11
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call i32 @mystrlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%23 = icmp eq i32 %22, 11
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = call i32 @mystrlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%27 = icmp eq i32 %26, 11
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = call i32 @mystrlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%31 = icmp eq i32 %30, 11
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = call i8* @mystrdup(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%35 = call i32 @strcmp(i8* dereferenceable(1) %34, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
store i8 89, i8* %34
%39 = call i32 @strcmp(i8* %34, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%40 = icmp eq i32 %39, 0
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = call i32 @free(i8* %34)
%44 = call i8* @mystrcpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%45 = call i32 @mystrcat(i8* %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%46 = call i32 @bcmp(i8* dereferenceable(18) %2, i8* dereferenceable(18) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i64 18)
%47 = icmp eq i32 %46, 0
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
%50 = call i32 @mystrcat(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%51 = call i32 @bcmp(i8* dereferenceable(18) %2, i8* dereferenceable(18) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i64 18)
%52 = icmp eq i32 %51, 0
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
%55 = call i8* @mystrcpy(i8* %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%56 = call i8* @mystrstr(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%57 = call i32 @strcmp(i8* dereferenceable(1) %56, i8* dereferenceable(24) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%58 = icmp eq i32 %57, 0
%59 = zext i1 %58 to i32
%60 = call i32 @assert(i32 %59)
%61 = call i8* @mystrstr(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%62 = icmp eq i8* %61, null
%63 = zext i1 %62 to i32
%64 = call i32 @assert(i32 %63)
%65 = call i8* @mystrstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %2)
%66 = icmp eq i8* %65, null
%67 = zext i1 %66 to i32
%68 = call i32 @assert(i32 %67)
%69 = call i8* @mystrstr(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%70 = icmp eq i8* %69, %2
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71)
%73 = call i64 @mystrcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%74 = lshr i64 %73, 63
%75 = trunc i64 %74 to i32
%76 = call i32 @assert(i32 %75)
%77 = call i64 @mystrcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%78 = icmp sgt i64 %77, 0
%79 = zext i1 %78 to i32
%80 = call i32 @assert(i32 %79)
%81 = call i64 @mystrcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%82 = icmp eq i64 %81, 0
%83 = zext i1 %82 to i32
%84 = call i32 @assert(i32 %83)
%85 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}