// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/tests.c
// Function: smirnov
int smirnov(char **files, int *which, double confidence, double *real_confidence)
{
 matrix distancematrix;
 int p, m, n, i, j, r, s, N;
 double D, d_i, statistic;
 Graphptr mst;
 matrix observations[2];
 p = read_multivariate_observations_for_two_file(files, observations);
 if (p == -1)
  {
   matrix_free(observations[0]);
   matrix_free(observations[1]);
   return 0;
  }
 multivariate_normality_test(files[0], confidence, &statistic);
 set_default_variable("out4",statistic + 0.0);
 multivariate_normality_test(files[1], confidence, &statistic);
 set_default_variable("out5",statistic + 0.0);
 m = observations[0].row;
 n = observations[1].row;
 N = m + n;
 *which = 3;
 distancematrix = distance_matrix_for_multiple_multivariate_sample(observations, 2, N);
 mst = minimum_spanning_tree_from_observations(observations, distancematrix, 2, N);
 if (mst == NULL)
   return 0;
 ranks_from_minimum_spanning_tree(mst, distancematrix);
 for (i = 0; i < m; i++)
   write_array_variables("aout", i + 1, 5, "d", mst->visitorder[i]);
 for (i = m; i < N; i++)
   write_array_variables("aout", i - m + 1, 6, "d", mst->visitorder[i]);
 if (p == 2)
   save_mst_to_array_variables(mst, observations, 2);
 matrix_free(observations[0]);
 matrix_free(observations[1]);
 D = 0;
 for (i = 1; i <= N; i++)
  {
   r = 0;
   s = 0;
   for (j = 0; j < N; j++)
     if (mst->visitorder[j] <= i)
      {
       if (j < m)
         r++;
       else 
         s++;
      }
   d_i = fabs(r / (m + 0.0) - s / (n + 0.0));
   if (d_i > D)
     D = d_i;
  }
 if (get_parameter_o("displayresulton") == ON)
   printf("D: %.2f\n", D);
 set_default_variable("out3", D);
 matrix_free(distancematrix);
 free_graph(mst);
 if (get_parameter_i("tailed") == 2)
  {
   *real_confidence = 1 - kolmogorov_two_sample(m, n, D);
   if (*real_confidence < confidence)
     return 0;
   else 
     return 1;
  }
 else
   printf(m1316); 
 return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xd1d50
movl %eax, -0x3c(%rbp)
cmpl $-0x1, -0x3c(%rbp)
jne 0xd4587
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x59ea0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x59ea0
movl $0x0, -0x4(%rbp)
jmp 0xd48eb
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movsd -0x20(%rbp), %xmm0
leaq -0x70(%rbp), %rsi
callq 0xd4900
xorps %xmm0, %xmm0
addsd -0x70(%rbp), %xmm0
leaq 0x115ef(%rip), %rdi     # 0xe5b9a
callq 0x4b070
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movsd -0x20(%rbp), %xmm0
leaq -0x70(%rbp), %rsi
callq 0xd4900
xorps %xmm0, %xmm0
addsd -0x70(%rbp), %xmm0
leaq 0x115cb(%rip), %rdi     # 0xe5ba0
callq 0x4b070
movl -0xa0(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
addl -0x44(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
leaq -0xa0(%rbp), %rdi
movl -0x58(%rbp), %edx
movl $0x2, %esi
callq 0xd39c0
movq %rax, -0xb0(%rbp)
movq %rdx, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0xa0(%rbp), %rdi
movl -0x58(%rbp), %r8d
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl $0x2, %ecx
callq 0xd4130
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jne 0xd466b
movl $0x0, -0x4(%rbp)
jmp 0xd48eb
movq -0x78(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0xd4350
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xd46c6
movl -0x48(%rbp), %esi
addl $0x1, %esi
movq -0x78(%rbp), %rax
movslq -0x48(%rbp), %rcx
movl 0xf433a0(%rax,%rcx,4), %r8d
leaq 0xde0d(%rip), %rdi      # 0xe24b5
movl $0x5, %edx
leaq 0x18bb2(%rip), %rcx     # 0xed266
movb $0x0, %al
callq 0x490c0
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xd4683
movl -0x40(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0xd4712
movl -0x48(%rbp), %esi
subl -0x40(%rbp), %esi
addl $0x1, %esi
movq -0x78(%rbp), %rax
movslq -0x48(%rbp), %rcx
movl 0xf433a0(%rax,%rcx,4), %r8d
leaq 0xddc1(%rip), %rdi      # 0xe24b5
movl $0x6, %edx
leaq 0x18b66(%rip), %rcx     # 0xed266
movb $0x0, %al
callq 0x490c0
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xd46cc
cmpl $0x2, -0x3c(%rbp)
jne 0xd472d
movq -0x78(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x2, %edx
callq 0xd3b50
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x59ea0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x59ea0
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
movl $0x1, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x58(%rbp), %eax
jg 0xd482e
movl $0x0, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0xd47ca
movq -0x78(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movl 0xf433a0(%rax,%rcx,4), %eax
cmpl -0x48(%rbp), %eax
jg 0xd47bd
movl -0x4c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xd47b2
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0xd47bb
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xd47bd
jmp 0xd47bf
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xd4783
cvtsi2sdl -0x50(%rbp), %xmm0
cvtsi2sdl -0x40(%rbp), %xmm1
xorps %xmm2, %xmm2
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvtsi2sdl -0x54(%rbp), %xmm1
cvtsi2sdl -0x44(%rbp), %xmm2
xorps %xmm3, %xmm3
addsd %xmm3, %xmm2
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movaps 0xe661(%rip), %xmm1     # 0xe2e60
pand %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
ucomisd -0x60(%rbp), %xmm0
jbe 0xd481e
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0xd4820
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xd4762
leaq 0xea36(%rip), %rdi      # 0xe326b
callq 0x79440
cmpl $0x1, %eax
jne 0xd4852
movsd -0x60(%rbp), %xmm0
leaq 0x19c03(%rip), %rdi     # 0xee44e
movb $0x1, %al
callq 0x4030
movsd -0x60(%rbp), %xmm0
leaq 0x11336(%rip), %rdi     # 0xe5b94
callq 0x4b070
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x59ea0
movq -0x78(%rbp), %rdi
callq 0x27120
leaq 0x149c4(%rip), %rdi     # 0xe9244
callq 0x78f10
cmpl $0x2, %eax
jne 0xd48d6
movl -0x40(%rbp), %edi
movl -0x44(%rbp), %esi
movsd -0x60(%rbp), %xmm0
callq 0x2f4a0
movaps %xmm0, %xmm1
movsd 0xd773(%rip), %xmm0     # 0xe2018
subsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd48cd
movl $0x0, -0x4(%rbp)
jmp 0xd48eb
movl $0x1, -0x4(%rbp)
jmp 0xd48eb
leaq 0x19b09(%rip), %rdi     # 0xee3e6
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)