// File: /workspace/github_c_makefile_star2_O1/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 $0x88, %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, 0x38(%rsp)
movslq %ecx, %r14
imulq $0x340, %r14, %rax      # imm = 0x340
movslq 0x30f20(%rdi,%rax), %rax
movq %rax, 0x70(%rsp)
movl %eax, %ebp
leaq 0x8f4f5(%rip), %rax     # 0xa36ab
movl $0x8, %edi
movl $0x8, %esi
movl $0x4, %edx
movq %r8, 0x78(%rsp)
movl %r8d, %ecx
movl %r9d, %r8d
movq %r9, 0x80(%rsp)
pushq $0x6
pushq %rax
callq 0x392af
addq $0x10, %rsp
movq %rax, %r12
testq %rbx, %rbx
je 0x14221
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 0x141ee
cvtsi2sd %eax, %xmm0
jmp 0x14225
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x8f479(%rip), %r14     # 0xa36ab
movl $0x4, %esi
movq 0x78(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
movl $0x14, %ecx
callq 0x39210
movq %rax, 0x40(%rsp)
movl $0x4, %esi
movq 0x80(%rsp), %rdi
movq %r14, %rdx
movl $0x15, %ecx
callq 0x39210
movq %rax, 0x20(%rsp)
movl $0x4, %esi
movq 0x70(%rsp), %rdi
movq %r14, %rdx
movl $0x16, %ecx
callq 0x39210
movq %rax, 0x18(%rsp)
movl $0x8, %edi
movl $0x4, %esi
movl %ebx, %edx
movq (%rsp), %rbx
movl %ebx, %ecx
movq %r14, %r8
movl $0x17, %r9d
callq 0x39245
movq %rax, 0x60(%rsp)
movl $0x8, %edi
movl $0x4, %esi
movl %r15d, %edx
movl %ebp, %ecx
movq %r14, %r8
movl $0x18, %r9d
callq 0x39245
movq %rax, 0x58(%rsp)
movl $0x8, %edi
movl $0x4, %esi
movl %ebx, %edx
movq 0x20(%rsp), %rbx
movl %ebp, %ecx
movq %r14, %r8
movq 0x18(%rsp), %r14
movl $0x19, %r9d
callq 0x39245
movq 0x40(%rsp), %r11
movq %rax, 0x50(%rsp)
testl %r15d, %r15d
jle 0x14385
xorl %eax, %eax
cmpl $0x0, (%rsp)
jle 0x1437d
xorl %ecx, %ecx
testl %ebp, %ebp
jle 0x14374
movq (%r12,%rax,8), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x60(%rsp), %rsi
movq (%rsi,%rax,8), %rsi
movq 0x58(%rsp), %rdi
movq (%rdi,%rax,8), %rdi
movq 0x50(%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 0x1433c
incq %rcx
cmpq (%rsp), %rcx
jne 0x14312
incq %rax
cmpq %r15, %rax
jne 0x1430a
testl %r15d, %r15d
movq %r13, 0x30(%rsp)
jle 0x1447b
xorpd %xmm5, %xmm5
xorl %r14d, %r14d
xorpd %xmm4, %xmm4
cmpl $0x0, (%rsp)
jle 0x1445a
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x1444d
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x14441
xorps %xmm0, %xmm0
cvtsi2sdl (%r11,%r14,4), %xmm0
movsd 0x10(%rsp), %xmm3
divsd %xmm3, %xmm0
mulsd %xmm3, %xmm0
movq 0x20(%rsp), %rcx
xorps %xmm2, %xmm2
cvtsi2sdl (%rcx,%r13,4), %xmm2
divsd %xmm3, %xmm2
mulsd %xmm0, %xmm2
movq 0x18(%rsp), %rcx
xorps %xmm1, %xmm1
cvtsi2sdl (%rcx,%rbx,4), %xmm1
divsd %xmm3, %xmm1
mulsd %xmm2, %xmm1
ucomisd %xmm5, %xmm1
jbe 0x14441
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%rsp)
divsd %xmm1, %xmm0
movsd %xmm4, 0x8(%rsp)
callq 0x4160
xorpd %xmm5, %xmm5
movsd 0x8(%rsp), %xmm4
movq 0x40(%rsp), %r11
mulsd 0x28(%rsp), %xmm0
addsd %xmm0, %xmm4
incq %rbx
cmpq %rbx, %rbp
jne 0x143b5
incq %r13
cmpq (%rsp), %r13
jne 0x143ab
incq %r14
cmpq %r15, %r14
jne 0x1439e
addsd %xmm4, %xmm4
movq 0x30(%rsp), %r13
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r14
jmp 0x1447f
xorpd %xmm4, %xmm4
movq (%rsp), %rcx
leal (%r15,%rcx), %eax
movl %r15d, %edi
imull %ecx, %edi
imull %ebp, %edi
addl %ebp, %eax
subl %eax, %edi
addl $0x2, %edi
movapd %xmm4, %xmm0
callq 0x1f4cd
movsd %xmm0, 0x8(%rsp)
leaq 0x8f174(%rip), %rdi     # 0xa3621
callq 0x536e7
testl %eax, %eax
je 0x144f5
leaq 0x8e46b(%rip), %rdi     # 0xa2928
callq 0x534b6
movl (%r13), %esi
movl 0x4(%r13), %edx
incl %esi
incl %edx
movq 0x38(%rsp), %rax
leal 0x1(%rax), %ecx
ucomisd 0x8(%rsp), %xmm0
leaq 0x8f1e5(%rip), %rax     # 0xa36c8
leaq 0x8f20f(%rip), %rdi     # 0xa36f9
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x145d4
xorpd %xmm4, %xmm4
xorl %r14d, %r14d
xorpd %xmm3, %xmm3
cmpl $0x0, (%rsp)
jle 0x145b3
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x145a6
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x1459a
movq 0x60(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%r13,4), %xmm0
movsd 0x10(%rsp), %xmm2
divsd %xmm2, %xmm0
mulsd %xmm2, %xmm0
movq 0x18(%rsp), %rcx
xorps %xmm1, %xmm1
cvtsi2sdl (%rcx,%rbx,4), %xmm1
divsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
jbe 0x1459a
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%rsp)
divsd %xmm1, %xmm0
movsd %xmm3, 0x8(%rsp)
callq 0x4160
xorpd %xmm4, %xmm4
movsd 0x8(%rsp), %xmm3
mulsd 0x28(%rsp), %xmm0
addsd %xmm0, %xmm3
incq %rbx
cmpq %rbx, %rbp
jne 0x14520
incq %r13
cmpq (%rsp), %r13
jne 0x14516
incq %r14
cmpq %r15, %r14
jne 0x14509
addsd %xmm3, %xmm3
movq 0x30(%rsp), %r13
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r14
jmp 0x145d8
xorpd %xmm3, %xmm3
leal -0x1(%r15), %ecx
movq (%rsp), %rax
leal -0x1(%rax), %edi
movl %edi, 0x68(%rsp)
movl %ecx, 0x4c(%rsp)
imull %ecx, %edi
movl %edi, 0x6c(%rsp)
movapd %xmm3, %xmm0
callq 0x1f4cd
movsd %xmm0, 0x8(%rsp)
leaq 0x8f019(%rip), %rdi     # 0xa3621
callq 0x536e7
testl %eax, %eax
je 0x14650
leaq 0x8e310(%rip), %rdi     # 0xa2928
callq 0x534b6
movq 0x38(%rsp), %rax
leal 0x1(%rax), %esi
movl (%r13), %edx
movl 0x4(%r13), %ecx
incl %edx
incl %ecx
ucomisd 0x8(%rsp), %xmm0
leaq 0x8f0f0(%rip), %rax     # 0xa372e
leaq 0x8f118(%rip), %rdi     # 0xa375d
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x1472f
xorpd %xmm4, %xmm4
xorl %r14d, %r14d
xorpd %xmm3, %xmm3
cmpl $0x0, (%rsp)
jle 0x1470e
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x14701
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x146f5
movq 0x58(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%rbx,4), %xmm0
movsd 0x10(%rsp), %xmm2
divsd %xmm2, %xmm0
mulsd %xmm2, %xmm0
movq 0x20(%rsp), %rcx
xorps %xmm1, %xmm1
cvtsi2sdl (%rcx,%r13,4), %xmm1
divsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
jbe 0x146f5
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%rsp)
divsd %xmm1, %xmm0
movsd %xmm3, 0x8(%rsp)
callq 0x4160
xorpd %xmm4, %xmm4
movsd 0x8(%rsp), %xmm3
mulsd 0x28(%rsp), %xmm0
addsd %xmm0, %xmm3
incq %rbx
cmpq %rbx, %rbp
jne 0x1467b
incq %r13
cmpq (%rsp), %r13
jne 0x14671
incq %r14
cmpq %r15, %r14
jne 0x14664
addsd %xmm3, %xmm3
movq 0x30(%rsp), %r13
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r14
jmp 0x14733
xorpd %xmm3, %xmm3
leal -0x1(%rbp), %eax
movl 0x4c(%rsp), %edi
movl %eax, 0x48(%rsp)
imull %eax, %edi
movl %edi, 0x4c(%rsp)
movapd %xmm3, %xmm0
callq 0x1f4cd
movsd %xmm0, 0x8(%rsp)
leaq 0x8eec6(%rip), %rdi     # 0xa3621
callq 0x536e7
testl %eax, %eax
je 0x147a3
leaq 0x8e1bd(%rip), %rdi     # 0xa2928
callq 0x534b6
movl (%r13), %ecx
movl 0x4(%r13), %esi
incl %esi
movq 0x38(%rsp), %rax
leal 0x1(%rax), %edx
incl %ecx
ucomisd 0x8(%rsp), %xmm0
leaq 0x8ef9d(%rip), %rax     # 0xa372e
leaq 0x8efc5(%rip), %rdi     # 0xa375d
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x14887
xorpd %xmm4, %xmm4
xorl %r14d, %r14d
xorpd %xmm3, %xmm3
movq 0x40(%rsp), %rdx
cmpl $0x0, (%rsp)
jle 0x14866
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x14859
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x1484d
movq 0x50(%rsp), %rcx
movq (%rcx,%r13,8), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%rbx,4), %xmm0
movsd 0x10(%rsp), %xmm2
divsd %xmm2, %xmm0
mulsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl (%rdx,%r14,4), %xmm1
divsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
jbe 0x1484d
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%rsp)
divsd %xmm1, %xmm0
movsd %xmm3, 0x8(%rsp)
callq 0x4160
xorpd %xmm4, %xmm4
movsd 0x8(%rsp), %xmm3
movq 0x40(%rsp), %rdx
mulsd 0x28(%rsp), %xmm0
addsd %xmm0, %xmm3
incq %rbx
cmpq %rbx, %rbp
jne 0x147d3
incq %r13
cmpq (%rsp), %r13
jne 0x147c9
incq %r14
cmpq %r15, %r14
jne 0x147bc
addsd %xmm3, %xmm3
movq 0x30(%rsp), %r13
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r14
jmp 0x1488b
xorpd %xmm3, %xmm3
movl 0x48(%rsp), %edi
imull 0x68(%rsp), %edi
movl %edi, 0x48(%rsp)
movapd %xmm3, %xmm0
callq 0x1f4cd
movsd %xmm0, 0x10(%rsp)
leaq 0x8ed73(%rip), %rdi     # 0xa3621
callq 0x536e7
testl %eax, %eax
je 0x148f6
leaq 0x8e06a(%rip), %rdi     # 0xa2928
callq 0x534b6
movl (%r13), %esi
movl 0x4(%r13), %ecx
incl %esi
movq 0x38(%rsp), %rax
leal 0x1(%rax), %edx
incl %ecx
ucomisd 0x10(%rsp), %xmm0
leaq 0x8ee4a(%rip), %rax     # 0xa372e
leaq 0x8ee72(%rip), %rdi     # 0xa375d
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x149cd
xorpd %xmm3, %xmm3
xorl %r14d, %r14d
xorpd %xmm2, %xmm2
cmpl $0x0, (%rsp)
jle 0x149ac
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x1499f
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x14997
movq 0x58(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x50(%rsp), %rdx
movq (%rdx,%r13,8), %rdx
movl (%rdx,%rbx,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 0x14997
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x10(%rsp)
callq 0x4160
xorpd %xmm3, %xmm3
movsd 0x10(%rsp), %xmm2
mulsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %rbx
cmpq %rbx, %rbp
jne 0x14921
incq %r13
cmpq (%rsp), %r13
jne 0x14917
incq %r14
cmpq %r15, %r14
jne 0x1490a
addsd %xmm2, %xmm2
movq 0x30(%rsp), %r13
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r14
jmp 0x149d1
xorpd %xmm2, %xmm2
movl 0x6c(%rsp), %edi
imull %ebp, %edi
movapd %xmm2, %xmm0
callq 0x1f4cd
movsd %xmm0, 0x10(%rsp)
leaq 0x8ec33(%rip), %rdi     # 0xa3621
callq 0x536e7
testl %eax, %eax
je 0x14a36
leaq 0x8df2a(%rip), %rdi     # 0xa2928
callq 0x534b6
movl (%r13), %esi
movl 0x4(%r13), %edx
incl %esi
incl %edx
movq 0x38(%rsp), %rax
leal 0x1(%rax), %ecx
ucomisd 0x10(%rsp), %xmm0
leaq 0x8ed6c(%rip), %rax     # 0xa3790
leaq 0x8edab(%rip), %rdi     # 0xa37d6
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x14b14
xorpd %xmm3, %xmm3
xorl %r14d, %r14d
xorpd %xmm2, %xmm2
movq 0x40(%rsp), %rsi
cmpl $0x0, (%rsp)
jle 0x14af3
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x14ae6
xorl %ebx, %ebx
movq (%r12,%r14,8), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbx,4), %eax
testl %eax, %eax
jle 0x14ade
movq 0x60(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x58(%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 0x14ade
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x10(%rsp)
callq 0x4160
xorpd %xmm3, %xmm3
movsd 0x10(%rsp), %xmm2
movq 0x40(%rsp), %rsi
mulsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %rbx
cmpq %rbx, %rbp
jne 0x14a66
incq %r13
cmpq (%rsp), %r13
jne 0x14a5c
incq %r14
cmpq %r15, %r14
jne 0x14a4f
addsd %xmm2, %xmm2
movq 0x30(%rsp), %r13
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r14
jmp 0x14b18
xorpd %xmm2, %xmm2
movl 0x48(%rsp), %edi
imull %r15d, %edi
movapd %xmm2, %xmm0
callq 0x1f4cd
movsd %xmm0, 0x10(%rsp)
leaq 0x8eaeb(%rip), %rdi     # 0xa3621
callq 0x536e7
testl %eax, %eax
je 0x14b7e
leaq 0x8dde2(%rip), %rdi     # 0xa2928
callq 0x534b6
movl (%r13), %ecx
movl 0x4(%r13), %esi
incl %esi
movq 0x38(%rsp), %rax
leal 0x1(%rax), %edx
incl %ecx
ucomisd 0x10(%rsp), %xmm0
leaq 0x8ec24(%rip), %rax     # 0xa3790
leaq 0x8ec63(%rip), %rdi     # 0xa37d6
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
testl %r15d, %r15d
jle 0x14c6c
movq %r15, 0x28(%rsp)
movl 0x70(%rsp), %r14d
xorpd %xmm3, %xmm3
xorl %r13d, %r13d
xorpd %xmm2, %xmm2
cmpl $0x0, (%rsp)
jle 0x14c44
xorl %ebx, %ebx
testl %ebp, %ebp
jle 0x14c33
xorl %r15d, %r15d
movq (%r12,%r13,8), %rax
movq (%rax,%rbx,8), %rax
movl (%rax,%r15,4), %eax
testl %eax, %eax
jle 0x14c2b
movq 0x60(%rsp), %rcx
movq (%rcx,%r13,8), %rcx
movq 0x50(%rsp), %rdx
movq (%rdx,%rbx,8), %rdx
movl (%rdx,%r15,4), %edx
imull (%rcx,%rbx,4), %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movq 0x20(%rsp), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%rbx,4), %xmm0
divsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jbe 0x14c2b
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
divsd %xmm1, %xmm0
movsd %xmm2, 0x10(%rsp)
callq 0x4160
xorpd %xmm3, %xmm3
movsd 0x10(%rsp), %xmm2
mulsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %r15
cmpq %r15, %r14
jne 0x14bb3
incq %rbx
cmpq 0x80(%rsp), %rbx
jne 0x14ba8
incq %r13
cmpq 0x78(%rsp), %r13
jne 0x14b9c
addsd %xmm2, %xmm2
movq 0x28(%rsp), %r15
movq 0x30(%rsp), %r13
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r14
jmp 0x14c70
xorpd %xmm2, %xmm2
movl 0x4c(%rsp), %edi
imull (%rsp), %edi
movapd %xmm2, %xmm0
callq 0x1f4cd
movsd %xmm0, 0x10(%rsp)
leaq 0x8e993(%rip), %rdi     # 0xa3621
callq 0x536e7
testl %eax, %eax
je 0x14cd5
leaq 0x8dc8a(%rip), %rdi     # 0xa2928
callq 0x534b6
movl (%r13), %esi
movl 0x4(%r13), %ecx
incl %esi
movq 0x38(%rsp), %rdx
incl %edx
incl %ecx
ucomisd 0x10(%rsp), %xmm0
leaq 0x8eacd(%rip), %rax     # 0xa3790
leaq 0x8eb0c(%rip), %rdi     # 0xa37d6
cmovaq %rax, %rdi
xorl %eax, %eax
callq 0x4030
movq 0x40(%rsp), %rdi
callq 0x39194
movq %rbx, %rdi
callq 0x39194
movq %r14, %rdi
callq 0x39194
movq 0x60(%rsp), %rdi
movl %r15d, %esi
callq 0x3915f
movq 0x58(%rsp), %rdi
movl %r15d, %esi
callq 0x3915f
movq 0x50(%rsp), %rdi
movq (%rsp), %rbx
movl %ebx, %esi
callq 0x3915f
movq %r12, %rdi
movl %r15d, %esi
movl %ebx, %edx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39199