// File: /workspace/github_c_makefile_star2_O3/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
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x39fc8d(%rip), %rax    # 0x3b1fa4
cmpl $0x0, (%rax)
leaq 0xc354f(%rip), %r15     # 0xd5870
movq (%r15), %rax
je 0x123ae
movl 0x1c0(%rax), %edi
callq 0x15391
movq (%r15), %rdx
cmpl $0x0, 0x1c0(%rdx)
jle 0x12396
movsd 0x931d7(%rip), %xmm0    # 0xa5520
movsd 0x8(%rsp), %xmm3
subsd %xmm3, %xmm0
xorl %ecx, %ecx
movl 0x1407128(%rdx), %esi
cmpq %rsi, %rcx
je 0x12387
movq (%rbx), %rdx
movq (%r14), %rsi
movsd (%rsi,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
movsd (%rdx,%rcx,8), %xmm2
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movq (%rax), %rdx
movsd %xmm2, (%rdx,%rcx,8)
movq (%r15), %rdx
incq %rcx
movslq 0x1c0(%rdx), %rsi
cmpq %rsi, %rcx
jl 0x12355
movq (%rbx), %rcx
movslq 0x1407128(%rdx), %rdx
movl (%rcx,%rdx,8), %ecx
movq (%rax), %rsi
movl %ecx, (%rsi,%rdx,8)
jmp 0x12471
movl 0x1bc(%rax), %edi
callq 0x15391
movq (%r15), %rdi
cmpl $0x0, 0x1bc(%rdi)
jle 0x12471
movsd 0x9314f(%rip), %xmm0    # 0xa5520
movsd 0x8(%rsp), %xmm3
subsd %xmm3, %xmm0
movl $0x61e1, %ecx           # imm = 0x61E1
xorl %edx, %edx
leaq 0x93f63(%rip), %rsi     # 0xa634c
movl (%rdi,%rcx,8), %edi
cmpq $0x4, %rdi
ja 0x12457
movslq (%rsi,%rdi,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
movq (%rbx), %rdi
movl (%rdi,%rdx,8), %edi
jmp 0x12450
movq (%rbx), %rdi
movq (%r14), %r8
movsd (%r8,%rdx,8), %xmm1
mulsd %xmm0, %xmm1
movsd (%rdi,%rdx,8), %xmm2
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movq (%rax), %rdi
movsd %xmm2, (%rdi,%rdx,8)
jmp 0x12457
movq (%rbx), %rdi
xorps %xmm1, %xmm1
cvtsi2sdl (%rdi,%rdx,8), %xmm1
movq (%r14), %rdi
xorps %xmm2, %xmm2
cvtsi2sdl (%rdi,%rdx,8), %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %edi
movq (%rax), %r8
movl %edi, (%r8,%rdx,8)
incq %rdx
movq (%r15), %rdi
movslq 0x1bc(%rdi), %r8
addq $0x68, %rcx
cmpq %r8, %rdx
jl 0x123e9
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq