// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/dataset.c
// Function: volume_overlap_region
double volume_overlap_region(Datasetptr d)
{
 /* multiclass is handled by one vs one */
 Instanceptr traindata;
 int i, j, k;
 double result = 0, classsum, min1, max1, min2, max2;
 read_from_train_file(d, &traindata);
 realize(traindata);
 exchange_classdefno(d);
 result = 1;
 for (i = 0; i < d->multifeaturecount; i++)
  {
   if (i != d->classdefno)
    {   
     classsum = 0;
     for (j = 0; j < d->classno; j++)
      {
       for (k = j + 1; k < d->classno; k++)
        {
         find_bounds_of_feature_class(traindata, i, j, &min1, &max1);
         find_bounds_of_feature_class(traindata, i, k, &min2, &max2);
         classsum += (fmin(max1, max2) - fmax(min1, min2)) / (fmax(max1, max2) + fmin(min1, min2));
        }
      }
     result *= (classsum / (d->classno * (d->classno - 1) / 2));
    }
  }
 exchange_classdefno(d); 
 deallocate(traindata);
 traindata = NULL;
 return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x85c60
movq -0x10(%rbp), %rdi
callq 0x17090
movq -0x8(%rbp), %rdi
callq 0x1a880
movsd 0xbd4ed(%rip), %xmm0    # 0xe2018
movsd %xmm0, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c0(%rcx), %eax
jge 0x24cda
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1407128(%rcx), %eax
je 0x24cca
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x24c97
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x24c87
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
leaq -0x38(%rbp), %rcx
leaq -0x40(%rbp), %r8
callq 0x17a00
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x1c(%rbp), %edx
leaq -0x48(%rbp), %rcx
leaq -0x50(%rbp), %r8
callq 0x17a00
movsd -0x40(%rbp), %xmm3
movsd -0x50(%rbp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm0
cmpunordsd %xmm0, %xmm0
movaps %xmm0, %xmm1
pand %xmm4, %xmm1
minsd %xmm3, %xmm2
pandn %xmm2, %xmm0
por %xmm1, %xmm0
movsd -0x38(%rbp), %xmm4
movsd -0x48(%rbp), %xmm3
movaps %xmm3, %xmm5
movaps %xmm4, %xmm1
cmpunordsd %xmm1, %xmm1
movaps %xmm1, %xmm2
pand %xmm5, %xmm2
maxsd %xmm4, %xmm3
pandn %xmm3, %xmm1
por %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd -0x40(%rbp), %xmm4
movsd -0x50(%rbp), %xmm3
movaps %xmm3, %xmm5
movaps %xmm4, %xmm1
cmpunordsd %xmm1, %xmm1
movaps %xmm1, %xmm2
pand %xmm5, %xmm2
maxsd %xmm4, %xmm3
pandn %xmm3, %xmm1
por %xmm2, %xmm1
movsd -0x38(%rbp), %xmm5
movsd -0x48(%rbp), %xmm4
movaps %xmm4, %xmm6
movaps %xmm5, %xmm2
cmpunordsd %xmm2, %xmm2
movaps %xmm2, %xmm3
pand %xmm6, %xmm3
minsd %xmm5, %xmm4
pandn %xmm4, %xmm2
por %xmm3, %xmm2
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
addsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x24b85
jmp 0x24c89
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x24b6c
movsd -0x30(%rbp), %xmm0
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
imull %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
mulsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x24ccc
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x24b37
movq -0x8(%rbp), %rdi
callq 0x1a880
movq -0x10(%rbp), %rdi
callq 0x44510
movq $0x0, -0x10(%rbp)
movsd -0x28(%rbp), %xmm0
addq $0x50, %rsp
popq %rbp
retq
nop