// File: /workspace/github_c_makefile_star2_O1/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 0x39cbef(%rip), %rax    # 0x3aefa4
cmpl $0x0, (%rax)
leaq 0xc04b1(%rip), %r15     # 0xd2870
movq (%r15), %rax
je 0x1244c
movl 0x1c0(%rax), %edi
callq 0x152fc
movq (%r15), %rdx
cmpl $0x0, 0x1c0(%rdx)
jle 0x12434
movsd 0x90139(%rip), %xmm0    # 0xa2520
movsd 0x8(%rsp), %xmm3
subsd %xmm3, %xmm0
xorl %ecx, %ecx
movl 0x1407128(%rdx), %edx
cmpq %rdx, %rcx
je 0x12422
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)
incq %rcx
movq (%r15), %rdx
movslq 0x1c0(%rdx), %rsi
cmpq %rsi, %rcx
jl 0x123f3
movq (%rbx), %rcx
movslq 0x1407128(%rdx), %rdx
movl (%rcx,%rdx,8), %ecx
movq (%rax), %rsi
movl %ecx, (%rsi,%rdx,8)
jmp 0x1250f
movl 0x1bc(%rax), %edi
callq 0x152fc
movq (%r15), %rdi
cmpl $0x0, 0x1bc(%rdi)
jle 0x1250f
movsd 0x900b1(%rip), %xmm0    # 0xa2520
movsd 0x8(%rsp), %xmm3
subsd %xmm3, %xmm0
movl $0x61e1, %ecx           # imm = 0x61E1
xorl %edx, %edx
leaq 0x90ec5(%rip), %rsi     # 0xa334c
movl (%rdi,%rcx,8), %edi
cmpq $0x4, %rdi
ja 0x124f5
movslq (%rsi,%rdi,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
movq (%rbx), %rdi
movl (%rdi,%rdx,8), %edi
jmp 0x124ee
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 0x124f5
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 0x12487
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq