// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/tests.c
// Function: range_tests
char* range_tests(char **files, int filecount, TEST_TYPE testtype, int* bestindex, int* caseno, char* newst)
{
 /*Last Changed 25.10.2004 updated the best search*/
 /*Last Changed 21.10.2004 added sort_two_arrays*/
 /*Last Changed 02.02.2004 added safemalloc*/
 /*Last Changed 05.05.2002*/
 /*Last Changed 14.08.2003 Added bestindex to represent best algorithm*/
 FILE *myfile;
 int treatments=0,*counts=NULL, i, j, k, m, p, *indexes, **lines,linecount = 0, found, **significance;
 double **observations=NULL, *means, multiplier, mse, sse=0.0, diff, confidence, n, test_result;
 char* st=NULL, ch;
 char tempst1[100],tst[100];
 switch (testtype)
  {
   case NEWMANKEULS:confidence= 1 - get_parameter_f("confidencelevel");
                    break;
   case DUNCAN     :confidence= 1 - pow(get_parameter_f("confidencelevel"), filecount-1);
                    break;
   default         :printf("This test type is not supported for range tests\n");
                    break;
  }
 while (files[treatments])
  {
   treatments++;
   counts=alloc(counts,treatments*sizeof(int),treatments);
   observations=alloc(observations,treatments*sizeof(double *),treatments);
   counts[treatments-1]=file_length(files[treatments-1]);
   observations[treatments-1]=(double *)safemalloc(counts[treatments-1]*sizeof(double), "range_tests", 19);
   if ((myfile=fopen(files[treatments-1],"r"))==NULL)
    {
     printf(m1274, files[treatments-1]);
     return 0;
    }
   for (i=0;i<counts[treatments-1];i++)
     fscanf(myfile,"%lf",&observations[treatments-1][i]);
   fclose(myfile);
  }
 significance = (int **)safecalloc_2d(sizeof(int *), sizeof(int), treatments, treatments, "range_tests", 29);
 for (i = 0; i < treatments; i++)
   for (j = i + 1; j < treatments; j++)
     significance[i][j] = 1;
 means = (double *)safemalloc(treatments*sizeof(double), "range_tests", 33);
 indexes = (int *)safemalloc(treatments*sizeof(int), "range_tests", 34);
 for (i=0;i<treatments;i++)
  {
   indexes[i]=i;
   means[i]=0.0;
   for (j=0;j<counts[i];j++)
     means[i]+=observations[i][j];
   means[i]/=counts[i];
  }
 for (i=0;i<treatments;i++)
   for (j=0;j<counts[i];j++)
     sse+=pow(observations[i][j]-means[i],2);
 sort_two_arrays(means, indexes, treatments);
 if (!get_parameter_o("texoutput"))
  {
   strcpy(tempst1, "");
   for (i = 0; i < treatments; i++)
     sprintf(tempst1, "%s%c", tempst1, indexes[i] + '1');
   sprintf(tempst1, "%s:", tempst1);
  }
 mse=sse/(treatments*(counts[0]-1));
 free_2d((void**)observations, treatments);
 n=counts[0];
 safe_free(counts);
 multiplier=sqrt(mse/n);
 for (i=0;i<filecount-1;i++)
   for (j=0;j<=i;j++)
    {
     found = 0;
     for (k=0; k<linecount; k++)
       if (j >= lines[k][0] && (filecount-1+j-i) <= lines[k][1])
        {
         found = 1;
         break;
        }
     if (found)
       continue;
     diff=means[filecount-1+j-i]-means[j];
     switch (testtype)
      {
       case NEWMANKEULS:
       case DUNCAN     :test_result=studentized_range_inverse(confidence,filecount*(n-1),filecount-i);
                        break;
       default         :printf("This test type is not supported for range tests\n");
                        break;
      }
     if (diff<(multiplier*test_result))
      {
       linecount++;
       lines = (int **) alloc(lines, linecount * sizeof(int *), linecount);
       lines[linecount-1] = (int *)safemalloc(2*sizeof(int), "range_tests", 85);
       lines[linecount-1][0] = j;
       lines[linecount-1][1] = filecount-1+j-i;
       for (k = j; k <= filecount-1+j-i; k++)
         for (m = k + 1; m <= filecount-1+j-i; m++)
           if (indexes[k] < indexes[m])
             significance[indexes[k]][indexes[m]] = 0;
           else
             significance[indexes[m]][indexes[k]] = 0;
      }
    }
 /*Find the best*/
 found = -1;
 for (k = 0; k < linecount; k++)
   if (lines[k][0] == 0)
    {
     found = k;
     break;
    }
 if (found == -1)
  {
   *bestindex = indexes[0];
   *caseno = 1;
  }
 else
  {
   *caseno = 2;
   *bestindex = indexes[lines[found][0]];
   for (k = lines[found][0] + 1; k <= lines[found][1]; k++)
     if (indexes[k] < *bestindex)
       *bestindex = indexes[k];
   for (k = 0; k < linecount; k++)
    {
     if (k == found)
       continue;
     j = 0;
     for (m = lines[k][0]; m <= lines[k][1]; m++)
       if (indexes[m] == *bestindex)
        {
         j = 1;
         break;
        }
     if (j)
      {
       for (m = lines[k][0]; m <= lines[k][1]; m++)
         if (indexes[m] < *bestindex)
          {
           *bestindex = -1;
           break;
          }
       *caseno = 4;
      }
     if (*bestindex == -1)
      {
       *caseno = 5;
       break;
      }
    }
  }
 if (*caseno == 2)
   for (k = lines[found][0]; k <= lines[found][1]; k++)
     if (*caseno != 3 && indexes[k] != *bestindex)
       for (p = 0; p < linecount; p++)
         if (*caseno != 3 && p != found)
           for (m = lines[p][0]; m <= lines[p][1]; m++)         
             if (indexes[m] == indexes[k])
               *caseno = 3;
 if (*bestindex != -1)
   (*bestindex)++;
 for (i = 0; i < linecount; i++)
  {
   sprintf(tst, "%s", "");
   for (j = lines[i][0]; j <= lines[i][1]; j++)
    {
     sprintf(tst,"%s%c",tst,'1'+indexes[j]);
    }
   for (k = 0; k < lines[i][1]-lines[i][0]+1; k++)
     for (m = k + 1; m < lines[i][1]-lines[i][0]+1; m++)
       if (tst[k]>tst[m])
        {
         ch = tst[k];
         tst[k] = tst[m];
         tst[m] = ch;
        }
   strcat(tempst1,tst);
   if (i != linecount-1)
     strcat(tempst1,"-");
  }
 for (k = 0; k < treatments; k++)
   for (m = k + 1; m < treatments; m++)
     if (significance[k][m])
       sprintf(newst,"%s%c%c-",newst,k+'1',m+'1');
 free_2d((void**)significance, treatments);
 if (linecount > 0)
   free_2d((void**)lines, linecount);
 safe_free(means);
 safe_free(indexes);
 st=strcopy(st,tempst1);
 return st;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %r9, 0xa0(%rsp)
movq %r8, %r15
movq %rcx, %r14
movl %esi, %ebx
movq %rdi, %r13
cmpl $0x5, %edx
movl %edx, 0x20(%rsp)
je 0x98c5a
cmpl $0x4, %edx
jne 0x98c86
leaq 0x9cd5(%rip), %rdi      # 0xa2928
callq 0x534b6
jmp 0x98c72
leaq 0x9cc7(%rip), %rdi      # 0xa2928
callq 0x534b6
leal -0x1(%rbx), %eax
cvtsi2sd %eax, %xmm1
callq 0x42f0
movsd 0x98a6(%rip), %xmm1     # 0xa2520
subsd %xmm0, %xmm1
movsd %xmm1, 0x70(%rsp)
jmp 0x98c92
leaq 0x1620b(%rip), %rdi     # 0xaee98
callq 0x4090
movq %rbx, 0x40(%rsp)
cmpq $0x0, (%r13)
movq %r14, 0x68(%rsp)
movq %r15, 0x60(%rsp)
je 0x98db3
xorl %r15d, %r15d
xorl %ebx, %ebx
movq $0x0, 0x8(%rsp)
movq %r13, 0x28(%rsp)
leaq 0x1(%r15), %r12
leaq 0x4(,%r15,4), %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x390c8
movq %rax, %rbx
leaq 0x8(,%r15,8), %rsi
movq 0x8(%rsp), %rdi
movl %r12d, %edx
callq 0x390c8
movq %rax, %r14
movq (%r13,%r15,8), %rdi
callq 0x37e22
movl %eax, (%rbx,%r15,4)
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x16043(%rip), %rsi     # 0xaed50
movl $0x13, %edx
callq 0x390f5
movq %r14, 0x8(%rsp)
movq %rax, (%r14,%r15,8)
movq (%r13,%r15,8), %rdi
leaq 0xfb63(%rip), %rsi      # 0xa888f
callq 0x40f0
testq %rax, %rax
je 0x98f10
movq %rax, %r14
movq %r12, 0x18(%rsp)
cmpl $0x0, (%rbx,%r15,4)
movq %rbx, 0x10(%rsp)
movq 0x8(%rsp), %rbx
leaq 0xdeb8(%rip), %r13      # 0xa6c10
jle 0x98d88
xorl %ebp, %ebp
xorl %r12d, %r12d
movq (%rbx,%r15,8), %rdx
addq %rbp, %rdx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4070
incq %r12
movq 0x10(%rsp), %rax
movslq (%rax,%r15,4), %rax
addq $0x8, %rbp
cmpq %rax, %r12
jl 0x98d5f
movq %r14, %rdi
callq 0x42a0
movq 0x18(%rsp), %rbp
movq 0x28(%rsp), %r13
cmpq $0x0, (%r13,%rbp,8)
movq %rbp, %r15
movq 0x10(%rsp), %rbx
jne 0x98cbf
movl %ebp, %r12d
jmp 0x98dc3
movq $0x0, 0x8(%rsp)
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %ebp, %ebp
leaq 0x15f86(%rip), %r8      # 0xaed50
movl $0x8, %edi
movl $0x4, %esi
movl %r12d, %edx
movl %r12d, %ecx
movl $0x1d, %r9d
callq 0x39245
movq %rax, %r14
movl %r12d, %r8d
testl %r12d, %r12d
je 0x98e29
xorl %eax, %eax
movq %r8, %rcx
xorl %edx, %edx
movq %rdx, %rsi
incq %rdx
cmpq %r8, %rdx
jae 0x98e1d
movq (%r14,%rsi,8), %rsi
addq %rax, %rsi
movl $0x1, %edi
movl $0x1, (%rsi,%rdi,4)
incq %rdi
cmpq %rdi, %rcx
jne 0x98e0e
addq $0x4, %rax
decq %rcx
cmpq %r8, %rdx
jne 0x98df7
movq %r8, 0x30(%rsp)
leaq (,%rbp,8), %rdi
leaq 0x15f13(%rip), %r15     # 0xaed50
movq %r15, %rsi
movl $0x21, %edx
callq 0x390f5
movq %rax, %r13
shlq $0x2, %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl $0x22, %edx
callq 0x390f5
movq %rax, %rbp
testl %r12d, %r12d
je 0x98f2a
xorl %eax, %eax
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %r8
movl %eax, (%rbp,%rax,4)
movq $0x0, (%r13,%rax,8)
movslq (%rbx,%rax,4), %rcx
testq %rcx, %rcx
jle 0x98eb0
movq (%r8,%rax,8), %rdx
movsd (%r13,%rax,8), %xmm0
xorl %esi, %esi
addsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%r13,%rax,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x98e9c
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd (%r13,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r13,%rax,8)
incq %rax
cmpq %rdi, %rax
jne 0x98e79
xorpd %xmm2, %xmm2
xorl %eax, %eax
movslq (%rbx,%rax,4), %rcx
testq %rcx, %rcx
jle 0x98f06
movq (%r8,%rax,8), %rdx
movsd (%r13,%rax,8), %xmm0
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm1
subsd %xmm0, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm2
incq %rsi
cmpq %rsi, %rcx
jne 0x98eed
incq %rax
cmpq %rdi, %rax
jne 0x98ed7
jmp 0x98f2e
movq (%r13,%r15,8), %rsi
leaq 0xa2ee(%rip), %rdi      # 0xa320a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4030
jmp 0x99642
xorpd %xmm2, %xmm2
movsd %xmm2, 0x10(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
movl %r12d, %edx
callq 0x39864
leaq 0x1024b(%rip), %rdi     # 0xa9194
callq 0x536e7
testl %eax, %eax
movq %r13, 0x80(%rsp)
movl %r12d, 0x24(%rsp)
jne 0x98fbe
movb $0x0, 0xb0(%rsp)
testl %r12d, %r12d
movq 0x30(%rsp), %r13
je 0x98fa0
leaq 0xb0(%rsp), %r12
xorl %r15d, %r15d
movl (%rbp,%r15,4), %ecx
addl $0x31, %ecx
movq %r12, %rdi
leaq 0xa63e(%rip), %rsi      # 0xa35cc
movq %r12, %rdx
xorl %eax, %eax
callq 0x41b0
incq %r15
cmpq %r15, %r13
jne 0x98f7c
leaq 0x15db5(%rip), %rsi     # 0xaed5c
leaq 0xb0(%rsp), %rdi
movq %rdi, %rdx
xorl %eax, %eax
callq 0x41b0
movl 0x24(%rsp), %r12d
movl (%rbx), %eax
decl %eax
imull %r12d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movl %r12d, %esi
callq 0x3915f
xorps %xmm0, %xmm0
cvtsi2sdl (%rbx), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
callq 0x39194
movsd 0x10(%rsp), %xmm0
divsd 0x38(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x9901b
sqrtsd %xmm0, %xmm0
jmp 0x99020
callq 0x4300
movsd %xmm0, 0x78(%rsp)
movl 0x20(%rsp), %r8d
movq 0x40(%rsp), %rax
cmpl $0x2, %eax
jl 0x992a0
leal -0x1(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
andl $-0x2, %r8d
movsd 0x38(%rsp), %xmm1
addsd 0x9d53(%rip), %xmm1     # 0xa2da8
mulsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
leaq 0x4(%rbp), %rdx
movq %rdx, 0x90(%rsp)
xorl %r10d, %r10d
movl $0x1, %edx
movq %rdx, 0x88(%rsp)
movl %eax, %esi
xorl %edi, %edi
xorl %edx, %edx
movl %r8d, 0x20(%rsp)
movl %ecx, 0x58(%rsp)
movq 0x40(%rsp), %rax
movq %rdi, 0x98(%rsp)
subl %edi, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0xa8(%rsp)
addl %ecx, %r10d
movq 0x90(%rsp), %r11
movl %esi, 0x5c(%rsp)
movl %esi, %r15d
xorl %r13d, %r13d
movq %r10, 0x48(%rsp)
testl %edx, %edx
jle 0x990ed
leal (%r10,%r13), %eax
movl %edx, %ecx
xorl %r9d, %r9d
movq (%rbx,%r9,8), %rsi
movslq (%rsi), %rdi
cmpq %rdi, %r13
jl 0x990e5
cmpl 0x4(%rsi), %eax
jle 0x9925a
incq %r9
cmpq %r9, %rcx
jne 0x990d0
movl %r15d, 0x8(%rsp)
movq %r11, 0x28(%rsp)
movq %rdx, 0x10(%rsp)
leal (%r10,%r13), %r12d
movslq %r12d, %r15
movq 0x80(%rsp), %rax
movsd (%rax,%r15,8), %xmm1
subsd (%rax,%r13,8), %xmm1
movsd %xmm1, 0x50(%rsp)
cmpl $0x4, %r8d
jne 0x9913f
movsd 0x70(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0xa8(%rsp), %xmm2
callq 0x2068f
jmp 0x99157
leaq 0x15d52(%rip), %rdi     # 0xaee98
movsd %xmm0, 0x18(%rsp)
callq 0x4090
movsd 0x18(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
mulsd %xmm0, %xmm1
ucomisd 0x50(%rsp), %xmm1
movq 0x10(%rsp), %rdx
jbe 0x991d8
movsd %xmm0, 0x18(%rsp)
movslq %edx, %rax
movq %rax, 0x50(%rsp)
incl %edx
leaq 0x8(,%rax,8), %rsi
movq %rbx, %rdi
movq %rdx, 0x10(%rsp)
callq 0x390c8
movq %rax, %rbx
movl $0x8, %edi
leaq 0x15bae(%rip), %rsi     # 0xaed50
movl $0x55, %edx
callq 0x390f5
movq 0x50(%rsp), %rcx
movq %rax, (%rbx,%rcx,8)
movl %r13d, (%rax)
movl %r15d, 0x4(%rax)
cmpq %r15, %r13
jle 0x991e9
movl 0x20(%rsp), %r8d
movq 0x10(%rsp), %rdx
movq 0x48(%rsp), %r10
movsd 0x18(%rsp), %xmm0
jmp 0x991e2
movl 0x20(%rsp), %r8d
movq 0x48(%rsp), %r10
movq 0x28(%rsp), %r11
jmp 0x99255
movl 0x8(%rsp), %eax
movq 0x28(%rsp), %r11
movq %r11, %rcx
movq %r13, %r10
movq 0x10(%rsp), %rdx
movsd 0x18(%rsp), %xmm0
cmpq %r15, %r10
jge 0x9923f
xorl %esi, %esi
movl (%rbp,%r10,4), %edi
movl (%rcx,%rsi,4), %r8d
cmpl %r8d, %edi
movl %r8d, %r9d
cmovll %edi, %r9d
cmovgl %edi, %r8d
movslq %r9d, %rdi
movq (%r14,%rdi,8), %rdi
movslq %r8d, %r8
movl $0x0, (%rdi,%r8,4)
incq %rsi
leal (%rsi,%r10), %edi
cmpl %edi, %r12d
jg 0x9920a
incq %r10
addq $0x4, %rcx
cmpq %rax, %r10
jne 0x99203
movl 0x20(%rsp), %r8d
movq 0x48(%rsp), %r10
movl 0x8(%rsp), %r15d
incq %r13
incl %r15d
addq $0x4, %r11
cmpq 0x88(%rsp), %r13
jne 0x990c3
movq 0x98(%rsp), %rcx
leal 0x1(%rcx), %eax
notl %ecx
movl 0x5c(%rsp), %esi
decl %esi
incq 0x88(%rsp)
movl %ecx, %r10d
movl %eax, %edi
movl 0x58(%rsp), %ecx
cmpl %ecx, %eax
jne 0x9908a
jmp 0x992a2
xorl %edx, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edx, %r11d
testl %edx, %edx
jle 0x992cd
xorl %ecx, %ecx
movq 0x68(%rsp), %r12
movq 0x60(%rsp), %r13
movq (%rbx,%rcx,8), %rsi
cmpl $0x0, (%rsi)
je 0x992d9
incq %rcx
cmpq %rcx, %r11
jne 0x992ba
jmp 0x992db
movq 0x68(%rsp), %r12
movq 0x60(%rsp), %r13
jmp 0x992db
movl %ecx, %eax
movslq %eax, %rcx
cmpl $-0x1, %eax
movq %rdx, 0x10(%rsp)
movq %r11, 0x8(%rsp)
movq %rcx, 0x18(%rsp)
je 0x993c6
movl $0x2, (%r13)
movq (%rbx,%rcx,8), %rcx
movslq (%rcx), %rsi
movl (%rbp,%rsi,4), %esi
movl %esi, (%r12)
movslq (%rcx), %rsi
cmpl 0x4(%rcx), %esi
jge 0x9932f
movl 0x4(%rbp,%rsi,4), %edi
cmpl (%r12), %edi
jge 0x99323
movl %edi, (%r12)
incq %rsi
movslq 0x4(%rcx), %rdi
cmpq %rdi, %rsi
jl 0x99315
testl %edx, %edx
jle 0x993dd
movl %eax, %ecx
xorl %esi, %esi
cmpq %rcx, %rsi
je 0x993b8
movq (%rbx,%rsi,8), %rdi
movslq (%rdi), %r10
movl 0x4(%rdi), %edi
cmpl %edi, %r10d
jg 0x993a7
movl (%r12), %r8d
leaq (,%r10,4), %r9
addq %rbp, %r9
movl %edi, %r11d
subl %r10d, %r11d
incl %r11d
xorl %r15d, %r15d
cmpl %r8d, (%r9,%r15,4)
je 0x9937a
incq %r15
cmpl %r15d, %r11d
jne 0x9936a
jmp 0x993a7
cmpl %edi, %r10d
jg 0x9939f
subl %r10d, %edi
incl %edi
xorl %r10d, %r10d
cmpl %r8d, (%r9,%r10,4)
jl 0x99397
incq %r10
cmpl %r10d, %edi
jne 0x99387
jmp 0x9939f
movl $0xffffffff, (%r12)     # imm = 0xFFFFFFFF
movl $0x4, (%r13)
cmpl $-0x1, (%r12)
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %r11
je 0x993d4
incq %rsi
cmpq %r11, %rsi
jne 0x9933b
jmp 0x993dd
movl (%rbp), %ecx
movl %ecx, (%r12)
movl $0x1, %ecx
jmp 0x993d9
movl $0x5, %ecx
movl %ecx, (%r13)
cmpl $0x2, (%r13)
jne 0x99468
movq 0x18(%rsp), %rcx
movq (%rbx,%rcx,8), %rcx
movslq (%rcx), %r10
cmpl 0x4(%rcx), %r10d
jg 0x99468
movl %eax, %eax
cmpl $0x3, (%r13)
je 0x99458
movl (%rbp,%r10,4), %esi
cmpl (%r12), %esi
je 0x99458
testl %edx, %edx
jle 0x99458
xorl %esi, %esi
cmpq %rax, %rsi
je 0x99450
cmpl $0x3, (%r13)
je 0x99450
movq (%rbx,%rsi,8), %rdi
movslq (%rdi), %r8
cmpl 0x4(%rdi), %r8d
jg 0x99450
decq %r8
movl 0x4(%rbp,%r8,4), %r9d
cmpl (%rbp,%r10,4), %r9d
jne 0x99444
movl $0x3, (%r13)
movslq 0x4(%rdi), %r9
incq %r8
cmpq %r9, %r8
jl 0x99430
incq %rsi
cmpq %r11, %rsi
jne 0x99414
leaq 0x1(%r10), %rsi
movslq 0x4(%rcx), %rdi
cmpq %rdi, %r10
movq %rsi, %r10
jl 0x993fc
movl (%r12), %eax
cmpl $-0x1, %eax
je 0x99477
incl %eax
movl %eax, (%r12)
testl %edx, %edx
jle 0x99586
movq 0x10(%rsp), %rax
decl %eax
movq %rax, 0x18(%rsp)
leaq 0x120(%rsp), %r15
xorl %r13d, %r13d
movb $0x0, 0x120(%rsp)
movq (%rbx,%r13,8), %rax
movslq (%rax), %r12
cmpl 0x4(%rax), %r12d
jg 0x994da
decq %r12
movl 0x4(%rbp,%r12,4), %ecx
addl $0x31, %ecx
movq %r15, %rdi
leaq 0xa10c(%rip), %rsi      # 0xa35cc
movq %r15, %rdx
xorl %eax, %eax
callq 0x41b0
movq (%rbx,%r13,8), %rax
movslq 0x4(%rax), %rax
incq %r12
cmpq %rax, %r12
jl 0x994ae
movq (%rbx,%r13,8), %rax
movl 0x4(%rax), %ecx
cmpl (%rax), %ecx
jl 0x9954a
xorl %eax, %eax
movq (%rbx,%r13,8), %rcx
movslq 0x4(%rcx), %rdx
movslq (%rcx), %rcx
subq %rcx, %rdx
cmpq %rdx, %rax
jge 0x99530
movq %rax, %rcx
movb 0x120(%rsp,%rax), %dl
movb 0x121(%rsp,%rcx), %sil
cmpb %sil, %dl
jle 0x99520
movb %sil, 0x120(%rsp,%rax)
movb %dl, 0x121(%rsp,%rcx)
movq (%rbx,%r13,8), %rdx
movl 0x4(%rdx), %esi
subl (%rdx), %esi
incq %rcx
cmpl %ecx, %esi
jg 0x994fd
leaq 0x1(%rax), %rcx
movq (%rbx,%r13,8), %rdx
movslq 0x4(%rdx), %rsi
movslq (%rdx), %rdx
subq %rdx, %rsi
cmpq %rsi, %rax
movq %rcx, %rax
jl 0x994e7
leaq 0xb0(%rsp), %rdi
movq %r15, %rsi
callq 0x41e0
cmpq 0x18(%rsp), %r13
je 0x99578
leaq 0xb0(%rsp), %rdi
callq 0x4190
movw $0x2d, 0xb0(%rsp,%rax)
incq %r13
cmpq 0x8(%rsp), %r13
jne 0x99496
cmpl $0x0, 0x24(%rsp)
movq 0x30(%rsp), %rcx
je 0x995fe
movl $0x1, %eax
movq %rax, 0x18(%rsp)
xorl %r13d, %r13d
leaq 0x1(%r13), %rax
movq %rax, 0x8(%rsp)
cmpq %rcx, %rax
jae 0x995ef
leal 0x31(%r13), %r15d
movq 0x18(%rsp), %r12
movq (%r14,%r13,8), %rax
cmpl $0x0, (%rax,%r12,4)
je 0x995e7
leal 0x31(%r12), %r8d
movq 0xa0(%rsp), %rdi
leaq 0x1578b(%rip), %rsi     # 0xaed60
movq %rdi, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x41b0
movq 0x30(%rsp), %rcx
incq %r12
cmpq %r12, %rcx
jne 0x995b6
incq 0x18(%rsp)
movq 0x8(%rsp), %r13
cmpq %rcx, %r13
jne 0x9959f
movq %r14, %rdi
movl 0x24(%rsp), %esi
callq 0x3915f
movq 0x10(%rsp), %rsi
testl %esi, %esi
jle 0x9961b
movq %rbx, %rdi
callq 0x3915f
movq 0x80(%rsp), %rdi
callq 0x39194
movq %rbp, %rdi
callq 0x39194
leaq 0xb0(%rsp), %rsi
xorl %edi, %edi
callq 0x3a404
movq %rax, %rbx
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq