// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/dataset.c
// Function: k_way_anova_dataset_discrete
void k_way_anova_dataset_discrete(Datasetptr d, Instanceptr data, int* features, int fdependent)
{
 /*!Last Changed 07.05.2004 only for three way currently*/
 int ***counts, *rowsums, *colsums, *depsums, datasize, **rcsums, **rfsums, **cfsums;
 int rowsize, colsize, dependentsize, i, j, k, row, col, index;
 double expected, sum, completeconf, onefactorconf, conditionalconf;
 Instanceptr tmp;
 rowsize = d->features[features[0]].valuecount;
 colsize = d->features[features[1]].valuecount;
 dependentsize = d->features[fdependent].valuecount;
 counts = (int***) safecalloc_3d(sizeof(int **), sizeof(int *), sizeof(int), rowsize, colsize, colsize, "k_way_anova_dataset_discrete", 6);
 tmp = data;
 datasize = 0;
 while (tmp)
  {
   row = tmp->values[features[0]].stringindex;
   col = tmp->values[features[1]].stringindex;
   index = tmp->values[fdependent].stringindex;
   counts[row][col][index]++;
   tmp = tmp->next;
   datasize++;
  }
 rowsums = safecalloc(rowsize, sizeof(int), "k_way_anova_dataset_discrete", 20);
 colsums = safecalloc(colsize, sizeof(int), "k_way_anova_dataset_discrete", 21);
 depsums = safecalloc(dependentsize, sizeof(int), "k_way_anova_dataset_discrete", 22);
 rcsums = (int**) safecalloc_2d(sizeof(int *), sizeof(int), rowsize, colsize, "k_way_anova_dataset_discrete", 23);
 rfsums = (int**) safecalloc_2d(sizeof(int *), sizeof(int), rowsize, dependentsize, "k_way_anova_dataset_discrete", 24);
 cfsums = (int**) safecalloc_2d(sizeof(int *), sizeof(int), colsize, dependentsize, "k_way_anova_dataset_discrete", 25);
 for (i = 0; i < rowsize; i++)
   for (j = 0; j < colsize; j++)
     for (k = 0; k < dependentsize; k++)
      {
       rowsums[i] += counts[i][j][k];
       colsums[j] += counts[i][j][k];
       depsums[k] += counts[i][j][k];
       rcsums[i][j] += counts[i][j][k];
       rfsums[i][k] += counts[i][j][k];
       cfsums[j][k] += counts[i][j][k];
      }
 /*Complete Independence*/
 sum = 0;
 for (i = 0; i < rowsize; i++)
   for (j = 0; j < colsize; j++)
     for (k = 0; k < dependentsize; k++)
       if (counts[i][j][k] > 0)
        {
         expected = datasize * (rowsums[i] / (datasize + 0.0)) * (colsums[j] / (datasize + 0.0)) * (depsums[k] / (datasize + 0.0));
         if (expected > 0)
           sum += counts[i][j][k] * log(counts[i][j][k] / expected);
        }
 sum *= 2;
 completeconf = chi_square(rowsize * colsize * dependentsize - rowsize - colsize - dependentsize + 2, sum);
 if (get_parameter_o("displayresulton"))
  {
   if (completeconf < get_parameter_f("confidencelevel"))
     printf(m1253, features[0] + 1, features[1] + 1, fdependent + 1);
   else
     printf(m1254, features[0] + 1, features[1] + 1, fdependent + 1);       
  }
 /*One Factor Independence*/
 /*One Factor Independence - Dependent Factor*/
 sum = 0;
 for (i = 0; i < rowsize; i++)
   for (j = 0; j < colsize; j++)
     for (k = 0; k < dependentsize; k++)
       if (counts[i][j][k] > 0)
        {
         expected = datasize * (rcsums[i][j] / (datasize + 0.0)) * (depsums[k] / (datasize + 0.0));
         if (expected > 0)
           sum += counts[i][j][k] * log(counts[i][j][k] / expected);
        }
 sum *= 2;
 onefactorconf = chi_square((rowsize - 1) * (colsize - 1), sum);
 if (get_parameter_o("displayresulton"))
  {
   if (onefactorconf < get_parameter_f("confidencelevel"))
     printf(m1255, fdependent + 1, features[0] + 1, features[1] + 1);
   else
     printf(m1256, fdependent + 1, features[0] + 1, features[1] + 1);
  }
 /*One Factor Independence - Factor 1*/
 sum = 0;
 for (i = 0; i < rowsize; i++)
   for (j = 0; j < colsize; j++)
     for (k = 0; k < dependentsize; k++)
       if (counts[i][j][k] > 0)
        {
         expected = datasize * (rfsums[i][k] / (datasize + 0.0)) * (colsums[j] / (datasize + 0.0));
         if (expected > 0)
           sum += counts[i][j][k] * log(counts[i][j][k] / expected);
        }
 sum *= 2;
 onefactorconf = chi_square((rowsize - 1) * (dependentsize - 1), sum);
 if (get_parameter_o("displayresulton"))
  {
   if (onefactorconf < get_parameter_f("confidencelevel"))
     printf(m1255, features[1] + 1, fdependent + 1, features[0] + 1);
   else
     printf(m1256, features[1] + 1, fdependent + 1, features[0] + 1);
  }
 /*One Factor Independence - Factor 2*/
 sum = 0;
 for (i = 0; i < rowsize; i++)
   for (j = 0; j < colsize; j++)
     for (k = 0; k < dependentsize; k++)
       if (counts[i][j][k] > 0)
        {
         expected = datasize * (cfsums[j][k] / (datasize + 0.0)) * (rowsums[i] / (datasize + 0.0));
         if (expected > 0)
           sum += counts[i][j][k] * log(counts[i][j][k] / expected);
        }
 sum *= 2;
 onefactorconf = chi_square((dependentsize - 1) * (colsize - 1), sum);
 if (get_parameter_o("displayresulton"))
  {  
   if (onefactorconf < get_parameter_f("confidencelevel"))
     printf(m1255, features[0] + 1, fdependent + 1, features[1] + 1);
   else
     printf(m1256, features[0] + 1, fdependent + 1, features[1] + 1);
  }
 /*Conditional Independence*/
 /*Conditional Independence - Dependent Factor*/
 sum = 0;
 for (i = 0; i < rowsize; i++)
   for (j = 0; j < colsize; j++)
     for (k = 0; k < dependentsize; k++)
       if (counts[i][j][k] > 0)
        {
         expected = rfsums[i][k] * cfsums[j][k] / (depsums[k] + 0.0);
         if (expected > 0)
           sum += counts[i][j][k] * log(counts[i][j][k] / expected);
        }
 sum *= 2;
 conditionalconf = chi_square((rowsize - 1) * (colsize - 1) * dependentsize, sum);
 if (get_parameter_o("displayresulton"))
  {
   if (conditionalconf < get_parameter_f("confidencelevel"))
     printf(m1257, features[0] + 1, features[1] + 1, fdependent + 1);
   else
     printf(m1258, features[0] + 1, features[1] + 1, fdependent + 1);
  }
 /*Conditional Independence - 1 Factor*/
 sum = 0;
 for (i = 0; i < rowsize; i++)
   for (j = 0; j < colsize; j++)
     for (k = 0; k < dependentsize; k++)
       if (counts[i][j][k] > 0)
        {
         expected = rcsums[i][j] * rfsums[i][k] / (rowsums[i] + 0.0);
         if (expected > 0)
           sum += counts[i][j][k] * log(counts[i][j][k] / expected);
        }
 sum *= 2;
 conditionalconf = chi_square((dependentsize - 1) * (colsize - 1) * rowsize, sum);
 if (get_parameter_o("displayresulton"))
  {
   if (conditionalconf < get_parameter_f("confidencelevel"))
     printf(m1257, features[1] + 1, fdependent + 1, features[0] + 1);
   else
     printf(m1258, features[1] + 1, fdependent + 1, features[0] + 1);
  }
 /*Conditional Independence - 2 Factor*/
 sum = 0;
 for (i = 0; i < rowsize; i++)
   for (j = 0; j < colsize; j++)
     for (k = 0; k < dependentsize; k++)
       if (counts[i][j][k] > 0)
        {
         expected = rcsums[i][j] * cfsums[j][k] / (colsums[j] + 0.0);
         if (expected > 0)
           sum += counts[i][j][k] * log(counts[i][j][k] / expected);
        }
 sum *= 2;
 conditionalconf = chi_square((rowsize - 1) * (dependentsize - 1) * colsize, sum);
 if (get_parameter_o("displayresulton"))
  {
   if (conditionalconf < get_parameter_f("confidencelevel"))
     printf(m1257, features[0] + 1, fdependent + 1, features[1] + 1);
   else
     printf(m1258, features[0] + 1, fdependent + 1, features[1] + 1);
  }
 safe_free(rowsums);
 safe_free(colsums);
 safe_free(depsums);
 free_2d((void**)rcsums, rowsize);
 free_2d((void**)rfsums, rowsize);
 free_2d((void**)cfsums, colsize);
 free_3d((void***)counts, rowsize, colsize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r13
movq %rsi, %rbx
movslq (%rdx), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
movl 0x30f20(%rdi,%rax), %r15d
movslq %r15d, %r8
movslq 0x4(%rdx), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
movl 0x30f20(%rdi,%rax), %eax
movq %rax, (%rsp)
movslq %eax, %r9
movq %rcx, 0x40(%rsp)
movslq %ecx, %r14
imulq $0x340, %r14, %rax      # imm = 0x340
movslq 0x30f20(%rdi,%rax), %rax
movq %rax, 0x90(%rsp)
movl %eax, %ebp
leaq 0x9252b(%rip), %rax     # 0xa66ef
movl $0x8, %edi
movl $0x8, %esi
movl $0x4, %edx
movq %r8, 0x98(%rsp)
movl %r8d, %ecx
movl %r9d, %r8d
movq %r9, 0xa0(%rsp)
pushq $0x6
pushq %rax
callq 0x3a29b
addq $0x10, %rsp
movq %rax, %r12
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
testq %rbx, %rbx
je 0x14243
xorl %eax, %eax
movq (%rbx), %rcx
movslq (%r13), %rdx
movslq (%rcx,%rdx,8), %rdx
movslq 0x4(%r13), %rsi
movslq (%rcx,%rsi,8), %rsi
movslq (%rcx,%r14,8), %rcx
movq (%r12,%rdx,8), %rdx
movq (%rdx,%rsi,8), %rdx
incl (%rdx,%rcx,4)
movq 0x10(%rbx), %rbx
incl %eax
testq %rbx, %rbx
jne 0x14209
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movapd %xmm0, 0x20(%rsp)
leaq 0x924a5(%rip), %r14     # 0xa66ef
movl $0x4, %esi
movq 0x98(%rsp), %rdi
movq %r14, %rdx
movl $0x14, %ecx
callq 0x3a1fc
movq %rax, 0x48(%rsp)
movl $0x4, %esi
movq 0xa0(%rsp), %rdi
movq %r14, %rdx
movl $0x15, %ecx
callq 0x3a1fc
movq %rax, 0x18(%rsp)
movl $0x4, %esi
movq 0x90(%rsp), %rdi
movq %r14, %rdx
movl $0x16, %ecx
callq 0x3a1fc
movq %rax, 0x10(%rsp)
movl $0x8, %edi
movl $0x4, %esi
movl %r15d, %edx
movq (%rsp), %rbx
movl %ebx, %ecx
movq %r14, %r8
movl $0x17, %r9d
callq 0x3a231
movq %rax, 0x68(%rsp)
movl $0x8, %edi
movl $0x4, %esi
movl %r15d, %edx
movl %ebp, %ecx
movq %r14, %r8
movl $0x18, %r9d
callq 0x3a231
movq %rax, 0x60(%rsp)
movl $0x8, %edi
movl $0x4, %esi
movl %ebx, %edx
movl %ebp, %ecx
movq %r14, %r8
movl $0x19, %r9d
callq 0x3a231
movq %rax, 0x58(%rsp)
testl %r15d, %r15d
movq %r13, 0x38(%rsp)
jle 0x144ba
xorl %eax, %eax
movq 0x48(%rsp), %r11
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
xorpd %xmm3, %xmm3
cmpl $0x0, (%rsp)
jle 0x143a6
xorl %ecx, %ecx
testl %ebp, %ebp
jle 0x1439d
movq (%r12,%rax,8), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x68(%rsp), %rsi
movq (%rsi,%rax,8), %rsi
movq 0x60(%rsp), %rdi
movq (%rdi,%rax,8), %rdi
movq 0x58(%rsp), %r8
movq (%r8,%rcx,8), %r8
xorl %r9d, %r9d
movl (%rdx,%r9,4), %r10d
addl %r10d, (%r11,%rax,4)
movl (%rdx,%r9,4), %r10d
addl %r10d, (%rbx,%rcx,4)
movl (%rdx,%r9,4), %r10d
addl %r10d, (%r14,%r9,4)
movl (%rdx,%r9,4), %r10d
addl %r10d, (%rsi,%rcx,4)
movl (%rdx,%r9,4), %r10d
addl %r10d, (%rdi,%r9,4)
movl (%rdx,%r9,4), %r10d
addl %r10d, (%r8,%r9,4)
incq %r9
cmpq %r9, %rbp
jne 0x14365
incq %rcx
cmpq (%rsp), %rcx
jne 0x1433b
incq %rax
cmpq %r15, %rax
jne 0x14333
testl %r15d, %r15d
jle 0x144c8
movapd 0x20(%rsp), %xmm4
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
xorpd %xmm5, %xmm5
xorl %r14d, %r14d
xorpd %xmm3, %xmm3
movapd %xmm4, 0x70(%rsp)
cmpl $0x0, (%rsp)
jle 0x14499
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x1448c
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x14480
xorps %xmm0, %xmm0
cvtsi2sdl (%r11,%r14,4), %xmm0
movapd 0x20(%rsp), %xmm1
divsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movq 0x10(%rsp), %rcx
movss (%rcx,%rbx,4), %xmm1
movq 0x18(%rsp), %rcx
movss (%rcx,%r13,4), %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvtdq2pd %xmm2, %xmm1
divpd %xmm4, %xmm1
mulsd %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
mulsd %xmm0, %xmm1
ucomisd %xmm5, %xmm1
jbe 0x14480
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x30(%rsp)
divsd %xmm1, %xmm0
movsd %xmm3, 0x8(%rsp)
callq 0x4160
xorpd %xmm5, %xmm5
movapd 0x70(%rsp), %xmm4
movsd 0x8(%rsp), %xmm3
movq 0x48(%rsp), %r11
mulsd 0x30(%rsp), %xmm0
addsd %xmm0, %xmm3
incq %rbx
cmpq %rbx, %rbp
jne 0x143e9
incq %r13
cmpq (%rsp), %r13
jne 0x143df
incq %r14
cmpq %r15, %r14
jne 0x143d2
addsd %xmm3, %xmm3
movq 0x38(%rsp), %r13
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
jmp 0x144c8
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
xorpd %xmm3, %xmm3
movl %r15d, %edi
movq (%rsp), %rax
imull %eax, %edi
imull %ebp, %edi
addl %r15d, %eax
addl %ebp, %eax
subl %eax, %edi
addl $0x2, %edi
movapd %xmm3, %xmm0
callq 0x1fc11
movsd %xmm0, 0x8(%rsp)
leaq 0x92170(%rip), %rdi     # 0xa6665
callq 0x54bec
testl %eax, %eax
je 0x1453d
leaq 0x91423(%rip), %rdi     # 0xa5928
callq 0x549ba
movl (%r13), %esi
movl 0x4(%r13), %edx
incl %esi
incl %edx
movq 0x40(%rsp), %rax
leal 0x1(%rax), %ecx
ucomisd 0x8(%rsp), %xmm0
leaq 0x921e1(%rip), %rax     # 0xa670c
leaq 0x9220b(%rip), %rdi     # 0xa673d
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x14633
movapd 0x20(%rsp), %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
xorpd %xmm4, %xmm4
xorl %r14d, %r14d
xorpd %xmm2, %xmm2
movapd %xmm3, 0x70(%rsp)
cmpl $0x0, (%rsp)
jle 0x14612
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x14605
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x145f9
movq 0x68(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x10(%rsp), %rdx
movss (%rdx,%rbx,4), %xmm0
movss (%rcx,%r13,4), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm1
divpd %xmm3, %xmm1
movapd %xmm1, %xmm0
mulsd 0x20(%rsp), %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
mulsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
jbe 0x145f9
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x30(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x4160
xorpd %xmm4, %xmm4
movapd 0x70(%rsp), %xmm3
movsd 0x8(%rsp), %xmm2
mulsd 0x30(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %rbx
cmpq %rbx, %rbp
jne 0x14578
incq %r13
cmpq (%rsp), %r13
jne 0x1456e
incq %r14
cmpq %r15, %r14
jne 0x14561
addsd %xmm2, %xmm2
movq 0x38(%rsp), %r13
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
jmp 0x14637
xorpd %xmm2, %xmm2
leal -0x1(%r15), %ecx
movq (%rsp), %rax
leal -0x1(%rax), %edi
movl %edi, 0x88(%rsp)
movl %ecx, 0x54(%rsp)
imull %ecx, %edi
movl %edi, 0x8c(%rsp)
movapd %xmm2, %xmm0
callq 0x1fc11
movsd %xmm0, 0x8(%rsp)
leaq 0x91ff8(%rip), %rdi     # 0xa6665
callq 0x54bec
testl %eax, %eax
je 0x146b5
leaq 0x912ab(%rip), %rdi     # 0xa5928
callq 0x549ba
movq 0x40(%rsp), %rax
leal 0x1(%rax), %esi
movl (%r13), %edx
movl 0x4(%r13), %ecx
incl %edx
incl %ecx
ucomisd 0x8(%rsp), %xmm0
leaq 0x920cf(%rip), %rax     # 0xa6772
leaq 0x920f7(%rip), %rdi     # 0xa67a1
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x147ab
movapd 0x20(%rsp), %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
xorpd %xmm4, %xmm4
xorl %r14d, %r14d
xorpd %xmm2, %xmm2
movapd %xmm3, 0x70(%rsp)
cmpl $0x0, (%rsp)
jle 0x1478a
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x1477d
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x14771
movq 0x60(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x18(%rsp), %rdx
movss (%rdx,%r13,4), %xmm0
movss (%rcx,%rbx,4), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm1
divpd %xmm3, %xmm1
movapd %xmm1, %xmm0
mulsd 0x20(%rsp), %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
mulsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
jbe 0x14771
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x30(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x4160
xorpd %xmm4, %xmm4
movapd 0x70(%rsp), %xmm3
movsd 0x8(%rsp), %xmm2
mulsd 0x30(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %rbx
cmpq %rbx, %rbp
jne 0x146f0
incq %r13
cmpq (%rsp), %r13
jne 0x146e6
incq %r14
cmpq %r15, %r14
jne 0x146d9
addsd %xmm2, %xmm2
movq 0x38(%rsp), %r13
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
jmp 0x147af
xorpd %xmm2, %xmm2
leal -0x1(%rbp), %eax
movl 0x54(%rsp), %edi
movl %eax, 0x50(%rsp)
imull %eax, %edi
movl %edi, 0x54(%rsp)
movapd %xmm2, %xmm0
callq 0x1fc11
movsd %xmm0, 0x8(%rsp)
leaq 0x91e8e(%rip), %rdi     # 0xa6665
callq 0x54bec
testl %eax, %eax
je 0x1481f
leaq 0x91141(%rip), %rdi     # 0xa5928
callq 0x549ba
movl (%r13), %ecx
movl 0x4(%r13), %esi
incl %esi
movq 0x40(%rsp), %rax
leal 0x1(%rax), %edx
incl %ecx
ucomisd 0x8(%rsp), %xmm0
leaq 0x91f65(%rip), %rax     # 0xa6772
leaq 0x91f8d(%rip), %rdi     # 0xa67a1
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x1491a
movapd 0x20(%rsp), %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
xorpd %xmm4, %xmm4
xorl %r14d, %r14d
xorpd %xmm2, %xmm2
movq 0x48(%rsp), %rdx
movapd %xmm3, 0x70(%rsp)
cmpl $0x0, (%rsp)
jle 0x148f9
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x148ec
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x148e0
movq 0x58(%rsp), %rcx
movq (%rcx,%r13,8), %rcx
movss (%rdx,%r14,4), %xmm0
movss (%rcx,%rbx,4), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm1
divpd %xmm3, %xmm1
movapd %xmm1, %xmm0
mulsd 0x20(%rsp), %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
mulsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
jbe 0x148e0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x30(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x4160
xorpd %xmm4, %xmm4
movapd 0x70(%rsp), %xmm3
movsd 0x8(%rsp), %xmm2
movq 0x48(%rsp), %rdx
mulsd 0x30(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %rbx
cmpq %rbx, %rbp
jne 0x1485f
incq %r13
cmpq (%rsp), %r13
jne 0x14855
incq %r14
cmpq %r15, %r14
jne 0x14848
addsd %xmm2, %xmm2
movq 0x38(%rsp), %r13
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
jmp 0x1491e
xorpd %xmm2, %xmm2
movl 0x50(%rsp), %edi
imull 0x88(%rsp), %edi
movl %edi, 0x50(%rsp)
movapd %xmm2, %xmm0
callq 0x1fc11
movsd %xmm0, 0x20(%rsp)
leaq 0x91d21(%rip), %rdi     # 0xa6665
callq 0x54bec
testl %eax, %eax
je 0x1498c
leaq 0x90fd4(%rip), %rdi     # 0xa5928
callq 0x549ba
movl (%r13), %esi
movl 0x4(%r13), %ecx
incl %esi
movq 0x40(%rsp), %rax
leal 0x1(%rax), %edx
incl %ecx
ucomisd 0x20(%rsp), %xmm0
leaq 0x91df8(%rip), %rax     # 0xa6772
leaq 0x91e20(%rip), %rdi     # 0xa67a1
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x14a63
xorpd %xmm3, %xmm3
xorl %r14d, %r14d
xorpd %xmm2, %xmm2
cmpl $0x0, (%rsp)
jle 0x14a42
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x14a35
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x14a2d
movq 0x60(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x58(%rsp), %rdx
movq (%rdx,%r13,8), %rdx
movl (%rdx,%rbx,4), %edx
imull (%rcx,%rbx,4), %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movq 0x10(%rsp), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%rbx,4), %xmm0
divsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jbe 0x14a2d
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x20(%rsp)
callq 0x4160
xorpd %xmm3, %xmm3
movsd 0x20(%rsp), %xmm2
mulsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %rbx
cmpq %rbx, %rbp
jne 0x149b7
incq %r13
cmpq (%rsp), %r13
jne 0x149ad
incq %r14
cmpq %r15, %r14
jne 0x149a0
addsd %xmm2, %xmm2
movq 0x38(%rsp), %r13
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
jmp 0x14a67
xorpd %xmm2, %xmm2
movl 0x8c(%rsp), %edi
imull %ebp, %edi
movapd %xmm2, %xmm0
callq 0x1fc11
movsd %xmm0, 0x20(%rsp)
leaq 0x91bde(%rip), %rdi     # 0xa6665
callq 0x54bec
testl %eax, %eax
je 0x14acf
leaq 0x90e91(%rip), %rdi     # 0xa5928
callq 0x549ba
movl (%r13), %esi
movl 0x4(%r13), %edx
incl %esi
incl %edx
movq 0x40(%rsp), %rax
leal 0x1(%rax), %ecx
ucomisd 0x20(%rsp), %xmm0
leaq 0x91d17(%rip), %rax     # 0xa67d4
leaq 0x91d56(%rip), %rdi     # 0xa681a
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x14bad
xorpd %xmm3, %xmm3
xorl %r14d, %r14d
xorpd %xmm2, %xmm2
movq 0x48(%rsp), %rsi
cmpl $0x0, (%rsp)
jle 0x14b8c
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x14b7f
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x14b77
movq 0x68(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x60(%rsp), %rdx
movq (%rdx,%r14,8), %rdx
movl (%rdx,%rbx,4), %edx
imull (%rcx,%r13,4), %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl (%rsi,%r14,4), %xmm0
divsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jbe 0x14b77
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x20(%rsp)
callq 0x4160
xorpd %xmm3, %xmm3
movsd 0x20(%rsp), %xmm2
movq 0x48(%rsp), %rsi
mulsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %rbx
cmpq %rbx, %rbp
jne 0x14aff
incq %r13
cmpq (%rsp), %r13
jne 0x14af5
incq %r14
cmpq %r15, %r14
jne 0x14ae8
addsd %xmm2, %xmm2
movq 0x38(%rsp), %r13
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
jmp 0x14bb1
xorpd %xmm2, %xmm2
movl 0x50(%rsp), %edi
imull %r15d, %edi
movapd %xmm2, %xmm0
callq 0x1fc11
movsd %xmm0, 0x20(%rsp)
leaq 0x91a96(%rip), %rdi     # 0xa6665
callq 0x54bec
testl %eax, %eax
je 0x14c17
leaq 0x90d49(%rip), %rdi     # 0xa5928
callq 0x549ba
movl (%r13), %ecx
movl 0x4(%r13), %esi
incl %esi
movq 0x40(%rsp), %rax
leal 0x1(%rax), %edx
incl %ecx
ucomisd 0x20(%rsp), %xmm0
leaq 0x91bcf(%rip), %rax     # 0xa67d4
leaq 0x91c0e(%rip), %rdi     # 0xa681a
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x14d0b
movq %r15, 0x30(%rsp)
movl 0x90(%rsp), %r14d
xorpd %xmm3, %xmm3
xorl %r13d, %r13d
xorpd %xmm2, %xmm2
cmpl $0x0, (%rsp)
jle 0x14ce0
xorl %ebx, %ebx
testl %ebp, %ebp
jle 0x14ccf
xorl %r15d, %r15d
movq (%r12,%r13,8), %rax
movq (%rax,%rbx,8), %rax
movl (%rax,%r15,4), %eax
testl %eax, %eax
jle 0x14cc7
movq 0x68(%rsp), %rcx
movq (%rcx,%r13,8), %rcx
movq 0x58(%rsp), %rdx
movq (%rdx,%rbx,8), %rdx
movl (%rdx,%r15,4), %edx
imull (%rcx,%rbx,4), %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movq 0x18(%rsp), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%rbx,4), %xmm0
divsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jbe 0x14cc7
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x20(%rsp)
callq 0x4160
xorpd %xmm3, %xmm3
movsd 0x20(%rsp), %xmm2
mulsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %r15
cmpq %r15, %r14
jne 0x14c4f
incq %rbx
cmpq 0xa0(%rsp), %rbx
jne 0x14c44
incq %r13
cmpq 0x98(%rsp), %r13
jne 0x14c38
addsd %xmm2, %xmm2
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r13
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
jmp 0x14d0f
xorpd %xmm2, %xmm2
movl 0x54(%rsp), %edi
imull (%rsp), %edi
movapd %xmm2, %xmm0
callq 0x1fc11
movsd %xmm0, 0x20(%rsp)
leaq 0x91938(%rip), %rdi     # 0xa6665
callq 0x54bec
testl %eax, %eax
je 0x14d74
leaq 0x90beb(%rip), %rdi     # 0xa5928
callq 0x549ba
movl (%r13), %esi
movl 0x4(%r13), %ecx
incl %esi
movq 0x40(%rsp), %rdx
incl %edx
incl %ecx
ucomisd 0x20(%rsp), %xmm0
leaq 0x91a72(%rip), %rax     # 0xa67d4
leaq 0x91ab1(%rip), %rdi     # 0xa681a
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
movq 0x48(%rsp), %rdi
callq 0x3a180
movq %rbx, %rdi
callq 0x3a180
movq %r14, %rdi
callq 0x3a180
movq 0x68(%rsp), %rdi
movl %r15d, %esi
callq 0x3a14b
movq 0x60(%rsp), %rdi
movl %r15d, %esi
callq 0x3a14b
movq 0x58(%rsp), %rdi
movq (%rsp), %rbx
movl %ebx, %esi
callq 0x3a14b
movq %r12, %rdi
movl %r15d, %esi
movl %ebx, %edx
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a185