// File: /workspace/github_c_makefile_star2_O1/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_detect
void
vl_covdet_detect (VlCovDet * self)
{
  VlScaleSpaceGeometry geom = vl_scalespace_get_geometry(self->gss) ;
  VlScaleSpaceGeometry cgeom ;
  float * levelxx = NULL ;
  float * levelyy = NULL ;
  float * levelxy = NULL ;
  vl_index o, s ;

  assert (self) ;
  assert (self->gss) ;

  /* clear previous detections if any */
  self->numFeatures = 0 ;

  /* prepare buffers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  cgeom = geom ;
  if (self->method == VL_COVDET_METHOD_DOG) {
    cgeom.octaveLastSubdivision -= 1 ;
  }
  if (!self->css ||
      !vl_scalespacegeometry_is_equal(cgeom,
                                      vl_scalespace_get_geometry(self->css)))
  {
    if (self->css) vl_scalespace_delete(self->css) ;
    self->css = vl_scalespace_new_with_geometry(cgeom) ;
  }
  if (self->method == VL_COVDET_METHOD_HARRIS_LAPLACE ||
      self->method == VL_COVDET_METHOD_MULTISCALE_HARRIS) {
    VlScaleSpaceOctaveGeometry oct = vl_scalespace_get_octave_geometry(self->gss, geom.firstOctave) ;
    levelxx = vl_malloc(oct.width * oct.height * sizeof(float)) ;
    levelyy = vl_malloc(oct.width * oct.height * sizeof(float)) ;
    levelxy = vl_malloc(oct.width * oct.height * sizeof(float)) ;
  }

  /* compute cornerness ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  for (o = cgeom.firstOctave ; o <= cgeom.lastOctave ; ++o) {
    VlScaleSpaceOctaveGeometry oct = vl_scalespace_get_octave_geometry(self->css, o) ;

    for (s = cgeom.octaveFirstSubdivision ; s <= cgeom.octaveLastSubdivision ; ++s) {
      float * level = vl_scalespace_get_level(self->gss, o, s) ;
      float * clevel = vl_scalespace_get_level(self->css, o, s) ;
      double sigma = vl_scalespace_get_level_sigma(self->css, o, s) ;
      switch (self->method) {
        case VL_COVDET_METHOD_DOG:
          _vl_dog_response(clevel,
                           vl_scalespace_get_level(self->gss, o, s + 1),
                           level,
                           oct.width, oct.height) ;
          break ;

        case VL_COVDET_METHOD_HARRIS_LAPLACE:
        case VL_COVDET_METHOD_MULTISCALE_HARRIS:
          _vl_harris_response(clevel,
                              level, oct.width, oct.height, oct.step,
                              sigma, 1.4 * sigma, 0.05) ;
          break ;

        case VL_COVDET_METHOD_HESSIAN:
        case VL_COVDET_METHOD_HESSIAN_LAPLACE:
        case VL_COVDET_METHOD_MULTISCALE_HESSIAN:
          _vl_det_hessian_response(clevel, level, oct.width, oct.height, oct.step, sigma) ;
          break ;

        default:
          assert(0) ;
      }
    }
  }

  /* find and refine local maxima ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  {
    vl_index * extrema = NULL ;
    vl_size extremaBufferSize = 0 ;
    vl_size numExtrema ;
    vl_size index ;
    for (o = cgeom.firstOctave ; o <= cgeom.lastOctave ; ++o) {
      VlScaleSpaceOctaveGeometry octgeom = vl_scalespace_get_octave_geometry(self->css, o) ;
      double step = octgeom.step ;
      vl_size width = octgeom.width ;
      vl_size height = octgeom.height ;
      vl_size depth = cgeom.octaveLastSubdivision - cgeom.octaveFirstSubdivision + 1 ;

      switch (self->method) {
        case VL_COVDET_METHOD_DOG:
        case VL_COVDET_METHOD_HESSIAN:
        {
          /* scale-space extrema */
          float const * octave =
          vl_scalespace_get_level(self->css, o, cgeom.octaveFirstSubdivision) ;
          numExtrema = vl_find_local_extrema_3(&extrema, &extremaBufferSize,
                                               octave, width, height, depth,
                                               0.8 * self->peakThreshold);
          for (index = 0 ; index < numExtrema ; ++index) {
            VlCovDetExtremum3 refined ;
            VlCovDetFeature feature ;
            vl_bool ok ;
            memset(&feature, 0, sizeof(feature)) ;
            ok = vl_refine_local_extreum_3(&refined,
                                           octave, width, height, depth,
                                           extrema[3*index+0],
                                           extrema[3*index+1],
                                           extrema[3*index+2]) ;
            ok &= fabs(refined.peakScore) > self->peakThreshold ;
            ok &= refined.edgeScore < self->edgeThreshold ;
            if (ok) {
              double sigma = cgeom.baseScale *
              pow(2.0, o + (refined.z + cgeom.octaveFirstSubdivision)
                  / cgeom.octaveResolution) ;
              feature.frame.x = refined.x * step ;
              feature.frame.y = refined.y * step ;
              feature.frame.a11 = sigma ;
              feature.frame.a12 = 0.0 ;
              feature.frame.a21 = 0.0 ;
              feature.frame.a22 = sigma ;
              feature.peakScore = refined.peakScore ;
              feature.edgeScore = refined.edgeScore ;
              vl_covdet_append_feature(self, &feature) ;
            }
          }
          break ;
        }

        default:
        {
          for (s = cgeom.octaveFirstSubdivision ; s < cgeom.octaveLastSubdivision ; ++s) {
            /* space extrema */
            float const * level = vl_scalespace_get_level(self->css,o,s) ;
            numExtrema = vl_find_local_extrema_2(&extrema, &extremaBufferSize,
                                                 level,
                                                 width, height,
                                                 0.8 * self->peakThreshold);
            for (index = 0 ; index < numExtrema ; ++index) {
              VlCovDetExtremum2 refined ;
              VlCovDetFeature feature ;
              vl_bool ok ;
              memset(&feature, 0, sizeof(feature)) ;
              ok = vl_refine_local_extreum_2(&refined,
                                             level, width, height,
                                             extrema[2*index+0],
                                             extrema[2*index+1]);
              ok &= fabs(refined.peakScore) > self->peakThreshold ;
              ok &= refined.edgeScore < self->edgeThreshold ;
              if (ok) {
                double sigma = cgeom.baseScale *
                pow(2.0, o + (double)s / cgeom.octaveResolution) ;
                feature.frame.x = refined.x * step ;
                feature.frame.y = refined.y * step ;
                feature.frame.a11 = sigma ;
                feature.frame.a12 = 0.0 ;
                feature.frame.a21 = 0.0 ;
                feature.frame.a22 = sigma ;
                feature.peakScore = refined.peakScore ;
                feature.edgeScore = refined.edgeScore ;
                vl_covdet_append_feature(self, &feature) ;
              }
            }
          }
          break ;
        }
      }
    } /* next octave */

    if (extrema) { vl_free(extrema) ; extrema = 0 ; }
  }

  /* Laplacian scale selection for certain methods */
  switch (self->method) {
    case VL_COVDET_METHOD_HARRIS_LAPLACE :
    case VL_COVDET_METHOD_HESSIAN_LAPLACE :
      vl_covdet_extract_laplacian_scales (self) ;
      break ;
    default:
      break ;
  }

  if (self->nonExtremaSuppression) {
    vl_index i, j ;
    double tol = self->nonExtremaSuppression ;
    self->numNonExtremaSuppressed = 0 ;
    for (i = 0 ; i < (signed)self->numFeatures ; ++i) {
      double x = self->features[i].frame.x ;
      double y = self->features[i].frame.y ;
      double sigma = self->features[i].frame.a11 ;
      double score = self->features[i].peakScore ;

      for (j = 0 ; j < (signed)self->numFeatures ; ++j) {
        double dx_ = self->features[j].frame.x - x ;
        double dy_ = self->features[j].frame.y - y ;
        double sigma_ = self->features[j].frame.a11 ;
        double score_ = self->features[j].peakScore ;
        if (score_ == 0) continue ;
        if (sigma < (1+tol) * sigma_ &&
            sigma_ < (1+tol) * sigma &&
            vl_abs_d(dx_) < tol * sigma &&
            vl_abs_d(dy_) < tol * sigma &&
            vl_abs_d(score) > vl_abs_d(score_)) {
          self->features[j].peakScore = 0 ;
          self->numNonExtremaSuppressed ++ ;
        }
      }
    }
    j = 0 ;
    for (i = 0 ; i < (signed)self->numFeatures ; ++i) {
      VlCovDetFeature feature = self->features[i] ;
      if (self->features[i].peakScore != 0) {
        self->features[j++] = feature ;
      }
    }
    self->numFeatures = j ;
  }

  if (levelxx) vl_free(levelxx) ;
  if (levelyy) vl_free(levelyy) ;
  if (levelxy) vl_free(levelxy) ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %r14
