// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/tests.c
// Function: signed_rank_test
int signed_rank_test(char **files, int *which, double confidence, double *real_confidence)
{
 /*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 i, counts[2], *iterator, count, total;
 double** observations, ranksum, current;
 Obs *obs = NULL;
 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;
  }
 obs = (Obs *)safemalloc(counts[0] * sizeof(Obs), "wilcoxon", 7);
 for (i = 0; i < counts[0]; i++)
  {
   obs[i].observation = fabs(observations[0][i] - observations[1][i]);
   obs[i].index = i;
   if (observations[0][i] > observations[1][i])
     obs[i].observation_no = 1;
   else
     obs[i].observation_no = -1;
   obs[i].rij = 0;
  }
 free_2d((void**)observations, 2);
 qsort(obs, counts[0], sizeof(Obs), sort_function_observation_ascending);
 assign_ranks_to_observations(obs, counts[0]);
 ranksum = 0;
 for (i = 0; i < counts[0]; i++)
   if (obs[i].observation_no == 1)
     ranksum += obs[i].rij;
 iterator = first_iterator(counts[0]);
 count = 0;
 total = 0;
 do{
   current = 0;
   for (i = 0; i < counts[0]; i++)
     if (iterator[i])
       current += obs[i].rij;
   total++;
   if (ranksum > current)
     count++;
 }while (next_iterator(iterator, counts[0], 1));
 safe_free(obs);
 if (get_parameter_i("tailed") == 2)
  {
   (*real_confidence) = count / (total + 0.0);
   if ((*real_confidence) < ((1 + confidence) / 2) && (*real_confidence) > ((1 - confidence) / 2))
     return 0;
   else
     return 1;
  }
 else
  {
   (*real_confidence) = count / (total + 0.0);
   if ((*real_confidence) < confidence)
     return 0;
   else
     return 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0xd2020
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0xd91a5
movq -0x28(%rbp), %rax
movsd 0x9823(%rip), %xmm0     # 0xe29b8
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xd94d2
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
je 0xd91d5
leaq 0x151fb(%rip), %rdi     # 0xee3af
movb $0x0, %al
callq 0x4030
movq -0x50(%rbp), %rdi
movl $0x2, %esi
callq 0x52e20
movl $0x0, -0x4(%rbp)
jmp 0xd94d2
movslq -0x34(%rbp), %rdi
shlq $0x5, %rdi
leaq 0x1538e(%rip), %rsi     # 0xee572
movl $0x7, %edx
callq 0x52d70
movq %rax, -0x68(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0xd92ce
movq -0x50(%rbp), %rax
movq (%rax), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movaps 0x9c33(%rip), %xmm1     # 0xe2e60
pand %xmm1, %xmm0
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movl -0x2c(%rbp), %ecx
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0xd9294
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0xd92a9
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd91f9
movq -0x50(%rbp), %rdi
movl $0x2, %esi
callq 0x52e20
movq -0x68(%rbp), %rdi
movslq -0x34(%rbp), %rsi
movl $0x20, %edx
leaq -0x85d90(%rip), %rcx    # 0x53560
callq 0x41f0
movq -0x68(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0xd13f0
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0xd9357
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0xd934a
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
addsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0xd934c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd9310
movl -0x34(%rbp), %edi
callq 0x51b20
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0xd93c1
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xd93b4
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
addsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0xd93b6
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd9380
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movsd -0x58(%rbp), %xmm0
ucomisd -0x60(%rbp), %xmm0
jbe 0xd93df
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xd93e1
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movl $0x1, %edx
callq 0x52330
cmpl $0x0, %eax
jne 0xd9371
movq -0x68(%rbp), %rdi
callq 0x52e80
leaq 0xfe39(%rip), %rdi      # 0xe9244
callq 0x78f10
cmpl $0x2, %eax
jne 0xd9492
cvtsi2sdl -0x44(%rbp), %xmm0
cvtsi2sdl -0x48(%rbp), %xmm1
xorps %xmm2, %xmm2
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
movsd (%rax), %xmm1
movsd 0x8bd6(%rip), %xmm0     # 0xe2018
addsd -0x20(%rbp), %xmm0
movsd 0x9851(%rip), %xmm2     # 0xe2ca0
divsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd9489
movq -0x28(%rbp), %rax
movsd (%rax), %xmm0
movsd 0x8baf(%rip), %xmm1     # 0xe2018
subsd -0x20(%rbp), %xmm1
movsd 0x982a(%rip), %xmm2     # 0xe2ca0
divsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd9489
movl $0x0, -0x4(%rbp)
jmp 0xd94d2
movl $0x1, -0x4(%rbp)
jmp 0xd94d2
cvtsi2sdl -0x44(%rbp), %xmm0
cvtsi2sdl -0x48(%rbp), %xmm1
xorps %xmm2, %xmm2
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd94cb
movl $0x0, -0x4(%rbp)
jmp 0xd94d2
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)