// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movsd %xmm0, 0x20(%rsp)
movq %rdi, %rbp
leaq 0x34(%rsp), %r14
leaq 0x30(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x9afd7
movq %rax, %rbx
movslq (%r15), %r15
movl (%r14), %r12d
movq %rax, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x97f73
leaq 0x16853(%rip), %rdx     # 0xb1dbd
movl $0x8, %esi
movq %r15, %rdi
movl $0x6, %ecx
callq 0x3a1fc
movq %rax, 0x18(%rsp)
testq %r15, %r15
movq %r15, 0x10(%rsp)
jle 0x9b632
movq %r12, %rax
shlq $0x5, %rax
xorl %ecx, %ecx
movq 0x18(%rsp), %r8
testl %r12d, %r12d
jle 0x9b5c3
movq (%rbx,%rcx,8), %rdx
movsd (%r8,%rcx,8), %xmm0
xorl %esi, %esi
addsd 0x10(%rdx,%rsi), %xmm0
movsd %xmm0, (%r8,%rcx,8)
addq $0x20, %rsi
cmpq %rsi, %rax
jne 0x9b5ae
incq %rcx
cmpq %r15, %rcx
jne 0x9b59d
testl %r15d, %r15d
jle 0x9b632
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %r13d, %r13d
leaq 0xb07d(%rip), %rbx      # 0xa6665
leaq 0x15192(%rip), %r14     # 0xb0781
movq 0x18(%rsp), %rax
movsd (%rax,%r13,8), %xmm0
divsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax,%r13,8)
movq %rbx, %rdi
callq 0x54bec
cmpl $0x1, %eax
jne 0x9b628
movq 0x18(%rsp), %rax
movsd (%rax,%r13,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x4030
incq %r13
cmpq %r13, 0x10(%rsp)
jne 0x9b5ef
leaq 0xb02c(%rip), %rdi      # 0xa6665
callq 0x54bec
cmpl $0x1, %eax
jne 0x9b64d
movl $0xa, %edi
callq 0x40d0
movsd 0x20(%rsp), %xmm2
ucomisd 0xa755(%rip), %xmm2     # 0xa5db0
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %r13
jne 0x9b698
jp 0x9b698
leaq 0x16920(%rip), %rax     # 0xb1f90
leal 0x1(%rdx), %ecx
imull %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
cvtsi2sd %r12d, %xmm1
leaq (%rax,%rdx,8), %rax
addq $-0x10, %rax
mulsd 0xc68e(%rip), %xmm1     # 0xa7d20
divsd %xmm1, %xmm0
jmp 0x9b6f8
leal 0x1(%rdx), %eax
imull %edx, %eax
ucomisd 0xe842(%rip), %xmm2     # 0xa9ee8
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
cvtsi2sd %r12d, %xmm1
mulsd 0xc666(%rip), %xmm1     # 0xa7d20
divsd %xmm1, %xmm0
jne 0x9b6d3
jp 0x9b6d3
leaq 0x16a57(%rip), %rax     # 0xb2120
leaq (%rax,%rdx,8), %rax
addq $-0x10, %rax
jmp 0x9b6f8
leal -0x2(%rdx), %eax
ucomisd 0x16612(%rip), %xmm2    # 0xb1cf0
cltq
jne 0x9b6ed
jp 0x9b6ed
leaq 0x16bc5(%rip), %rcx     # 0xb22b0
jmp 0x9b6f4
leaq 0x16a2c(%rip), %rcx     # 0xb2120
leaq (%rcx,%rax,8), %rax
movsd (%rax), %xmm1
movsd %xmm1, 0x8(%rsp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x9b712
sqrtsd %xmm0, %xmm0
jmp 0x9b717
callq 0x4300
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
leaq 0xaf37(%rip), %rdi      # 0xa6665
callq 0x54bec
cmpl $0x1, %eax
jne 0x9b74c
leaq 0x16687(%rip), %rdi     # 0xb1dc6
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x4030
movq 0x10(%rsp), %rax
testl %eax, %eax
jle 0x9b817
movq %rbp, 0x28(%rsp)
movl $0x1, %r14d
movapd 0xaa74(%rip), %xmm1     # 0xa61e0
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %r15, %rbx
incq %r15
cmpq %rax, %r15
movq %r14, 0x20(%rsp)
jge 0x9b7f8
movsd (%r13,%rbx,8), %xmm0
subsd (%r13,%r14,8), %xmm0
andpd %xmm1, %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x9b7f0
incl %ebp
leaq 0xa00c(%rip), %r13      # 0xa57b0
movq %r13, %rdi
movl %ebp, %esi
movl $0x1, %edx
leaq 0x15441(%rip), %r12     # 0xb0bf6
movq %r12, %rcx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x33644
incq %r14
movq %r13, %rdi
movq 0x18(%rsp), %r13
movl %ebp, %esi
movl $0x2, %edx
movq %r12, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x33644
movapd 0xa9f7(%rip), %xmm1     # 0xa61e0
movq 0x10(%rsp), %rax
jmp 0x9b7f3
incq %r14
cmpq %rax, %r14
jne 0x9b781
movq 0x20(%rsp), %r14
incq %r14
cmpq %rax, %r15
jne 0x9b771
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movq 0x28(%rsp), %rbp
jmp 0x9b81b
xorpd %xmm0, %xmm0
leaq 0xd7c6(%rip), %rdi      # 0xa8fe8
callq 0x34a17
leaq 0xd170(%rip), %rdi      # 0xa899e
callq 0x54afc
cmpl $0x1, %eax
je 0x9b854
testl %eax, %eax
jne 0x9b86a
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
movsd 0x8(%rsp), %xmm0
callq 0x263e5
jmp 0x9b86a
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
movsd 0x8(%rsp), %xmm0
callq 0x6f3f7
movq %r13, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a180