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;
    }
  }
  quicksort(0, currentstrArray, strArray);
  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   1080 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1783 <main+0x603>
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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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   1080 <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    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%rdx
xor    %edi,%edi
mov    $0x0,%al
call   1070 <quicksort@plt>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1769 <main+0x5e9>
mov    -0x7c(%rbp),%esi
lea    0xa07(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x28(%rbp),%rax
movslq -0x7c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0x968(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1724 <main+0x5a4>
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rsi
lea    0x9d0(%rip),%rdi
mov    $0x0,%al
call   1080 <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    13bc <main+0x22c>
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   1090 <printf@plt>
movslq %ebx,%rax
lea    0x8(,%rax,8),%rdi
call   10a0 <malloc@plt>
mov    %rax,-0x40(%rbp)
lea    0xe2b(%rip),%r14
xor    %r12d,%r12d
xor    %eax,%eax
mov    %rax,-0x30(%rbp)
xor    %r13d,%r13d
mov    %r15,-0x48(%rbp)
jmp    1262 <main+0xd2>
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1070 <strlen@plt>
add    $0xffffffffffffffff,%rax
cmp    %rax,%r12
je     13d2 <main+0x242>
lea    0x1(%r12),%rbx
mov    %r15,%rdi
call   1070 <strlen@plt>
add    $0xffffffffffffffff,%rax
cmp    %r12,%rax
mov    %rbx,%r12
jbe    1491 <main+0x301>
movsbl (%r15,%r12,1),%edx
mov    %r14,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1090 <printf@plt>
movsbl (%r15,%r12,1),%edi
call   10b0 <isalpha@plt>
test   %eax,%eax
jne    1230 <main+0xa0>
test   %r12,%r12
je     1378 <main+0x1e8>
movsbl -0x1(%r15,%r12,1),%edi
call   10b0 <isalpha@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1070 <strlen@plt>
add    $0xffffffffffffffff,%rax
test   %r14d,%r14d
je     1396 <main+0x206>
cmp    %rax,%r12
je     1508 <main+0x378>
mov    %r13d,%ebx
mov    %r13d,%eax
neg    %eax
lea    (%r12,%rax,1),%r15
lea    (%r12,%rax,1),%r14
add    $0x1,%r14
lea    0xda6(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rsp,-0x38(%rbp)
mov    %r14d,%r14d
lea    0xf(%r14),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r13
sub    %rax,%r13
mov    %r13,%rsp
movslq %ebx,%rsi
add    -0x48(%rbp),%rsi
movslq %r15d,%r15
mov    %r13,%rdi
mov    %r15,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r15,%r13,1)
mov    -0x48(%rbp),%r15
mov    %r13,%rdi
call   1070 <strlen@plt>
lea    0xd6d(%rip),%rdi
mov    %r13,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r14,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    -0x30(%rbp),%rbx
movslq %ebx,%rax
mov    -0x40(%rbp),%rcx
mov    %r14,(%rcx,%rax,8)
mov    %r14,%rdi
mov    %r13,%rsi
call   1040 <strcpy@plt>
lea    0xd59(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1090 <printf@plt>
add    $0x1,%ebx
mov    %rbx,-0x30(%rbp)
mov    -0x38(%rbp),%rsp
lea    0x1(%r12),%r13d
jmp    13b0 <main+0x220>
mov    $0x1,%r13d
lea    0xcc9(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1090 <printf@plt>
jmp    1245 <main+0xb5>
cmp    %rax,%r12
je     15b2 <main+0x422>
lea    0x1(%r12),%r13d
lea    0xcb9(%rip),%rdi
call   1050 <puts@plt>
lea    0xc88(%rip),%r14
jmp    1245 <main+0xb5>
lea    0xd33(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%eax
jmp    14f9 <main+0x369>
lea    0xcfd(%rip),%rdi
call   1050 <puts@plt>
mov    %r13d,%eax
neg    %eax
lea    (%rax,%r12,1),%r14
lea    (%rax,%r12,1),%rbx
add    $0x2,%rbx
lea    0xc82(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rsp,-0x38(%rbp)
mov    %ebx,%r12d
lea    0xf(%r12),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
movslq %r13d,%rsi
add    %r15,%rsi
add    $0x1,%r14d
movslq %r14d,%r14
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%rbx,1)
mov    %rbx,%rdi
call   1070 <strlen@plt>
lea    0xc4a(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r12,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    %r15,%r12
movslq -0x30(%rbp),%r15
mov    -0x40(%rbp),%rax
mov    %r14,(%rax,%r15,8)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
lea    0xc36(%rip),%rdi
mov    %r14,%rsi
mov    %r15d,%edx
mov    %r12,%r15
xor    %eax,%eax
call   1090 <printf@plt>
mov    -0x38(%rbp),%rsp
xor    %edi,%edi
mov    -0x30(%rbp),%r13
mov    %r13d,%esi
mov    -0x40(%rbp),%r12
mov    %r12,%rdx
xor    %eax,%eax
call   1080 <quicksort@plt>
test   %r13d,%r13d
js     14de <main+0x34e>
add    $0x1,%r13d
lea    0xc26(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    (%r12,%rbx,8),%rdi
call   1050 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    14c0 <main+0x330>
mov    %r15,%rdi
call   1070 <strlen@plt>
lea    0xbfc(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r13d,%eax
neg    %eax
lea    (%rax,%r12,1),%r14
lea    (%rax,%r12,1),%rbx
add    $0x1,%rbx
lea    0xb58(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rsp,-0x38(%rbp)
mov    %ebx,%r12d
lea    0xf(%r12),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
movslq %r13d,%rsi
add    %r15,%rsi
movslq %r14d,%r14
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%rbx,1)
mov    %rbx,%rdi
call   1070 <strlen@plt>
lea    0xb24(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r12,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    -0x30(%rbp),%r12
movslq %r12d,%rax
mov    -0x40(%rbp),%rcx
mov    %r14,(%rcx,%rax,8)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
lea    0xb10(%rip),%rdi
mov    %r14,%rsi
mov    %r12,-0x30(%rbp)
mov    %r12d,%edx
jmp    1486 <main+0x2f6>
mov    -0x30(%rbp),%rax
add    $0xffffffff,%eax
mov    %rax,-0x30(%rbp)
lea    0xa99(%rip),%rdi
call   1050 <puts@plt>
jmp    1491 <main+0x301>

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 = [11 x i8] c"Index: %d\0A\00"
@.str.12 = [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 %292
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 i32, i32* %9
%270 = load i8**, i8*** %8
%271 = call i32 (i32, i32, i8**, ...) bitcast (i32 (...)* @quicksort to i32 (i32, i32, i8**, ...)*)(i32 0, i32 %269, i8** %270)
store i32 0, i32* %21
br label %272
272: ; preds = %285, %268
%273 = load i32, i32* %21
%274 = load i32, i32* %9
%275 = icmp sle i32 %273, %274
br i1 %275, label %276, label %288
276: ; preds = %272
%277 = load i32, i32* %21
%278 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %277)
%279 = load i8**, i8*** %8
%280 = load i32, i32* %21
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds i8*, i8** %279, i64 %281
%283 = load i8*, i8** %282
%284 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %283)
br label %285
285: ; preds = %276
%286 = load i32, i32* %21
%287 = add nsw i32 %286, 1
store i32 %287, i32* %21
br label %272
288: ; preds = %272
%289 = load i8*, i8** %6
%290 = call i64 @strlen(i8* %289)
%291 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i64 %290)
br label %292
292: ; preds = %288, %24
%293 = load i32, i32* %3
ret i32 %293
}

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.11 = [11 x i8] c"Index: %d\0A\00"
@.str.12 = [13 x i8] c"Length: %ld\0A\00"
@str = [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, i64 0, i64 0))
br label %149
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 = call i32 (i32, i32, i8**, ...) bitcast (i32 (...)* @quicksort to i32 (i32, i32, i8**, ...)*)(i32 0, i32 %131, i8** %19)
%133 = icmp slt i32 %131, 0
br i1 %133, label %137, label %134
134: ; preds = %130
%135 = add nuw i32 %131, 1
%136 = zext i32 %135 to i64
br label %140
137: ; preds = %140, %130
%138 = call i64 @strlen(i8* dereferenceable(1) %8)
%139 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i64 %138)
br label %149
140: ; preds = %134, %140
%141 = phi i64 [ 0, %134 ], [ %147, %140 ]
%142 = trunc i64 %141 to i32
%143 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %142)
%144 = getelementptr inbounds i8*, i8** %19, i64 %141
%145 = load i8*, i8** %144
%146 = call i32 @puts(i8* dereferenceable(1) %145)
%147 = add nuw nsw i64 %141, 1
%148 = icmp eq i64 %147, %136
br i1 %148, label %137, label %140
149: ; preds = %137, %4
%150 = phi i32 [ 1, %4 ], [ 0, %137 ]
ret i32 %150
}