// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/tests.c
// Function: ftest5x2
int ftest5x2(char **files, int *which, double confidence, double *real_confidence)
{
 /*Add divide by 0 check to num/denom */
 /*Last Changed 02.02.2004 added safemalloc*/
 /*Last Changed 16.05.2002*/
 /*One Tailed Test for H0: mu1 <= mu2 H1: mu1 > mu2*/
 /*Two Tailed Test for H0: mu1 = mu2 H1: mu1 != mu2*/
 /*confidence = 0.95 for alpha = 0.05, confidence = 0.99 for alpha = 0.01 etc.*/
 int counts[2], i, df1, df2;
 double **observations, *difference, *variance, *means, num, denom, sum;
 observations = read_observations_for_two_file(files, counts);
 if (!observations)
  {
   *real_confidence = 0.5;
   return 0;
  }
 if (counts[0] != counts[1])
  {
   printf(m1315);
   free_2d((void**)observations, 2);
   return 0;
  }
 difference = (double *)safemalloc(counts[0] * sizeof(double), "ftest5x2", 16);
 means = (double *)safemalloc((counts[0] / 2) * sizeof(double), "ftest5x2", 17);
 variance = (double *)safemalloc((counts[0] / 2) * sizeof(double), "ftest5x2", 18);
 sum = 0;
 num = 0;
 for (i = 0; i < counts[0]; i++)
  {
   difference[i] = observations[0][i] - observations[1][i];
   write_array_variables("aout", i + 1, 1, "f", difference[i]);
   num += difference[i] * difference[i];
   sum += difference[i];
  }
 if (sum > 0)
   (*which) = 1;
 else
   (*which) = 2;
 if (!get_parameter_o("accuracy")) 
   (*which) = 3 - (*which);    
 denom = 0;
 for (i = 0; i < (counts[0] / 2); i++)
  {
   means[i] = (difference[2 * i] + difference[2 * i + 1]) / 2;
   variance[i] = (difference[2 * i] - means[i]) * (difference[2 * i] - means[i]) + (difference[2 * i + 1] - means[i]) * (difference[2 * i + 1] - means[i]);
   denom += variance[i];
  }
 denom *= 2;
 free_2d((void**)observations, 2);
 safe_free(difference);
 safe_free(means);
 safe_free(variance);
 df1 = counts[0];
 df2 = counts[0] / 2;
 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
	 {
   if ((num / denom) < f_distribution_inverse(1 - confidence, df1, df2))
     return 0;
   else
     if (sum < 0)
      {
       (*real_confidence) = 1 - (*real_confidence);
       return 0;      
      }
     else
       return 1;
		}
 return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xd2020
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xd34e0
movq -0x28(%rbp), %rax
movsd 0xf4e8(%rip), %xmm0     # 0xe29b8
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xd3920
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
je 0xd3510
leaq 0x1aec0(%rip), %rdi     # 0xee3af
movb $0x0, %al
callq 0x4030
movq -0x48(%rbp), %rdi
movl $0x2, %esi
callq 0x52e20
movl $0x0, -0x4(%rbp)
jmp 0xd3920
movslq -0x30(%rbp), %rdi
shlq $0x3, %rdi
leaq 0x1aeb9(%rip), %rsi     # 0xee3d8
movl $0x10, %edx
callq 0x52d70
movq %rax, -0x50(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x1ae92(%rip), %rsi     # 0xee3d8
movl $0x11, %edx
callq 0x52d70
movq %rax, -0x60(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x1ae6b(%rip), %rsi     # 0xee3d8
movl $0x12, %edx
callq 0x52d70
movq %rax, -0x58(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x78(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0xd364a
movq -0x48(%rbp), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x34(%rbp), %esi
addl $0x1, %esi
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0xeecf(%rip), %rdi      # 0xe24b5
movl $0x1, %edx
leaq 0x11c27(%rip), %rcx     # 0xe5219
movb $0x1, %al
callq 0x490c0
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x68(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xd3592
movsd -0x78(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd3664
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
jmp 0xd366e
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
leaq 0x14d47(%rip), %rdi     # 0xe83bc
callq 0x79440
cmpl $0x0, %eax
jne 0xd3690
movq -0x18(%rbp), %rax
movl $0x3, %ecx
subl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x7c(%rbp), %eax
cmpl %ecx, %eax
jge 0xd37b7
movq -0x50(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0xf5b6(%rip), %xmm1     # 0xe2ca0
divsd %xmm1, %xmm0
movq -0x60(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x50(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movq -0x60(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm2
movq -0x50(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x60(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x50(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm3
movq -0x60(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x58(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x58(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xd369f
movsd 0xf4e1(%rip), %xmm0     # 0xe2ca0
mulsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x48(%rbp), %rdi
movl $0x2, %esi
callq 0x52e20
movq -0x50(%rbp), %rdi
callq 0x52e80
movq -0x60(%rbp), %rdi
callq 0x52e80
movq -0x58(%rbp), %rdi
callq 0x52e80
movl -0x30(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x3c(%rbp)
movsd -0x70(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd3818
jp 0xd3818
jmp 0xd3846
movsd -0x68(%rbp), %xmm0
divsd -0x70(%rbp), %xmm0
movl -0x38(%rbp), %edi
movl -0x3c(%rbp), %esi
callq 0x2ddf0
movaps %xmm0, %xmm1
movsd 0xe7e0(%rip), %xmm0     # 0xe2018
subsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0xd3852
movl $0x0, -0x4(%rbp)
jmp 0xd3920
leaq 0x159eb(%rip), %rdi     # 0xe9244
callq 0x78f10
cmpl $0x2, %eax
jne 0xd38ad
movsd -0x68(%rbp), %xmm0
divsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd 0xe79b(%rip), %xmm0     # 0xe2018
subsd -0x20(%rbp), %xmm0
movl -0x38(%rbp), %edi
movl -0x3c(%rbp), %esi
callq 0x2e160
movsd -0x88(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd38a4
movl $0x0, -0x4(%rbp)
jmp 0xd3920
movl $0x1, -0x4(%rbp)
jmp 0xd3920
movsd -0x68(%rbp), %xmm0
divsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0xe751(%rip), %xmm0     # 0xe2018
subsd -0x20(%rbp), %xmm0
movl -0x38(%rbp), %edi
movl -0x3c(%rbp), %esi
callq 0x2e160
movsd -0x90(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd38ee
movl $0x0, -0x4(%rbp)
jmp 0xd3920
xorps %xmm0, %xmm0
ucomisd -0x78(%rbp), %xmm0
jbe 0xd3919
movq -0x28(%rbp), %rax
movsd 0xe714(%rip), %xmm0     # 0xe2018
subsd (%rax), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xd3920
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)