int main(int argc, char **argv) {
  if (argc != 2) {
    printf("Please use only 1 argument.\ni.e. ./pointersorter "
           "\"the*string*of*some*sort\"\nExiting...\n");
    return 1;
  }
  char *input = argv[1];
  int maxSize = (int)ceil(((double)strlen(input)) / 2) + 1;
  printf("Max Size of Array: %d\n", maxSize);
  char **strArray = (char **)malloc(maxSize * sizeof(char *));
  int currentstrArray = 0;
  int wordStart = 0;
  int wordEnd;
  for (wordEnd = 0; wordEnd <= strlen(input) - 1; wordEnd++) {
    printf("index %d : %c\n", wordEnd, input[wordEnd]);
    if (!isalpha(input[wordEnd])) {
      if (wordEnd == 0) {
        wordStart = 1;
        printf("wordStart: %d\n", wordStart);
        continue;
      } else if ((!isalpha(input[wordEnd - 1])) &&
                 (wordEnd == strlen(input) - 1)) {
        currentstrArray--;
        printf("%s\n", "Ending");
        break;
      } else if (!isalpha(input[wordEnd - 1])) {
        wordStart = wordEnd + 1;
        printf("%s\n", "Multiple no alphas\n");
        continue;
      } else if (wordEnd == strlen(input) - 1) {
        int subLength = wordEnd - wordStart + 1;
        printf("Substring Length: %d\n", subLength);
        char subStr[subLength];
        strncpy(subStr, &input[wordStart], subLength - 1);
        subStr[subLength - 1] = '\0';
        printf("Substring: %s\nSubstring length: %zd\n", subStr,
               strlen(subStr));
        strArray[currentstrArray] = malloc(sizeof(subStr));
        strcpy(strArray[currentstrArray], subStr);
        printf("inserting string: %s at index: %d\n", strArray[currentstrArray],
               currentstrArray);
        break;
      }
      int subLength = wordEnd - wordStart + 1;
      printf("Substring Length: %d\n", subLength);
      char subStr[subLength];
      strncpy(subStr, &input[wordStart], subLength - 1);
      subStr[subLength - 1] = '\0';
      printf("Substring: %s\nSubstring length: %zd\n", subStr, strlen(subStr));
      strArray[currentstrArray] = malloc(sizeof(subStr));
      strcpy(strArray[currentstrArray], subStr);
      printf("inserting string: %s at index: %d\n", strArray[currentstrArray],
             currentstrArray);
      currentstrArray++;
      wordStart = wordEnd + 1;
      continue;
    } else if (wordEnd == strlen(input) - 1) {
      printf("%s\n", "ending\n");
      int subLength = wordEnd - wordStart + 2;
      printf("Substring Length: %d\n", subLength);
      char subStr[subLength];
      strncpy(subStr, &input[wordStart], subLength - 1);
      subStr[subLength - 1] = '\0';
      printf("Substring: %s\nSubstring length: %zd\n", subStr, strlen(subStr));
      strArray[currentstrArray] = malloc(sizeof(subStr));
      strcpy(strArray[currentstrArray], subStr);
      printf("inserting string: %s at index: %d\n", strArray[currentstrArray],
             currentstrArray);
      break;
    }
  }
  insertionsort(strArray, currentstrArray + 1);
  printf("\n\n\n\n\n\n");
  for (int i = 0; i <= currentstrArray; i++) {
    printf("Index: %d\n", i);
    printf("%s\n", strArray[i]);
  }
  printf("Length: %ld\n", strlen(input));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11bd <main+0x3d>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1792 <main+0x612>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
movq   %rax,%xmm0
movaps 0xe32(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xe36(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdff(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <ceil@plt>
cvttsd2si %xmm0,%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movslq -0x1c(%rbp),%rdi
shl    $0x3,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rcx
mov    -0x88(%rbp),%rax
sub    $0x1,%rcx
cmp    %rcx,%rax
ja     170d <main+0x58d>
mov    -0x34(%rbp),%esi
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   10a0 <isalpha@plt>
cmp    $0x0,%eax
jne    15b7 <main+0x437>
cmpl   $0x0,-0x34(%rbp)
jne    12d4 <main+0x154>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%esi
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    16ff <main+0x57f>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   10a0 <isalpha@plt>
cmp    $0x0,%eax
jne    1341 <main+0x1c1>
movslq -0x34(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rcx
mov    -0x90(%rbp),%rax
sub    $0x1,%rcx
cmp    %rcx,%rax
jne    1341 <main+0x1c1>
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
lea    0xd8e(%rip),%rdi
lea    0xd8b(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    170d <main+0x58d>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   10a0 <isalpha@plt>
cmp    $0x0,%eax
jne    1383 <main+0x203>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
lea    0xd4c(%rip),%rdi
lea    0xd50(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    16ff <main+0x57f>
movslq -0x34(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rcx
mov    -0x98(%rbp),%rax
sub    $0x1,%rcx
cmp    %rcx,%rax
jne    14a2 <main+0x322>
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%esi
lea    0xd15(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    -0x38(%rbp),%eax
mov    %rax,-0xa8(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0xa0(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%rsi
movslq -0x30(%rbp),%rax
add    %rax,%rsi
mov    -0x38(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rdx
call   1030 <strncpy@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x38(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,(%rdi,%rax,1)
call   1060 <strlen@plt>
mov    -0xa0(%rbp),%rsi
mov    %rax,%rdx
lea    0xcb2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0xa8(%rbp),%rdi
call   1090 <malloc@plt>
mov    -0xa0(%rbp),%rsi
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <strcpy@plt>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x2c(%rbp),%edx
lea    0xc87(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
jmp    170d <main+0x58d>
jmp    14a7 <main+0x327>
jmp    14ac <main+0x32c>
jmp    14b1 <main+0x331>
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%esi
lea    0xc12(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    -0x4c(%rbp),%eax
mov    %rax,-0xb8(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0xb0(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x60(%rbp)
mov    -0x18(%rbp),%rsi
movslq -0x30(%rbp),%rax
add    %rax,%rsi
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rdx
call   1030 <strncpy@plt>
mov    -0xb0(%rbp),%rdi
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,(%rdi,%rax,1)
call   1060 <strlen@plt>
mov    -0xb0(%rbp),%rsi
mov    %rax,%rdx
lea    0xbaf(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0xb8(%rbp),%rdi
call   1090 <malloc@plt>
mov    -0xb0(%rbp),%rsi
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <strcpy@plt>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x2c(%rbp),%edx
lea    0xb84(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,%rsp
jmp    16ff <main+0x57f>
movslq -0x34(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rcx
mov    -0xc0(%rbp),%rax
sub    $0x1,%rcx
cmp    %rcx,%rax
jne    16f5 <main+0x575>
lea    0xad3(%rip),%rdi
lea    0xb49(%rip),%rsi
xor    %eax,%eax
mov    %al,-0xd1(%rbp)
call   1070 <printf@plt>
mov    -0xd1(%rbp),%al
mov    -0x34(%rbp),%ecx
mov    -0x30(%rbp),%edx
sub    %edx,%ecx
add    $0x2,%ecx
mov    %ecx,-0x64(%rbp)
mov    -0x64(%rbp),%esi
lea    0xac0(%rip),%rdi
call   1070 <printf@plt>
mov    -0x64(%rbp),%eax
mov    %rax,-0xd0(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0xc8(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x78(%rbp)
mov    -0x18(%rbp),%rsi
movslq -0x30(%rbp),%rax
add    %rax,%rsi
mov    -0x64(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rdx
call   1030 <strncpy@plt>
mov    -0xc8(%rbp),%rdi
mov    -0x64(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,(%rdi,%rax,1)
call   1060 <strlen@plt>
mov    -0xc8(%rbp),%rsi
mov    %rax,%rdx
lea    0xa5f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0xd0(%rbp),%rdi
call   1090 <malloc@plt>
mov    -0xc8(%rbp),%rsi
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <strcpy@plt>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x2c(%rbp),%edx
lea    0xa34(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x70(%rbp),%rax
mov    %rax,%rsp
jmp    170d <main+0x58d>
jmp    16fa <main+0x57a>
jmp    16ff <main+0x57f>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    124b <main+0xcb>
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
add    $0x1,%esi
mov    $0x0,%al
call   1080 <insertionsort@plt>
lea    0xa1c(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1778 <main+0x5f8>
mov    -0x7c(%rbp),%esi
lea    0x9ff(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x28(%rbp),%rax
movslq -0x7c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0x959(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1733 <main+0x5b3>
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rsi
lea    0x9c8(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
cmp    $0x2,%edi
jne    13ba <main+0x22a>
mov    0x8(%rsi),%r15
mov    %r15,%rdi
call   1070 <strlen@plt>
movq   %rax,%xmm1
punpckldq 0xe3d(%rip),%xmm1
subpd  0xe45(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  0xe41(%rip),%xmm0
call   1060 <ceil@plt>
cvttsd2si %xmm0,%ebx
lea    0x1(%rbx),%esi
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
movslq %ebx,%rax
lea    0x8(,%rax,8),%rdi
call   10a0 <malloc@plt>
mov    %rax,%r12
xor    %r13d,%r13d
xor    %eax,%eax
mov    %rax,-0x30(%rbp)
xor    %r14d,%r14d
mov    %r12,-0x48(%rbp)
mov    %r15,-0x38(%rbp)
jmp    1261 <main+0xd1>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
call   1070 <strlen@plt>
add    $0xffffffffffffffff,%rax
cmp    %rax,%r13
je     13d0 <main+0x240>
lea    0x1(%r13),%rbx
mov    %r15,%rdi
call   1070 <strlen@plt>
add    $0xffffffffffffffff,%rax
cmp    %r13,%rax
mov    %rbx,%r13
jbe    148d <main+0x2fd>
movsbl (%r15,%r13,1),%edx
lea    0xdd2(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
movsbl (%r15,%r13,1),%edi
call   10b0 <isalpha@plt>
test   %eax,%eax
jne    1230 <main+0xa0>
test   %r13,%r13
je     137a <main+0x1ea>
movsbl -0x1(%r15,%r13,1),%edi
call   10b0 <isalpha@plt>
mov    %r15,%rdi
mov    %eax,%r15d
call   1070 <strlen@plt>
add    $0xffffffffffffffff,%rax
test   %r15d,%r15d
je     1398 <main+0x208>
cmp    %rax,%r13
je     1519 <main+0x389>
mov    %r14d,%eax
neg    %eax
lea    (%rax,%r13,1),%r12
lea    (%rax,%r13,1),%r15
add    $0x1,%r15
lea    0xda6(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rsp,-0x40(%rbp)
mov    %r15d,%ebx
lea    0xf(%rbx),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
movslq %r14d,%rsi
add    -0x38(%rbp),%rsi
movslq %r12d,%r14
mov    %r15,%rdi
mov    %r14,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%r15,1)
mov    %r15,%rdi
call   1070 <strlen@plt>
lea    0xd71(%rip),%rdi
mov    %r15,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    -0x30(%rbp),%rbx
movslq %ebx,%rax
mov    -0x48(%rbp),%r12
mov    %r14,(%r12,%rax,8)
mov    %r14,%rdi
mov    %r15,%rsi
mov    -0x38(%rbp),%r15
call   1040 <strcpy@plt>
lea    0xd59(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1080 <printf@plt>
add    $0x1,%ebx
mov    %rbx,-0x30(%rbp)
mov    -0x40(%rbp),%rsp
lea    0x1(%r13),%r14d
jmp    1245 <main+0xb5>
mov    $0x1,%r14d
lea    0xcc7(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    1245 <main+0xb5>
cmp    %rax,%r13
je     15c0 <main+0x430>
lea    0x1(%r13),%r14d
lea    0xcb8(%rip),%rdi
call   1050 <puts@plt>
mov    -0x38(%rbp),%r15
jmp    1245 <main+0xb5>
lea    0xd3b(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%eax
jmp    150a <main+0x37a>
lea    0xcff(%rip),%rdi
call   1050 <puts@plt>
mov    %r14d,%eax
neg    %eax
lea    (%rax,%r13,1),%r15
lea    (%rax,%r13,1),%rbx
add    $0x2,%rbx
lea    0xc84(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rsp,-0x40(%rbp)
mov    %ebx,%r13d
lea    0xf(%r13),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
movslq %r14d,%rsi
add    -0x38(%rbp),%rsi
add    $0x1,%r15d
movslq %r15d,%r14
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%rbx,1)
mov    %rbx,%rdi
call   1070 <strlen@plt>
lea    0xc4c(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r13,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r14
movslq -0x30(%rbp),%r15
mov    -0x48(%rbp),%rax
mov    %r14,(%rax,%r15,8)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
lea    0xc3b(%rip),%rdi
mov    %r14,%rsi
mov    -0x48(%rbp),%r12
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <printf@plt>
mov    -0x40(%rbp),%rsp
mov    %r12,%r15
mov    -0x30(%rbp),%r12
lea    0x1(%r12),%ebx
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1090 <insertionsort@plt>
lea    0xc4a(%rip),%rdi
call   1050 <puts@plt>
test   %r12d,%r12d
js     14ee <main+0x35e>
mov    %ebx,%r14d
lea    0xc1e(%rip),%r13
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    (%r15,%rbx,8),%rdi
call   1050 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    14d0 <main+0x340>
mov    -0x38(%rbp),%rdi
call   1070 <strlen@plt>
lea    0xbeb(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14d,%eax
neg    %eax
lea    (%rax,%r13,1),%r12
lea    (%rax,%r13,1),%rbx
add    $0x1,%rbx
lea    0xb47(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rsp,-0x40(%rbp)
mov    %ebx,%r15d
lea    0xf(%r15),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
movslq %r14d,%rsi
add    -0x38(%rbp),%rsi
movslq %r12d,%r13
mov    %rbx,%rdi
mov    %r13,%rdx
call   1030 <strncpy@plt>
movb   $0x0,0x0(%r13,%rbx,1)
mov    %rbx,%rdi
call   1070 <strlen@plt>
lea    0xb12(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r15
mov    -0x30(%rbp),%r13
movslq %r13d,%rax
mov    -0x48(%rbp),%r12
mov    %r15,(%r12,%rax,8)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
lea    0xafe(%rip),%rdi
mov    %r15,%rsi
mov    %r13d,%edx
jmp    1482 <main+0x2f2>
mov    -0x30(%rbp),%rax
add    $0xffffffff,%eax
mov    %rax,-0x30(%rbp)
lea    0xa8b(%rip),%rdi
call   1050 <puts@plt>
jmp    148d <main+0x2fd>

LLVM IR (-O0):
@.str = [87 x i8] c"Please use only 1 argument.\0Ai.e. ./pointersorter \22the*string*of*some*sort\22\0AExiting...\0A\00"
@.str.1 = [23 x i8] c"Max Size of Array: %d\0A\00"
@.str.2 = [15 x i8] c"index %d : %c\0A\00"
@.str.3 = [15 x i8] c"wordStart: %d\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
@.str.5 = [7 x i8] c"Ending\00"
@.str.6 = [20 x i8] c"Multiple no alphas\0A\00"
@.str.7 = [22 x i8] c"Substring Length: %d\0A\00"
@.str.8 = [37 x i8] c"Substring: %s\0ASubstring length: %zd\0A\00"
@.str.9 = [35 x i8] c"inserting string: %s at index: %d\0A\00"
@.str.10 = [8 x i8] c"ending\0A\00"
@.str.11 = [7 x i8] c"\0A\0A\0A\0A\0A\0A\00"
@.str.12 = [11 x i8] c"Index: %d\0A\00"
@.str.13 = [13 x i8] c"Length: %ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i64
%15 = alloca i32
%16 = alloca i8*
%17 = alloca i64
%18 = alloca i32
%19 = alloca i8*
%20 = alloca i64
%21 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = load i32, i32* %4
%23 = icmp ne i32 %22, 2
br i1 %23, label %24, label %26
24: ; preds = %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %294
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
store i8* %29, i8** %6
%30 = load i8*, i8** %6
%31 = call i64 @strlen(i8* %30)
%32 = uitofp i64 %31 to double
%33 = fdiv double %32, 2.000000e+00
%34 = call double @llvm.ceil.f64(double %33)
%35 = fptosi double %34 to i32
%36 = add nsw i32 %35, 1
store i32 %36, i32* %7
%37 = load i32, i32* %7
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = mul i64 %40, 8
%42 = call i8* @malloc(i64 %41)
%43 = bitcast i8* %42 to i8**
store i8** %43, i8*** %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
br label %44
44: ; preds = %265, %26
%45 = load i32, i32* %11
%46 = sext i32 %45 to i64
%47 = load i8*, i8** %6
%48 = call i64 @strlen(i8* %47)
%49 = sub i64 %48, 1
%50 = icmp ule i64 %46, %49
br i1 %50, label %51, label %268
51: ; preds = %44
%52 = load i32, i32* %11
%53 = load i8*, i8** %6
%54 = load i32, i32* %11
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %53, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %52, i32 %58)
%60 = load i8*, i8** %6
%61 = load i32, i32* %11
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %60, i64 %62
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = call i32 @isalpha(i32 %65)
%67 = icmp ne i32 %66, 0
br i1 %67, label %211, label %68
68: ; preds = %51
%69 = load i32, i32* %11
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %74
71: ; preds = %68
store i32 1, i32* %10
%72 = load i32, i32* %10
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %72)
br label %265
74: ; preds = %68
%75 = load i8*, i8** %6
%76 = load i32, i32* %11
%77 = sub nsw i32 %76, 1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8, i8* %75, i64 %78
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = call i32 @isalpha(i32 %81)
%83 = icmp ne i32 %82, 0
br i1 %83, label %95, label %84
84: ; preds = %74
%85 = load i32, i32* %11
%86 = sext i32 %85 to i64
%87 = load i8*, i8** %6
%88 = call i64 @strlen(i8* %87)
%89 = sub i64 %88, 1
%90 = icmp eq i64 %86, %89
br i1 %90, label %91, label %95
91: ; preds = %84
%92 = load i32, i32* %9
%93 = add nsw i32 %92, -1
store i32 %93, i32* %9
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %268
95: ; preds = %84, %74
%96 = load i8*, i8** %6
%97 = load i32, i32* %11
%98 = sub nsw i32 %97, 1
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i8, i8* %96, i64 %99
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = call i32 @isalpha(i32 %102)
%104 = icmp ne i32 %103, 0
br i1 %104, label %109, label %105
105: ; preds = %95
%106 = load i32, i32* %11
%107 = add nsw i32 %106, 1
store i32 %107, i32* %10
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %265
109: ; preds = %95
%110 = load i32, i32* %11
%111 = sext i32 %110 to i64
%112 = load i8*, i8** %6
%113 = call i64 @strlen(i8* %112)
%114 = sub i64 %113, 1
%115 = icmp eq i64 %111, %114
br i1 %115, label %116, label %160
116: ; preds = %109
%117 = load i32, i32* %11
%118 = load i32, i32* %10
%119 = sub nsw i32 %117, %118
%120 = add nsw i32 %119, 1
store i32 %120, i32* %12
%121 = load i32, i32* %12
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %121)
%123 = load i32, i32* %12
%124 = zext i32 %123 to i64
%125 = call i8* @llvm.stacksave()
store i8* %125, i8** %13
%126 = alloca i8, i64 %124
store i64 %124, i64* %14
%127 = load i8*, i8** %6
%128 = load i32, i32* %10
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i8, i8* %127, i64 %129
%131 = load i32, i32* %12
%132 = sub nsw i32 %131, 1
%133 = sext i32 %132 to i64
%134 = call i8* @strncpy(i8* %126, i8* %130, i64 %133)
%135 = load i32, i32* %12
%136 = sub nsw i32 %135, 1
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i8, i8* %126, i64 %137
store i8 0, i8* %138
%139 = call i64 @strlen(i8* %126)
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i8* %126, i64 %139)
%141 = call i8* @malloc(i64 %124)
%142 = load i8**, i8*** %8
%143 = load i32, i32* %9
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i8*, i8** %142, i64 %144
store i8* %141, i8** %145
%146 = load i8**, i8*** %8
%147 = load i32, i32* %9
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i8*, i8** %146, i64 %148
%150 = load i8*, i8** %149
%151 = call i8* @strcpy(i8* %150, i8* %126)
%152 = load i8**, i8*** %8
%153 = load i32, i32* %9
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i8*, i8** %152, i64 %154
%156 = load i8*, i8** %155
%157 = load i32, i32* %9
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %156, i32 %157)
%159 = load i8*, i8** %13
br label %268
160: ; preds = %109
br label %161
161: ; preds = %160
br label %162
162: ; preds = %161
br label %163
163: ; preds = %162
%164 = load i32, i32* %11
%165 = load i32, i32* %10
%166 = sub nsw i32 %164, %165
%167 = add nsw i32 %166, 1
store i32 %167, i32* %15
%168 = load i32, i32* %15
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %168)
%170 = load i32, i32* %15
%171 = zext i32 %170 to i64
%172 = call i8* @llvm.stacksave()
store i8* %172, i8** %16
%173 = alloca i8, i64 %171
store i64 %171, i64* %17
%174 = load i8*, i8** %6
%175 = load i32, i32* %10
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %174, i64 %176
%178 = load i32, i32* %15
%179 = sub nsw i32 %178, 1
%180 = sext i32 %179 to i64
%181 = call i8* @strncpy(i8* %173, i8* %177, i64 %180)
%182 = load i32, i32* %15
%183 = sub nsw i32 %182, 1
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i8, i8* %173, i64 %184
store i8 0, i8* %185
%186 = call i64 @strlen(i8* %173)
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i8* %173, i64 %186)
%188 = call i8* @malloc(i64 %171)
%189 = load i8**, i8*** %8
%190 = load i32, i32* %9
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds i8*, i8** %189, i64 %191
store i8* %188, i8** %192
%193 = load i8**, i8*** %8
%194 = load i32, i32* %9
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds i8*, i8** %193, i64 %195
%197 = load i8*, i8** %196
%198 = call i8* @strcpy(i8* %197, i8* %173)
%199 = load i8**, i8*** %8
%200 = load i32, i32* %9
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i8*, i8** %199, i64 %201
%203 = load i8*, i8** %202
%204 = load i32, i32* %9
%205 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %203, i32 %204)
%206 = load i32, i32* %9
%207 = add nsw i32 %206, 1
store i32 %207, i32* %9
%208 = load i32, i32* %11
%209 = add nsw i32 %208, 1
store i32 %209, i32* %10
%210 = load i8*, i8** %16
br label %265
211: ; preds = %51
%212 = load i32, i32* %11
%213 = sext i32 %212 to i64
%214 = load i8*, i8** %6
%215 = call i64 @strlen(i8* %214)
%216 = sub i64 %215, 1
%217 = icmp eq i64 %213, %216
br i1 %217, label %218, label %263
218: ; preds = %211
%219 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%220 = load i32, i32* %11
%221 = load i32, i32* %10
%222 = sub nsw i32 %220, %221
%223 = add nsw i32 %222, 2
store i32 %223, i32* %18
%224 = load i32, i32* %18
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %224)
%226 = load i32, i32* %18
%227 = zext i32 %226 to i64
%228 = call i8* @llvm.stacksave()
store i8* %228, i8** %19
%229 = alloca i8, i64 %227
store i64 %227, i64* %20
%230 = load i8*, i8** %6
%231 = load i32, i32* %10
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds i8, i8* %230, i64 %232
%234 = load i32, i32* %18
%235 = sub nsw i32 %234, 1
%236 = sext i32 %235 to i64
%237 = call i8* @strncpy(i8* %229, i8* %233, i64 %236)
%238 = load i32, i32* %18
%239 = sub nsw i32 %238, 1
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds i8, i8* %229, i64 %240
store i8 0, i8* %241
%242 = call i64 @strlen(i8* %229)
%243 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i8* %229, i64 %242)
%244 = call i8* @malloc(i64 %227)
%245 = load i8**, i8*** %8
%246 = load i32, i32* %9
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds i8*, i8** %245, i64 %247
store i8* %244, i8** %248
%249 = load i8**, i8*** %8
%250 = load i32, i32* %9
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds i8*, i8** %249, i64 %251
%253 = load i8*, i8** %252
%254 = call i8* @strcpy(i8* %253, i8* %229)
%255 = load i8**, i8*** %8
%256 = load i32, i32* %9
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds i8*, i8** %255, i64 %257
%259 = load i8*, i8** %258
%260 = load i32, i32* %9
%261 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %259, i32 %260)
%262 = load i8*, i8** %19
br label %268
263: ; preds = %211
br label %264
264: ; preds = %263
br label %265
265: ; preds = %264, %163, %105, %71
%266 = load i32, i32* %11
%267 = add nsw i32 %266, 1
store i32 %267, i32* %11
br label %44
268: ; preds = %218, %116, %91, %44
%269 = load i8**, i8*** %8
%270 = load i32, i32* %9
%271 = add nsw i32 %270, 1
%272 = call i32 (i8**, i32, ...) bitcast (i32 (...)* @insertionsort to i32 (i8**, i32, ...)*)(i8** %269, i32 %271)
%273 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %21
br label %274
274: ; preds = %287, %268
%275 = load i32, i32* %21
%276 = load i32, i32* %9
%277 = icmp sle i32 %275, %276
br i1 %277, label %278, label %290
278: ; preds = %274
%279 = load i32, i32* %21
%280 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i32 %279)
%281 = load i8**, i8*** %8
%282 = load i32, i32* %21
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds i8*, i8** %281, i64 %283
%285 = load i8*, i8** %284
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %285)
br label %287
287: ; preds = %278
%288 = load i32, i32* %21
%289 = add nsw i32 %288, 1
store i32 %289, i32* %21
br label %274
290: ; preds = %274
%291 = load i8*, i8** %6
%292 = call i64 @strlen(i8* %291)
%293 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i64 %292)
br label %294
294: ; preds = %290, %24
%295 = load i32, i32* %3
ret i32 %295
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"Max Size of Array: %d\0A\00"
@.str.2 = [15 x i8] c"index %d : %c\0A\00"
@.str.3 = [15 x i8] c"wordStart: %d\0A\00"
@.str.5 = [7 x i8] c"Ending\00"
@.str.6 = [20 x i8] c"Multiple no alphas\0A\00"
@.str.7 = [22 x i8] c"Substring Length: %d\0A\00"
@.str.8 = [37 x i8] c"Substring: %s\0ASubstring length: %zd\0A\00"
@.str.9 = [35 x i8] c"inserting string: %s at index: %d\0A\00"
@.str.10 = [8 x i8] c"ending\0A\00"
@.str.12 = [11 x i8] c"Index: %d\0A\00"
@.str.13 = [13 x i8] c"Length: %ld\0A\00"
@str = [6 x i8] c"\0A\0A\0A\0A\0A\00"
@str.14 = [86 x i8] c"Please use only 1 argument.\0Ai.e. ./pointersorter \22the*string*of*some*sort\22\0AExiting...\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.14, i64 0, i64 0))
br label %150
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @strlen(i8* dereferenceable(1) %8)
%10 = uitofp i64 %9 to double
%11 = fmul double %10, 5.000000e-01
%12 = tail call double @llvm.ceil.f64(double %11)
%13 = fptosi double %12 to i32
%14 = add nsw i32 %13, 1
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = sext i32 %14 to i64
%17 = shl nsw i64 %16, 3
%18 = tail call i8* @malloc(i64 %17)
%19 = bitcast i8* %18 to i8**
br label %20
20: ; preds = %6, %123
%21 = phi i64 [ 0, %6 ], [ %126, %123 ]
%22 = phi i32 [ 0, %6 ], [ %125, %123 ]
%23 = phi i32 [ 0, %6 ], [ %124, %123 ]
%24 = trunc i64 %21 to i32
%25 = getelementptr inbounds i8, i8* %8, i64 %21
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %24, i32 %27)
%29 = load i8, i8* %25
%30 = sext i8 %29 to i32
%31 = call i32 @isalpha(i32 %30)
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %97
33: ; preds = %20
%34 = icmp eq i64 %21, 0
br i1 %34, label %35, label %37
35: ; preds = %33
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 1)
br label %123
37: ; preds = %33
%38 = add nsw i64 %21, -1
%39 = getelementptr inbounds i8, i8* %8, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = call i32 @isalpha(i32 %41)
%43 = icmp eq i32 %42, 0
%44 = call i64 @strlen(i8* dereferenceable(1) %8)
%45 = add i64 %44, -1
%46 = icmp eq i64 %45, %21
br i1 %43, label %47, label %54
47: ; preds = %37
br i1 %46, label %48, label %51
48: ; preds = %47
%49 = add nsw i32 %22, -1
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %130
51: ; preds = %47
%52 = add nuw nsw i32 %24, 1
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %123
54: ; preds = %37
br i1 %46, label %55, label %75
55: ; preds = %54
%56 = trunc i64 %21 to i32
%57 = sub nsw i32 %56, %23
%58 = add nsw i32 %57, 1
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %58)
%60 = zext i32 %58 to i64
%61 = call i8* @llvm.stacksave()
%62 = alloca i8, i64 %60
%63 = sext i32 %23 to i64
%64 = getelementptr inbounds i8, i8* %8, i64 %63
%65 = sext i32 %57 to i64
%66 = call i8* @strncpy(i8* %62, i8* %64, i64 %65)
%67 = getelementptr inbounds i8, i8* %62, i64 %65
store i8 0, i8* %67
%68 = call i64 @strlen(i8* %62)
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i8* %62, i64 %68)
%70 = call i8* @malloc(i64 %60)
%71 = sext i32 %22 to i64
%72 = getelementptr inbounds i8*, i8** %19, i64 %71
store i8* %70, i8** %72
%73 = call i8* @strcpy(i8* dereferenceable(1) %70, i8* %62)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %70, i32 %22)
br label %130
75: ; preds = %54
%76 = sub nsw i32 %24, %23
%77 = add nsw i32 %76, 1
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %77)
%79 = zext i32 %77 to i64
%80 = call i8* @llvm.stacksave()
%81 = alloca i8, i64 %79
%82 = sext i32 %23 to i64
%83 = getelementptr inbounds i8, i8* %8, i64 %82
%84 = sext i32 %76 to i64
%85 = call i8* @strncpy(i8* %81, i8* %83, i64 %84)
%86 = getelementptr inbounds i8, i8* %81, i64 %84
store i8 0, i8* %86
%87 = call i64 @strlen(i8* %81)
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i8* %81, i64 %87)
%89 = call i8* @malloc(i64 %79)
%90 = sext i32 %22 to i64
%91 = getelementptr inbounds i8*, i8** %19, i64 %90
store i8* %89, i8** %91
%92 = call i8* @strcpy(i8* dereferenceable(1) %89, i8* %81)
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %89, i32 %22)
%94 = add nsw i32 %22, 1
%95 = trunc i64 %21 to i32
%96 = add i32 %95, 1
br label %123
97: ; preds = %20
%98 = call i64 @strlen(i8* dereferenceable(1) %8)
%99 = add i64 %98, -1
%100 = icmp eq i64 %99, %21
br i1 %100, label %101, label %123
101: ; preds = %97
%102 = trunc i64 %21 to i32
%103 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%104 = sub nsw i32 %102, %23
%105 = add nsw i32 %104, 2
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %105)
%107 = zext i32 %105 to i64
%108 = call i8* @llvm.stacksave()
%109 = alloca i8, i64 %107
%110 = sext i32 %23 to i64
%111 = getelementptr inbounds i8, i8* %8, i64 %110
%112 = add nsw i32 %104, 1
%113 = sext i32 %112 to i64
%114 = call i8* @strncpy(i8* %109, i8* %111, i64 %113)
%115 = getelementptr inbounds i8, i8* %109, i64 %113
store i8 0, i8* %115
%116 = call i64 @strlen(i8* %109)
%117 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i8* %109, i64 %116)
%118 = call i8* @malloc(i64 %107)
%119 = sext i32 %22 to i64
%120 = getelementptr inbounds i8*, i8** %19, i64 %119
store i8* %118, i8** %120
%121 = call i8* @strcpy(i8* dereferenceable(1) %118, i8* %109)
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %118, i32 %22)
br label %130
123: ; preds = %97, %75, %51, %35
%124 = phi i32 [ %23, %97 ], [ 1, %35 ], [ %96, %75 ], [ %52, %51 ]
%125 = phi i32 [ %22, %97 ], [ %22, %35 ], [ %94, %75 ], [ %22, %51 ]
%126 = add nuw i64 %21, 1
%127 = call i64 @strlen(i8* dereferenceable(1) %8)
%128 = add i64 %127, -1
%129 = icmp ugt i64 %128, %21
br i1 %129, label %20, label %130
130: ; preds = %123, %101, %55, %48
%131 = phi i32 [ %22, %101 ], [ %22, %55 ], [ %49, %48 ], [ %125, %123 ]
%132 = add i32 %131, 1
%133 = call i32 (i8**, i32, ...) bitcast (i32 (...)* @insertionsort to i32 (i8**, i32, ...)*)(i8** %19, i32 %132)
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%135 = icmp slt i32 %131, 0
br i1 %135, label %138, label %136
136: ; preds = %130
%137 = zext i32 %132 to i64
br label %141
138: ; preds = %141, %130
%139 = call i64 @strlen(i8* dereferenceable(1) %8)
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i64 %139)
br label %150
141: ; preds = %136, %141
%142 = phi i64 [ 0, %136 ], [ %148, %141 ]
%143 = trunc i64 %142 to i32
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i32 %143)
%145 = getelementptr inbounds i8*, i8** %19, i64 %142
%146 = load i8*, i8** %145
%147 = call i32 @puts(i8* dereferenceable(1) %146)
%148 = add nuw nsw i64 %142, 1
%149 = icmp eq i64 %148, %137
br i1 %149, label %138, label %141
150: ; preds = %138, %4
%151 = phi i32 [ 1, %4 ], [ 0, %138 ]
ret i32 %151
}