// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/tests.c
// Function: waldwolfowitz
int waldwolfowitz(char **files, int *which, double confidence, double *real_confidence)
{
 int p, m, n, i, j, R, N, C;
 double expectation, variance, statistic;
 matrix observations[2], distancematrix;
 Graphptr mst;
 p = read_multivariate_observations_for_two_file(files, observations);
 if (p == -1)
  {
   matrix_free(observations[0]);
   matrix_free(observations[1]);
   return 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);
 matrix_free(distancematrix);
 if (mst == NULL)
   return 0;
 if (p == 2)
   save_mst_to_array_variables(mst, observations, 2);
 matrix_free(observations[0]);
 matrix_free(observations[1]);
 R = 1;
 for (i = 0; i < mst->nvertices; i++)
   for (j = 0; j < mst->degree[i]; j++)
     if (i < mst->edges[i][j].v && ((i < m && mst->edges[i][j].v >= m) || (i >= m && mst->edges[i][j].v < m)))
       R++;
 expectation = 2 * m * n / (N + 1.0) + 1;
 C = 0;
 for (i = 0; i < mst->nvertices; i++)
   if (mst->degree[i] > 1)
     C += binom(mst->degree[i], 2);
 free_graph(mst);
 set_default_variable("out3", R);
 variance = ((2 * m * n) / (N * (N - 1.0))) * ((2 * m * n - N) / (N + 0.0) + ((C - N + 2) / ((N - 2) * (N - 3))) * (N * (N - 1) - 4 * m * n + 2));
 statistic = (R - expectation) / sqrt(variance);
 if (get_parameter_i("tailed") == 2)
  {
   (*real_confidence) = normal(statistic, 1);
   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 -0x80(%rbp), %rsi
callq 0xd1d50
movl %eax, -0x2c(%rbp)
cmpl $-0x1, -0x2c(%rbp)
jne 0xd3d68
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x59ea0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x59ea0
movl $0x0, -0x4(%rbp)
jmp 0xd4116
movl -0x80(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
leaq -0x80(%rbp), %rdi
movl -0x44(%rbp), %edx
movl $0x2, %esi
callq 0xd39c0
movq %rax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
movl -0x44(%rbp), %r8d
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movl $0x2, %ecx
callq 0xd4130
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x59ea0
cmpq $0x0, -0x98(%rbp)
jne 0xd3e12
movl $0x0, -0x4(%rbp)
jmp 0xd4116
cmpl $0x2, -0x2c(%rbp)
jne 0xd3e2d
movq -0x98(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0x2, %edx
callq 0xd3b50
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x59ea0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x59ea0
movl $0x1, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movq -0x98(%rbp), %rcx
cmpl 0xf46280(%rcx), %eax
jge 0xd3f3b
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x98(%rbp), %rcx
movslq -0x38(%rbp), %rdx
cmpl 0xf42400(%rcx,%rdx,4), %eax
jge 0xd3f2b
movl -0x38(%rbp), %eax
movq -0x98(%rbp), %rcx
movslq -0x38(%rbp), %rdx
imulq $0x3e80, %rdx, %rdx     # imm = 0x3E80
addq %rdx, %rcx
movslq -0x3c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jge 0xd3f1b
movl -0x38(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0xd3ee3
movq -0x98(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x3e80, %rcx, %rcx     # imm = 0x3E80
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x30(%rbp), %eax
jge 0xd3f12
movl -0x38(%rbp), %eax
cmpl -0x30(%rbp), %eax
jl 0xd3f1b
movq -0x98(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x3e80, %rcx, %rcx     # imm = 0x3E80
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x30(%rbp), %eax
jge 0xd3f1b
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xd3f1d
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xd3e72
jmp 0xd3f2d
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xd3e55
movl -0x30(%rbp), %eax
shll %eax
imull -0x34(%rbp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sdl -0x44(%rbp), %xmm1
movsd 0xe0c3(%rip), %xmm2     # 0xe2018
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0xe0b3(%rip), %xmm1     # 0xe2018
addsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movq -0x98(%rbp), %rcx
cmpl 0xf46280(%rcx), %eax
jge 0xd3fd2
movq -0x98(%rbp), %rax
movslq -0x38(%rbp), %rcx
cmpl $0x1, 0xf42400(%rax,%rcx,4)
jle 0xd3fc5
movq -0x98(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl 0xf42400(%rax,%rcx,4), %edi
movl $0x2, %esi
callq 0x52ba0
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0xd3fc7
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xd3f7c
movq -0x98(%rbp), %rdi
callq 0x27120
cvtsi2sdl -0x40(%rbp), %xmm0
leaq 0x11baa(%rip), %rdi     # 0xe5b94
callq 0x4b070
movl -0x30(%rbp), %eax
shll %eax
imull -0x34(%rbp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sdl -0x44(%rbp), %xmm1
cvtsi2sdl -0x44(%rbp), %xmm2
movsd 0xe00a(%rip), %xmm3     # 0xe2018
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movl -0x30(%rbp), %eax
shll %eax
imull -0x34(%rbp), %eax
subl -0x44(%rbp), %eax
cvtsi2sd %eax, %xmm1
cvtsi2sdl -0x44(%rbp), %xmm2
xorps %xmm3, %xmm3
addsd %xmm3, %xmm2
divsd %xmm2, %xmm1
movl -0x48(%rbp), %eax
subl -0x44(%rbp), %eax
addl $0x2, %eax
movl -0x44(%rbp), %ecx
subl $0x2, %ecx
movl -0x44(%rbp), %edx
subl $0x3, %edx
imull %edx, %ecx
cltd
idivl %ecx
movl -0x44(%rbp), %ecx
movl -0x44(%rbp), %edx
subl $0x1, %edx
imull %edx, %ecx
movl -0x30(%rbp), %edx
shll $0x2, %edx
imull -0x34(%rbp), %edx
subl %edx, %ecx
addl $0x2, %ecx
imull %ecx, %eax
cvtsi2sd %eax, %xmm2
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
cvtsi2sdl -0x40(%rbp), %xmm0
subsd -0x50(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movsd -0x58(%rbp), %xmm0
callq 0x42a0
movaps %xmm0, %xmm1
movsd -0xb0(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
leaq 0x15189(%rip), %rdi     # 0xe9244
callq 0x78f10
cmpl $0x2, %eax
jne 0xd4101
movsd -0x60(%rbp), %xmm0
movl $0x1, %edi
callq 0x2e350
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd40f8
movl $0x0, -0x4(%rbp)
jmp 0xd4116
movl $0x1, -0x4(%rbp)
jmp 0xd4116
leaq 0x1a2de(%rip), %rdi     # 0xee3e6
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)