// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/instance.c
// Function: distance_between_instances
double distance_between_instances(Instanceptr inst1, Instanceptr inst2)
{
 int i;
 double res = 0;
 if (mustrealize)
  {
   for (i = 0; i < current_dataset->multifeaturecount - 1; i++)
     res = res + pow((real_feature(inst1, i) - real_feature(inst2, i)), 2);
  }
 else
  {
   for (i = 0; i < current_dataset->featurecount; i++)
     switch (current_dataset->features[i].type)
      {
       case INTEGER:res += pow((inst1->values[i].intvalue - inst2->values[i].intvalue), 2);
                    break;
       case    REAL:res += pow((inst1->values[i].floatvalue - inst2->values[i].floatvalue), 2);
                    break;
       case  STRING:if (inst1->values[i].stringindex != inst2->values[i].stringindex)
                      res += 1;
                    break;
      }
  }
 return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
leaq 0x39dc75(%rip), %rax    # 0x3e1f74
cmpl $0x0, (%rax)
je 0x4438a
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
leaq 0xc1527(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x44385
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x42c40
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x42c40
movaps %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd 0x9e93c(%rip), %xmm1    # 0xe2ca0
callq 0x4290
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4430f
jmp 0x444a0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
leaq 0xc14a5(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x4449e
leaq 0xc148f(%rip), %rax     # 0x105840
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
testl %eax, %eax
je 0x443ea
jmp 0x443cf
movl -0x34(%rbp), %eax
subl $0x1, %eax
je 0x4445c
jmp 0x443dd
movl -0x34(%rbp), %eax
subl $0x2, %eax
je 0x44423
jmp 0x4448e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x14(%rbp), %rdx
subl (%rcx,%rdx,8), %eax
cvtsi2sd %eax, %xmm0
movsd 0x9e88e(%rip), %xmm1    # 0xe2ca0
callq 0x4290
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x4448e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd 0x9e855(%rip), %xmm1    # 0xe2ca0
callq 0x4290
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x4448e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x14(%rbp), %rdx
cmpl (%rcx,%rdx,8), %eax
je 0x4448c
movsd 0x9db96(%rip), %xmm0    # 0xe2018
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x4448e
jmp 0x44490
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x44391
jmp 0x444a0
movsd -0x20(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)