movq (%rdi), %rsi
leaq 0x1d8(%rsp), %rbx
movq %rbx, %rdi
callq 0x98c0
movq %r14, %r10
movq $0x0, 0x58(%r14)
leaq 0x148(%rsp), %rdi
movl $0x9, %ecx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
cmpl $0x1, 0x10(%r14)
jne 0xc093
decq 0x178(%rsp)
movq 0x8(%r10), %rsi
testq %rsi, %rsi
movq %r10, 0x90(%rsp)
je 0xc0e8
leaq 0x220(%rsp), %rbx
movq %rbx, %rdi
callq 0x98c0
leaq 0x148(%rsp), %rsi
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x48(%rsp), %rdi
movl $0x9, %ecx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x9560
movq 0x90(%rsp), %r10
testl %eax, %eax
jne 0xc11a
movq 0x8(%r10), %rdi
testq %rdi, %rdi
je 0xc0f6
callq 0x9820
leaq 0x148(%rsp), %rsi
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x98b0
movq 0x90(%rsp), %r10
movq %rax, 0x8(%r10)
movl 0x10(%r10), %eax
orl $0x2, %eax
cmpl $0x6, %eax
jne 0xc196
movq (%r10), %rsi
movq 0x1e8(%rsp), %rdx
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
callq 0x95f0
movq (%rbx), %rdi
imulq 0x8(%rbx), %rdi
shlq $0x2, %rdi
callq 0x95b0
movq %rax, 0x130(%rsp)
movq (%rbx), %rdi
imulq 0x8(%rbx), %rdi
shlq $0x2, %rdi
callq 0x95b0
movq %rax, 0x128(%rsp)
movq (%rbx), %rdi
imulq 0x8(%rbx), %rdi
shlq $0x2, %rdi
callq 0x95b0
movq 0x90(%rsp), %r10
movq %rax, 0x138(%rsp)
jmp 0xc1ba
movq $0x0, 0x138(%rsp)
movq $0x0, 0x128(%rsp)
movq $0x0, 0x130(%rsp)
movq 0x158(%rsp), %r14
cmpq 0x160(%rsp), %r14
jg 0xc7c7
movq 0x8(%r10), %rsi
leaq 0xf0(%rsp), %rdi
movq %r14, %rdx
callq 0x95f0
movq 0x90(%rsp), %r10
movq 0x170(%rsp), %r12
cmpq 0x178(%rsp), %r12
jg 0xc7b2
movq %r14, 0xd0(%rsp)
movq (%r10), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x9050
movq %rax, %rbx
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x9050
movq %rax, %r15
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x97e0
movq 0x90(%rsp), %r10
movl 0x10(%r10), %eax
cmpl $0x6, %eax
ja 0xc79c
movl $0x2c, %ecx
btl %eax, %ecx
jb 0xc49e
movl $0x50, %ecx
btl %eax, %ecx
jae 0xc695
movq %r12, 0xe0(%rsp)
movq 0xf0(%rsp), %r14
movq 0xf8(%rsp), %r12
movq %r12, 0xa0(%rsp)
movsd 0x100(%rsp), %xmm2
movapd %xmm0, %xmm1
mulsd 0x26f96(%rip), %xmm1    # 0x33248
movsd %xmm1, 0xb0(%rsp)
movsd %xmm2, 0xc8(%rsp)
divsd %xmm2, %xmm0
movsd 0x26f70(%rip), %xmm1    # 0x33240
callq 0x9270
movsd %xmm0, 0x98(%rsp)
movq %r14, %r13
imulq %r12, %r13
shlq $0x2, %r13
movq %r13, %rdi
callq 0x95b0
movq %rax, %r12
movq %r13, %rdi
callq 0x95b0
movq %rax, %rbp
movq %r13, %rdi
callq 0x95b0
movq %rax, %r13
movq %r14, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x9170
movq 0xa0(%rsp), %r8
movl %r14d, %eax
imull %r8d, %eax
movslq %eax, %rbx
testq %rbx, %rbx
jle 0xc6f0
movsd 0xc8(%rsp), %xmm4
movsd 0xb0(%rsp), %xmm3
xorps %xmm0, %xmm0
cvtsd2ss 0x98(%rsp), %xmm0
movss %xmm0, 0x98(%rsp)
xorl %eax, %eax
movss (%r12,%rax,4), %xmm0
movss (%rbp,%rax,4), %xmm1
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movss %xmm2, (%r12,%rax,4)
mulss %xmm1, %xmm0
mulss %xmm1, %xmm1
movss %xmm1, (%rbp,%rax,4)
movss %xmm0, (%r13,%rax,4)
incq %rax
cmpq %rax, %rbx
jne 0xc378
movapd %xmm3, %xmm0
divsd %xmm4, %xmm0
movsd %xmm0, 0xb0(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r14, %r9
movapd %xmm0, %xmm1
callq 0x9770
movq %rbp, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r14, %rcx
movq 0xa0(%rsp), %r8
movq %r14, %r9
movsd 0xb0(%rsp), %xmm0
movaps %xmm0, %xmm1
callq 0x9770
movq %r13, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq 0xa0(%rsp), %r8
movq %r14, %r9
movsd 0xb0(%rsp), %xmm0
movaps %xmm0, %xmm1
callq 0x9770
testq %rbx, %rbx
movsd 0x26e1e(%rip), %xmm5    # 0x33250
jle 0xc76c
xorps %xmm0, %xmm0
cvtss2sd 0x98(%rsp), %xmm0
xorl %eax, %eax
movss (%r12,%rax,4), %xmm1
movss (%rbp,%rax,4), %xmm2
movss (%r13,%rax,4), %xmm3
mulss %xmm3, %xmm3
movaps %xmm1, %xmm4
mulss %xmm2, %xmm4
subss %xmm3, %xmm4
addss %xmm2, %xmm1
xorps %xmm2, %xmm2
cvtss2sd %xmm4, %xmm2
mulss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm5, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, (%r15,%rax,4)
incq %rax
cmpq %rax, %rbx
jne 0xc446
jmp 0xc76c
movq %r12, 0xe0(%rsp)
movq 0xf0(%rsp), %r14
movq 0xf8(%rsp), %r13
movsd 0x100(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x26d75(%rip), %xmm1    # 0x33240
callq 0x9270
leaq 0x4(%r15), %rax
movq %rax, 0xa0(%rsp)
decq %r13
cmpq $0x2, %r13
movss 0x26db0(%rip), %xmm10   # 0x3329c
jb 0xc60b
cvtsd2ss %xmm0, %xmm0
movq 0xa0(%rsp), %rax
leaq (%rax,%r14,4), %rax
leaq (%rbx,%r14,4), %r8
movq %r14, %rcx
negq %rcx
movl $0x1, %edx
movl $0x1, %esi
subq %r14, %rsi
leaq -0x1(%r14), %rdi
leaq -0x2(%r14), %r9
movq %r9, 0xb0(%rsp)
leaq (,%r14,4), %r9
movq %r9, %r10
negq %r10
leaq 0x8(%r8), %r11
cmpq $0x2, %rdi
jb 0xc5f8
movss (%r8,%r14,4), %xmm7
movss 0x4(%r8,%r14,4), %xmm8
movss (%r8), %xmm5
movss 0x4(%r8), %xmm3
movss (%r8,%rsi,4), %xmm1
movss (%r8,%rcx,4), %xmm2
leaq (%r8,%r9), %rbp
addq $0x8, %rbp
leaq (%r8,%r10), %r12
addq $0x8, %r12
xorl %ebx, %ebx
movq 0xb0(%rsp), %r8
subss %xmm7, %xmm2
movss (%r12,%rbx), %xmm4
movaps %xmm3, %xmm6
addss %xmm3, %xmm6
movaps %xmm6, %xmm9
subss %xmm5, %xmm9
movaps %xmm3, %xmm5
movss (%r11,%rbx), %xmm3
subss %xmm1, %xmm6
subss %xmm8, %xmm6
movaps %xmm8, %xmm7
movss (%rbp,%rbx), %xmm8
subss %xmm3, %xmm9
mulss %xmm9, %xmm6
subss %xmm4, %xmm2
addss %xmm8, %xmm2
mulss %xmm10, %xmm2
mulss %xmm2, %xmm2
subss %xmm2, %xmm6
mulss %xmm0, %xmm6
movss %xmm6, (%rax,%rbx)
addq $0x4, %rbx
movaps %xmm1, %xmm2
movaps %xmm4, %xmm1
decq %r8
jne 0xc583
addq %rbx, %rax
addq %rbx, %r11
addq $0x8, %rax
incq %rdx
movq %r11, %r8
cmpq %r13, %rdx
jne 0xc537
leaq (%r15,%r14,4), %rsi
addq $0x4, %rsi
leaq -0x8(,%r14,4), %rbx
movq 0xa0(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rdx
callq 0x95a0
testq %r13, %r13
je 0xc660
leaq (,%r14,4), %rax
movss 0x4(%r15), %xmm0
movss %xmm0, (%r15)
movss -0x8(%r15,%rax), %xmm0
movss %xmm0, -0x4(%r15,%rax)
addq %rax, %r15
decq %r13
jne 0xc63b
leaq 0x4(%r15), %r12
movq %r14, %rax
negq %rax
leaq (%r12,%rax,4), %rsi
movss (%rsi), %xmm0
movss %xmm0, (%r15)
movss -0xc(%r12), %xmm0
movss %xmm0, -0x4(%r15,%r14,4)
addq $0x4, %r15
movq %r15, %rdi
movq %rbx, %rdx
callq 0x95a0
jmp 0xc784
cmpl $0x1, %eax
jne 0xc79c
movq (%r10), %rdi
leaq 0x1(%r12), %rdx
movq %r14, %rsi
callq 0x9050
movq 0x90(%rsp), %r10
movl 0xf0(%rsp), %ecx
imull 0xf8(%rsp), %ecx
movslq %ecx, %rcx
testq %rcx, %rcx
jle 0xc79c
xorl %edx, %edx
movss (%rbx,%rdx,4), %xmm0
subss (%rax,%rdx,4), %xmm0
movss %xmm0, (%r15,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0xc6d3
jmp 0xc79c
movsd 0xb0(%rsp), %xmm0
divsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r8, %rbx
movq %r14, %r9
movapd %xmm0, %xmm1
callq 0x9770
movq %rbp, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r14, %rcx
movq %rbx, %r8
movq %r14, %r9
movsd 0xb0(%rsp), %xmm0
movaps %xmm0, %xmm1
callq 0x9770
movq %r13, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %rbx, %r8
movq %r14, %r9
movsd 0xb0(%rsp), %xmm0
movaps %xmm0, %xmm1
callq 0x9770
movq %r13, %rdi
callq 0x9580
movq %rbp, %rdi
callq 0x9580
movq %r12, %rdi
callq 0x9580
movq 0x90(%rsp), %r10
movq 0xd0(%rsp), %r14
movq 0xe0(%rsp), %r12
leaq 0x1(%r12), %rax
cmpq 0x178(%rsp), %r12
movq %rax, %r12
jl 0xc20a
leaq 0x1(%r14), %rax
cmpq 0x160(%rsp), %r14
movq %rax, %r14
jl 0xc1d0
xorl %eax, %eax
movq %rax, 0xd8(%rsp)
movq %rax, 0x140(%rsp)
movq 0x158(%rsp), %rbx
cmpq 0x160(%rsp), %rbx
jg 0xccc6
movq 0x8(%r10), %rsi
leaq 0x1c0(%rsp), %rdi
movq %rbx, %rdx
callq 0x95f0
movq 0x90(%rsp), %r10
movsd 0x1d0(%rsp), %xmm0
movapd %xmm0, 0xa0(%rsp)
movq 0x1c0(%rsp), %r13
movq 0x1c8(%rsp), %rbp
movq 0x170(%rsp), %r14
movl 0x10(%r10), %eax
decl %eax
cmpl $0x2, %eax
movq %rbx, 0x98(%rsp)
jae 0xca8e
movq 0x178(%rsp), %r15
subq %r14, %r15
incq %r15
movq 0x8(%r10), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x9050
movq %rax, %r14
movq 0x90(%rsp), %rax
movsd 0x18(%rax), %xmm0
mulsd 0x269d7(%rip), %xmm0    # 0x33258
leaq 0xd8(%rsp), %rdi
leaq 0x140(%rsp), %rsi
movq %r14, %rdx
movq %r13, %rcx
movq %rbp, %r8
movq %r15, %r9
callq 0x9980
movq 0x90(%rsp), %r10
testq %rax, %rax
je 0xccac
movq %rax, %rbx
xorps %xmm0, %xmm0
cvtsi2ssq 0x98(%rsp), %xmm0
movss %xmm0, 0xc8(%rsp)
movq 0xd8(%rsp), %r12
movaps 0xa0(%rsp), %xmm0
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0xa0(%rsp)
addq $0x10, %r12
movq %r15, 0xd0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
movq $0x0, 0x1b0(%rsp)
movq -0x10(%r12), %r9
movups -0x8(%r12), %xmm0
movups %xmm0, (%rsp)
leaq 0xf0(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %r15, %r8
callq 0x90d0
movq 0x90(%rsp), %r10
movsd 0x114(%rsp), %xmm2
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0     # xmm0 = xmm0[1,1],xmm2[1,1]
cvtss2sd %xmm0, %xmm0
movsd 0x20(%r10), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xca7c
movaps %xmm2, %xmm0
andps 0x26800(%rip), %xmm0    # 0x33170
cvtss2sd %xmm0, %xmm0
ucomisd 0x18(%r10), %xmm0
jbe 0xca7c
testl %eax, %eax
je 0xca7c
movq 0x168(%rsp), %rax
testq %rax, %rax
movaps %xmm2, 0xb0(%rsp)
js 0xc9a7
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
jmp 0xc9bf
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2ssq 0x170(%rsp), %xmm1
addss 0x110(%rsp), %xmm1
movsd 0x180(%rsp), %xmm2
movsd %xmm2, 0xe0(%rsp)
divss %xmm0, %xmm1
addss 0xc8(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
callq 0x9040
cvtps2pd 0x108(%rsp), %xmm1
mulpd 0xa0(%rsp), %xmm1
cvtpd2ps %xmm1, %xmm1
mulsd 0xe0(%rsp), %xmm0
movlpd %xmm1, 0x190(%rsp)
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x198(%rsp)
movq $0x0, 0x19c(%rsp)
movss %xmm0, 0x1a4(%rsp)
movaps 0xb0(%rsp), %xmm0
movlps %xmm0, 0x1a8(%rsp)
movq 0x90(%rsp), %r15
movq %r15, %rdi
leaq 0x190(%rsp), %rsi
callq 0x94e0
movq %r15, %r10
movq 0xd0(%rsp), %r15
addq $0x18, %r12
decq %rbx
jne 0xc8f3
jmp 0xccac
cmpq 0x178(%rsp), %r14
jge 0xccac
xorps %xmm0, %xmm0
cvtsi2sdq 0x98(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
movaps 0xa0(%rsp), %xmm0
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0xa0(%rsp)
movq 0x8(%r10), %rdi
movq 0x98(%rsp), %rsi
movq %r14, %rdx
movq %r10, %r15
callq 0x9050
movq %rax, %rbx
movsd 0x18(%r15), %xmm0
mulsd 0x2676b(%rip), %xmm0    # 0x33258
leaq 0xd8(%rsp), %rdi
leaq 0x140(%rsp), %rsi
movq %rax, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x9590
testq %rax, %rax
je 0xcc93
movq %rax, %r12
movq 0xd8(%rsp), %r15
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
movsd %xmm0, 0xd0(%rsp)
addq $0x8, %r15
xorpd %xmm0, %xmm0
movapd %xmm0, 0x100(%rsp)
movapd %xmm0, 0xf0(%rsp)
movq $0x0, 0x110(%rsp)
movq -0x8(%r15), %r8
movq (%r15), %r9
leaq 0x190(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x9680
movsd 0x1a8(%rsp), %xmm2
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0     # xmm0 = xmm0[1,1],xmm2[1,1]
cvtss2sd %xmm0, %xmm0
movq 0x90(%rsp), %rcx
movsd 0x20(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xcc86
movaps %xmm2, %xmm0
andps 0x265c8(%rip), %xmm0    # 0x33170
cvtss2sd %xmm0, %xmm0
ucomisd 0x18(%rcx), %xmm0
jbe 0xcc86
testl %eax, %eax
je 0xcc86
movsd 0x180(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movsd 0x168(%rsp), %xmm0
unpcklps 0x2659f(%rip), %xmm0    # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x265a7(%rip), %xmm0    # 0x33190
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0xd0(%rsp), %xmm0
divsd %xmm1, %xmm0
addsd 0xc8(%rsp), %xmm0
movaps %xmm2, 0xe0(%rsp)
callq 0x9040
cvtps2pd 0x1a0(%rsp), %xmm1
mulpd 0xa0(%rsp), %xmm1
cvtpd2ps %xmm1, %xmm1
mulsd 0xb0(%rsp), %xmm0
movlpd %xmm1, 0xf0(%rsp)
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xf8(%rsp)
movq $0x0, 0xfc(%rsp)
movss %xmm0, 0x104(%rsp)
movaps 0xe0(%rsp), %xmm0
movlps %xmm0, 0x108(%rsp)
movq 0x90(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x94e0
addq $0x10, %r15
decq %r12
jne 0xcb34
incq %r14
cmpq 0x178(%rsp), %r14
movq 0x90(%rsp), %r10
jl 0xcac5
movq 0x98(%rsp), %rcx
leaq 0x1(%rcx), %rbx
cmpq 0x160(%rsp), %rcx
jl 0xc7ef
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0xccec
callq 0x9580
movq 0x90(%rsp), %r10
movq $0x0, 0xd8(%rsp)
movl 0x10(%r10), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0xcd08
movq %r10, %rdi
callq 0x9930
movq 0x90(%rsp), %r10
movsd 0x40(%r10), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xcd1d
jnp 0xce6c
movq $0x0, 0x48(%r10)
movslq 0x58(%r10), %rax
testq %rax, %rax
jle 0xce0f
movq 0x50(%r10), %rcx
movsd 0x26522(%rip), %xmm1    # 0x33260
addsd %xmm0, %xmm1
leaq 0x18(%rcx), %rdx
xorl %esi, %esi
movaps 0x26421(%rip), %xmm2    # 0x33170
xorps %xmm3, %xmm3
movapd 0x263a6(%rip), %xmm4    # 0x33100
leaq (%rsi,%rsi,4), %rdi
cvtps2pd (%rcx,%rdi,8), %xmm5
xorps %xmm6, %xmm6
cvtss2sd 0x8(%rcx,%rdi,8), %xmm6
movapd %xmm1, %xmm7
mulsd %xmm6, %xmm7
movapd %xmm0, %xmm8
mulsd %xmm6, %xmm8
movss 0x18(%rcx,%rdi,8), %xmm9
andps %xmm2, %xmm9
unpcklpd %xmm8, %xmm8            # xmm8 = xmm8[0,0]
movq %rdx, %rdi
movq %rax, %r8
movss (%rdi), %xmm10
ucomiss %xmm3, %xmm10
jne 0xcdab
jp 0xcdab
addq $0x28, %rdi
decq %r8
jne 0xcd93
jmp 0xce03
xorps %xmm11, %xmm11
cvtss2sd -0x10(%rdi), %xmm11
ucomisd %xmm11, %xmm7
jbe 0xcda0
mulsd %xmm1, %xmm11
ucomisd %xmm6, %xmm11
jbe 0xcda0
cvtps2pd -0x18(%rdi), %xmm11
subpd %xmm5, %xmm11
andpd %xmm4, %xmm11
cmpltpd %xmm8, %xmm11
movmskpd %xmm11, %r9d
testb $0x1, %r9b
je 0xcda0
shrb %r9b
je 0xcda0
andps %xmm2, %xmm10
ucomiss %xmm10, %xmm9
jbe 0xcda0
movl $0x0, (%rdi)
incq 0x48(%r10)
jmp 0xcda0
incq %rsi
cmpq %rax, %rsi
jne 0xcd5a
cmpl $0x0, 0x58(%r10)
jle 0xce66
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
xorl %edx, %edx
xorl %eax, %eax
movq 0x50(%r10), %rsi
movss 0x18(%rsi,%rcx), %xmm1
ucomiss %xmm0, %xmm1
jne 0xce31
jnp 0xce54
leaq (%rax,%rax,4), %rdi
incq %rax
movups (%rsi,%rcx), %xmm1
movups 0x10(%rsi,%rcx), %xmm2
movq 0x20(%rsi,%rcx), %r8
movq %r8, 0x20(%rsi,%rdi,8)
movups %xmm2, 0x10(%rsi,%rdi,8)
movups %xmm1, (%rsi,%rdi,8)
incq %rdx
movslq 0x58(%r10), %rsi
addq $0x28, %rcx
cmpq %rsi, %rdx
jl 0xce20
jmp 0xce68
xorl %eax, %eax
movq %rax, 0x58(%r10)
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0xce7e
callq 0x9580
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0xce90
callq 0x9580
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0xcea2
callq 0x9580
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq