// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/data.c
// Function: within_class_matrix
matrix within_class_matrix(Instanceptr myptr)
{
 /*!Last Changed 26.01.2002*/
 int i,j,k;
 Instanceptr temp;
 int *c_counts;
 Instanceptr c_means; 
 matrix result, current_matrix;
 temp = myptr;
 result = matrix_alloc(current_dataset->multifeaturecount - 1, current_dataset->multifeaturecount - 1);
 current_matrix = matrix_alloc(current_dataset->multifeaturecount - 1, current_dataset->multifeaturecount - 1);
 c_counts = find_class_counts(temp);
 c_means = find_class_means(temp, c_counts);
 for (i = 0; i < current_dataset->classno; i++)
  {
   temp = myptr;
   while (temp)
    {
     if (give_classno(temp) == i)
       for (j = 0; j < current_dataset->multifeaturecount - 1; j++)
         for (k = 0; k < current_dataset->multifeaturecount - 1; k++)
           current_matrix.values[j][k] += (real_feature(temp, j) - real_feature(data_x(c_means, i), j)) * (real_feature(temp, k) - real_feature(data_x(c_means, i), k));
     temp = temp->next;
    }
   matrix_add(&result, current_matrix);
   for (j = 0; j < current_dataset->multifeaturecount - 1; j++)
     for (k = 0; k < current_dataset->multifeaturecount - 1; k++)
       current_matrix.values[j][k] = 0;
  }
 matrix_free(current_matrix);
 safe_free(c_counts);
 deallocate(c_means);
 return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0xec852(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1c0(%rax), %edi
subl $0x1, %edi
leaq 0xec83f(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1c0(%rax), %esi
subl $0x1, %esi
callq 0x57fc0
movq %rax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq 0xec80f(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1c0(%rax), %edi
subl $0x1, %edi
leaq 0xec7fc(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1c0(%rax), %esi
subl $0x1, %esi
callq 0x57fc0
movq %rax, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rdi
callq 0x183a0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x188c0
movq %rax, -0x40(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
leaq 0xec7a4(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x10(%rcx), %eax
jge 0x19275
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x191e2
movq -0x30(%rbp), %rdi
callq 0x43530
cmpl -0x1c(%rbp), %eax
jne 0x191d1
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
leaq 0xec762(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x191cf
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0xec73d(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x191bf
movq -0x30(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x42c40
movsd %xmm0, -0x88(%rbp)
movq -0x40(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x46c40
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x42c40
movaps %xmm0, %xmm1
movsd -0x88(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x42c40
movsd %xmm0, -0x80(%rbp)
movq -0x40(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x46c40
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x42c40
movsd -0x80(%rbp), %xmm2
movaps %xmm0, %xmm1
movsd -0x78(%rbp), %xmm0
subsd %xmm1, %xmm2
movq -0x48(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x190f9
jmp 0x191c1
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x190d4
jmp 0x191d1
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x190b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x10(%rbp), %rdi
callq 0x5ac40
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
leaq 0xec63c(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x19265
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0xec61b(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x19258
movq -0x48(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1921b
jmp 0x1925a
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x191fa
jmp 0x19267
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x19092
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x59ea0
movq -0x38(%rbp), %rdi
callq 0x52e80
movq -0x40(%rbp), %rdi
callq 0x44510
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)