// File: /workspace/github_c_makefile_star2_O2/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, 0x40(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdi, %r12
cmpl $0x5, %edx
movq %rcx, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
je 0x8cc4b
cmpl $0x4, %edx
jne 0x8cc7b
leaq 0x8ce4(%rip), %rdi      # 0x95928
callq 0x4cdcf
jmp 0x8cc67
leaq 0x8cd6(%rip), %rdi      # 0x95928
callq 0x4cdcf
movq 0x48(%rsp), %rax
decl %eax
cvtsi2sd %eax, %xmm1
callq 0x42f0
movsd 0x88b1(%rip), %xmm1     # 0x95520
subsd %xmm0, %xmm1
movsd %xmm1, 0x70(%rsp)
jmp 0x8cc87
leaq 0x151ee(%rip), %rdi     # 0xa1e70
callq 0x4090
leaq 0xcf1a(%rip), %r14      # 0x99ba8
xorl %r15d, %r15d
xorl %ebp, %ebp
movq $0x0, 0x8(%rsp)
movq %r12, 0x30(%rsp)
cmpq $0x0, (%r12,%r15,8)
je 0x8cd78
leaq 0x1(%r15), %r13
leaq 0x4(,%r15,4), %rsi
movq 0x8(%rsp), %rdi
movl %r13d, %edx
callq 0x34f30
movq %rax, %rbx
leaq 0x8(,%r15,8), %rsi
movq %rbp, %rdi
movq %r13, 0x10(%rsp)
movl %r13d, %edx
callq 0x34f30
movq %rax, %rbp
movq (%r12,%r15,8), %rdi
callq 0x33f62
movq %rbx, 0x8(%rsp)
movl %eax, (%rbx,%r15,4)
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x15025(%rip), %rsi     # 0xa1d28
pushq $0x13
popq %rdx
callq 0x34f59
movq %rax, (%rbp,%r15,8)
movq %r15, %rbx
movq (%r12,%r15,8), %rdi
leaq 0xeb61(%rip), %rsi      # 0x9b87f
callq 0x40f0
testq %rax, %rax
je 0x8cf09
movq %rax, %r13
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rsp), %rax
movslq (%rax,%rbx,4), %rax
cmpq %rax, %r12
jge 0x8cd61
movq (%rbp,%rbx,8), %rdx
addq %r15, %rdx
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x4070
incq %r12
addq $0x8, %r15
jmp 0x8cd35
movq %r13, %rdi
callq 0x42a0
movq 0x10(%rsp), %r15
movq 0x30(%rsp), %r12
jmp 0x8cca1
leaq 0x14fa9(%rip), %r8      # 0xa1d28
movq %r15, 0x28(%rsp)
pushq $0x8
popq %rdi
pushq $0x4
popq %rsi
pushq $0x1d
popq %r9
movq 0x28(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x3509c
movq 0x28(%rsp), %r12
movq %rax, %r15
movl %r12d, %edi
movl %r12d, %ebx
pushq $0x1
popq %rax
xorl %ecx, %ecx
cmpq %rbx, %rcx
je 0x8cdd5
movq %rax, %rdx
cmpq %rdi, %rdx
jae 0x8cdcd
movq (%r15,%rcx,8), %rsi
movl $0x1, (%rsi,%rdx,4)
incq %rdx
jmp 0x8cdb8
incq %rcx
incq %rax
jmp 0x8cdb0
movq %rdi, 0x50(%rsp)
leaq (,%r12,8), %rdi
leaq 0x14f3f(%rip), %r14     # 0xa1d28
pushq $0x21
popq %rdx
movq %r14, %rsi
callq 0x34f59
movq %r12, %rdi
shlq $0x2, %rdi
pushq $0x22
popq %rdx
movq %r14, %rsi
movq %rax, %r14
callq 0x34f59
movq %rax, %r12
xorl %eax, %eax
cmpq %rbx, %rax
je 0x8ce61
movl %eax, (%r12,%rax,4)
andq $0x0, (%r14,%rax,8)
movq 0x8(%rsp), %rcx
movl (%rcx,%rax,4), %ecx
testl %ecx, %ecx
movl $0x0, %edx
cmovgl %ecx, %edx
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x8ce4e
movq (%rbp,%rax,8), %rdi
addsd (%rdi,%rsi,8), %xmm0
movsd %xmm0, (%r14,%rax,8)
incq %rsi
jmp 0x8ce34
cvtsi2sd %ecx, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, (%r14,%rax,8)
incq %rax
jmp 0x8ce0e
xorpd %xmm1, %xmm1
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rbx, %rcx
je 0x8cea4
movq 0x8(%rsp), %rdx
movl (%rdx,%rcx,4), %edx
testl %edx, %edx
cmovlel %eax, %edx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x8ce9f
movq (%rbp,%rcx,8), %rdi
movsd (%rdi,%rsi,8), %xmm0
subsd (%r14,%rcx,8), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm1
incq %rsi
jmp 0x8ce7d
incq %rcx
jmp 0x8ce69
movsd %xmm1, 0x10(%rsp)
movq %r14, 0x80(%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq 0x28(%rsp), %r14
movl %r14d, %edx
callq 0x35617
leaq 0xf2b8(%rip), %rdi      # 0x9c184
callq 0x4cff1
testl %eax, %eax
jne 0x8cf40
leaq 0x120(%rsp), %r14
movb $0x0, (%r14)
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x8cf22
movl (%r12,%r13,4), %ecx
addl $0x31, %ecx
movq %r14, %rdi
leaq 0x96b6(%rip), %rsi      # 0x965b0
movq %r14, %rdx
xorl %eax, %eax
callq 0x41b0
incq %r13
jmp 0x8cee4
movq (%r12,%rbx,8), %rsi
leaq 0x92f6(%rip), %rdi      # 0x9620a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4030
jmp 0x8d3d8
leaq 0x14e0b(%rip), %rsi     # 0xa1d34
leaq 0x120(%rsp), %rdi
movq %rdi, %rdx
xorl %eax, %eax
callq 0x41b0
movq 0x28(%rsp), %r14
movq 0x8(%rsp), %r13
movl (%r13), %eax
decl %eax
imull %r14d, %eax
cvtsi2sd %eax, %xmm0
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movq %rbp, %rdi
movl %r14d, %esi
callq 0x34fc3
cvtsi2sdl (%r13), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %r13, %rdi
callq 0x34ff7
movsd 0x10(%rsp), %xmm0
divsd 0x38(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movq %rbx, 0x90(%rsp)
jb 0x8cfa6
sqrtsd %xmm0, %xmm0
jmp 0x8cfab
callq 0x4300
movsd %xmm0, 0x78(%rsp)
movq 0x40(%rsp), %r14
movl 0x1c(%rsp), %r9d
movq 0x48(%rsp), %rax
leal -0x1(%rax), %ecx
cvtsi2sd %eax, %xmm0
andl $-0x2, %r9d
movsd 0x38(%rsp), %xmm1
addsd 0x8dd7(%rip), %xmm1     # 0x95db0
movq $0x0, 0x8(%rsp)
testl %ecx, %ecx
movl $0x0, %eax
movl %ecx, 0x64(%rsp)
cmovgl %ecx, %eax
movl %eax, 0x68(%rsp)
mulsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
pushq $0x1
popq %rax
movq %rax, 0x88(%rsp)
xorl %ecx, %ecx
movl %r9d, 0x1c(%rsp)
cmpl 0x68(%rsp), %ecx
je 0x8d1e5
movl 0x64(%rsp), %eax
subl %ecx, %eax
movq %rax, 0xa8(%rsp)
movq 0x48(%rsp), %rax
movl %ecx, 0x6c(%rsp)
subl %ecx, %eax
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x98(%rsp)
xorl %ebp, %ebp
pushq $0x1
popq %r10
movq 0x8(%rsp), %rdi
cmpq 0x88(%rsp), %rbp
je 0x8d1c8
movq 0xa8(%rsp), %rax
leal (%rax,%rbp), %r13d
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x8d091
movq (%rbx,%rcx,8), %rdx
movslq (%rdx), %rsi
cmpq %rsi, %rbp
jl 0x8d08c
cmpl 0x4(%rdx), %r13d
jle 0x8d1bd
incq %rcx
jmp 0x8d071
movq %r10, 0x30(%rsp)
movq %rdi, 0x8(%rsp)
movslq %r13d, %r14
movq 0x80(%rsp), %rax
movsd (%rax,%r14,8), %xmm1
subsd (%rax,%rbp,8), %xmm1
movsd %xmm1, 0x58(%rsp)
cmpl $0x4, %r9d
jne 0x8d0d9
movsd 0x70(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x98(%rsp), %xmm2
callq 0x1e7b3
jmp 0x8d0f1
leaq 0x14d90(%rip), %rdi     # 0xa1e70
movsd %xmm0, 0x10(%rsp)
callq 0x4090
movsd 0x10(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
mulsd %xmm0, %xmm1
ucomisd 0x58(%rsp), %xmm1
jbe 0x8d1a1
movsd %xmm0, 0x10(%rsp)
movq 0x8(%rsp), %rdx
movslq %edx, %rax
movq %rax, 0x58(%rsp)
incl %edx
leaq 0x8(,%rax,8), %rsi
movq %rbx, %rdi
movq %rdx, 0x8(%rsp)
callq 0x34f30
movq %rax, %rbx
pushq $0x8
popq %rdi
leaq 0x14bea(%rip), %rsi     # 0xa1d28
pushq $0x55
popq %rdx
callq 0x34f59
movq 0x58(%rsp), %rcx
movq %rax, (%rbx,%rcx,8)
movl %ebp, (%rax)
movl %r13d, 0x4(%rax)
movq %rbp, %rax
movq 0x30(%rsp), %r10
movq %r10, %rcx
movl 0x1c(%rsp), %r9d
cmpq %r14, %rax
jg 0x8d1b2
movq %rcx, %rdx
cmpl %edx, %r13d
jl 0x8d199
movl (%r12,%rax,4), %esi
movl (%r12,%rdx,4), %edi
cmpl %edi, %esi
movl %edi, %r8d
cmovll %esi, %r8d
cmovgl %esi, %edi
movslq %r8d, %rsi
movq (%r15,%rsi,8), %rsi
movslq %edi, %rdi
andl $0x0, (%rsi,%rdi,4)
incq %rdx
jmp 0x8d16d
incq %rax
incq %rcx
jmp 0x8d165
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %r9d
movq 0x30(%rsp), %r10
jmp 0x8d1bd
movq 0x8(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
incq %rbp
incq %r10
jmp 0x8d04b
movq %rdi, 0x8(%rsp)
movl 0x6c(%rsp), %ecx
incl %ecx
incq 0x88(%rsp)
movq 0x40(%rsp), %r14
jmp 0x8d010
xorl %eax, %eax
movq 0x8(%rsp), %rcx
testl %ecx, %ecx
movl $0x0, %r13d
cmovgl %ecx, %r13d
cmpq %rax, %r13
je 0x8d20f
movq (%rbx,%rax,8), %rcx
cmpl $0x0, (%rcx)
je 0x8d3ed
incq %rax
jmp 0x8d1f8
movl (%r12), %eax
movq 0x20(%rsp), %rcx
movl %eax, (%rcx)
pushq $0x1
popq %rsi
movl %esi, (%r14)
movq 0x20(%rsp), %rcx
movl (%rcx), %eax
cmpl $-0x1, %eax
je 0x8d230
incl %eax
movl %eax, (%rcx)
movq 0x8(%rsp), %rax
decl %eax
movq %rax, 0x30(%rsp)
leaq 0xb0(%rsp), %r14
xorl %ebp, %ebp
movq 0x50(%rsp), %rcx
movq %r13, 0x10(%rsp)
cmpq %r13, %rbp
je 0x8d333
movb $0x0, 0xb0(%rsp)
movq (%rbx,%rbp,8), %rax
movslq (%rax), %r13
movslq 0x4(%rax), %rdi
cmpq %rdi, %r13
jg 0x8d295
movl (%r12,%r13,4), %ecx
addl $0x31, %ecx
movq %r14, %rdi
leaq 0x932e(%rip), %rsi      # 0x965b0
movq %r14, %rdx
xorl %eax, %eax
callq 0x41b0
incq %r13
movq (%rbx,%rbp,8), %rax
jmp 0x8d268
movl (%rax), %ecx
xorl %edx, %edx
pushq $0x1
popq %rsi
movq 0x10(%rsp), %r13
movl %edi, %r8d
subl %ecx, %r8d
movslq %r8d, %r8
cmpq %r8, %rdx
jg 0x8d2f8
movq %rsi, %r8
movl %edi, %r9d
subl %ecx, %r9d
cmpl %r8d, %r9d
jl 0x8d2f0
movb 0xb0(%rsp,%rdx), %dil
movb 0xb0(%rsp,%r8), %r9b
cmpb %r9b, %dil
jle 0x8d2e8
movb %r9b, 0xb0(%rsp,%rdx)
movb %dil, 0xb0(%rsp,%r8)
movq (%rbx,%rbp,8), %rax
movl (%rax), %ecx
incq %r8
movl 0x4(%rax), %edi
jmp 0x8d2b2
incq %rdx
incq %rsi
jmp 0x8d2a1
leaq 0x120(%rsp), %rdi
movq %r14, %rsi
callq 0x41e0
cmpq 0x30(%rsp), %rbp
je 0x8d326
leaq 0x120(%rsp), %rdi
callq 0x4190
movw $0x2d, 0x120(%rsp,%rax)
incq %rbp
movq 0x50(%rsp), %rcx
jmp 0x8d250
pushq $0x1
popq %r14
xorl %ebp, %ebp
cmpq 0x90(%rsp), %rbp
je 0x8d393
leal 0x31(%rbp), %r13d
movq %r14, 0x10(%rsp)
cmpq %rcx, %r14
jae 0x8d386
movq (%r15,%rbp,8), %rax
cmpl $0x0, (%rax,%r14,4)
je 0x8d381
leal 0x31(%r14), %r8d
movq 0xa0(%rsp), %rdi
leaq 0x149c9(%rip), %rsi     # 0xa1d38
movq %rdi, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x41b0
movq 0x50(%rsp), %rcx
incq %r14
jmp 0x8d34c
incq %rbp
movq 0x10(%rsp), %r14
incq %r14
jmp 0x8d339
movq %r15, %rdi
movq 0x28(%rsp), %rsi
callq 0x34fc3
movq 0x8(%rsp), %rsi
testl %esi, %esi
jle 0x8d3b1
movq %rbx, %rdi
callq 0x34fc3
movq 0x80(%rsp), %rdi
callq 0x34ff7
movq %r12, %rdi
callq 0x34ff7
leaq 0x120(%rsp), %rsi
xorl %edi, %edi
callq 0x3604c
movq %rax, %rbx
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x2, (%r14)
movq (%rbx,%rax,8), %rcx
movslq (%rcx), %rdx
movl (%r12,%rdx,4), %edx
movq 0x20(%rsp), %rsi
movl %edx, (%rsi)
movslq (%rcx), %rsi
movslq 0x4(%rcx), %rdi
cmpq %rdi, %rsi
jge 0x8d42c
movl 0x4(%r12,%rsi,4), %r8d
incq %rsi
cmpl %edx, %r8d
jge 0x8d40d
movq 0x20(%rsp), %rdx
movl %r8d, (%rdx)
movl %r8d, %edx
jmp 0x8d409
xorl %edi, %edi
pushq $0x5
popq %rsi
cmpq %r13, %rdi
je 0x8d491
cmpq %rdi, %rax
je 0x8d48c
movq (%rbx,%rdi,8), %r8
movslq (%r8), %r9
movslq 0x4(%r8), %r8
movq %r9, %r10
cmpq %r8, %r10
jg 0x8d483
leaq 0x1(%r10), %r11
cmpl %edx, (%r12,%r10,4)
movq %r11, %r10
jne 0x8d449
cmpq %r8, %r9
jg 0x8d475
leaq 0x1(%r9), %r10
cmpl %edx, (%r12,%r9,4)
movq %r10, %r9
jge 0x8d45b
movq 0x20(%rsp), %rdx
orl $-0x1, (%rdx)
movl $0x4, (%r14)
movq 0x20(%rsp), %rdx
movl (%rdx), %edx
cmpl $-0x1, %edx
je 0x8d21d
incq %rdi
jmp 0x8d431
cmpl $0x2, (%r14)
jne 0x8d220
movslq (%rcx), %rdx
pushq $0x2
popq %rdi
pushq $0x3
popq %rsi
movl %edi, %r9d
movslq 0x4(%rcx), %r8
cmpq %r8, %rdx
jg 0x8d220
cmpl $0x3, %r9d
jne 0x8d4bf
movl %esi, %r9d
jmp 0x8d4cd
movl (%r12,%rdx,4), %r8d
movq 0x20(%rsp), %r10
cmpl (%r10), %r8d
jne 0x8d4d2
incq %rdx
jmp 0x8d4a7
xorl %r8d, %r8d
cmpq %r13, %r8
je 0x8d4cd
cmpl $0x3, %edi
sete %r9b
cmpq %r8, %rax
sete %r10b
orb %r9b, %r10b
je 0x8d4f5
incq %r8
movl %edi, %r9d
jmp 0x8d4d5
movq (%rbx,%r8,8), %r9
movslq (%r9), %r10
movslq 0x4(%r9), %r11
cmpq %r11, %r10
jg 0x8d4ed
movl (%r12,%r10,4), %r11d
cmpl (%r12,%rdx,4), %r11d
jne 0x8d518
movl $0x3, (%r14)
movl %esi, %edi
incq %r10
jmp 0x8d4fc