// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/tests.c
// Function: hotellingt
int hotellingt(char **files, int *which, double confidence, double *real_confidence)
{
 /*!Last Changed 12.01.2009*/
 int i, k, p, m, df1, df2;
 double *samplemean, num, denom, statistic;
 matrix observations[2], difference, covariance, mean, eigenvec, dummy, result, tmp, meant, weights;
 p = read_multivariate_observations_for_two_file(files, observations);
 if (p == -1)
  {
   matrix_free(observations[0]);
   matrix_free(observations[1]);
   return 0;
  }
 if (observations[0].row != observations[1].row)
  {
   printf(m1426);
   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);
 k = observations[0].row;
 *which = 3;
 difference = matrix_difference(observations[0], observations[1]);
 covariance = matrix_covariance(difference, &samplemean);
 mean = matrix_alloc(1, p);
 memcpy(mean.values[0], samplemean, p * sizeof(double));
 safe_free(samplemean);
 dummy = matrix_copy(covariance);
 if (!matrix_inverse(&dummy))
  {
   find_eigenvalues_eigenvectors(&eigenvec, covariance, &p, 1.0 - DBL_DELTA);
   reduce_dimension_of_covariance_matrix(&covariance, p, eigenvec);
   reduce_dimension_of_vector(&mean, p, eigenvec);
   matrix_free(eigenvec);
   p++;
  }
 set_default_variable("out3", p + 0.0);
 matrix_free(dummy);
 m = k - 1;
 matrix_inverse(&covariance);
 tmp = matrix_multiply(mean, covariance);
 meant = matrix_transpose(mean);
 result = matrix_multiply(tmp, meant);
 weights = matrix_multiply(covariance, meant);
 for (i = 0; i < p; i++)
   write_array_variables("aout", i + 1, 1, "f", weights.values[i][0]); 
 matrix_free(weights);
 num = (m - p + 1) * k * result.values[0][0];
 matrix_free(meant);
 matrix_free(tmp);
 matrix_free(result);
 matrix_free(covariance);
 matrix_free(mean);
 for (i = 0; i < 2; i++)
   matrix_free(observations[i]);
 denom = p * m;
 df1 = p;
 df2 = m - p + 1;
 if (denom != 0)
   (*real_confidence) = 1 - f_distribution(num / denom, df1, df2);
 else
   return 0;
 if (get_parameter_i("tailed") == 2)
  {
   if ((num / denom) < f_distribution_inverse(1 - confidence, df1, df2))
     return 0;
   else
     return 1;
  }
 else
   printf(m1316);
 return 0;  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
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, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
jne 0xd4d28
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 0xd52a1
movl -0x80(%rbp), %eax
cmpl -0x70(%rbp), %eax
je 0xd4d4a
leaq 0x19720(%rip), %rdi     # 0xee457
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
jmp 0xd52a1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movsd -0x20(%rbp), %xmm0
leaq -0x60(%rbp), %rsi
callq 0xd4900
xorps %xmm0, %xmm0
addsd -0x60(%rbp), %xmm0
leaq 0x10e2c(%rip), %rdi     # 0xe5b9a
callq 0x4b070
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movsd -0x20(%rbp), %xmm0
leaq -0x60(%rbp), %rsi
callq 0xd4900
xorps %xmm0, %xmm0
addsd -0x60(%rbp), %xmm0
leaq 0x10e08(%rip), %rdi     # 0xe5ba0
callq 0x4b070
movl -0x80(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x5aea0
movq %rax, -0x120(%rbp)
movq %rdx, -0x118(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x5bc50
movq %rax, -0x130(%rbp)
movq %rdx, -0x128(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x34(%rbp), %esi
movl $0x1, %edi
callq 0x57fc0
movq %rax, -0x140(%rbp)
movq %rdx, -0x138(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rsi
movslq -0x34(%rbp), %rdx
shlq $0x3, %rdx
callq 0x42b0
movq -0x48(%rbp), %rdi
callq 0x52e80
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x58550
movq %rax, -0x150(%rbp)
movq %rdx, -0x148(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5c470
cmpl $0x0, %eax
jne 0xd4f52
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
leaq -0x34(%rbp), %rcx
movsd 0x193e1(%rip), %xmm0    # 0xee2d8
callq 0x5fba0
movl -0x34(%rbp), %esi
movq -0xc0(%rbp), %rdx
movq -0xb8(%rbp), %rcx
leaq -0xa0(%rbp), %rdi
callq 0x2c990
movl -0x34(%rbp), %esi
movq -0xc0(%rbp), %rdx
movq -0xb8(%rbp), %rcx
leaq -0xb0(%rbp), %rdi
callq 0x2caf0
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x59ea0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cvtsi2sdl -0x34(%rbp), %xmm0
xorps %xmm1, %xmm1
addsd %xmm1, %xmm0
leaq 0x10c2f(%rip), %rdi     # 0xe5b94
callq 0x4b070
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x59ea0
movl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x38(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5c470
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq -0x98(%rbp), %rcx
callq 0x59fe0
movq %rax, -0x160(%rbp)
movq %rdx, -0x158(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x59ed0
movq %rax, -0x170(%rbp)
movq %rdx, -0x168(%rbp)
movq -0x170(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0x100(%rbp), %rdx
movq -0xf8(%rbp), %rcx
callq 0x59fe0
movq %rax, -0x180(%rbp)
movq %rdx, -0x178(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x100(%rbp), %rdx
movq -0xf8(%rbp), %rcx
callq 0x59fe0
movq %rax, -0x190(%rbp)
movq %rdx, -0x188(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x108(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0xd50fd
movl -0x2c(%rbp), %esi
addl $0x1, %esi
movq -0x108(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
leaq 0xd3d6(%rip), %rdi      # 0xe24b5
movl $0x1, %edx
leaq 0x1012e(%rip), %rcx     # 0xe5219
movb $0x1, %al
callq 0x490c0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd50b7
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x59ea0
movl -0x38(%rbp), %eax
subl -0x34(%rbp), %eax
addl $0x1, %eax
imull -0x30(%rbp), %eax
cvtsi2sd %eax, %xmm0
movq -0xd8(%rbp), %rax
movq (%rax), %rax
mulsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x59ea0
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x59ea0
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x59ea0
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x59ea0
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x59ea0
movl $0x0, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
jge 0xd51c6
movslq -0x2c(%rbp), %rcx
leaq -0x80(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x59ea0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd519a
movl -0x34(%rbp), %eax
imull -0x38(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x58(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
subl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd51fa
jp 0xd51fa
jmp 0xd5228
movsd -0x50(%rbp), %xmm0
divsd -0x58(%rbp), %xmm0
movl -0x3c(%rbp), %edi
movl -0x40(%rbp), %esi
callq 0x2ddf0
movaps %xmm0, %xmm1
movsd 0xcdfe(%rip), %xmm0     # 0xe2018
subsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0xd5231
movl $0x0, -0x4(%rbp)
jmp 0xd52a1
leaq 0x1400c(%rip), %rdi     # 0xe9244
callq 0x78f10
cmpl $0x2, %eax
jne 0xd528c
movsd -0x50(%rbp), %xmm0
divsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x198(%rbp)
movsd 0xcdbc(%rip), %xmm0     # 0xe2018
subsd -0x20(%rbp), %xmm0
movl -0x3c(%rbp), %edi
movl -0x40(%rbp), %esi
callq 0x2e160
movsd -0x198(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd5283
movl $0x0, -0x4(%rbp)
jmp 0xd52a1
movl $0x1, -0x4(%rbp)
jmp 0xd52a1
leaq 0x19153(%rip), %rdi     # 0xee3e6
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax)