// File: /workspace/github_c_makefile_star2_O3/zpole[P]IICV/vl/sift.c
// Function: vl_sift_calc_keypoint_descriptor
VL_EXPORT
void
vl_sift_calc_keypoint_descriptor (VlSiftFilt *f,
                                  vl_sift_pix *descr,
                                  VlSiftKeypoint const* k,
                                  double angle0)
{
  /*
     The SIFT descriptor is a three dimensional histogram of the
     position and orientation of the gradient.  There are NBP bins for
     each spatial dimension and NBO bins for the orientation dimension,
     for a total of NBP x NBP x NBO bins.

     The support of each spatial bin has an extension of SBP = 3sigma
     pixels, where sigma is the scale of the keypoint.  Thus all the
     bins together have a support SBP x NBP pixels wide. Since
     weighting and interpolation of pixel is used, the support extends
     by another half bin. Therefore, the support is a square window of
     SBP x (NBP + 1) pixels. Finally, since the patch can be
     arbitrarily rotated, we need to consider a window 2W += sqrt(2) x
     SBP x (NBP + 1) pixels wide.
  */

  double const magnif      = f-> magnif ;

  double       xper        = pow (2.0, f->o_cur) ;

  int          w           = f-> octave_width ;
  int          h           = f-> octave_height ;
  int const    xo          = 2 ;         /* x-stride */
  int const    yo          = 2 * w ;     /* y-stride */
  int const    so          = 2 * w * h ; /* s-stride */
  double       x           = k-> x     / xper ;
  double       y           = k-> y     / xper ;
  double       sigma       = k-> sigma / xper ;

  int          xi          = (int) (x + 0.5) ;
  int          yi          = (int) (y + 0.5) ;
  int          si          = k-> is ;

  double const st0         = sin (angle0) ;
  double const ct0         = cos (angle0) ;
  double const SBP         = magnif * sigma + VL_EPSILON_D ;
  int    const W           = floor
    (sqrt(2.0) * SBP * (NBP + 1) / 2.0 + 0.5) ;

  int const binto = 1 ;          /* bin theta-stride */
  int const binyo = NBO * NBP ;  /* bin y-stride */
  int const binxo = NBO ;        /* bin x-stride */

  int bin, dxi, dyi ;
  vl_sift_pix const *pt ;
  vl_sift_pix       *dpt ;

  /* check bounds */
  if(k->o  != f->o_cur        ||
     xi    <  0               ||
     xi    >= w               ||
     yi    <  0               ||
     yi    >= h -    1        ||
     si    <  f->s_min + 1    ||
     si    >  f->s_max - 2     )
    return ;

  /* synchronize gradient buffer */
  update_gradient (f) ;

  /* VL_PRINTF("W = %d ; magnif = %g ; SBP = %g\n", W,magnif,SBP) ; */

  /* clear descriptor */
  memset (descr, 0, sizeof(vl_sift_pix) * NBO*NBP*NBP) ;

  /* Center the scale space and the descriptor on the current keypoint.
   * Note that dpt is pointing to the bin of center (SBP/2,SBP/2,0).
   */
  pt  = f->grad + xi*xo + yi*yo + (si - f->s_min - 1)*so ;
  dpt = descr + (NBP/2) * binyo + (NBP/2) * binxo ;

#undef atd
#define atd(dbinx,dbiny,dbint) *(dpt + (dbint)*binto + (dbiny)*binyo + (dbinx)*binxo)

  /*
   * Process pixels in the intersection of the image rectangle
   * (1,1)-(M-1,N-1) and the keypoint bounding box.
   */
  for(dyi =  VL_MAX (- W, 1 - yi    ) ;
      dyi <= VL_MIN (+ W, h - yi - 2) ; ++ dyi) {

    for(dxi =  VL_MAX (- W, 1 - xi    ) ;
        dxi <= VL_MIN (+ W, w - xi - 2) ; ++ dxi) {

      /* retrieve */
      vl_sift_pix mod   = *( pt + dxi*xo + dyi*yo + 0 ) ;
      vl_sift_pix angle = *( pt + dxi*xo + dyi*yo + 1 ) ;
      vl_sift_pix theta = vl_mod_2pi_f (angle - angle0) ;

      /* fractional displacement */
      vl_sift_pix dx = xi + dxi - x;
      vl_sift_pix dy = yi + dyi - y;

      /* get the displacement normalized w.r.t. the keypoint
         orientation and extension */
      vl_sift_pix nx = ( ct0 * dx + st0 * dy) / SBP ;
      vl_sift_pix ny = (-st0 * dx + ct0 * dy) / SBP ;
      vl_sift_pix nt = NBO * theta / (2 * VL_PI) ;

      /* Get the Gaussian weight of the sample. The Gaussian window
       * has a standard deviation equal to NBP/2. Note that dx and dy
       * are in the normalized frame, so that -NBP/2 <= dx <=
       * NBP/2. */
      vl_sift_pix const wsigma = f->windowSize ;
      vl_sift_pix win = fast_expn
        ((nx*nx + ny*ny)/(2.0 * wsigma * wsigma)) ;

      /* The sample will be distributed in 8 adjacent bins.
         We start from the ``lower-left'' bin. */
      int         binx = (int)vl_floor_f (nx - 0.5) ;
      int         biny = (int)vl_floor_f (ny - 0.5) ;
      int         bint = (int)vl_floor_f (nt) ;
      vl_sift_pix rbinx = nx - (binx + 0.5) ;
      vl_sift_pix rbiny = ny - (biny + 0.5) ;
      vl_sift_pix rbint = nt - bint ;
      int         dbinx ;
      int         dbiny ;
      int         dbint ;

      /* Distribute the current sample into the 8 adjacent bins*/
      for(dbinx = 0 ; dbinx < 2 ; ++dbinx) {
        for(dbiny = 0 ; dbiny < 2 ; ++dbiny) {
          for(dbint = 0 ; dbint < 2 ; ++dbint) {

            if (binx + dbinx >= - (NBP/2) &&
                binx + dbinx <    (NBP/2) &&
                biny + dbiny >= - (NBP/2) &&
                biny + dbiny <    (NBP/2) ) {
              vl_sift_pix weight = win
                * mod
                * vl_abs_f (1 - dbinx - rbinx)
                * vl_abs_f (1 - dbiny - rbiny)
                * vl_abs_f (1 - dbint - rbint) ;

              atd(binx+dbinx, biny+dbiny, (bint+dbint) % NBO) += weight ;
            }
          }
        }
      }
    }
  }

  /* Standard SIFT descriptors are normalized, truncated and normalized again */
  if(1) {

    /* Normalize the histogram to L2 unit length. */
    vl_sift_pix norm = normalize_histogram (descr, descr + NBO*NBP*NBP) ;

    /* Set the descriptor to zero if it is lower than our norm_threshold */
    if(f-> norm_thresh && norm < f-> norm_thresh) {
        for(bin = 0; bin < NBO*NBP*NBP ; ++ bin)
            descr [bin] = 0;
    }
    else {

      /* Truncate at 0.2. */
      for(bin = 0; bin < NBO*NBP*NBP ; ++ bin) {
        if (descr [bin] > 0.2) descr [bin] = 0.2;
      }

      /* Normalize again. */
      normalize_histogram (descr, descr + NBO*NBP*NBP) ;
    }
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movsd %xmm0, 0x40(%rsp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movsd 0xa0(%rdi), %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x3c(%rdi), %edi
movsd 0x3a40(%rip), %xmm0     # 0x32270
callq 0x90c0
movapd %xmm0, %xmm1
movsd %xmm0, 0x8(%rsp)
movslq 0x58(%r14), %r13
movl 0x5c(%r14), %ebp
xorps %xmm0, %xmm0
cvtss2sd 0x10(%r15), %xmm0
movsd %xmm0, 0x38(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x14(%r15), %xmm0
movsd %xmm0, 0x28(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x1c(%r15), %xmm0
divsd %xmm1, %xmm0
mulsd 0x10(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
movl 0xc(%r15), %r12d
movsd 0x40(%rsp), %xmm0
callq 0x9860
movaps %xmm0, 0x50(%rsp)
movsd 0x40(%rsp), %xmm0
callq 0x9450
movaps %xmm0, 0xa0(%rsp)
movapd 0x10(%rsp), %xmm1
addsd 0x4315(%rip), %xmm1     # 0x32bc8
movsd 0x4b05(%rip), %xmm0     # 0x333c0
movapd %xmm1, 0x10(%rsp)
mulsd %xmm1, %xmm0
mulsd 0x39ab(%rip), %xmm0     # 0x32278
movsd 0x390b(%rip), %xmm1     # 0x321e0
mulsd %xmm1, %xmm0
addsd %xmm1, %xmm0
callq 0x9880
movsd 0x8(%rsp), %xmm2
movl (%r15), %eax
cmpl 0x3c(%r14), %eax
jne 0x2f0c3
movsd 0x38(%rsp), %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, 0x38(%rsp)
addsd 0x38d3(%rip), %xmm1     # 0x321e0
cvttsd2si %xmm1, %ecx
movq %rcx, 0x30(%rsp)
testl %ecx, %ecx
js 0x2f0c3
movl %r13d, %eax
subl 0x30(%rsp), %eax
jle 0x2f0c3
movsd 0x28(%rsp), %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, 0x28(%rsp)
addsd 0x389d(%rip), %xmm1     # 0x321e0
cvttsd2si %xmm1, %ecx
testl %ecx, %ecx
js 0x2f0c3
movq %rax, %r15
leal -0x1(%rbp), %eax
cmpl %ecx, %eax
jle 0x2f0c3
cmpl 0x34(%r14), %r12d
jle 0x2f0c3
movl 0x38(%r14), %eax
addl $-0x2, %eax
cmpl %eax, %r12d
jg 0x2f0c3
cvttsd2si %xmm0, %eax
movl %eax, 0x8(%rsp)
movq %r14, 0x20(%rsp)
movq %r14, %rdi
movq %rcx, %r14
callq 0x2d20a
movl $0x200, %edx            # imm = 0x200
movq %rbx, 0x60(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x9400
movl 0x8(%rsp), %r11d
movl %r11d, %eax
negl %eax
movl $0x1, %edx
subl %r14d, %edx
cmpl %eax, %edx
movl %eax, %ecx
cmovgl %edx, %ecx
movl %ebp, %edi
movq %r14, 0x68(%rsp)
subl %r14d, %edi
addl $-0x2, %edi
cmpl %r11d, %edi
cmovgel %r11d, %edi
cmpl %edi, %ecx
jg 0x2eeaa
movl %edi, %r10d
addq %r13, %r13
movq 0x30(%rsp), %r9
leal (%r9,%r9), %esi
shlq $0x2, %rsi
movq 0x20(%rsp), %r8
addq 0xb0(%r8), %rsi
movl %r13d, %edi
imull 0x68(%rsp), %edi
movslq %edi, %rdi
leaq (%rsi,%rdi,4), %rsi
movl 0x34(%r8), %edi
notl %edi
addl %edi, %r12d
movq %r13, 0x80(%rsp)
imull %r13d, %ebp
imull %ebp, %r12d
movslq %r12d, %rdi
leaq (%rsi,%rdi,4), %rsi
movq %rsi, 0x78(%rsp)
movq 0x60(%rsp), %rsi
addq $0x140, %rsi            # imm = 0x140
movl $0x1, %edi
subl %r9d, %edi
cmpl %eax, %edi
cmovlel %eax, %edi
addl $-0x2, %r15d
cmpl %r11d, %r15d
cmovgel %r11d, %r15d
movapd 0xa0(%rsp), %xmm1
movapd %xmm1, %xmm0
movapd 0x50(%rsp), %xmm6
unpcklpd %xmm6, %xmm0            # xmm0 = xmm0[0],xmm6[0]
movapd %xmm0, 0x90(%rsp)
xorpd 0x3659(%rip), %xmm6     # 0x320d0
movl %edi, 0x4c(%rsp)
movslq %edi, %rdi
movq %rdi, 0x70(%rsp)
movq %r15, 0x88(%rsp)
leal 0x1(%r15), %edi
movl %edi, 0x8(%rsp)
cmpl %edx, %eax
cmovgl %eax, %edx
movslq %edx, %rax
movq %rax, 0x50(%rsp)
addl %eax, %r10d
subl %ecx, %r10d
incl %r10d
movl %r10d, 0x48(%rsp)
movaps 0x10(%rsp), %xmm0
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0x10(%rsp)
unpcklpd %xmm1, %xmm6            # xmm6 = xmm6[0],xmm1[0]
movss 0x38b5(%rip), %xmm1     # 0x3237c
movss 0x38b1(%rip), %xmm2     # 0x32380
xorps %xmm3, %xmm3
movaps 0x4957(%rip), %xmm7     # 0x33430
movaps 0x368f(%rip), %xmm8     # 0x32170
movl 0x4c(%rsp), %eax
cmpl 0x88(%rsp), %eax
jg 0x2ee93
movq 0x50(%rsp), %rdx
movq %rdx, %rax
movq 0x68(%rsp), %rcx
addl %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
imulq 0x80(%rsp), %rax
subsd 0x28(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x78(%rsp), %rcx
leaq (%rcx,%rax,4), %rdx
cvtss2sd %xmm0, %xmm10
movlhps %xmm10, %xmm10          # xmm10 = xmm10[0,0]
mulpd 0x90(%rsp), %xmm10
movq 0x20(%rsp), %rax
xorps %xmm0, %xmm0
cvtsd2ss 0xa8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movaps %xmm0, %xmm11
addsd %xmm0, %xmm11
mulsd %xmm0, %xmm11
movq 0x70(%rsp), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rdx,%rdi,8), %xmm0
subsd 0x40(%rsp), %xmm0
xorps %xmm9, %xmm9
cvtsd2ss %xmm0, %xmm9
ucomiss %xmm1, %xmm9
jbe 0x2eb88
addss %xmm2, %xmm9
jmp 0x2eb76
addss %xmm1, %xmm9
ucomiss %xmm9, %xmm3
ja 0x2eb83
movq 0x30(%rsp), %rax
addl %edi, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
subsd 0x38(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm6, %xmm0
addpd %xmm10, %xmm0
divpd 0x10(%rsp), %xmm0
cvtpd2ps %xmm0, %xmm4
movapd %xmm4, %xmm13
shufps $0x55, %xmm4, %xmm13    # xmm13 = xmm13[1,1],xmm4[1,1]
mulss 0x486d(%rip), %xmm9     # 0x33440
cvtss2sd %xmm9, %xmm9
divsd 0x37cf(%rip), %xmm9     # 0x323b0
movaps %xmm4, %xmm12
mulss %xmm4, %xmm12
movaps %xmm13, %xmm14
mulss %xmm13, %xmm14
addss %xmm12, %xmm14
cvtss2sd %xmm14, %xmm14
divsd %xmm11, %xmm14
xorps %xmm12, %xmm12
ucomisd 0x4799(%rip), %xmm14    # 0x333a8
ja 0x2ec9b
mulsd 0x4792(%rip), %xmm14    # 0x333b0
cvttsd2si %xmm14, %rax
xorps %xmm12, %xmm12
cvtsi2sd %rax, %xmm12
xorpd %xmm15, %xmm15
cmpnlepd %xmm14, %xmm15
cmpneqpd %xmm14, %xmm12
andpd %xmm15, %xmm12
movq %xmm12, %rcx
addq %rax, %rcx
xorps %xmm12, %xmm12
cvtsi2sd %ecx, %xmm12
subsd %xmm12, %xmm14
movslq %ecx, %rax
shlq $0x20, %rcx
movabsq $0x100000000, %r8       # imm = 0x100000000
addq %r8, %rcx
leaq 0xcaad(%rip), %r8       # 0x3b720
movsd (%r8,%rax,8), %xmm12
sarq $0x1d, %rcx
movsd (%rcx,%r8), %xmm15
subsd %xmm12, %xmm15
mulsd %xmm14, %xmm15
addsd %xmm12, %xmm15
xorps %xmm12, %xmm12
cvtsd2ss %xmm15, %xmm12
cvtsd2ss %xmm9, %xmm9
cvtss2sd %xmm13, %xmm13
movaps %xmm4, %xmm0
addps %xmm7, %xmm0
xorps %xmm15, %xmm15
movaps %xmm0, %xmm14
shufps $0x55, %xmm0, %xmm14    # xmm14 = xmm14[1,1],xmm0[1,1]
cvttss2si %xmm14, %rcx
cmpnleps %xmm0, %xmm15
cvtsi2ss %rcx, %xmm5
ucomiss %xmm5, %xmm14
setp %al
setne %r9b
orb %al, %r9b
cvtss2sd %xmm4, %xmm4
cvttss2si %xmm0, %r11
unpcklps %xmm15, %xmm15          # xmm15 = xmm15[0,0,1,1]
movmskpd %xmm15, %eax
movl %eax, %r10d
shrb %r10b
andb %r9b, %r10b
xorps %xmm5, %xmm5
cvtsi2ss %r11, %xmm5
movzbl %r10b, %r9d
subq %r9, %rcx
ucomiss %xmm5, %xmm0
setp %r9b
setne %r10b
orb %r9b, %r10b
andb %al, %r10b
movzbl %r10b, %eax
subq %rax, %r11
cvttss2si %xmm9, %rax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
xorps %xmm5, %xmm5
cmpnleps %xmm9, %xmm5
cmpneqps %xmm9, %xmm0
andps %xmm5, %xmm0
movd %xmm0, %r9d
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd 0x3498(%rip), %xmm5     # 0x321e0
addsd %xmm5, %xmm0
subsd %xmm0, %xmm13
cvtsd2ss %xmm13, %xmm13
xorps %xmm0, %xmm0
cvtsi2sd %r11d, %xmm0
addsd %xmm5, %xmm0
subsd %xmm0, %xmm4
xorps %xmm14, %xmm14
cvtsd2ss %xmm4, %xmm14
addl %r9d, %eax
xorps %xmm15, %xmm15
cvtsi2ss %eax, %xmm15
mulss (%rdx,%rdi,8), %xmm12
subss %xmm9, %xmm15
movslq %r11d, %r12
movslq %ecx, %rbp
movb $0x1, %cl
xorl %r9d, %r9d
leaq (%r9,%rbp), %r13
xorl $0x1, %r9d
xorps %xmm0, %xmm0
cvtsi2ss %r9d, %xmm0
leal -0x2(%r13), %r11d
subss %xmm13, %xmm0
andps %xmm8, %xmm0
mulss %xmm12, %xmm0
shlq $0x5, %r13
addq %rsi, %r13
movb $0x1, %r14b
xorl %r10d, %r10d
cmpl $-0x4, %r11d
setb %r15b
leaq (%r10,%r12), %rbx
leal -0x2(%rbx), %r9d
cmpl $-0x4, %r9d
setb %r9b
xorl $0x1, %r10d
xorps %xmm9, %xmm9
cvtsi2ss %r10d, %xmm9
subss %xmm14, %xmm9
andps %xmm8, %xmm9
mulss %xmm0, %xmm9
shlq $0x7, %rbx
addq %r13, %rbx
orb %r15b, %r9b
xorl %r15d, %r15d
movb $0x1, %r10b
testb %r9b, %r9b
jne 0x2ee4a
movl %r15d, %r8d
xorl $0x1, %r8d
xorps %xmm4, %xmm4
cvtsi2ss %r8d, %xmm4
addss %xmm15, %xmm4
andps %xmm8, %xmm4
mulss %xmm9, %xmm4
movl %r15d, %r8d
addl %eax, %r8d
leal 0x7(%r15,%rax), %r15d
cmovnsl %r8d, %r15d
andl $-0x8, %r15d
subl %r15d, %r8d
movslq %r8d, %r8
addss (%rbx,%r8,4), %xmm4
movss %xmm4, (%rbx,%r8,4)
movl $0x1, %r15d
testb $0x1, %r10b
movl $0x0, %r10d
jne 0x2ee03
movl $0x1, %r10d
testb $0x1, %r14b
movl $0x0, %r14d
jne 0x2edc0
movl $0x1, %r9d
testb $0x1, %cl
movl $0x0, %ecx
jne 0x2ed91
incq %rdi
cmpl %edi, 0x8(%rsp)
jne 0x2eb5e
movq 0x50(%rsp), %rax
incq %rax
movq %rax, 0x50(%rsp)
cmpl %eax, 0x48(%rsp)
jne 0x2eae1
xorpd %xmm2, %xmm2
xorl %eax, %eax
movq 0x60(%rsp), %rdi
movss (%rdi,%rax), %xmm0
mulss %xmm0, %xmm0
addss %xmm0, %xmm2
addq $0x4, %rax
cmpq $0x200, %rax            # imm = 0x200
jne 0x2eeb5
xorps %xmm1, %xmm1
cvtss2sd %xmm2, %xmm1
movsd 0x34db(%rip), %xmm0     # 0x323b8
ucomisd %xmm1, %xmm0
movq 0x20(%rsp), %rdx
jbe 0x2eef2
movss 0x3474(%rip), %xmm1     # 0x32364
jmp 0x2ef46
movd %xmm2, %eax
sarl %eax
movl $0x5f3759df, %ecx       # imm = 0x5F3759DF
subl %eax, %ecx
movd %ecx, %xmm3
movss 0x344d(%rip), %xmm1     # 0x32358
mulss %xmm2, %xmm1
movaps %xmm1, %xmm4
mulss %xmm3, %xmm4
mulss %xmm3, %xmm4
movss 0x3456(%rip), %xmm5     # 0x32378
addss %xmm5, %xmm4
mulss %xmm3, %xmm4
mulss %xmm4, %xmm1
mulss %xmm4, %xmm1
addss %xmm5, %xmm1
mulss %xmm4, %xmm1
mulss %xmm2, %xmm1
addss 0x341e(%rip), %xmm1     # 0x32364
movaps %xmm1, %xmm2
shufps $0x0, %xmm1, %xmm2      # xmm2 = xmm2[0,0],xmm1[0,0]
xorl %eax, %eax
movups (%rdi,%rax,4), %xmm3
divps %xmm2, %xmm3
movups %xmm3, (%rdi,%rax,4)
addq $0x4, %rax
cmpq $0x80, %rax
jne 0x2ef4f
movsd 0x98(%rdx), %xmm2
xorps %xmm3, %xmm3
ucomisd %xmm3, %xmm2
jne 0x2ef79
jnp 0x2efa0
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x2efa0
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9400
xorl %eax, %eax
movsd 0x3a0e(%rip), %xmm1     # 0x329b8
movapd 0x3a1e(%rip), %xmm2     # 0x329d0
cvtps2pd 0x8(%rdi,%rax,4), %xmm3
cvtps2pd (%rdi,%rax,4), %xmm4
ucomisd %xmm1, %xmm4
jbe 0x2efc8
movl $0x3e4ccccd, (%rdi,%rax,4) # imm = 0x3E4CCCCD
movapd %xmm2, %xmm5
cmpltpd %xmm4, %xmm5
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x2efe3
movl $0x3e4ccccd, 0x4(%rdi,%rax,4) # imm = 0x3E4CCCCD
movapd %xmm2, %xmm4
cmpltpd %xmm3, %xmm4
pextrw $0x0, %xmm4, %ecx
testb $0x1, %cl
je 0x2effe
movl $0x3e4ccccd, 0x8(%rdi,%rax,4) # imm = 0x3E4CCCCD
pextrw $0x4, %xmm4, %ecx
testb $0x1, %cl
je 0x2f010
movl $0x3e4ccccd, 0xc(%rdi,%rax,4) # imm = 0x3E4CCCCD
addq $0x4, %rax
cmpq $0x80, %rax
jne 0x2efb2
xorpd %xmm1, %xmm1
xorl %eax, %eax
movss (%rdi,%rax), %xmm2
mulss %xmm2, %xmm2
addss %xmm2, %xmm1
addq $0x4, %rax
cmpq $0x200, %rax            # imm = 0x200
jne 0x2f022
xorps %xmm2, %xmm2
cvtss2sd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x2f052
movss 0x3314(%rip), %xmm0     # 0x32364
jmp 0x2f0a6
movd %xmm1, %eax
sarl %eax
movl $0x5f3759df, %ecx       # imm = 0x5F3759DF
subl %eax, %ecx
movd %ecx, %xmm2
movss 0x32ed(%rip), %xmm0     # 0x32358
mulss %xmm1, %xmm0
movaps %xmm0, %xmm3
mulss %xmm2, %xmm3
mulss %xmm2, %xmm3
movss 0x32f6(%rip), %xmm4     # 0x32378
addss %xmm4, %xmm3
mulss %xmm2, %xmm3
mulss %xmm3, %xmm0
mulss %xmm3, %xmm0
addss %xmm4, %xmm0
mulss %xmm3, %xmm0
mulss %xmm1, %xmm0
addss 0x32be(%rip), %xmm0     # 0x32364
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
xorl %eax, %eax
movups (%rdi,%rax,4), %xmm1
divps %xmm0, %xmm1
movups %xmm1, (%rdi,%rax,4)
addq $0x4, %rax
cmpq $0x80, %rax
jne 0x2f0ac
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq