// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/tests.c
// Function: combined5x2t
int combined5x2t(char **files, int *which, double confidence, double *real_confidence)
{
 /*Last Changed 06.10.2004*/
 /*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, df;
 double **observations, *difference, *variance, *means, num, denom, sum, upper, lower;
 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), "combined5x2t", 15);
 means = (double *)safemalloc((counts[0] / 2) * sizeof(double), "combined5x2t", 16);
 variance = (double *)safemalloc((counts[0] / 2) * sizeof(double), "combined5x2t", 17);
 sum = 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]);
   sum += difference[i];
  }
 if (sum > 0)
   (*which) = 1;
 else
   (*which) = 2;
 if (!get_parameter_o("accuracy")) 
   (*which) = 3 - (*which);    
 denom = 0;
 num = 0;
 for (i = 0; i < (counts[0] / 2); i++)
  {
   means[i] = (difference[2 * i] + difference[2 * i + 1]) / 2;
   num += means[i];
   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];
  }
 num *= sqrt(10);
 num /= 5;
 denom /= 5;
 denom = sqrt(denom);
 free_2d((void**)observations, 2);
 safe_free(difference);
 safe_free(means);
 safe_free(variance);
 df = counts[0] / 2;
 if (denom != 0)
  {
   sum = t_distribution(num / denom, df);
   (*real_confidence) = 1 - sum;
  }
 else
   return 0;
 if (get_parameter_i("tailed") == 1)
  {
   upper = t_distribution_inverse(1 - confidence, df);
   if ((num / denom) < upper)
     return 0;
   else
     return 1;
  }
 else
  {
   upper = t_distribution_inverse((1 - confidence) / 2, df);
   lower = -t_distribution_inverse((1 - confidence) / 2, df);
   if ((num / denom) > lower && (num / denom) < upper)
     return 0;
   else
     return 1;
  }
}

// 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, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xd2ff0
movq -0x28(%rbp), %rax
movsd 0xf9d8(%rip), %xmm0     # 0xe29b8
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xd347e
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
je 0xd3020
leaq 0x1b3b0(%rip), %rdi     # 0xee3af
movb $0x0, %al
callq 0x4030
movq -0x40(%rbp), %rdi
movl $0x2, %esi
callq 0x52e20
movl $0x0, -0x4(%rbp)
jmp 0xd347e
movslq -0x30(%rbp), %rdi
shlq $0x3, %rdi
leaq 0x1b39c(%rip), %rsi     # 0xee3cb
movl $0xf, %edx
callq 0x52d70
movq %rax, -0x48(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x1b375(%rip), %rsi     # 0xee3cb
movl $0x10, %edx
callq 0x52d70
movq %rax, -0x58(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x1b34e(%rip), %rsi     # 0xee3cb
movl $0x11, %edx
callq 0x52d70
movq %rax, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0xd3126
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x34(%rbp), %esi
addl $0x1, %esi
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0xf3c7(%rip), %rdi      # 0xe24b5
movl $0x1, %edx
leaq 0x1211f(%rip), %rcx     # 0xe5219
movb $0x1, %al
callq 0x490c0
movq -0x48(%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 0xd309a
movsd -0x70(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd3140
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
jmp 0xd314a
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
leaq 0x1526b(%rip), %rdi     # 0xe83bc
callq 0x79440
cmpl $0x0, %eax
jne 0xd316c
movq -0x18(%rbp), %rax
movl $0x3, %ecx
subl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jge 0xd32b8
movq -0x48(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x48(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0xfacc(%rip), %xmm1     # 0xe2ca0
divsd %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 -0x60(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x48(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x58(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movq -0x48(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movq -0x58(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm2
movq -0x48(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x58(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x48(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm3
movq -0x58(%rbp), %rax
movslq -0x34(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xd3183
movsd 0x11688(%rip), %xmm0    # 0xe4948
callq 0x42a0
mulsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
movsd 0x115c4(%rip), %xmm1    # 0xe48a0
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x68(%rbp), %xmm0
movsd 0x115ae(%rip), %xmm1    # 0xe48a0
divsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
callq 0x42a0
movsd %xmm0, -0x68(%rbp)
movq -0x40(%rbp), %rdi
movl $0x2, %esi
callq 0x52e20
movq -0x48(%rbp), %rdi
callq 0x52e80
movq -0x58(%rbp), %rdi
callq 0x52e80
movq -0x50(%rbp), %rdi
callq 0x52e80
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x38(%rbp)
movsd -0x68(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd3353
jp 0xd3353
jmp 0xd3381
movsd -0x60(%rbp), %xmm0
divsd -0x68(%rbp), %xmm0
movl -0x38(%rbp), %edi
callq 0x2f370
movsd %xmm0, -0x70(%rbp)
movsd 0xeca6(%rip), %xmm0     # 0xe2018
subsd -0x70(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0xd338d
movl $0x0, -0x4(%rbp)
jmp 0xd347e
leaq 0x15eb0(%rip), %rdi     # 0xe9244
callq 0x78f10
cmpl $0x1, %eax
jne 0xd33e5
movsd 0xec72(%rip), %xmm0     # 0xe2018
subsd -0x20(%rbp), %xmm0
movl -0x38(%rbp), %edi
callq 0x2f400
movsd %xmm0, -0x78(%rbp)
movsd -0x60(%rbp), %xmm1
divsd -0x68(%rbp), %xmm1
movsd -0x78(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd33d9
movl $0x0, -0x4(%rbp)
jmp 0xd347e
movl $0x1, -0x4(%rbp)
jmp 0xd347e
movsd 0xec2b(%rip), %xmm0     # 0xe2018
subsd -0x20(%rbp), %xmm0
movsd 0xf8a6(%rip), %xmm1     # 0xe2ca0
divsd %xmm1, %xmm0
movl -0x38(%rbp), %edi
callq 0x2f400
movsd %xmm0, -0x78(%rbp)
movsd 0xec05(%rip), %xmm0     # 0xe2018
subsd -0x20(%rbp), %xmm0
movsd 0xf880(%rip), %xmm1     # 0xe2ca0
divsd %xmm1, %xmm0
movl -0x38(%rbp), %edi
callq 0x2f400
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x60(%rbp), %xmm0
divsd -0x68(%rbp), %xmm0
ucomisd -0x80(%rbp), %xmm0
jbe 0xd3477
movsd -0x60(%rbp), %xmm1
divsd -0x68(%rbp), %xmm1
movsd -0x78(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd3477
movl $0x0, -0x4(%rbp)
jmp 0xd347e
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)