#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 */
struct timeval {
  long long tv_usec;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int countNumberofStrings(char *, long, char);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, int, long, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int getStringSize(char *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
char *malloc(long);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ quicksort(char **, int /*<<< orphan*/, int);
char *strtok(char *, char *);
int main(void) {
  struct timeval stop, start;
  gettimeofday(&start, NULL);
  FILE *file;
  char *buffer;
  long length;
  int numberofStrings;
  long long score = 0;
  file = fopen("/home/jrivas/Downloads/p022_names.txt", "r");
  if (file == NULL) {
    printf("error opening");
  }
  fseek(file, 0, SEEK_END);
  length = ftell(file);
  fseek(file, 0, SEEK_SET);
  buffer = malloc(length * sizeof(char));
  if (buffer) {
    fread(buffer, 1, length, file);
  }
  fclose(file);
  numberofStrings = countNumberofStrings(buffer, length, ',');
  char *names[numberofStrings];
  int i = 0, j = 0, temp = 0;
  char *token = strtok(buffer + 1, "\",\"");
  names[i++] = token;
  while (token != NULL) {
    token = strtok(NULL, "\",\"");
    names[i++] = token;
  }
  quicksort(names, 0, numberofStrings - 1);
  for (i = 0; i < numberofStrings; i++) {
    temp = 0;
    for (j = getStringSize(names[i]) - 1; j >= 0; j--) {
      temp += names[i][j] - ('A') + 1;
    }
    score += temp * (i + 1);
  }
  printf("score: %lld\n", score);
  gettimeofday(&stop, NULL);
  printf("\ntook %lu usec\n", stop.tv_usec - start.tv_usec);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
movq   $0x0,-0x40(%rbp)
lea    0xe15(%rip),%rdi
lea    0xe34(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1214 <main+0x54>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    0x2dc9(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10b0 <fseek@plt>
mov    -0x20(%rbp),%rdi
call   1080 <ftell@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    0x2d98(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10b0 <fseek@plt>
mov    -0x30(%rbp),%rdi
shl    $0x0,%rdi
call   10a0 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     127b <main+0xbb>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    $0x2c,%edx
call   1090 <countNumberofStrings@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x48(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x1,%rdi
lea    0xd52(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,%rcx
mov    -0x70(%rbp),%rax
mov    %rcx,-0x68(%rbp)
mov    -0x68(%rbp),%rdx
mov    -0x54(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x54(%rbp)
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
cmpq   $0x0,-0x68(%rbp)
je     134b <main+0x18b>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd16(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,%rcx
mov    -0x70(%rbp),%rax
mov    %rcx,-0x68(%rbp)
mov    -0x68(%rbp),%rdx
mov    -0x54(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x54(%rbp)
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    130a <main+0x14a>
mov    -0x70(%rbp),%rdi
mov    -0x34(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1050 <quicksort@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    13e9 <main+0x229>
mov    -0x70(%rbp),%rax
movl   $0x0,-0x5c(%rbp)
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10c0 <getStringSize@plt>
sub    $0x1,%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x0,-0x58(%rbp)
jl     13c5 <main+0x205>
mov    -0x70(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x41,%eax
add    $0x1,%eax
add    -0x5c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x58(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x58(%rbp)
jmp    138d <main+0x1cd>
mov    -0x5c(%rbp),%eax
mov    -0x54(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cltq
add    -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1363 <main+0x1a3>
mov    -0x40(%rbp),%rsi
lea    0xc46(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x10(%rbp),%rsi
sub    -0x18(%rbp),%rsi
lea    0xc30(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
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    $0x18,%rsp
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
lea    0xe2d(%rip),%rdi
lea    0xe4c(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1205 <main+0x45>
lea    0xe3a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   10b0 <fseek@plt>
mov    %r14,%rdi
call   1080 <ftell@plt>
mov    %rax,%r15
mov    0x2dae(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   10b0 <fseek@plt>
mov    %r15,%rdi
call   10a0 <malloc@plt>
mov    %rax,%r13
test   %rax,%rax
je     1259 <main+0x99>
mov    %r13,%rdi
mov    $0x1,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <fread@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    $0x2c,%edx
call   1090 <countNumberofStrings@plt>
mov    %rsp,-0x30(%rbp)
mov    %eax,%r12d
lea    0xf(,%r12,8),%rbx
and    $0xfffffffffffffff0,%rbx
mov    %rsp,%r15
mov    %r15,%r14
sub    %rbx,%r14
neg    %rbx
mov    %r14,%rsp
add    $0x1,%r13
lea    0xda8(%rip),%rsi
mov    %r13,%rdi
call   10e0 <strtok@plt>
mov    %rax,(%r15,%rbx,1)
test   %rax,%rax
je     12d6 <main+0x116>
lea    0x8(%r14),%rbx
lea    0xd8c(%rip),%r13
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %r13,%rsi
call   10e0 <strtok@plt>
mov    %rax,(%rbx)
add    $0x8,%rbx
test   %rax,%rax
jne    12c0 <main+0x100>
lea    -0x1(%r12),%edx
xor    %r13d,%r13d
mov    %r14,%rdi
xor    %esi,%esi
call   1050 <quicksort@plt>
test   %r12d,%r12d
jle    142b <main+0x26b>
xor    %ebx,%ebx
xor    %r13d,%r13d
jmp    1317 <main+0x157>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
mov    %ebx,%eax
imul   %esi,%eax
cltq
add    %rax,%r13
cmp    %r12,%rbx
je     142b <main+0x26b>
mov    (%r14,%rbx,8),%rdi
call   10c0 <getStringSize@plt>
movdqa 0xcd8(%rip),%xmm4
mov    $0x0,%esi
test   %eax,%eax
jle    1300 <main+0x140>
mov    (%r14,%rbx,8),%rcx
mov    %eax,%r9d
xor    %esi,%esi
cmp    $0x8,%eax
jb     1400 <main+0x240>
lea    -0x1(%r9),%rdi
add    $0xffffffff,%eax
cmp    %edi,%eax
jb     1400 <main+0x240>
mov    %rdi,%rax
shr    $0x20,%rax
jne    1400 <main+0x240>
mov    %r9d,%r8d
and    $0xfffffff8,%r8d
mov    %r9d,%eax
and    $0x7,%eax
pxor   %xmm0,%xmm0
mov    %r8,%rsi
pxor   %xmm1,%xmm1
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
movd   -0x3(%rcx,%rdx,1),%xmm2
punpcklbw %xmm2,%xmm2
movd   -0x7(%rcx,%rdx,1),%xmm3
punpcklbw %xmm3,%xmm3
pshufd $0xc4,%xmm2,%xmm2
pshuflw $0xac,%xmm2,%xmm2
pshufhw $0x24,%xmm2,%xmm2
psrad  $0x18,%xmm2
pshufd $0xc4,%xmm3,%xmm3
pshuflw $0xac,%xmm3,%xmm3
pshufhw $0x24,%xmm3,%xmm3
psrad  $0x18,%xmm3
paddd  %xmm4,%xmm0
paddd  %xmm2,%xmm0
paddd  %xmm4,%xmm1
paddd  %xmm3,%xmm1
add    $0xfffffffffffffff8,%rdi
add    $0xfffffffffffffff8,%rsi
jne    1380 <main+0x1c0>
paddd  %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%esi
cmp    %r9,%r8
je     1300 <main+0x140>
jmp    1403 <main+0x243>
nopl   (%rax)
mov    %r9,%rax
add    $0x1,%rax
nopw   0x0(%rax,%rax,1)
lea    -0x2(%rax),%edx
movsbl (%rcx,%rdx,1),%edx
add    %edx,%esi
add    $0xffffffc0,%esi
add    $0xffffffffffffffff,%rax
cmp    $0x1,%rax
ja     1410 <main+0x250>
jmp    1300 <main+0x140>
lea    0xc18(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
mov    -0x40(%rbp),%rsi
sub    -0x38(%rbp),%rsi
lea    0xc01(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    -0x30(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i64 }
@.str = [38 x i8] c"/home/jrivas/Downloads/p022_names.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [14 x i8] c"error opening\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.3 = [4 x i8] c"\22,\22\00"
@.str.4 = [13 x i8] c"score: %lld\0A\00"
@.str.5 = [16 x i8] c"\0Atook %lu usec\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = alloca %struct.timeval
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i32 0, i32* %1
%15 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
store i64 0, i64* %8
%16 = call i32* @fopen(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %16, i32** %4
%17 = load i32*, i32** %4
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %21
19: ; preds = %0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %0
%22 = load i32*, i32** %4
%23 = load i32, i32* @SEEK_END
%24 = call i32 @fseek(i32* %22, i32 0, i32 %23)
%25 = load i32*, i32** %4
%26 = call i64 @ftell(i32* %25)
store i64 %26, i64* %6
%27 = load i32*, i32** %4
%28 = load i32, i32* @SEEK_SET
%29 = call i32 @fseek(i32* %27, i32 0, i32 %28)
%30 = load i64, i64* %6
%31 = mul i64 %30, 1
%32 = call i8* @malloc(i64 %31)
store i8* %32, i8** %5
%33 = load i8*, i8** %5
%34 = icmp ne i8* %33, null
br i1 %34, label %35, label %40
35: ; preds = %21
%36 = load i8*, i8** %5
%37 = load i64, i64* %6
%38 = load i32*, i32** %4
%39 = call i32 @fread(i8* %36, i32 1, i64 %37, i32* %38)
br label %40
40: ; preds = %35, %21
%41 = load i32*, i32** %4
%42 = call i32 @fclose(i32* %41)
%43 = load i8*, i8** %5
%44 = load i64, i64* %6
%45 = call i32 @countNumberofStrings(i8* %43, i64 %44, i8 signext 44)
store i32 %45, i32* %7
%46 = load i32, i32* %7
%47 = zext i32 %46 to i64
%48 = call i8* @llvm.stacksave()
store i8* %48, i8** %9
%49 = alloca i8*, i64 %47
store i64 %47, i64* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
%50 = load i8*, i8** %5
%51 = getelementptr inbounds i8, i8* %50, i64 1
%52 = call i8* @strtok(i8* %51, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %52, i8** %14
%53 = load i8*, i8** %14
%54 = load i32, i32* %11
%55 = add nsw i32 %54, 1
store i32 %55, i32* %11
%56 = sext i32 %54 to i64
%57 = getelementptr inbounds i8*, i8** %49, i64 %56
store i8* %53, i8** %57
br label %58
58: ; preds = %61, %40
%59 = load i8*, i8** %14
%60 = icmp ne i8* %59, null
br i1 %60, label %61, label %68
61: ; preds = %58
%62 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %62, i8** %14
%63 = load i8*, i8** %14
%64 = load i32, i32* %11
%65 = add nsw i32 %64, 1
store i32 %65, i32* %11
%66 = sext i32 %64 to i64
%67 = getelementptr inbounds i8*, i8** %49, i64 %66
store i8* %63, i8** %67
br label %58
68: ; preds = %58
%69 = load i32, i32* %7
%70 = sub nsw i32 %69, 1
%71 = call i32 @quicksort(i8** %49, i32 0, i32 %70)
store i32 0, i32* %11
br label %72
72: ; preds = %111, %68
%73 = load i32, i32* %11
%74 = load i32, i32* %7
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %114
76: ; preds = %72
store i32 0, i32* %13
%77 = load i32, i32* %11
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %49, i64 %78
%80 = load i8*, i8** %79
%81 = call i32 @getStringSize(i8* %80)
%82 = sub nsw i32 %81, 1
store i32 %82, i32* %12
br label %83
83: ; preds = %100, %76
%84 = load i32, i32* %12
%85 = icmp sge i32 %84, 0
br i1 %85, label %86, label %103
86: ; preds = %83
%87 = load i32, i32* %11
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8*, i8** %49, i64 %88
%90 = load i8*, i8** %89
%91 = load i32, i32* %12
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i8, i8* %90, i64 %92
%94 = load i8, i8* %93
%95 = sext i8 %94 to i32
%96 = sub nsw i32 %95, 65
%97 = add nsw i32 %96, 1
%98 = load i32, i32* %13
%99 = add nsw i32 %98, %97
store i32 %99, i32* %13
br label %100
100: ; preds = %86
%101 = load i32, i32* %12
%102 = add nsw i32 %101, -1
store i32 %102, i32* %12
br label %83
103: ; preds = %83
%104 = load i32, i32* %13
%105 = load i32, i32* %11
%106 = add nsw i32 %105, 1
%107 = mul nsw i32 %104, %106
%108 = sext i32 %107 to i64
%109 = load i64, i64* %8
%110 = add nsw i64 %109, %108
store i64 %110, i64* %8
br label %111
111: ; preds = %103
%112 = load i32, i32* %11
%113 = add nsw i32 %112, 1
store i32 %113, i32* %11
br label %72
114: ; preds = %72
%115 = load i64, i64* %8
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i64 %115)
%117 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%118 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%119 = load i64, i64* %118
%120 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%121 = load i64, i64* %120
%122 = sub nsw i64 %119, %121
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i64 %122)
store i32 0, i32* %1
%124 = load i8*, i8** %9
%125 = load i32, i32* %1
ret i32 %125
}

LLVM IR (-O2):
%struct.timeval = type { i64 }
@.str = [38 x i8] c"/home/jrivas/Downloads/p022_names.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [14 x i8] c"error opening\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.3 = [4 x i8] c"\22,\22\00"
@.str.4 = [13 x i8] c"score: %lld\0A\00"
@.str.5 = [16 x i8] c"\0Atook %lu usec\0A\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timeval* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %0
%11 = load i32, i32* @SEEK_END
%12 = tail call i32 @fseek(i32* %6, i32 0, i32 %11)
%13 = tail call i64 @ftell(i32* %6)
%14 = load i32, i32* @SEEK_SET
%15 = tail call i32 @fseek(i32* %6, i32 0, i32 %14)
%16 = tail call i8* @malloc(i64 %13)
%17 = icmp eq i8* %16, null
br i1 %17, label %20, label %18
18: ; preds = %10
%19 = tail call i32 @fread(i8* %16, i32 1, i64 %13, i32* %6)
br label %20
20: ; preds = %18, %10
%21 = tail call i32 @fclose(i32* %6)
%22 = tail call i32 @countNumberofStrings(i8* %16, i64 %13, i8 signext 44)
%23 = zext i32 %22 to i64
%24 = tail call i8* @llvm.stacksave()
%25 = alloca i8*, i64 %23
%26 = getelementptr inbounds i8, i8* %16, i64 1
%27 = tail call i8* @strtok(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %27, i8** %25
%28 = icmp eq i8* %27, null
br i1 %28, label %35, label %29
29: ; preds = %20, %29
%30 = phi i64 [ %32, %29 ], [ 1, %20 ]
%31 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%32 = add nuw i64 %30, 1
%33 = getelementptr inbounds i8*, i8** %25, i64 %30
store i8* %31, i8** %33
%34 = icmp eq i8* %31, null
br i1 %34, label %35, label %29
35: ; preds = %29, %20
%36 = add nsw i32 %22, -1
%37 = call i32 @quicksort(i8** %25, i32 0, i32 %36)
%38 = icmp sgt i32 %22, 0
br i1 %38, label %39, label %111
39: ; preds = %35, %103
%40 = phi i64 [ %105, %103 ], [ 0, %35 ]
%41 = phi i64 [ %109, %103 ], [ 0, %35 ]
%42 = getelementptr inbounds i8*, i8** %25, i64 %40
%43 = load i8*, i8** %42
%44 = call i32 @getStringSize(i8* %43)
%45 = icmp sgt i32 %44, 0
br i1 %45, label %46, label %103
46: ; preds = %39
%47 = load i8*, i8** %42
%48 = zext i32 %44 to i64
%49 = icmp ult i32 %44, 8
br i1 %49, label %89, label %50
50: ; preds = %46
%51 = add nsw i64 %48, -1
%52 = add i32 %44, -1
%53 = trunc i64 %51 to i32
%54 = icmp ult i32 %52, %53
%55 = icmp ugt i64 %51, 4294967295
%56 = or i1 %54, %55
br i1 %56, label %89, label %57
57: ; preds = %50
%58 = and i64 %48, 4294967288
%59 = and i64 %48, 7
br label %60
60: ; preds = %60, %57
%61 = phi i64 [ 0, %57 ], [ %83, %60 ]
%62 = phi <4 x i32> [ zeroinitializer, %57 ], [ %81, %60 ]
%63 = phi <4 x i32> [ zeroinitializer, %57 ], [ %82, %60 ]
%64 = xor i64 %61, -1
%65 = add i64 %64, %48
%66 = and i64 %65, 4294967295
%67 = getelementptr inbounds i8, i8* %47, i64 %66
%68 = getelementptr inbounds i8, i8* %67, i64 -3
%69 = bitcast i8* %68 to <4 x i8>*
%70 = load <4 x i8>, <4 x i8>* %69
%71 = shufflevector <4 x i8> %70, <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%72 = getelementptr inbounds i8, i8* %67, i64 -4
%73 = getelementptr inbounds i8, i8* %72, i64 -3
%74 = bitcast i8* %73 to <4 x i8>*
%75 = load <4 x i8>, <4 x i8>* %74
%76 = shufflevector <4 x i8> %75, <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%77 = sext <4 x i8> %71 to <4 x i32>
%78 = sext <4 x i8> %76 to <4 x i32>
%79 = add <4 x i32> %62, <i32 -64, i32 -64, i32 -64, i32 -64>
%80 = add <4 x i32> %63, <i32 -64, i32 -64, i32 -64, i32 -64>
%81 = add <4 x i32> %79, %77
%82 = add <4 x i32> %80, %78
%83 = add nuw i64 %61, 8
%84 = icmp eq i64 %83, %58
br i1 %84, label %85, label %60
85: ; preds = %60
%86 = add <4 x i32> %82, %81
%87 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %86)
%88 = icmp eq i64 %58, %48
br i1 %88, label %103, label %89
89: ; preds = %50, %46, %85
%90 = phi i64 [ %48, %50 ], [ %48, %46 ], [ %59, %85 ]
%91 = phi i32 [ 0, %50 ], [ 0, %46 ], [ %87, %85 ]
br label %92
92: ; preds = %89, %92
%93 = phi i64 [ %95, %92 ], [ %90, %89 ]
%94 = phi i32 [ %101, %92 ], [ %91, %89 ]
%95 = add nsw i64 %93, -1
%96 = and i64 %95, 4294967295
%97 = getelementptr inbounds i8, i8* %47, i64 %96
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = add i32 %94, -64
%101 = add i32 %100, %99
%102 = icmp ugt i64 %93, 1
br i1 %102, label %92, label %103
103: ; preds = %92, %85, %39
%104 = phi i32 [ 0, %39 ], [ %87, %85 ], [ %101, %92 ]
%105 = add nuw nsw i64 %40, 1
%106 = trunc i64 %105 to i32
%107 = mul nsw i32 %104, %106
%108 = sext i32 %107 to i64
%109 = add nsw i64 %41, %108
%110 = icmp eq i64 %105, %23
br i1 %110, label %111, label %39
111: ; preds = %103, %35
%112 = phi i64 [ 0, %35 ], [ %109, %103 ]
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i64 %112)
%114 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%115 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%116 = load i64, i64* %115
%117 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%118 = load i64, i64* %117
%119 = sub nsw i64 %116, %118
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i64 %119)
ret i32 0
}