// File: /workspace/github_c_makefile_star2_O1/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 0x27245(%rip), %xmm1    # 0x33120
pand %xmm0, %xmm1
por 0x27249(%rip), %xmm1    # 0x33130
psrlq $0x20, %xmm0
por 0x2724c(%rip), %xmm0    # 0x33140
subpd 0x27254(%rip), %xmm0    # 0x33150
addpd %xmm1, %xmm0
addpd 0x27258(%rip), %xmm0    # 0x33160
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
minsd %xmm1, %xmm0
divsd 0x2731c(%rip), %xmm0    # 0x33238
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 0xbf6b
cmpl $0x1, %esi
jne 0xbf66
incq %rcx
jmp 0xbf6b
decq %rcx
xorl %edx, %edx
movq %r12, 0x98(%rsp)
movq %r15, 0xa0(%rsp)
movq 0x38(%r14), %rsi
movq %rsi, 0xa8(%rsp)
movq %rax, 0xb0(%rsp)
movq 0x30(%r14), %rax
movq %rax, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xc8(%rsp)
movq (%r14), %rsi
testq %rsi, %rsi
je 0xbfef
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
testl %eax, %eax
jne 0xc01c
movq (%r14), %rdi
testq %rdi, %rdi
je 0xbffc
callq 0x9820
leaq 0x98(%rsp), %rsi
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x98b0
movq %rax, (%r14)
testq %rax, %rax
je 0xc02b
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x9570
xorl %eax, %eax
jmp 0xc030
movl $0x2, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq