// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/data.c
// Function: find_linear_interpolation_data
Instanceptr find_linear_interpolation_data(Instanceptr data1, Instanceptr data2, double param)
{
 /*!Last Changed 01.05.2006 currently for classification*/
 int i;
 Instanceptr result;
 if (mustrealize)
  {
   result = empty_instance(current_dataset->multifeaturecount);
   for (i = 0; i < current_dataset->multifeaturecount; i++)
     if (i != current_dataset->classdefno)
       result->values[i].floatvalue = data1->values[i].floatvalue * param + data2->values[i].floatvalue * (1 - param);
   result->values[current_dataset->classdefno].stringindex = data1->values[current_dataset->classdefno].stringindex;
  }
 else
  {
   result = empty_instance(current_dataset->featurecount);
   for (i = 0; i < current_dataset->featurecount; i++)
     switch (current_dataset->features[i].type)
      {
       case  INTEGER:result->values[i].intvalue = (int) (data1->values[i].intvalue * param + data2->values[i].intvalue * (1 - param));
                     break;
       case   REGDEF:
       case     REAL:result->values[i].floatvalue = data1->values[i].floatvalue * param + data2->values[i].floatvalue * (1 - param);
                     break;   
       case CLASSDEF:
       case   STRING:result->values[i].stringindex = data1->values[i].stringindex;
                     break;
      }
  }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x398a33(%rip), %rax    # 0x3a9fa4
cmpl $0x0, (%rax)
leaq 0xbc2f5(%rip), %r15     # 0xcd870
movq (%r15), %rax
movsd 0x83f9a(%rip), %xmm1    # 0x95520
movsd %xmm0, 0x8(%rsp)
subsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
je 0x11612
movl 0x1c0(%rax), %edi
callq 0x140fd
movq (%r15), %rdx
xorl %ecx, %ecx
movsd 0x8(%rsp), %xmm2
movsd (%rsp), %xmm3
movslq 0x1c0(%rdx), %rsi
cmpq %rsi, %rcx
jge 0x115f5
movl 0x1407128(%rdx), %esi
cmpq %rsi, %rcx
je 0x115f0
movq (%rbx), %rdx
movq (%r14), %rsi
movsd (%rsi,%rcx,8), %xmm0
mulsd %xmm3, %xmm0
movsd (%rdx,%rcx,8), %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq (%rax), %rdx
movsd %xmm1, (%rdx,%rcx,8)
movq (%r15), %rdx
incq %rcx
jmp 0x115b2
movq (%rbx), %rcx
movslq 0x1407128(%rdx), %rdx
movl (%rcx,%rdx,8), %ecx
movq (%rax), %rsi
movl %ecx, (%rsi,%rdx,8)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl 0x1bc(%rax), %edi
callq 0x140fd
movl $0x61e1, %ecx           # imm = 0x61E1
xorl %edx, %edx
leaq 0x84d21(%rip), %rsi     # 0x9634c
movsd 0x8(%rsp), %xmm2
movsd (%rsp), %xmm3
movq (%r15), %rdi
movslq 0x1bc(%rdi), %r8
cmpq %r8, %rdx
jge 0x11608
movl (%rdi,%rcx,8), %edi
cmpq $0x4, %rdi
ja 0x116ad
movslq (%rsi,%rdi,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
movq (%rbx), %rdi
movl (%rdi,%rdx,8), %edi
jmp 0x116a6
movq (%rbx), %rdi
movq (%r14), %r8
movsd (%r8,%rdx,8), %xmm0
mulsd %xmm3, %xmm0
movsd (%rdi,%rdx,8), %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq (%rax), %rdi
movsd %xmm1, (%rdi,%rdx,8)
jmp 0x116ad
movq (%rbx), %rdi
cvtsi2sdl (%rdi,%rdx,8), %xmm0
movq (%r14), %rdi
cvtsi2sdl (%rdi,%rdx,8), %xmm1
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %edi
movq (%rax), %r8
movl %edi, (%r8,%rdx,8)
incq %rdx
addq $0x68, %rcx
jmp 0x11636