// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/tests.c
// Function: nemenyi
void nemenyi(char **files, double confidence)
{
 /*!Last Changed 26.04.2010*/
 int i, j, N, k, t;
 Obsptr *obs;
 double *R, cd;
 double critical99[49] = {2.576, 2.913, 3.113, 3.255, 3.364, 3.452, 3.526, 3.590, 3.646, 3.696, 3.741, 3.781, 3.818, 3.853, 3.884, 3.914, 3.941, 3.967, 3.992, 4.015, 4.037, 4.057, 4.077,4.096, 4.114, 4.132, 4.148, 4.164, 4.179, 4.194, 4.208, 4.222, 4.236, 4.249, 4.261, 4.273, 4.285, 4.296, 4.307, 4.318, 4.329, 4.339, 4.349, 4.359, 4.368, 4.378, 4.387, 4.395, 4.404};
 double critical95[49] = {1.960, 2.344, 2.569, 2.728, 2.850, 2.948, 3.031, 3.102, 3.164, 3.219, 3.268, 3.313, 3.354, 3.391, 3.426, 3.458, 3.489, 3.517, 3.544, 3.569, 3.593, 3.616, 3.637, 3.658, 3.678, 3.696, 3.714, 3.732, 3.749, 3.765, 3.780, 3.795, 3.810, 3.824, 3.837, 3.850, 3.863, 3.876, 3.888, 3.899, 3.911, 3.922, 3.933, 3.943, 3.954, 3.964, 3.973, 3.983, 3.992};
 double critical90[49] = {1.645, 2.052, 2.291, 2.460, 2.589, 2.693, 2.780, 2.855, 2.920, 2.978, 3.030, 3.077, 3.120, 3.159, 3.196, 3.230, 3.261, 3.291, 3.319, 3.346, 3.371, 3.394, 3.417, 3.439, 3.459, 3.479, 3.498, 3.516, 3.533, 3.550, 3.567, 3.582, 3.597, 3.612, 3.626, 3.640, 3.653, 3.666, 3.679, 3.691, 3.703, 3.714, 3.726, 3.737, 3.747, 3.758, 3.768, 3.778, 3.788};
 obs = read_observations_for_multiple_equal_size_file(files, &N, &k);
 assign_ranks_to_equal_size_observations(obs, k, N);
 R = (double *)safecalloc(k, sizeof(double), "friedman", 6);
 for (i = 0; i < k; i++)
   for (j = 0; j < N; j++)
     R[i] += obs[i][j].rij;
 for (i = 0; i < k; i++)
  {
   R[i] /= N;
   if (get_parameter_o("displayresulton") == ON)
     printf("%.6f ", R[i]);
  }
 if (get_parameter_o("displayresulton") == ON)
   printf("\n");
 t = 0;
 if (confidence == 0.99)
   cd = critical99[k - 2] * sqrt((k * (k + 1)) / (6.0 * N));
 else
   if (confidence == 0.95)
     cd = critical95[k - 2] * sqrt((k * (k + 1)) / (6.0 * N));
   else
     if (confidence == 0.90)
       cd = critical90[k - 2] * sqrt((k * (k + 1)) / (6.0 * N));
     else
       cd = critical95[k - 2] * sqrt((k * (k + 1)) / (6.0 * N));
 if (get_parameter_o("displayresulton") == ON)
   printf("CD: %.6f\n", cd);
 for (i = 0; i < k; i++)
   for (j = i + 1; j < k; j++)
    {
     if (fabs(R[i] - R[j]) > cd)
      {
       t++;
       write_array_variables("aout", t, 1, "d", i + 1);
       write_array_variables("aout", t, 2, "d", j + 1);
      }
    }
 set_default_variable("out1", t + 0.0);
 switch (get_parameter_l("imagetype"))
  {
        case IMAGE_EPS:rangetest_plot(R, k, files, cd);
                       break;
   case IMAGE_PSTRICKS:rangetest_plot_pstricks(R, k, files, cd);
                       break;
  } 
 safe_free(R);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movsd %xmm0, 0x18(%rsp)
leaq 0x44(%rsp), %r14
leaq 0x40(%rsp), %r15
movq %rdi, 0x20(%rsp)
movq %r14, %rsi
movq %r15, %rdx
callq 0x8c2e0
movq %rax, %rbx
movl (%r15), %r15d
movslq %r15d, %r13
movl (%r14), %r14d
movq %rax, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0x8962c
leaq 0x154f8(%rip), %rdx     # 0xa1d15
pushq $0x8
popq %rsi
pushq $0x6
popq %rcx
movq %r13, %rdi
callq 0x35067
movq %rax, %r12
xorl %eax, %eax
testl %r14d, %r14d
movl $0x0, %ecx
cmovgl %r14d, %ecx
movq %r13, 0x28(%rsp)
testl %r13d, %r13d
movl $0x0, %ebp
cmovgl %r15d, %ebp
shlq $0x5, %rcx
cmpq %rbp, %rax
je 0x8c87e
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x8c879
movq (%rbx,%rax,8), %rsi
movsd 0x10(%rsi,%rdx), %xmm0
addsd (%r12,%rax,8), %xmm0
movsd %xmm0, (%r12,%rax,8)
addq $0x20, %rdx
jmp 0x8c858
incq %rax
jmp 0x8c851
cvtsi2sd %r14d, %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %r13d, %r13d
leaq 0x9d72(%rip), %rbx      # 0x96605
leaq 0x13e4b(%rip), %r14     # 0xa06e5
cmpq %r13, %rbp
je 0x8c8d3
movsd (%r12,%r13,8), %xmm0
divsd 0x10(%rsp), %xmm0
movsd %xmm0, (%r12,%r13,8)
movq %rbx, %rdi
callq 0x4cff1
cmpl $0x1, %eax
jne 0x8c8ce
movsd (%r12,%r13,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x4030
incq %r13
jmp 0x8c89a
leaq 0x9d2b(%rip), %rdi      # 0x96605
callq 0x4cff1
cmpl $0x1, %eax
jne 0x8c8ec
pushq $0xa
popq %rdi
callq 0x40d0
movsd 0x18(%rsp), %xmm1
ucomisd 0x94be(%rip), %xmm1     # 0x95db8
movq 0x28(%rsp), %rdx
jne 0x8c931
jp 0x8c931
leaq 0x155e6(%rip), %rax     # 0xa1ef0
leal 0x1(%r15), %ecx
imull %edx, %ecx
cvtsi2sd %ecx, %xmm0
leaq (%rax,%rdx,8), %rax
addq $-0x10, %rax
movsd 0x10(%rsp), %xmm1
mulsd 0xb36d(%rip), %xmm1     # 0x97c98
divsd %xmm1, %xmm0
jmp 0x8c990
leal 0x1(%rdx), %eax
imull %edx, %eax
ucomisd 0xd4d1(%rip), %xmm1     # 0x99e10
cvtsi2sd %eax, %xmm0
movsd 0x10(%rsp), %xmm2
mulsd 0xb347(%rip), %xmm2     # 0x97c98
divsd %xmm2, %xmm0
jne 0x8c96a
jp 0x8c96a
leaq 0x15720(%rip), %rax     # 0xa2080
leaq (%rax,%rdx,8), %rax
addq $-0x10, %rax
jmp 0x8c990
leal -0x2(%r15), %eax
ucomisd 0x152c2(%rip), %xmm1    # 0xa1c38
cltq
jne 0x8c985
jp 0x8c985
leaq 0x1588d(%rip), %rcx     # 0xa2210
jmp 0x8c98c
leaq 0x156f4(%rip), %rcx     # 0xa2080
leaq (%rcx,%rax,8), %rax
movsd (%rax), %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x8c9a4
sqrtsd %xmm0, %xmm0
jmp 0x8c9b5
movsd %xmm2, 0x8(%rsp)
callq 0x4300
movsd 0x8(%rsp), %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
leaq 0x9c3f(%rip), %rdi      # 0x96605
callq 0x4cff1
cmpl $0x1, %eax
jne 0x8c9e4
leaq 0x15347(%rip), %rdi     # 0xa1d1e
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x4030
pushq $0x1
popq %rax
movapd 0x97f1(%rip), %xmm2     # 0x961e0
xorl %r14d, %r14d
movl $0x0, 0x18(%rsp)
movsd 0x8(%rsp), %xmm1
movq %rbp, 0x30(%rsp)
cmpq %rbp, %r14
je 0x8cac3
leaq 0x1(%r14), %r8
movq %rax, %rbp
movl %ebp, %r13d
incq %rbp
cmpl %r13d, %r15d
jle 0x8cab3
movsd (%r12,%r14,8), %xmm0
subsd -0x8(%r12,%rbp,8), %xmm0
andpd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
ja 0x8ca43
incq %rbp
incl %r13d
jmp 0x8ca1b
movl 0x18(%rsp), %ebx
incl %ebx
leaq 0x8d60(%rip), %rdi      # 0x957b0
movl %ebx, %esi
pushq $0x1
popq %rdx
leaq 0x140fe(%rip), %rcx     # 0xa0b5a
movq %r8, 0x10(%rsp)
movq 0x10(%rsp), %r8
movq %rax, 0x38(%rsp)
xorl %eax, %eax
callq 0x2f310
incl %r13d
leaq 0x8d34(%rip), %rdi      # 0x957b0
movl %ebx, 0x18(%rsp)
movl %ebx, %esi
pushq $0x2
popq %rdx
leaq 0x140ce(%rip), %rcx     # 0xa0b5a
movl %r13d, %r8d
xorl %eax, %eax
callq 0x2f310
movq 0x10(%rsp), %r8
movapd 0x973d(%rip), %xmm2     # 0x961e0
movq 0x38(%rsp), %rax
movsd 0x8(%rsp), %xmm1
jmp 0x8ca15
incq %rax
movq %r8, %r14
movq 0x30(%rsp), %rbp
jmp 0x8ca05
cvtsi2sdl 0x18(%rsp), %xmm0
leaq 0xc488(%rip), %rdi      # 0x98f58
callq 0x30597
leaq 0xbe42(%rip), %rdi      # 0x9891e
callq 0x4cf11
cmpl $0x1, %eax
je 0x8cb04
testl %eax, %eax
movsd 0x8(%rsp), %xmm0
jne 0x8cb1a
movq %r12, %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x231fc
jmp 0x8cb1a
movq %r12, %rdi
movl %r15d, %esi
movq 0x20(%rsp), %rdx
movsd 0x8(%rsp), %xmm0
callq 0x65fe9
movq %r12, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34ff7