// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_put_image
int
vl_covdet_put_image (VlCovDet * self,
                     float const * image,
                     vl_size width, vl_size height)
{
  vl_size const minOctaveSize = 16 ;
  vl_index lastOctave ;
  vl_index octaveFirstSubdivision ;
  vl_index octaveLastSubdivision ;
  VlScaleSpaceGeometry geom = vl_scalespace_get_default_geometry(width,height) ;

  assert (self) ;
  assert (image) ;
  assert (width >= 1) ;
  assert (height >= 1) ;

  /* (minOctaveSize - 1) 2^lastOctave <= min(width,height) - 1 */
  lastOctave = vl_floor_d(vl_log2_d(VL_MIN((double)width-1,(double)height-1) / (minOctaveSize - 1))) ;

  if (self->method == VL_COVDET_METHOD_DOG) {
    octaveFirstSubdivision = -1 ;
    octaveLastSubdivision = self->octaveResolution + 1 ;
  } else if (self->method == VL_COVDET_METHOD_HESSIAN) {
    octaveFirstSubdivision = -1 ;
    octaveLastSubdivision = self->octaveResolution ;
  } else {
    octaveFirstSubdivision = 0 ;
    octaveLastSubdivision = self->octaveResolution - 1 ;
  }

  geom.width = width ;
  geom.height = height ;
  geom.firstOctave = self->firstOctave ;
  geom.lastOctave = lastOctave ;
  geom.octaveResolution = self->octaveResolution ;
  geom.octaveFirstSubdivision = octaveFirstSubdivision ;
  geom.octaveLastSubdivision = octaveLastSubdivision ;

  if (self->gss == NULL ||
      ! vl_scalespacegeometry_is_equal (geom,
                                        vl_scalespace_get_geometry(self->gss)))
  {
    if (self->gss) vl_scalespace_delete(self->gss) ;
    self->gss = vl_scalespace_new_with_geometry(geom) ;
    if (self->gss == NULL) return VL_ERR_ALLOC ;
  }
  vl_scalespace_put_image(self->gss, image) ;
  return VL_ERR_OK ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x98(%rsp), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x99e0
movq %r15, %xmm1
movq %r12, %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa 0x21794(%rip), %xmm1    # 0x2d100
pand %xmm0, %xmm1
por 0x21798(%rip), %xmm1    # 0x2d110
psrlq $0x20, %xmm0
por 0x2179b(%rip), %xmm0    # 0x2d120
subpd 0x217a3(%rip), %xmm0    # 0x2d130
addpd %xmm1, %xmm0
addpd 0x217a7(%rip), %xmm0    # 0x2d140
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
minsd %xmm1, %xmm0
divsd 0x21863(%rip), %xmm0    # 0x2d210
callq 0x9080
cvttsd2si %xmm0, %rcx
cvtsi2sd %rcx, %xmm1
cmpneqpd %xmm0, %xmm1
xorpd %xmm2, %xmm2
cmpnlepd %xmm0, %xmm2
andpd %xmm1, %xmm2
movq %xmm2, %rax
addq %rcx, %rax
movl 0x10(%r14), %esi
movq 0x30(%r14), %rcx
pushq $-0x1
popq %rdx
cmpl $0x2, %esi
je 0xb9f1
cmpl $0x1, %esi
jne 0xb9f6
leaq 0x1(%rcx), %rsi
jmp 0xb9fc
movq %rcx, %rsi
jmp 0xb9fc
leaq -0x1(%rcx), %rsi
xorl %edx, %edx
movq %r12, 0x98(%rsp)
movq %r15, 0xa0(%rsp)
movq 0x38(%r14), %rdi
movq %rdi, 0xa8(%rsp)
movq %rax, 0xb0(%rsp)
movq %rcx, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rsi, 0xc8(%rsp)
movq (%r14), %rsi
testq %rsi, %rsi
je 0xba88
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
callq 0x9930
pushq $0x9
popq %rax
leaq 0x98(%rsp), %rsi
movq %rax, %rcx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x48(%rsp), %rdi
movq %rax, %rcx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x9590
movq (%r14), %rdi
testl %eax, %eax
jne 0xbaa9
testq %rdi, %rdi
je 0xba88
callq 0x9880
pushq $0x9
popq %rcx
leaq 0x98(%rsp), %rsi
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x9920
movq %rax, %rdi
movq %rax, (%r14)
testq %rax, %rax
je 0xbab5
movq %rbx, %rsi
callq 0x95a0
xorl %eax, %eax
jmp 0xbab8
pushq $0x2
popq %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq