// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/homkermap.c
// Function: vl_homogeneouskernelmap_evaluate_f
void
VL_XCAT(vl_homogeneouskernelmap_evaluate_,SFX)
(VlHomogeneousKernelMap const * self,
 T * destination,
 vl_size stride,
 double x)
{
  /* break value into exponent and mantissa */
  int exponent ;
  int unsigned j ;
  double mantissa = frexp(x, &exponent) ;
  double sign = (mantissa >= 0.0) ? +1.0 : -1.0 ;
  mantissa *= 2*sign ;
  exponent -- ;

  if (mantissa == 0 ||
      exponent <= self->minExponent ||
      exponent >= self->maxExponent) {
    for (j = 0 ; j < 2*self->order+1 ; ++j) {
      *destination = (T) 0.0 ;
      destination += stride ;
    }
    return  ;
  }
  {
    vl_size featureDimension = 2*self->order + 1 ;
    double const * v1 = self->table +
    (exponent - self->minExponent) * self->numSubdivisions * featureDimension ;
    double const * v2 ;
    double f1, f2 ;

    mantissa -= 1.0 ;
    while (mantissa >= self->subdivision) {
      mantissa -= self->subdivision ;
      v1 += featureDimension ;
    }
    v2 = v1 + featureDimension ;
    for (j = 0 ; j < featureDimension ; ++j) {
      f1 = *v1++ ;
      f2 = *v2++ ;
      *destination = (T) sign * ((f2 - f1) * (self->numSubdivisions * mantissa) + f1) ;
      destination += stride ;
    }
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
leaq 0x44(%rsp), %rdi
callq 0x9570
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm1
movsd 0x36a5b(%rip), %xmm3    # 0x590d8
movsd 0x36a13(%rip), %xmm2    # 0x59098
xorps %xmm0, %xmm0
cmplesd %xmm1, %xmm0
movaps %xmm0, %xmm1
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x36a36(%rip), %xmm0    # 0x590e0
mulsd 0x30(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x44(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x44(%rsp)
movsd 0x38(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x226da
jp 0x226da
jmp 0x226fa
movslq 0x44(%rsp), %rax
movq 0x60(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jle 0x226fa
movslq 0x44(%rsp), %rax
movq 0x60(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jl 0x2274c
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
movq 0x60(%rsp), %rcx
movq 0x18(%rcx), %rcx
shlq %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x22747
movq 0x58(%rsp), %rax
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movq 0x50(%rsp), %rax
shlq $0x2, %rax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x22702
jmp 0x228e2
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rax
shlq %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0x44(%rsp), %rcx
movq 0x60(%rsp), %rdx
subq 0x38(%rdx), %rcx
movq 0x60(%rsp), %rdx
imulq 0x28(%rdx), %rcx
imulq 0x28(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movsd 0x38(%rsp), %xmm0
movsd 0x36936(%rip), %xmm1    # 0x590d8
subsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movq 0x60(%rsp), %rax
ucomisd 0x30(%rax), %xmm0
jb 0x227ed
movq 0x60(%rsp), %rax
movsd 0x30(%rax), %xmm1
movsd 0x38(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x28(%rsp), %rax
shlq $0x3, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x227ac
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
cmpq 0x28(%rsp), %rax
jae 0x228e2
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x20(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x18(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x30(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
subsd %xmm2, %xmm1
movq 0x60(%rsp), %rax
movq 0x28(%rax), %xmm3
movaps 0x368e1(%rip), %xmm2    # 0x59160
punpckldq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
movapd 0x368e5(%rip), %xmm2    # 0x59170
subpd %xmm2, %xmm3
movaps %xmm3, %xmm2
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
addsd %xmm2, %xmm3
mulsd 0x38(%rsp), %xmm3
movsd 0x10(%rsp), %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x58(%rsp), %rax
movss %xmm0, (%rax)
movq 0x50(%rsp), %rax
shlq $0x2, %rax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x2280b
addq $0x68, %rsp
retq
nopw (%rax,%rax)