// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/indtests.c
// Function: one_independence_test
double ***one_independence_test(bayesiangraphptr mygraph)
{
	/*!Last Changed 02.02.2004 added safemalloc*/
 /*!Last Changed 27.02.2001*/
 double time;
 int i, j, k, total = mygraph->nodecount * (mygraph->nodecount - 1) * (mygraph->nodecount - 2) / 2;
 double ***result, walk = total / 80.0, c;
	char pst[READLINELENGTH];
 printf(m1270);
 time = -clock();
 result = (double***) safemalloc_3d(sizeof(double **), sizeof(double *), sizeof(double), mygraph->nodecount, mygraph->nodecount, mygraph->nodecount, "one_independence_test", 6);
 c = 0;
 for (i = 0; i < mygraph->nodecount; i++)
   for (j = 0; j < mygraph->nodecount; j++)
     for (k = 0; k < mygraph->nodecount; k++)
       if ((i != j) && (i != k) && (j != k))
        {
         if (i < j)
          {
           result[i][j][k] = one_independence_test_indexed(mygraph, i, j, k);
           c++;
          }
         else
           result[i][j][k] = result[j][i][k];
         while (c >= walk)
          {
           printf(".");
           c -= walk;
          }
        }
       else
         result[i][j][k] = 0;
 time += clock();
	set_precision(pst, "Time for 1 independence calculations:", "\n");
 printf(pst, time / CLOCKS_PER_SEC);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a148, %rsp          # imm = 0x7A148
movq %rdi, %rbx
movl 0x10(%rdi), %eax
leal -0x1(%rax), %ecx
imull %eax, %ecx
addl $-0x2, %eax
imull %ecx, %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm0
divsd 0x6d177(%rip), %xmm0    # 0x97d88
movsd %xmm0, 0x10(%rsp)
leaq 0x6ddcb(%rip), %rdi     # 0x989e9
callq 0x4090
callq 0x4250
movq %rax, 0x18(%rsp)
movl 0x10(%rbx), %ecx
leaq 0x6dd57(%rip), %rax     # 0x9898e
pushq $0x8
popq %rdi
movq %rdi, %rsi
movq %rdi, %rdx
movl %ecx, %r8d
movl %ecx, %r9d
pushq $0x6
pushq %rax
callq 0x3522d
movsd 0x20(%rsp), %xmm1
addq $0x10, %rsp
movq %rax, %r14
movl 0x10(%rbx), %eax
xorpd %xmm2, %xmm2
xorl %r12d, %r12d
pushq $0x2e
popq %rbp
movslq %eax, %rcx
cmpq %rcx, %r12
jge 0x2ad4c
xorl %r13d, %r13d
movslq %eax, %rcx
cmpq %rcx, %r13
jge 0x2ad44
xorl %r15d, %r15d
movslq %eax, %rcx
cmpq %rcx, %r15
jge 0x2ad3c
cmpq %r15, %r13
je 0x2ace1
cmpq %r13, %r12
je 0x2ace1
cmpq %r15, %r12
je 0x2ace1
cmpq %r13, %r12
jae 0x2acf0
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
movl %r15d, %ecx
movsd %xmm2, 0x8(%rsp)
callq 0x4838b
movsd 0x8(%rsp), %xmm2
movsd 0x10(%rsp), %xmm1
movq (%r14,%r12,8), %rax
movq (%rax,%r13,8), %rax
movsd %xmm0, (%rax,%r15,8)
addsd 0x6a841(%rip), %xmm2    # 0x95520
jmp 0x2ad2b
movq (%r14,%r12,8), %rcx
movq (%rcx,%r13,8), %rcx
andq $0x0, (%rcx,%r15,8)
jmp 0x2ad34
movq (%r14,%r13,8), %rax
movq (%rax,%r12,8), %rax
movsd (%rax,%r15,8), %xmm0
movq (%r14,%r12,8), %rax
movq (%rax,%r13,8), %rax
movsd %xmm0, (%rax,%r15,8)
jmp 0x2ad2b
movl %ebp, %edi
movsd %xmm2, 0x8(%rsp)
callq 0x40d0
movsd 0x8(%rsp), %xmm2
movsd 0x10(%rsp), %xmm1
subsd %xmm1, %xmm2
ucomisd %xmm1, %xmm2
jae 0x2ad0e
movl 0x10(%rbx), %eax
incq %r15
jmp 0x2ac86
incq %r13
jmp 0x2ac77
incq %r12
jmp 0x2ac68
movq 0x18(%rsp), %rax
negq %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x4250
cvtsi2sd %rax, %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x6dc28(%rip), %rsi     # 0x989a4
leaq 0x6e388(%rip), %rdx     # 0x9910b
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x35305
movsd 0x8(%rsp), %xmm0
divsd 0x6af8a(%rip), %xmm0    # 0x95d28
movq %rbx, %rdi
movb $0x1, %al
callq 0x4030
movq %r14, %rax
addq $0x7a148, %rsp          # imm = 0x7A148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)