// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/data.c
// Function: covariance
matrix covariance(Instanceptr myptr, Instance currentmean)
{
 int i, j, size = data_size(myptr);
 matrix temp;
 Instanceptr current = myptr;
 temp = matrix_alloc(current_dataset->multifeaturecount - 1, current_dataset->multifeaturecount - 1);
 while (current)
  {
   for (i = 0; i < current_dataset->multifeaturecount - 1; i++)
     for (j = 0; j < current_dataset->multifeaturecount - 1; j++)
       temp.values[i][j] += (real_feature(current, i) - real_feature(&currentmean, i)) * (real_feature(current, j) - real_feature(&currentmean, j));
   current = current->next;
  }
 for (i = 0; i < current_dataset->multifeaturecount -1 ; i++)
   for (j = 0; j < current_dataset->multifeaturecount - 1; j++)
     temp.values[i][j] /= (size - 1);
 return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x449f0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0xed7d1(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1c0(%rax), %edi
subl $0x1, %edi
leaq 0xed7be(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1c0(%rax), %esi
subl $0x1, %esi
callq 0x57fc0
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x181ad
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
leaq 0xed779(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1819c
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
leaq 0xed754(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1818c
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x42c40
movq -0x48(%rbp), %rdi
movsd %xmm0, -0x60(%rbp)
movl -0x1c(%rbp), %esi
callq 0x42c40
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x30(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x42c40
movq -0x48(%rbp), %rdi
movsd %xmm0, -0x58(%rbp)
movl -0x20(%rbp), %esi
callq 0x42c40
movsd -0x58(%rbp), %xmm2
movaps %xmm0, %xmm1
movsd -0x50(%rbp), %xmm0
subsd %xmm1, %xmm2
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x180e2
jmp 0x1818e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x180bd
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x180ab
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
leaq 0xed682(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1822f
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
leaq 0xed661(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18222
movl -0x24(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x181d5
jmp 0x18224
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x181b4
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)