// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/statistics.c
// Function: multiple_comparison
int* multiple_comparison(char **files,int filecount,TEST_TYPE testtype, char* st, int* monotone, int* componentcount, CORRECTION_TYPE correctiontype)
{
 /*Last Changed 18.11.2004 added holm's correction*/
 /*Last Changed 25.02.2004 added monotonicity*/
 /*Last Changed 02.02.2004 added safemalloc Runs only with accuracy set to 0*/
 /*Last Changed 09.02.2003 !!!!  put "-" into st before calling !!!!!*/
 int i, j, *result, edgecount = 0, *inthelist, found, compcount = (filecount * (filecount - 1)) / 2;
 Linkptr edges = NULL, newedge, lastedge = NULL, tmp, tmpbefore, tmp1;
 Comparisonptr comparisons;
 char ch;
 result = (int *)safemalloc(filecount*sizeof(int), "multiple_comparison", 7);
 inthelist = (int *)safecalloc(filecount, sizeof(int), "multiple_comparison", 8);
 comparisons = all_pairwise_comparisons(files, filecount, correctiontype, testtype);
 for (i = 0; i < compcount; i++)
   if (!comparisons[i].accepted) /*If the test rejects*/
    {
     newedge = (Linkptr) safemalloc(sizeof(Link), "multiple_comparison", 36);
     newedge -> from = comparisons[i].alg1;
     newedge -> to = comparisons[i].alg2;
     ch = comparisons[i].alg1 + 1 + '0';
     sprintf(st,"%s%c",st,ch);
     ch = comparisons[i].alg2 + 1 + '0';
     sprintf(st,"%s%c",st,ch);
     sprintf(st,"%s%c",st,'-');
     newedge -> next = NULL;
     if (lastedge != NULL)
       lastedge -> next = newedge;
     else
       edges = newedge;
     lastedge = newedge;
     edgecount++;
    }
 safe_free(comparisons);
 *componentcount = connected_components(edges, filecount);
 for (j = 0; j < filecount; j++)
   for (i = 0; i < filecount; i++)
     if (!(inthelist[i]))
      {
       tmp = edges;
       while (tmp && tmp->from != i)
         tmp = tmp->next;
       if (!tmp)
        {
         tmp = edges;
         tmpbefore = NULL;
         while (tmp)
          {
           tmp1 = tmp->next;
           if (tmp->to != i)
             tmpbefore = tmp;
           else
            {
             if (tmpbefore)
               tmpbefore -> next = tmp1;
             else
               edges = tmp1; 
             safe_free(tmp);
            }
           tmp = tmp1;
          }
         result[j] = i+1;
         inthelist[i] = 1;
         break;
        }
      }
 found = 0;
 for (i = 0; i < filecount - 1; i++)
   for (j = i + 1; j < filecount; j++)
     if (result[i] > result[j])
       found++;
 if (found == edgecount)
   *monotone = 1;
 else
   *monotone = 0;
 safe_free(inthelist);
 return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0xc(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
imull %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x68(%rbp)
movslq -0xc(%rbp), %rdi
shlq $0x2, %rdi
leaq 0x2a182(%rip), %rsi     # 0xede23
movl $0x7, %edx
callq 0x52d70
movq %rax, -0x38(%rbp)
movslq -0xc(%rbp), %rdi
movl $0x4, %esi
leaq 0x2a164(%rip), %rdx     # 0xede23
movl $0x8, %ecx
callq 0x52f40
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl 0x10(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0xc3490
movq %rax, -0x88(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0xc3e45
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
jne 0xc3e35
movl $0x10, %edi
leaq 0x2a102(%rip), %rsi     # 0xede23
movl $0x24, %edx
callq 0x52d70
movq %rax, -0x60(%rbp)
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
addl $0x1, %eax
addl $0x30, %eax
movb %al, -0x89(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rdx
movsbl -0x89(%rbp), %ecx
leaq 0x1f455(%rip), %rsi     # 0xe31f0
movb $0x0, %al
callq 0x4170
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
addl $0x1, %eax
addl $0x30, %eax
movb %al, -0x89(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rdx
movsbl -0x89(%rbp), %ecx
leaq 0x1f417(%rip), %rsi     # 0xe31f0
movb $0x0, %al
callq 0x4170
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x1f401(%rip), %rsi     # 0xe31f0
movl $0x2d, %ecx
movb $0x0, %al
callq 0x4170
movq -0x60(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpq $0x0, -0x68(%rbp)
je 0xc3e1c
movq -0x60(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xc3e24
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc3e37
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xc3ced
movq -0x88(%rbp), %rdi
callq 0x52e80
movq -0x58(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xc2a70
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xc3f98
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xc3f88
movq -0x48(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xc3f78
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x70(%rbp)
movb %al, -0x8a(%rbp)
je 0xc3ec6
movq -0x70(%rbp), %rax
movl (%rax), %eax
cmpl -0x2c(%rbp), %eax
setne %al
movb %al, -0x8a(%rbp)
movb -0x8a(%rbp), %al
testb $0x1, %al
jne 0xc3ed2
jmp 0xc3ee0
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0xc3ea5
cmpq $0x0, -0x70(%rbp)
jne 0xc3f76
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0xc3f54
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x2c(%rbp), %eax
je 0xc3f24
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0xc3f4a
cmpq $0x0, -0x78(%rbp)
je 0xc3f39
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xc3f41
movq -0x80(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x70(%rbp), %rdi
callq 0x52e80
movq -0x80(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0xc3efb
movl -0x2c(%rbp), %edx
addl $0x1, %edx
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0xc3f88
jmp 0xc3f78
jmp 0xc3f7a
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xc3e7f
jmp 0xc3f8a
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xc3e6c
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xc3fff
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xc3ff2
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x38(%rbp), %rcx
movslq -0x30(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0xc3fe5
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xc3fe7
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xc3fbc
jmp 0xc3ff4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xc3fa6
movl -0x4c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jne 0xc4013
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
jmp 0xc401d
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x48(%rbp), %rdi
callq 0x52e80
movq -0x38(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)