// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq (%rdi), %rsi
leaq 0x1d8(%rsp), %r14
movq %r14, %rdi
callq 0x9930
andq $0x0, 0x58(%rbx)
pushq $0x9
popq %rcx
leaq 0x178(%rsp), %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
cmpl $0x1, 0x10(%rbx)
jne 0xbb12
decq 0x1a8(%rsp)
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0xbb64
leaq 0x220(%rsp), %r14
movq %r14, %rdi
callq 0x9930
pushq $0x9
popq %rax
leaq 0x178(%rsp), %rsi
movq %rax, %rcx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x48(%rsp), %rdi
movq %rax, %rcx
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x9590
testl %eax, %eax
jne 0xbb7e
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xbb64
callq 0x9880
pushq $0x9
popq %rcx
leaq 0x178(%rsp), %rsi
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x9920
movq %rax, 0x8(%rbx)
movl 0x10(%rbx), %eax
orl $0x2, %eax
cmpl $0x6, %eax
jne 0xbbf1
movq (%rbx), %rsi
movq 0x1e8(%rsp), %rdx
leaq 0xf8(%rsp), %r14
movq %r14, %rdi
callq 0x9630
movq (%r14), %rdi
imulq 0x8(%r14), %rdi
shlq $0x2, %rdi
callq 0x95e0
movq %rax, 0x130(%rsp)
movq (%r14), %rdi
imulq 0x8(%r14), %rdi
shlq $0x2, %rdi
callq 0x95e0
movq %rax, 0x128(%rsp)
movq (%r14), %rdi
imulq 0x8(%r14), %rdi
shlq $0x2, %rdi
callq 0x95e0
movq %rax, 0x138(%rsp)
jmp 0xbc15
movq $0x0, 0x138(%rsp)
movq $0x0, 0x128(%rsp)
movq $0x0, 0x130(%rsp)
movq 0x188(%rsp), %r14
movq 0x190(%rsp), %rax
cmpq %rax, %r14
jg 0xc144
movq 0x8(%rbx), %rsi
leaq 0xf8(%rsp), %rdi
movq %r14, %rdx
callq 0x9630
movq 0x1a0(%rsp), %r13
movq %r14, 0xa0(%rsp)
cmpq 0x1a8(%rsp), %r13
jg 0xc13c
movq (%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9050
movq %rax, %r15
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9050
movq %rax, %r12
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9840
movl 0x10(%rbx), %eax
cmpl $0x6, %eax
ja 0xc0e5
pushq $0x2c
popq %rcx
btl %eax, %ecx
jb 0xbdce
pushq $0x50
popq %rcx
btl %eax, %ecx
jae 0xc0ed
movq %r13, 0xe0(%rsp)
movq 0xf8(%rsp), %r14
movq %r14, 0xc0(%rsp)
movq 0x100(%rsp), %r13
movq %r13, 0xb0(%rsp)
movsd 0x108(%rsp), %xmm1
movsd %xmm0, 0x90(%rsp)
movsd %xmm1, 0xa8(%rsp)
divsd %xmm1, %xmm0
movsd 0x21513(%rip), %xmm1    # 0x2d218
callq 0x9280
movsd %xmm0, 0x98(%rsp)
imulq %r13, %r14
shlq $0x2, %r14
movq %r14, %rdi
callq 0x95e0
movq %rax, %rbp
movq %r14, %rdi
callq 0x95e0
movq %rax, %r13
movq %r14, %rdi
callq 0x95e0
movq %rax, %r14
movq 0xc0(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
movq %rbp, %rdi
movq %r13, %rsi
pushq $0x1
popq %rdx
movq %r15, %r8
movq %rcx, %r9
movq %rcx, %r15
callq 0x9170
movq %r15, %rcx
movl %r15d, %eax
movq 0xb0(%rsp), %rdx
movq %rdx, %r8
imull %edx, %eax
movslq %eax, %r15
testq %r15, %r15
movl $0x0, %eax
cmovleq %rax, %r15
xorl %eax, %eax
cmpq %rax, %r15
je 0xbfb4
movss (%rbp,%rax,4), %xmm0
movss (%r13,%rax,4), %xmm1
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movss %xmm2, (%rbp,%rax,4)
mulss %xmm1, %xmm0
mulss %xmm1, %xmm1
movss %xmm1, (%r13,%rax,4)
movss %xmm0, (%r14,%rax,4)
incq %rax
jmp 0xbd91
movq %r13, 0xe0(%rsp)
movq 0xf8(%rsp), %r14
movq 0x100(%rsp), %r13
movsd 0x108(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x2141d(%rip), %xmm1    # 0x2d218
callq 0x9280
cvtsd2ss %xmm0, %xmm0
leaq (%r15,%r14,4), %rcx
leaq 0x4(%r12), %rax
movq %rax, 0xb0(%rsp)
leaq (%r12,%r14,4), %rax
addq $0x4, %rax
decq %r13
movq %r14, %rdx
negq %rdx
movq %rdx, 0x90(%rsp)
pushq $0x1
popq %r9
movq %r9, %rdx
subq %r14, %rdx
leaq -0x1(%r14), %rsi
leaq (,%r14,4), %r15
movq %r15, %r8
negq %r8
movss 0x21421(%rip), %xmm11   # 0x2d274
cmpq %r13, %r9
jae 0xbf37
movq %rbx, %rdi
movq 0x90(%rsp), %r10
movss (%rcx,%r10,4), %xmm1
movss (%rcx,%rdx,4), %xmm3
movss (%rcx), %xmm4
movss 0x4(%rcx), %xmm2
movss (%rcx,%r14,4), %xmm7
movss 0x4(%rcx,%r14,4), %xmm5
leaq 0x8(%rcx), %r10
leaq (%rcx,%r15), %rbp
addq $0x8, %rbp
leaq (%rcx,%r8), %rbx
addq $0x8, %rbx
xorl %r11d, %r11d
pushq $0x1
popq %rcx
cmpq %rsi, %rcx
jae 0xbf1f
movaps %xmm3, %xmm6
movaps %xmm2, %xmm8
movss (%rbx,%r11), %xmm3
movss (%r10,%r11), %xmm2
movaps %xmm8, %xmm9
addss %xmm8, %xmm9
movaps %xmm9, %xmm10
subss %xmm6, %xmm9
subss %xmm5, %xmm9
subss %xmm7, %xmm1
movaps %xmm5, %xmm7
movss (%rbp,%r11), %xmm5
subss %xmm4, %xmm10
subss %xmm2, %xmm10
mulss %xmm10, %xmm9
subss %xmm3, %xmm1
addss %xmm5, %xmm1
mulss %xmm11, %xmm1
mulss %xmm1, %xmm1
subss %xmm1, %xmm9
mulss %xmm0, %xmm9
movss %xmm9, (%rax,%r11)
incq %rcx
addq $0x4, %r11
movaps %xmm8, %xmm4
movaps %xmm6, %xmm1
jmp 0xbea2
addq %r11, %rax
addq $0x8, %rax
incq %r9
addq %r11, %r10
movq %r10, %rcx
movq %rdi, %rbx
jmp 0xbe53
leaq (%r12,%r14,4), %rsi
addq $0x4, %rsi
leaq -0x8(,%r14,4), %r14
movq 0xb0(%rsp), %rdi
movq %r14, %rdx
callq 0x95d0
subq $0x1, %r13
jb 0xbf7d
movss 0x4(%r12), %xmm0
movss %xmm0, (%r12)
movss -0x8(%r12,%r15), %xmm0
movss %xmm0, -0x4(%r12,%r15)
addq %r15, %r12
jmp 0xbf57
movq %r12, %rsi
subq %r15, %rsi
movss 0x4(%rsi), %xmm0
addq $0x4, %rsi
movss %xmm0, (%r12)
movss -0x8(%r12), %xmm0
movss %xmm0, -0x4(%r15,%r12)
addq $0x4, %r12
movq %r12, %rdi
movq %r14, %rdx
callq 0x95d0
jmp 0xc0d5
movsd 0x90(%rsp), %xmm1
mulsd 0x2125b(%rip), %xmm1    # 0x2d220
cvtsd2ss 0x98(%rsp), %xmm0
movss %xmm0, 0x98(%rsp)
divsd 0xa8(%rsp), %xmm1
movsd %xmm1, 0x90(%rsp)
movq %rbp, %rdi
movq %rcx, %rsi
movq %rbp, %rdx
movq %rcx, %r9
movapd %xmm1, %xmm0
callq 0x97d0
movq %r13, %rdi
movq 0xc0(%rsp), %rcx
movq %rcx, %rsi
movq %r13, %rdx
movq 0xb0(%rsp), %r8
movq %rcx, %r9
movsd 0x90(%rsp), %xmm0
movaps %xmm0, %xmm1
callq 0x97d0
movq %r14, %rdi
movq 0xc0(%rsp), %rcx
movq %rcx, %rsi
movq %r14, %rdx
movq %rcx, %r9
movq 0xb0(%rsp), %r8
movsd 0x90(%rsp), %xmm0
movaps %xmm0, %xmm1
callq 0x97d0
cvtss2sd 0x98(%rsp), %xmm0
xorl %eax, %eax
movsd 0x211bd(%rip), %xmm5    # 0x2d228
cmpq %rax, %r15
je 0xc0bd
movss (%rbp,%rax,4), %xmm1
movss (%r13,%rax,4), %xmm2
movss (%r14,%rax,4), %xmm3
mulss %xmm3, %xmm3
movaps %xmm1, %xmm4
mulss %xmm2, %xmm4
subss %xmm3, %xmm4
addss %xmm2, %xmm1
cvtss2sd %xmm4, %xmm2
mulss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm5, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, (%r12,%rax,4)
incq %rax
jmp 0xc06b
movq %r14, %rdi
callq 0x95b0
movq %r13, %rdi
callq 0x95b0
movq %rbp, %rdi
callq 0x95b0
movq 0xa0(%rsp), %r14
movq 0xe0(%rsp), %r13
incq %r13
jmp 0xbc52
cmpl $0x1, %eax
jne 0xc0e5
movq (%rbx), %rdi
leaq 0x1(%r13), %rdx
movq %r14, %rsi
callq 0x9050
movl 0xf8(%rsp), %ecx
imull 0x100(%rsp), %ecx
movslq %ecx, %rcx
testq %rcx, %rcx
movl $0x0, %edx
cmovleq %rdx, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xc0e5
movss (%r15,%rdx,4), %xmm0
subss (%rax,%rdx,4), %xmm0
movss %xmm0, (%r12,%rdx,4)
incq %rdx
jmp 0xc121
incq %r14
jmp 0xbc1d
leaq 0xd8(%rsp), %rcx
andq $0x0, (%rcx)
leaq 0x140(%rsp), %rcx
andq $0x0, (%rcx)
movq 0x188(%rsp), %r13
movq $0x0, 0x98(%rsp)
cmpq %rax, %r13
jg 0xc5bc
movq 0x8(%rbx), %rsi
leaq 0x1c0(%rsp), %rdi
movq %r13, %rdx
callq 0x9630
movsd 0x1d0(%rsp), %xmm0
movq 0x1c0(%rsp), %r14
movq 0x1c8(%rsp), %r15
movq 0x1a0(%rsp), %rdx
movq 0x1a8(%rsp), %r12
movl 0x10(%rbx), %eax
decl %eax
cmpl $0x2, %eax
jae 0xc3b9
subq %rdx, %r12
incq %r12
movq 0x8(%rbx), %rdi
movq %r13, %rsi
movapd %xmm0, 0xc0(%rsp)
callq 0x9050
movsd 0x18(%rbx), %xmm0
mulsd 0x21044(%rip), %xmm0    # 0x2d230
leaq 0xd8(%rsp), %rdi
leaq 0x140(%rsp), %rsi
movq %rax, 0xe0(%rsp)
movq %rax, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %r12, 0x90(%rsp)
movq %r12, %r9
callq 0x99f0
movapd 0xc0(%rsp), %xmm0
cvtsi2ss %r13, %xmm1
movss %xmm1, 0xa8(%rsp)
movq %rax, %r12
movq 0xd8(%rsp), %rcx
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movq %rcx, 0x98(%rsp)
leaq 0x10(%rcx), %rbp
movapd %xmm0, 0xc0(%rsp)
subq $0x1, %r12
jb 0xc5ac
andq $0x0, 0x170(%rsp)
movq -0x10(%rbp), %r9
movups -0x8(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq 0xf8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq %r14, %rdx
movq %r15, %rcx
movq 0x90(%rsp), %r8
callq 0x90d0
movsd 0x11c(%rsp), %xmm2
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0     # xmm0 = xmm0[1,1],xmm2[1,1]
cvtss2sd %xmm0, %xmm0
movsd 0x20(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xc3b0
movaps %xmm2, %xmm0
andps 0x20e89(%rip), %xmm0    # 0x2d150
cvtss2sd %xmm0, %xmm0
ucomisd 0x18(%rbx), %xmm0
jbe 0xc3b0
testl %eax, %eax
je 0xc3b0
movq 0x198(%rsp), %rax
testq %rax, %rax
movaps %xmm2, 0xb0(%rsp)
js 0xc2fa
cvtsi2ss %rax, %xmm0
jmp 0xc30f
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
cvtsi2ssq 0x1a0(%rsp), %xmm1
addss 0x118(%rsp), %xmm1
movsd 0x1b0(%rsp), %xmm2
movsd %xmm2, 0xa0(%rsp)
divss %xmm0, %xmm1
addss 0xa8(%rsp), %xmm1
cvtss2sd %xmm1, %xmm0
callq 0x9040
cvtps2pd 0x110(%rsp), %xmm1
mulpd 0xc0(%rsp), %xmm1
cvtpd2ps %xmm1, %xmm1
mulsd 0xa0(%rsp), %xmm0
movlpd %xmm1, 0x150(%rsp)
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x158(%rsp)
andq $0x0, 0x15c(%rsp)
movss %xmm0, 0x164(%rsp)
movaps 0xb0(%rsp), %xmm0
movlps %xmm0, 0x168(%rsp)
movq %rbx, %rdi
leaq 0x150(%rsp), %rsi
callq 0x9510
addq $0x18, %rbp
jmp 0xc258
cvtsi2sd %r13, %xmm1
movsd %xmm1, 0xa0(%rsp)
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movq %r13, 0x148(%rsp)
movapd %xmm0, 0xc0(%rsp)
cmpq %r12, %rdx
jge 0xc5ac
movq 0x8(%rbx), %rdi
movq %r13, %rsi
movq %rdx, %r13
callq 0x9050
movq %rax, %rbp
movsd 0x18(%rbx), %xmm0
mulsd 0x20e2c(%rip), %xmm0    # 0x2d230
leaq 0xd8(%rsp), %rdi
leaq 0x140(%rsp), %rsi
movq %rax, %rdx
movq %r14, %rcx
movq %r15, %r8
callq 0x95c0
movq %rax, %r12
movq 0xd8(%rsp), %rcx
movq %r13, 0xa8(%rsp)
cvtsi2sd %r13, %xmm0
movsd %xmm0, 0xb0(%rsp)
movq %rcx, 0x98(%rsp)
leaq 0x8(%rcx), %r13
subq $0x1, %r12
jb 0xc58c
andq $0x0, 0x118(%rsp)
movq -0x8(%r13), %r8
movq (%r13), %r9
leaq 0x150(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x96c0
movsd 0x168(%rsp), %xmm2
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0     # xmm0 = xmm0[1,1],xmm2[1,1]
cvtss2sd %xmm0, %xmm0
movsd 0x20(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xc583
movaps %xmm2, %xmm0
andps 0x20ca3(%rip), %xmm0    # 0x2d150
cvtss2sd %xmm0, %xmm0
ucomisd 0x18(%rbx), %xmm0
jbe 0xc583
testl %eax, %eax
je 0xc583
movsd 0x1b0(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x198(%rsp), %xmm0
unpcklps 0x20c7a(%rip), %xmm0    # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x20c82(%rip), %xmm0    # 0x2d170
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0xb0(%rsp), %xmm0
divsd %xmm1, %xmm0
addsd 0xa0(%rsp), %xmm0
movaps %xmm2, 0xe0(%rsp)
callq 0x9040
cvtps2pd 0x160(%rsp), %xmm1
mulpd 0xc0(%rsp), %xmm1
cvtpd2ps %xmm1, %xmm1
mulsd 0x90(%rsp), %xmm0
movlpd %xmm1, 0xf8(%rsp)
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x100(%rsp)
andq $0x0, 0x104(%rsp)
movss %xmm0, 0x10c(%rsp)
movaps 0xe0(%rsp), %xmm0
movlps %xmm0, 0x110(%rsp)
movq %rbx, %rdi
leaq 0xf8(%rsp), %rsi
callq 0x9510
addq $0x10, %r13
jmp 0xc44f
movq 0xa8(%rsp), %rdx
incq %rdx
movq 0x1a8(%rsp), %r12
movq 0x148(%rsp), %r13
jmp 0xc3dc
incq %r13
movq 0x190(%rsp), %rax
jmp 0xc170
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xc5ce
callq 0x95b0
movl 0x10(%rbx), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0xc5e1
movq %rbx, %rdi
callq 0x99a0
movsd 0x40(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xc5f6
jnp 0xc741
andq $0x0, 0x48(%rbx)
movq 0x58(%rbx), %rax
movslq %eax, %rcx
movsd 0x20c2e(%rip), %xmm1    # 0x2d238
xorl %edx, %edx
testq %rcx, %rcx
movl $0x0, %esi
cmovgq %rcx, %rsi
addsd %xmm0, %xmm1
xorps %xmm2, %xmm2
movapd 0x20ab9(%rip), %xmm3    # 0x2d0e0
xorl %edi, %edi
cmpq %rsi, %rdi
je 0xc6ea
movq 0x50(%rbx), %r8
imulq $0x28, %rdi, %r9
cvtps2pd (%r8,%r9), %xmm4
cvtss2sd 0x8(%r8,%r9), %xmm5
movapd %xmm1, %xmm6
mulsd %xmm5, %xmm6
movapd %xmm0, %xmm7
mulsd %xmm5, %xmm7
movss 0x18(%r8,%r9), %xmm8
andps 0x20aeb(%rip), %xmm8    # 0x2d150
unpcklpd %xmm7, %xmm7            # xmm7 = xmm7[0,0]
addq $0x18, %r8
movq %rcx, %r9
subq $0x1, %r9
jb 0xc6e2
movss (%r8), %xmm9
ucomiss %xmm2, %xmm9
jne 0xc689
jp 0xc689
addq $0x28, %r8
jmp 0xc670
cvtss2sd -0x10(%r8), %xmm10
ucomisd %xmm10, %xmm6
jbe 0xc683
mulsd %xmm1, %xmm10
ucomisd %xmm5, %xmm10
jbe 0xc683
cvtps2pd -0x18(%r8), %xmm10
subpd %xmm4, %xmm10
andpd %xmm3, %xmm10
cmpltpd %xmm7, %xmm10
movmskpd %xmm10, %r10d
testb $0x1, %r10b
je 0xc683
shrb %r10b
je 0xc683
andps 0x20a81(%rip), %xmm9    # 0x2d150
ucomiss %xmm9, %xmm8
jbe 0xc683
andl $0x0, (%r8)
incq %rdx
movq %rdx, 0x48(%rbx)
jmp 0xc683
incq %rdi
jmp 0xc629
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
xorl %edx, %edx
xorl %esi, %esi
movslq %eax, %rdi
cmpq %rdi, %rsi
jge 0xc73d
movq 0x50(%rbx), %rdi
movss 0x18(%rdi,%rcx), %xmm1
ucomiss %xmm0, %xmm1
jne 0xc70d
jnp 0xc734
imulq $0x28, %rdx, %rax
incq %rdx
movups (%rdi,%rcx), %xmm1
movups 0x10(%rdi,%rcx), %xmm2
movq 0x20(%rdi,%rcx), %r8
movq %r8, 0x20(%rdi,%rax)
movups %xmm2, 0x10(%rdi,%rax)
movups %xmm1, (%rdi,%rax)
movq 0x58(%rbx), %rax
incq %rsi
addq $0x28, %rcx
jmp 0xc6f4
movq %rdx, 0x58(%rbx)
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0xc753
callq 0x95b0
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
movq 0x138(%rsp), %rbx
je 0xc76d
callq 0x95b0
testq %rbx, %rbx
je 0xc77a
movq %rbx, %rdi
callq 0x95b0
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq