// File: /workspace/github_c_makefile_star2_O3/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 0x9970
movq %r15, %xmm1
movq %r12, %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa 0x2621c(%rip), %xmm1    # 0x32120
pand %xmm0, %xmm1
por 0x26220(%rip), %xmm1    # 0x32130
psrlq $0x20, %xmm0
por 0x26223(%rip), %xmm0    # 0x32140
subpd 0x2622b(%rip), %xmm0    # 0x32150
addpd %xmm1, %xmm0
addpd 0x2622f(%rip), %xmm0    # 0x32160
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
minsd %xmm1, %xmm0
divsd 0x26303(%rip), %xmm0    # 0x32248
callq 0x9080
cvttsd2si %xmm0, %rcx
xorps %xmm1, %xmm1
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
movq $-0x1, %rdx
cmpl $0x2, %esi
je 0xbf90
cmpl $0x1, %esi
jne 0xbf95
leaq 0x1(%rcx), %rsi
jmp 0xbf9b
movq %rcx, %rsi
jmp 0xbf9b
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 0xc028
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
callq 0x98c0
leaq 0x98(%rsp), %rsi
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x48(%rsp), %rdi
movl $0x9, %ecx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x9560
movq (%r14), %rdi
testl %eax, %eax
jne 0xc04b
testq %rdi, %rdi
je 0xc028
callq 0x9820
leaq 0x98(%rsp), %rsi
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x98b0
movq %rax, %rdi
movq %rax, (%r14)
testq %rax, %rax
je 0xc057
movq %rbx, %rsi
callq 0x9570
xorl %eax, %eax
jmp 0xc05c
movl $0x2, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq