#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 begins_with(char *, char *);
char *center(char *, int);
char **chop(char *, char);
char *common_prefix(char *, char *);
char *ellipsize(char *, int);
int ends_with(char *, char *);
int find_idx(char *, char);
char *find_ptr(char *, char);
int index_of_first_difference(char *, char *);
int is_blank(char *);
int /*<<< orphan*/ lstrip(char *);
char *make_space(int);
int /*<<< orphan*/ printf(char *, ...);
char *replace(char *, char *, char *);
int /*<<< orphan*/ rstrip(char *);
int /*<<< orphan*/ strcmp_ign_case(char *, char *);
char *xerox(char *);
int main(int argc, char **argv) {
  char *s = " \t\b\0";
  printf("Is |%s| blank? %d\n", s, is_blank(s));
  s = "This string was xeroxed.";
  char *x = xerox(s);
  printf("%s\n", x);
  printf("|%s|Five spaces should seperate the bars.\n", make_space(5));
  s = "Centered";
  printf("|%s|\n", center(s, 10));
  s = "Prefix";
  x = "Pre";
  printf("Is '%s' a prefix of '%s'? %d\n", x, s, begins_with(s, x));
  s = "Working";
  x = "ing";
  printf("Is '%s' a suffix of '%s'? %d\n", x, s, ends_with(s, x));
  s = "Appendectomy";
  x = "Apple";
  printf("%s and %s have a common prefix of: %s\n", s, x, common_prefix(s, x));
  s = "Appendectomy";
  x = "Apple";
  printf("Index of first difference between %s and %s: %d\n", s, x,
         index_of_first_difference(s, x));
  char r[] = "     Working     ";
  printf("|%s|\n", r);
  lstrip(r);
  printf("|%s|\n", r);
  rstrip(r);
  printf("|%s|\n", r);
  s = "abcdefgh";
  char z = 'd';
  printf("Index of '%c' in '%s': %d\n", z, s, find_idx(s, z));
  s = "abcdefgh";
  z = 'd';
  printf("Pointer to '%c' in '%s': %s\n", z, s, find_ptr(s, z));
  s = "";
  x = "";
  printf("", strcmp_ign_case(s, x));
  s = "Who lives in a pineapple under the sea? Spongebob Squarepants.";
  printf("%s\n", ellipsize(s, 5));
  s = "This..should..have..spaces..not..dots!";
  char *pat = "..";
  char *rep = " ";
  printf("%s\n", replace(s, pat, rep));
  s = "I am ready for a nice vacation";
  z = ' ';
  char **array = chop(s, z);
  int i;
  for (i = 0; array[i] != NULL; i++) {
    printf("word[%d]=%s\n", i, array[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xdd0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <is_blank@plt>
mov    -0xd0(%rbp),%rsi
mov    %eax,%edx
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xdb2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1100 <xerox@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x5,%edi
call   1040 <make_space@plt>
mov    %rax,%rsi
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xdb1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0xa,%esi
call   1130 <center@plt>
mov    %rax,%rsi
lea    0xd9e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xd96(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xd92(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10f0 <begins_with@plt>
mov    -0xc8(%rbp),%rsi
mov    -0xc0(%rbp),%rdx
mov    %eax,%ecx
lea    0xd58(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xd68(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xd61(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10c0 <ends_with@plt>
mov    -0xb8(%rbp),%rsi
mov    -0xb0(%rbp),%rdx
mov    %eax,%ecx
lea    0xd27(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xd37(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xd39(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <common_prefix@plt>
mov    -0xa8(%rbp),%rsi
mov    -0xa0(%rbp),%rdx
mov    %rax,%rcx
lea    0xd00(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xcdf(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xce1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1120 <index_of_first_difference@plt>
mov    -0x98(%rbp),%rsi
mov    -0x90(%rbp),%rdx
mov    %eax,%ecx
lea    0xcd0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0xdce(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xdcb(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xdc8(%rip),%ax
mov    %ax,-0x30(%rbp)
lea    -0x40(%rbp),%rsi
lea    0xc0e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x40(%rbp),%rdi
call   10e0 <lstrip@plt>
lea    -0x40(%rbp),%rsi
lea    0xbf3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x40(%rbp),%rdi
call   1030 <rstrip@plt>
lea    -0x40(%rbp),%rsi
lea    0xbd8(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc8a(%rip),%rax
mov    %rax,-0x18(%rbp)
movb   $0x64,-0x41(%rbp)
movsbl -0x41(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x18(%rbp),%rdi
movsbl -0x41(%rbp),%esi
call   10b0 <find_idx@plt>
mov    -0x84(%rbp),%esi
mov    -0x80(%rbp),%rdx
mov    %eax,%ecx
lea    0xc59(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc42(%rip),%rax
mov    %rax,-0x18(%rbp)
movb   $0x64,-0x41(%rbp)
movsbl -0x41(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x18(%rbp),%rdi
movsbl -0x41(%rbp),%esi
call   1110 <find_ptr@plt>
mov    -0x74(%rbp),%esi
mov    -0x70(%rbp),%rdx
mov    %rax,%rcx
lea    0xc31(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xb35(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xb2a(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <strcmp_ign_case@plt>
mov    %eax,%esi
lea    0xb10(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc0d(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x5,%esi
call   1090 <ellipsize@plt>
mov    %rax,%rsi
lea    0xbed(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc22(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xc3e(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xc36(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
call   10d0 <replace@plt>
mov    %rax,%rsi
lea    0xbaa(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc0b(%rip),%rax
mov    %rax,-0x18(%rbp)
movb   $0x20,-0x41(%rbp)
mov    -0x18(%rbp),%rdi
movsbl -0x41(%rbp),%esi
call   1080 <chop@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x64(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1624 <main+0x414>
mov    -0x64(%rbp),%esi
mov    -0x60(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xbe1(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    15e6 <main+0x3d6>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
lea    0xdd0(%rip),%rbx
mov    %rbx,%rdi
call   10b0 <is_blank@plt>
lea    0xdc6(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xdc6(%rip),%rdi
call   1110 <xerox@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x5,%edi
call   1050 <make_space@plt>
lea    0xdc1(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xddb(%rip),%rdi
mov    $0xa,%esi
call   1140 <center@plt>
lea    0xdd3(%rip),%r14
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xdc5(%rip),%r15
lea    0xdc5(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1100 <begins_with@plt>
lea    0xdb7(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xdbf(%rip),%r15
lea    0xdbc(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   10d0 <ends_with@plt>
lea    0xdae(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xdb6(%rip),%rbx
lea    0xdbc(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <common_prefix@plt>
lea    0xdb0(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1130 <index_of_first_difference@plt>
lea    0xdb5(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
movaps 0xeab(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x20,0x10(%rsp)
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   10f0 <lstrip@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   1030 <rstrip@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xd84(%rip),%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   10c0 <find_idx@plt>
lea    0xd79(%rip),%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1120 <find_ptr@plt>
lea    0xd6f(%rip),%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xc68(%rip),%rdi
mov    %rdi,%rsi
call   1070 <strcmp_ign_case@plt>
lea    0xd64(%rip),%rdi
mov    $0x5,%esi
call   10a0 <ellipsize@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
lea    0xd8a(%rip),%rdi
lea    0xdaa(%rip),%rsi
lea    0xda6(%rip),%rdx
call   10e0 <replace@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
lea    0xd94(%rip),%rdi
mov    $0x20,%esi
call   1090 <chop@plt>
mov    (%rax),%rdx
test   %rdx,%rdx
je     147a <main+0x25a>
mov    %rax,%r15
lea    0xd97(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x8(%r15,%rbx,8),%rdx
add    $0x1,%rbx
test   %rdx,%rdx
jne    1460 <main+0x240>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c" \09\08\00\00"
@.str.1 = [19 x i8] c"Is |%s| blank? %d\0A\00"
@.str.2 = [25 x i8] c"This string was xeroxed.\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [43 x i8] c"|%s|Five spaces should seperate the bars.\0A\00"
@.str.5 = [9 x i8] c"Centered\00"
@.str.6 = [6 x i8] c"|%s|\0A\00"
@.str.7 = [7 x i8] c"Prefix\00"
@.str.8 = [4 x i8] c"Pre\00"
@.str.9 = [30 x i8] c"Is '%s' a prefix of '%s'? %d\0A\00"
@.str.10 = [8 x i8] c"Working\00"
@.str.11 = [4 x i8] c"ing\00"
@.str.12 = [30 x i8] c"Is '%s' a suffix of '%s'? %d\0A\00"
@.str.13 = [13 x i8] c"Appendectomy\00"
@.str.14 = [6 x i8] c"Apple\00"
@.str.15 = [39 x i8] c"%s and %s have a common prefix of: %s\0A\00"
@.str.16 = [49 x i8] c"Index of first difference between %s and %s: %d\0A\00"
@__const.main.r = [18 x i8] c" Working \00"
@.str.17 = [9 x i8] c"abcdefgh\00"
@.str.18 = [27 x i8] c"Index of '%c' in '%s': %d\0A\00"
@.str.19 = [29 x i8] c"Pointer to '%c' in '%s': %s\0A\00"
@.str.20 = [1 x i8] zeroinitializer
@.str.21 = [63 x i8] c"Who lives in a pineapple under the sea? Spongebob Squarepants.\00"
@.str.22 = [39 x i8] c"This..should..have..spaces..not..dots!\00"
@.str.23 = [3 x i8] c"..\00"
@.str.24 = [2 x i8] c" \00"
@.str.25 = [31 x i8] c"I am ready for a nice vacation\00"
@.str.26 = [13 x i8] c"word[%d]=%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [18 x i8]
%9 = alloca i8
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8**
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %6
%14 = load i8*, i8** %6
%15 = load i8*, i8** %6
%16 = call i32 @is_blank(i8* %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %14, i32 %16)
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8** %6
%18 = load i8*, i8** %6
%19 = call i8* @xerox(i8* %18)
store i8* %19, i8** %7
%20 = load i8*, i8** %7
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%22 = call i8* @make_space(i32 5)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i8* %22)
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8** %6
%24 = load i8*, i8** %6
%25 = call i8* @center(i8* %24, i32 10)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %25)
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8** %7
%27 = load i8*, i8** %7
%28 = load i8*, i8** %6
%29 = load i8*, i8** %6
%30 = load i8*, i8** %7
%31 = call i32 @begins_with(i8* %29, i8* %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i8* %27, i8* %28, i32 %31)
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8** %7
%33 = load i8*, i8** %7
%34 = load i8*, i8** %6
%35 = load i8*, i8** %6
%36 = load i8*, i8** %7
%37 = call i32 @ends_with(i8* %35, i8* %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i8* %33, i8* %34, i32 %37)
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8** %7
%39 = load i8*, i8** %6
%40 = load i8*, i8** %7
%41 = load i8*, i8** %6
%42 = load i8*, i8** %7
%43 = call i8* @common_prefix(i8* %41, i8* %42)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0), i8* %39, i8* %40, i8* %43)
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8** %7
%45 = load i8*, i8** %6
%46 = load i8*, i8** %7
%47 = load i8*, i8** %6
%48 = load i8*, i8** %7
%49 = call i32 @index_of_first_difference(i8* %47, i8* %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.16, i64 0, i64 0), i8* %45, i8* %46, i32 %49)
%51 = bitcast [18 x i8]* %8 to i8*
%52 = getelementptr inbounds [18 x i8], [18 x i8]* %8, i64 0, i64 0
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %52)
%54 = getelementptr inbounds [18 x i8], [18 x i8]* %8, i64 0, i64 0
%55 = call i32 @lstrip(i8* %54)
%56 = getelementptr inbounds [18 x i8], [18 x i8]* %8, i64 0, i64 0
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %56)
%58 = getelementptr inbounds [18 x i8], [18 x i8]* %8, i64 0, i64 0
%59 = call i32 @rstrip(i8* %58)
%60 = getelementptr inbounds [18 x i8], [18 x i8]* %8, i64 0, i64 0
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %60)
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8** %6
store i8 100, i8* %9
%62 = load i8, i8* %9
%63 = sext i8 %62 to i32
%64 = load i8*, i8** %6
%65 = load i8*, i8** %6
%66 = load i8, i8* %9
%67 = call i32 @find_idx(i8* %65, i8 signext %66)
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i32 %63, i8* %64, i32 %67)
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8** %6
store i8 100, i8* %9
%69 = load i8, i8* %9
%70 = sext i8 %69 to i32
%71 = load i8*, i8** %6
%72 = load i8*, i8** %6
%73 = load i8, i8* %9
%74 = call i8* @find_ptr(i8* %72, i8 signext %73)
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0), i32 %70, i8* %71, i8* %74)
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.20, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.20, i64 0, i64 0), i8** %7
%76 = load i8*, i8** %6
%77 = load i8*, i8** %7
%78 = call i32 @strcmp_ign_case(i8* %76, i8* %77)
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.20, i64 0, i64 0), i32 %78)
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.21, i64 0, i64 0), i8** %6
%80 = load i8*, i8** %6
%81 = call i8* @ellipsize(i8* %80, i32 5)
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %81)
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.22, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i8** %10
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0), i8** %11
%83 = load i8*, i8** %6
%84 = load i8*, i8** %10
%85 = load i8*, i8** %11
%86 = call i8* @replace(i8* %83, i8* %84, i8* %85)
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %86)
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.25, i64 0, i64 0), i8** %6
store i8 32, i8* %9
%88 = load i8*, i8** %6
%89 = load i8, i8* %9
%90 = call i8** @chop(i8* %88, i8 signext %89)
store i8** %90, i8*** %12
store i32 0, i32* %13
br label %91
91: ; preds = %106, %2
%92 = load i8**, i8*** %12
%93 = load i32, i32* %13
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i8*, i8** %92, i64 %94
%96 = load i8*, i8** %95
%97 = icmp ne i8* %96, null
br i1 %97, label %98, label %109
98: ; preds = %91
%99 = load i32, i32* %13
%100 = load i8**, i8*** %12
%101 = load i32, i32* %13
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i8*, i8** %100, i64 %102
%104 = load i8*, i8** %103
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.26, i64 0, i64 0), i32 %99, i8* %104)
br label %106
106: ; preds = %98
%107 = load i32, i32* %13
%108 = add nsw i32 %107, 1
store i32 %108, i32* %13
br label %91
109: ; preds = %91
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c" \09\08\00\00"
@.str.1 = [19 x i8] c"Is |%s| blank? %d\0A\00"
@.str.2 = [25 x i8] c"This string was xeroxed.\00"
@.str.4 = [43 x i8] c"|%s|Five spaces should seperate the bars.\0A\00"
@.str.5 = [9 x i8] c"Centered\00"
@.str.6 = [6 x i8] c"|%s|\0A\00"
@.str.7 = [7 x i8] c"Prefix\00"
@.str.8 = [4 x i8] c"Pre\00"
@.str.9 = [30 x i8] c"Is '%s' a prefix of '%s'? %d\0A\00"
@.str.10 = [8 x i8] c"Working\00"
@.str.11 = [4 x i8] c"ing\00"
@.str.12 = [30 x i8] c"Is '%s' a suffix of '%s'? %d\0A\00"
@.str.13 = [13 x i8] c"Appendectomy\00"
@.str.14 = [6 x i8] c"Apple\00"
@.str.15 = [39 x i8] c"%s and %s have a common prefix of: %s\0A\00"
@.str.16 = [49 x i8] c"Index of first difference between %s and %s: %d\0A\00"
@__const.main.r = [18 x i8] c" Working \00"
@.str.17 = [9 x i8] c"abcdefgh\00"
@.str.18 = [27 x i8] c"Index of '%c' in '%s': %d\0A\00"
@.str.19 = [29 x i8] c"Pointer to '%c' in '%s': %s\0A\00"
@.str.20 = [1 x i8] zeroinitializer
@.str.21 = [63 x i8] c"Who lives in a pineapple under the sea? Spongebob Squarepants.\00"
@.str.22 = [39 x i8] c"This..should..have..spaces..not..dots!\00"
@.str.23 = [3 x i8] c"..\00"
@.str.24 = [2 x i8] c" \00"
@.str.25 = [31 x i8] c"I am ready for a nice vacation\00"
@.str.26 = [13 x i8] c"word[%d]=%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [18 x i8]
%4 = tail call i32 @is_blank(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i8* @xerox(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
%8 = tail call i8* @make_space(i32 5)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i8* %8)
%10 = tail call i8* @center(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 10)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %10)
%12 = tail call i32 @begins_with(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %12)
%14 = tail call i32 @ends_with(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %14)
%16 = tail call i8* @common_prefix(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %16)
%18 = tail call i32 @index_of_first_difference(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 0
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %20)
%22 = call i32 @lstrip(i8* %20)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %20)
%24 = call i32 @rstrip(i8* %20)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %20)
%26 = call i32 @find_idx(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8 signext 100)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i32 %26)
%28 = call i8* @find_ptr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8 signext 100)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8* %28)
%30 = call i32 @strcmp_ign_case(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.20, i64 0, i64 0))
%31 = call i8* @ellipsize(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.21, i64 0, i64 0), i32 5)
%32 = call i32 @puts(i8* dereferenceable(1) %31)
%33 = call i8* @replace(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
%34 = call i32 @puts(i8* dereferenceable(1) %33)
%35 = call i8** @chop(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.25, i64 0, i64 0), i8 signext 32)
%36 = load i8*, i8** %35
%37 = icmp eq i8* %36, null
br i1 %37, label %47, label %38
38: ; preds = %2, %38
%39 = phi i64 [ %43, %38 ], [ 0, %2 ]
%40 = phi i8* [ %45, %38 ], [ %36, %2 ]
%41 = trunc i64 %39 to i32
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.26, i64 0, i64 0), i32 %41, i8* %40)
%43 = add nuw i64 %39, 1
%44 = getelementptr inbounds i8*, i8** %35, i64 %43
%45 = load i8*, i8** %44
%46 = icmp eq i8* %45, null
br i1 %46, label %47, label %38
47: ; preds = %38, %2
ret i32 0
}