// File: /workspace/github_c_makefile_star2_O3/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 $0x198, %rsp            # imm = 0x198
movq %r9, 0xb0(%rsp)
movq %r8, %r14
movq %rcx, %rbx
movl %esi, %r15d
movq %rdi, 0x8(%rsp)
cmpl $0x5, %edx
movl %edx, 0x1c(%rsp)
je 0x9b9aa
cmpl $0x4, %edx
jne 0x9b9da
leaq 0x9f85(%rip), %rdi      # 0xa5928
callq 0x549ba
jmp 0x9b9c3
leaq 0x9f77(%rip), %rdi      # 0xa5928
callq 0x549ba
leal -0x1(%r15), %eax
cvtsi2sd %eax, %xmm1
callq 0x42f0
movsd 0x9b55(%rip), %xmm1     # 0xa5520
subsd %xmm0, %xmm1
movsd %xmm1, 0x88(%rsp)
jmp 0x9b9e6
leaq 0x16537(%rip), %rdi     # 0xb1f18
callq 0x4090
movq %r15, 0x70(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
movq %rbx, 0x40(%rsp)
movq %r14, 0x38(%rsp)
je 0x9bc73
movl $0x1, %eax
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
movq 0x8(%rsp), %r14
movq %rax, 0x10(%rsp)
leaq 0x1(%rbp), %r12
leaq 0x4(,%rbp,4), %rsi
movq %r15, %rdi
movl %r12d, %edx
callq 0x3a0b4
movq %rax, %r13
leaq 0x8(,%rbp,8), %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x3a0b4
movq %rax, %rbx
movq (%r14,%rbp,8), %rdi
callq 0x38a4a
movl %eax, (%r13,%rbp,4)
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x16363(%rip), %rsi     # 0xb1dd0
movl $0x13, %edx
callq 0x3a0e1
movq %rax, (%rbx,%rbp,8)
movq (%r14,%rbp,8), %rdi
leaq 0xfed5(%rip), %rsi      # 0xab95b
callq 0x40f0
testq %rax, %rax
je 0x9bda4
movq %rax, %r14
movq %r12, 0x28(%rsp)
cmpl $0x0, (%r13,%rbp,4)
movq %rbx, %r15
jle 0x9bad5
xorl %ebx, %ebx
xorl %r12d, %r12d
movq (%r15,%rbp,8), %rdx
addq %rbx, %rdx
movq %r14, %rdi
leaq 0xe1c3(%rip), %rsi      # 0xa9c80
xorl %eax, %eax
callq 0x4070
incq %r12
movslq (%r13,%rbp,4), %rax
addq $0x8, %rbx
cmpq %rax, %r12
jl 0x9baac
movq %r14, %rdi
callq 0x42a0
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %eax
movq 0x28(%rsp), %r12
movq 0x8(%rsp), %r14
cmpq $0x0, (%r14,%r12,8)
movq %r12, %rbp
movq %r15, %rbx
movq %r13, %r15
jne 0x9ba1c
leaq 0x162c6(%rip), %r8      # 0xb1dd0
movl $0x8, %edi
movl $0x4, %esi
movl %r12d, %edx
movq %rcx, %r13
movl %r12d, %ecx
movl $0x1d, %r9d
callq 0x3a231
movq %rax, %r14
movl %r12d, %eax
movl %r13d, %ecx
addq $0x2, %rcx
movl $0x10, %edx
xorl %esi, %esi
movdqa 0xa8ec(%rip), %xmm0     # 0xa6430
movdqa 0xa8f4(%rip), %xmm1     # 0xa6440
movdqa 0xa8fc(%rip), %xmm2     # 0xa6450
pcmpeqd %xmm3, %xmm3
movq %rsi, %r8
incq %rsi
cmpq %rax, %rsi
jae 0x9bc59
movq %rcx, %rdi
andq $-0x4, %rdi
movq %r8, %r9
notq %r9
addq %rax, %r9
decq %r9
movq %r9, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
movq (%r14,%r8,8), %r8
addq %rdx, %r8
pxor %xmm2, %xmm4
xorl %r9d, %r9d
movq %r9, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm1, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm4, %xmm7
pcmpeqd %xmm4, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r10d
notl %r10d
testb $0x1, %r10b
je 0x9bbe0
movl $0x1, -0xc(%r8,%r9,4)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %r10d
testb $0x1, %r10b
je 0x9bbf9
movl $0x1, -0x8(%r8,%r9,4)
por %xmm0, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm4, %xmm6
pcmpeqd %xmm4, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm3, %xmm5
pextrw $0x0, %xmm5, %r10d
testb $0x1, %r10b
je 0x9bc38
movl $0x1, -0x4(%r8,%r9,4)
pextrw $0x4, %xmm5, %r10d
testb $0x1, %r10b
je 0x9bc4c
movl $0x1, (%r8,%r9,4)
addq $0x4, %r9
cmpq %r9, %rdi
jne 0x9bb92
decq %rcx
addq $0x4, %rdx
cmpq %rax, %rsi
jne 0x9bb58
movq %rbx, 0x8(%rsp)
movl %r12d, %ebx
jmp 0x9bca7
leaq 0x16156(%rip), %r8      # 0xb1dd0
xorl %r12d, %r12d
movl $0x8, %edi
movl $0x4, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1d, %r9d
callq 0x3a231
movq %rax, %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
movq $0x0, 0x8(%rsp)
leaq (,%r12,8), %rdi
leaq 0x1611a(%rip), %r13     # 0xb1dd0
movq %r13, %rsi
movl $0x21, %edx
callq 0x3a0e1
movq %rax, 0x68(%rsp)
shlq $0x2, %r12
movq %r12, %rdi
movq %r13, %rsi
movl $0x22, %edx
callq 0x3a0e1
movq %rax, %rbp
movl %ebx, 0x34(%rsp)
movl %ebx, %eax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x9bdc2
xorl %eax, %eax
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %r13
movq 0x68(%rsp), %rdi
movq 0x8(%rsp), %r8
movl %eax, (%rbp,%rax,4)
movq $0x0, (%rdi,%rax,8)
movslq (%r15,%rax,4), %rcx
testq %rcx, %rcx
jle 0x9bd3f
movq (%r8,%rax,8), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
addsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rdi,%rax,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x9bd2b
jmp 0x9bd43
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, (%rdi,%rax,8)
incq %rax
cmpq 0x48(%rsp), %rax
jne 0x9bd0c
cmpq $0x0, 0x58(%rsp)
je 0x9bdd7
pxor %xmm2, %xmm2
xorl %eax, %eax
movslq (%r15,%rax,4), %rcx
testq %rcx, %rcx
jle 0x9bd98
movq (%r8,%rax,8), %rdx
movsd (%rdi,%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 0x9bd7f
incq %rax
cmpq 0x48(%rsp), %rax
jne 0x9bd6b
jmp 0x9bddb
movq 0x8(%rsp), %rax
movq (%rax,%rbp,8), %rsi
leaq 0xa456(%rip), %rdi      # 0xa620a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4030
jmp 0x9c3ad
pxor %xmm2, %xmm2
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %r13
movq 0x68(%rsp), %rdi
jmp 0x9bddb
pxor %xmm2, %xmm2
movsd %xmm2, 0x10(%rsp)
movq %rbp, %rsi
movl 0x34(%rsp), %ebx
movl %ebx, %edx
callq 0x3a870
leaq 0x1046a(%rip), %rdi     # 0xac260
callq 0x54bec
testl %eax, %eax
jne 0x9be68
movb $0x0, 0xc0(%rsp)
cmpq $0x0, 0x58(%rsp)
movq 0x48(%rsp), %r12
je 0x9be41
leaq 0xc0(%rsp), %r13
xorl %ebx, %ebx
movl (%rbp,%rbx,4), %ecx
addl $0x31, %ecx
movq %r13, %rdi
leaq 0xa7e1(%rip), %rsi      # 0xa6610
movq %r13, %rdx
xorl %eax, %eax
callq 0x41b0
incq %rbx
cmpq %rbx, %r12
jne 0x9be1e
leaq 0x15f94(%rip), %rsi     # 0xb1ddc
leaq 0xc0(%rsp), %rdi
movq %rdi, %rdx
xorl %eax, %eax
callq 0x41b0
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %r13
movl 0x34(%rsp), %ebx
movl (%r15), %eax
decl %eax
imull %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movl %ebx, %esi
callq 0x3a14b
xorps %xmm0, %xmm0
cvtsi2sdl (%r15), %xmm0
movsd %xmm0, 0x60(%rsp)
movq %r15, %rdi
callq 0x3a180
movsd 0x10(%rsp), %xmm0
divsd 0x60(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x9bec5
sqrtsd %xmm0, %xmm0
jmp 0x9beca
callq 0x4300
movsd %xmm0, 0x90(%rsp)
movl 0x1c(%rsp), %edi
movq 0x70(%rsp), %rax
cmpl $0x2, %eax
jl 0x9c188
leal -0x1(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
andl $-0x2, %edi
movsd 0x60(%rsp), %xmm1
addsd 0x9ea8(%rip), %xmm1     # 0xa5da8
mulsd %xmm0, %xmm1
movsd %xmm1, 0x60(%rsp)
leaq 0x4(%rbp), %rdx
movq %rdx, 0xa0(%rsp)
xorl %r8d, %r8d
movl $0x1, %edx
movq %rdx, 0x98(%rsp)
movl %eax, %r13d
xorl %edx, %edx
xorl %r15d, %r15d
movl %edi, 0x1c(%rsp)
movl %ecx, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq %rdx, 0xa8(%rsp)
subl %edx, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0xb8(%rsp)
addl %ecx, %r8d
movq 0xa0(%rsp), %r10
movl %r13d, 0x84(%rsp)
xorl %ebx, %ebx
movq %r8, 0x78(%rsp)
leal (%r8,%rbx), %r12d
testl %r15d, %r15d
jle 0x9bf9e
movl %r15d, %eax
xorl %ecx, %ecx
movq (%r11,%rcx,8), %rdx
movslq (%rdx), %rsi
cmpq %rsi, %rbx
jl 0x9bf96
cmpl 0x4(%rdx), %r12d
jle 0x9c10d
incq %rcx
cmpq %rcx, %rax
jne 0x9bf80
movq %r10, 0x50(%rsp)
movq %r11, 0x10(%rsp)
movq %r15, 0x28(%rsp)
movslq %r12d, %r15
movq 0x68(%rsp), %rax
movsd (%rax,%r15,8), %xmm1
subsd (%rax,%rbx,8), %xmm1
movsd %xmm1, 0x20(%rsp)
cmpl $0x4, %edi
jne 0x9bfea
movsd 0x88(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
movsd 0xb8(%rsp), %xmm2
callq 0x20e03
jmp 0x9c002
leaq 0x15f27(%rip), %rdi     # 0xb1f18
movsd %xmm0, 0x8(%rsp)
callq 0x4090
movsd 0x8(%rsp), %xmm0
movsd 0x90(%rsp), %xmm1
mulsd %xmm0, %xmm1
ucomisd 0x20(%rsp), %xmm1
movq 0x10(%rsp), %r11
jbe 0x9c090
movsd %xmm0, 0x8(%rsp)
movq 0x28(%rsp), %rdx
movslq %edx, %rax
movq %rax, 0x20(%rsp)
incl %edx
leaq 0x8(,%rax,8), %rsi
movq %r11, %rdi
movq %rdx, 0x28(%rsp)
callq 0x3a0b4
movq %rax, 0x10(%rsp)
movl $0x8, %edi
leaq 0x15d79(%rip), %rsi     # 0xb1dd0
movl $0x55, %edx
callq 0x3a0e1
movq 0x10(%rsp), %r11
movq 0x20(%rsp), %rcx
movq %rax, (%r11,%rcx,8)
movl %ebx, (%rax)
movl %r12d, 0x4(%rax)
cmpq %r15, %rbx
jle 0x9c0a5
movq 0x28(%rsp), %r15
movl 0x1c(%rsp), %edi
movq 0x78(%rsp), %r8
movsd 0x8(%rsp), %xmm0
jmp 0x9c09e
movq 0x28(%rsp), %r15
movl 0x1c(%rsp), %edi
movq 0x78(%rsp), %r8
movq 0x50(%rsp), %r10
jmp 0x9c10d
movl %r13d, %eax
movq 0x50(%rsp), %r10
movq %r10, %rcx
movq %rbx, %rdx
movsd 0x8(%rsp), %xmm0
cmpq %r15, %rdx
jge 0x9c0f3
xorl %esi, %esi
movl (%rbp,%rdx,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,%rdx), %edi
cmpl %edi, %r12d
jg 0x9c0c0
incq %rdx
addq $0x4, %rcx
cmpq %rax, %rdx
jne 0x9c0b9
movq 0x28(%rsp), %r15
movl 0x1c(%rsp), %edi
movq 0x78(%rsp), %r8
incq %rbx
incl %r13d
addq $0x4, %r10
cmpq 0x98(%rsp), %rbx
jne 0x9bf72
movq 0xa8(%rsp), %rcx
leal 0x1(%rcx), %eax
notl %ecx
movl 0x84(%rsp), %r13d
decl %r13d
incq 0x98(%rsp)
movl %ecx, %r8d
movl %eax, %edx
movl 0x80(%rsp), %ecx
cmpl %ecx, %eax
jne 0x9bf39
testl %r15d, %r15d
setg %sil
jle 0x9c18f
movl %r15d, %eax
xorl %ecx, %ecx
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %r13
movq (%r11,%rcx,8), %rdx
cmpl $0x0, (%rdx)
je 0x9c3c2
incq %rcx
cmpq %rcx, %rax
jne 0x9c171
jmp 0x9c19b
xorl %esi, %esi
xorl %r15d, %r15d
jmp 0x9c19b
xorl %esi, %esi
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %r13
movl (%rbp), %eax
movl %eax, (%r12)
movl $0x1, %eax
movl %eax, (%r13)
movq %r15, 0x28(%rsp)
movl (%r12), %eax
cmpl $-0x1, %eax
je 0x9c1bf
incl %eax
movl %eax, (%r12)
movl %esi, 0x20(%rsp)
testb %sil, %sil
movq %r11, 0x10(%rsp)
je 0x9c2f6
movq 0x28(%rsp), %rax
leal -0x1(%rax), %r12d
movl %eax, %r13d
leaq 0x130(%rsp), %rbx
leaq 0xa424(%rip), %rdx      # 0xa6610
xorl %r15d, %r15d
movq %r13, 0x8(%rsp)
movq %r12, 0x50(%rsp)
movb $0x0, 0x130(%rsp)
movq (%r11,%r15,8), %rax
movl (%rax), %ecx
movl 0x4(%rax), %esi
cmpl %esi, %ecx
jg 0x9c250
movslq %ecx, %r12
decq %r12
movq %rdx, %r13
movl 0x4(%rbp,%r12,4), %ecx
addl $0x31, %ecx
movq %rbx, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x41b0
movq 0x10(%rsp), %r11
movq (%r11,%r15,8), %rax
movslq 0x4(%rax), %rsi
incq %r12
cmpq %rsi, %r12
jl 0x9c217
movl (%rax), %ecx
movq 0x50(%rsp), %r12
movq 0x8(%rsp), %r13
cmpl %ecx, %esi
jl 0x9c2b2
xorl %edx, %edx
movl %esi, %edi
subl %ecx, %edi
movslq %edi, %rdi
cmpq %rdi, %rdx
jge 0x9c2a6
movq %rdx, %rsi
movb 0x130(%rsp,%rdx), %dil
movb 0x131(%rsp,%rsi), %r8b
cmpb %r8b, %dil
jle 0x9c290
movb %r8b, 0x130(%rsp,%rdx)
movb %dil, 0x131(%rsp,%rsi)
movq (%r11,%r15,8), %rax
movl (%rax), %ecx
movl 0x4(%rax), %edi
subl %ecx, %edi
incq %rsi
cmpl %esi, %edi
jg 0x9c265
movl 0x4(%rax), %esi
movl %esi, %edi
subl %ecx, %edi
movslq %edi, %rdi
leaq 0x1(%rdx), %r8
cmpq %rdi, %rdx
movq %r8, %rdx
jl 0x9c256
leaq 0xc0(%rsp), %rdi
movq %rbx, %rsi
callq 0x41e0
cmpq %r12, %r15
je 0x9c2de
leaq 0xc0(%rsp), %rdi
callq 0x4190
movw $0x2d, 0xc0(%rsp,%rax)
incq %r15
cmpq %r13, %r15
movq 0x10(%rsp), %r11
leaq 0xa320(%rip), %rdx      # 0xa6610
jne 0x9c1f9
cmpq $0x0, 0x58(%rsp)
movq 0x48(%rsp), %rcx
je 0x9c367
movl $0x1, %ebx
xorl %r12d, %r12d
leaq 0x1(%r12), %rax
movq %rax, 0x8(%rsp)
cmpq %rcx, %rax
jae 0x9c35a
leal 0x31(%r12), %r13d
movq %rbx, %r15
movq (%r14,%r12,8), %rax
cmpl $0x0, (%rax,%r15,4)
je 0x9c352
leal 0x31(%r15), %r8d
movq 0xb0(%rsp), %rdi
leaq 0x15aa0(%rip), %rsi     # 0xb1de0
movq %rdi, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x41b0
movq 0x48(%rsp), %rcx
incq %r15
cmpq %r15, %rcx
jne 0x9c322
incq %rbx
movq 0x8(%rsp), %r12
cmpq %rcx, %r12
jne 0x9c30b
movq %r14, %rdi
movl 0x34(%rsp), %esi
callq 0x3a14b
cmpb $0x0, 0x20(%rsp)
je 0x9c389
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x3a14b
movq 0x68(%rsp), %rdi
callq 0x3a180
movq %rbp, %rdi
callq 0x3a180
leaq 0xc0(%rsp), %rsi
xorl %edi, %edi
callq 0x3b494
movq %rax, %rbx
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, 0x20(%rsp)
movl $0x2, (%r13)
movq (%r11,%rcx,8), %rdx
movslq (%rdx), %rsi
movl (%rbp,%rsi,4), %esi
movl %esi, (%r12)
movslq (%rdx), %rdi
movq %rdx, 0x10(%rsp)
movl 0x4(%rdx), %r8d
cmpl %r8d, %edi
jge 0x9c413
movq 0x10(%rsp), %rdx
movl 0x4(%rbp,%rdi,4), %r9d
cmpl %esi, %r9d
jge 0x9c408
movl %r9d, (%r12)
movl 0x4(%rdx), %r8d
movl %r9d, %esi
incq %rdi
movslq %r8d, %r9
cmpq %r9, %rdi
jl 0x9c3f3
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x9c48f
movq (%r11,%rdi,8), %r8
movslq (%r8), %r10
movl 0x4(%r8), %r8d
cmpl %r8d, %r10d
jg 0x9c486
movq %r11, %rdx
leaq (,%r10,4), %r9
addq %rbp, %r9
movl %r8d, %r11d
subl %r10d, %r11d
incl %r11d
xorl %ebx, %ebx
cmpl %esi, (%r9,%rbx,4)
je 0x9c456
incq %rbx
cmpl %ebx, %r11d
jne 0x9c443
movq %rdx, %r11
jmp 0x9c486
subl %r10d, %r8d
incl %r8d
xorl %r10d, %r10d
movq %rdx, %r11
cmpl %esi, (%r9,%r10,4)
jl 0x9c472
incq %r10
cmpl %r10d, %r8d
jne 0x9c462
jmp 0x9c47a
movl $0xffffffff, (%r12)     # imm = 0xFFFFFFFF
movl $0x4, (%r13)
movl (%r12), %esi
cmpl $-0x1, %esi
je 0x9c56b
incq %rdi
cmpq %rax, %rdi
jne 0x9c415
cmpl $0x2, (%r13)
jne 0x9c562
movq 0x10(%rsp), %rdx
movslq (%rdx), %rsi
movl 0x4(%rdx), %r8d
cmpl %r8d, %esi
jg 0x9c562
movq %r11, %rdx
movl $0x2, %edi
movl $0x2, %r9d
movl $0x3, %r10d
cmpl $0x3, %r9d
je 0x9c549
movl (%rbp,%rsi,4), %r10d
cmpl (%r12), %r10d
jne 0x9c4e5
movl %r9d, %r10d
jmp 0x9c549
xorl %r8d, %r8d
cmpl $0x3, %edi
sete %r9b
cmpq %r8, %rcx
sete %r10b
orb %r9b, %r10b
jne 0x9c535
movq (%rdx,%r8,8), %r9
movslq (%r9), %r10
movl 0x4(%r9), %r11d
cmpl %r11d, %r10d
jg 0x9c535
decq %r10
movl 0x4(%rbp,%r10,4), %ebx
cmpl (%rbp,%rsi,4), %ebx
jne 0x9c52a
movl $0x3, (%r13)
movl 0x4(%r9), %r11d
movl $0x3, %edi
movslq %r11d, %rbx
incq %r10
cmpq %rbx, %r10
jl 0x9c50e
incq %r8
cmpq %rax, %r8
jne 0x9c4e8
movq 0x10(%rsp), %r8
movl 0x4(%r8), %r8d
movl %edi, %r10d
leaq 0x1(%rsi), %r11
movslq %r8d, %rbx
movl %r10d, %r9d
cmpq %rbx, %rsi
movq %r11, %rsi
jl 0x9c4c9
movq %rdx, %r11
movl 0x20(%rsp), %esi
jmp 0x9c1ab
movl $0x5, %eax
movl 0x20(%rsp), %esi
jmp 0x9c1a7