// File: /workspace/github_c_makefile_star2_O1/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 $0xc8, %rsp
movsd %xmm0, 0x50(%rsp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movsd 0xa0(%rdi), %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x3c(%rdi), %edi
movsd 0x471c(%rip), %xmm0     # 0x33260
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, 0x48(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x14(%r15), %xmm0
movsd %xmm0, 0x30(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x1c(%r15), %xmm0
divsd %xmm1, %xmm0
mulsd 0x10(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
movl 0xc(%r15), %r12d
movsd 0x50(%rsp), %xmm0
callq 0x9860
movaps %xmm0, 0x70(%rsp)
movsd 0x50(%rsp), %xmm0
callq 0x9450
movaps %xmm0, 0xb0(%rsp)
movapd 0x10(%rsp), %xmm1
addsd 0x5011(%rip), %xmm1     # 0x33bd8
movsd 0x5801(%rip), %xmm0     # 0x343d0
movapd %xmm1, 0x10(%rsp)
mulsd %xmm1, %xmm0
mulsd 0x4687(%rip), %xmm0     # 0x33268
movsd 0x45e7(%rip), %xmm1     # 0x331d0
mulsd %xmm1, %xmm0
addsd %xmm1, %xmm0
callq 0x9880
movsd 0x8(%rsp), %xmm2
movl (%r15), %eax
cmpl 0x3c(%r14), %eax
jne 0x2f3d2
movsd 0x48(%rsp), %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, 0x48(%rsp)
addsd 0x45af(%rip), %xmm1     # 0x331d0
cvttsd2si %xmm1, %ecx
movq %rcx, 0x40(%rsp)
testl %ecx, %ecx
js 0x2f3d2
movl %r13d, %eax
subl 0x40(%rsp), %eax
jle 0x2f3d2
movsd 0x30(%rsp), %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, 0x30(%rsp)
addsd 0x4579(%rip), %xmm1     # 0x331d0
cvttsd2si %xmm1, %ecx
testl %ecx, %ecx
js 0x2f3d2
movq %rax, %r15
leal -0x1(%rbp), %eax
cmpl %ecx, %eax
jle 0x2f3d2
cmpl 0x34(%r14), %r12d
jle 0x2f3d2
movl 0x38(%r14), %eax
addl $-0x2, %eax
cmpl %eax, %r12d
jg 0x2f3d2
cvttsd2si %xmm0, %eax
movl %eax, 0x8(%rsp)
movq %r14, 0x28(%rsp)
movq %r14, %rdi
movq %rcx, %r14
callq 0x2d528
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 0x2f1b9
movl %edi, %r10d
addq %r13, %r13
movq 0x40(%rsp), %r9
leal (%r9,%r9), %esi
shlq $0x2, %rsi
movq 0x28(%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, 0x90(%rsp)
imull %r13d, %ebp
imull %ebp, %r12d
movslq %r12d, %rdi
leaq (%rsi,%rdi,4), %rsi
movq %rsi, 0x88(%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 0xb0(%rsp), %xmm1
movapd %xmm1, %xmm0
movapd 0x70(%rsp), %xmm6
unpcklpd %xmm6, %xmm0            # xmm0 = xmm0[0],xmm6[0]
movapd %xmm0, 0xa0(%rsp)
xorpd 0x4342(%rip), %xmm6     # 0x330d0
movl %edi, 0x5c(%rsp)
movslq %edi, %rdi
movq %rdi, 0x80(%rsp)
movq %r15, 0x98(%rsp)
leal 0x1(%r15), %edi
movl %edi, 0x70(%rsp)
cmpl %edx, %eax
cmovgl %eax, %edx
movslq %edx, %rax
movq %rax, 0x38(%rsp)
addl %eax, %r10d
subl %ecx, %r10d
incl %r10d
movl %r10d, 0x58(%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 0x458b(%rip), %xmm1     # 0x3336c
movss 0x4587(%rip), %xmm2     # 0x33370
xorps %xmm3, %xmm3
movaps 0x565d(%rip), %xmm7     # 0x34450
movaps 0x4375(%rip), %xmm8     # 0x33170
movl 0x5c(%rsp), %eax
cmpl 0x98(%rsp), %eax
jg 0x2f1a2
movq 0x38(%rsp), %rdx
movq %rdx, %rax
movq 0x68(%rsp), %rcx
addl %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
imulq 0x90(%rsp), %rax
subsd 0x30(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x88(%rsp), %rcx
leaq (%rcx,%rax,4), %r8
cvtss2sd %xmm0, %xmm10
movlhps %xmm10, %xmm10          # xmm10 = xmm10[0,0]
mulpd 0xa0(%rsp), %xmm10
movq 0x28(%rsp), %rax
xorps %xmm0, %xmm0
cvtsd2ss 0xa8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movaps %xmm0, %xmm11
addsd %xmm0, %xmm11
mulsd %xmm0, %xmm11
movq 0x80(%rsp), %rdi
movq %r8, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r8,%rdi,8), %xmm0
subsd 0x50(%rsp), %xmm0
xorps %xmm9, %xmm9
cvtsd2ss %xmm0, %xmm9
ucomiss %xmm1, %xmm9
jbe 0x2eeae
addss %xmm2, %xmm9
jmp 0x2ee9c
addss %xmm1, %xmm9
ucomiss %xmm9, %xmm3
ja 0x2eea9
movq 0x40(%rsp), %rax
addl %edi, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
subsd 0x48(%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, %xmm0
movapd %xmm0, %xmm13
shufps $0x55, %xmm0, %xmm13    # xmm13 = xmm13[1,1],xmm0[1,1]
mulss 0x5567(%rip), %xmm9     # 0x34460
cvtss2sd %xmm9, %xmm9
divsd 0x4499(%rip), %xmm9     # 0x333a0
movaps %xmm0, %xmm12
mulss %xmm0, %xmm12
movaps %xmm13, %xmm14
mulss %xmm13, %xmm14
addss %xmm12, %xmm14
cvtss2sd %xmm14, %xmm14
divsd %xmm11, %xmm14
xorps %xmm12, %xmm12
ucomisd 0x5483(%rip), %xmm14    # 0x343b8
ja 0x2efc1
mulsd 0x547c(%rip), %xmm14    # 0x343c0
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, %rdx      # imm = 0x100000000
addq %rdx, %rcx
leaq 0xd787(%rip), %rdx      # 0x3c720
movsd (%rdx,%rax,8), %xmm12
sarq $0x1d, %rcx
movsd (%rcx,%rdx), %xmm15
subsd %xmm12, %xmm15
mulsd %xmm14, %xmm15
addsd %xmm12, %xmm15
xorps %xmm12, %xmm12
cvtsd2ss %xmm15, %xmm12
cvtsd2ss %xmm9, %xmm9
movaps %xmm0, %xmm14
addps %xmm7, %xmm14
movaps %xmm14, %xmm15
shufps $0x55, %xmm14, %xmm15   # xmm15 = xmm15[1,1],xmm14[1,1]
cvttss2si %xmm15, %rcx
cvtss2sd %xmm13, %xmm13
xorps %xmm4, %xmm4
cvtsi2ss %rcx, %xmm4
xorps %xmm5, %xmm5
cmpnleps %xmm14, %xmm5
ucomiss %xmm4, %xmm15
setp %al
setne %r9b
orb %al, %r9b
cvtss2sd %xmm0, %xmm0
cvttss2si %xmm14, %r11
unpcklps %xmm5, %xmm5            # xmm5 = xmm5[0,0,1,1]
movmskpd %xmm5, %eax
movl %eax, %r10d
shrb %r10b
andb %r9b, %r10b
movzbl %r10b, %r9d
subq %r9, %rcx
xorps %xmm4, %xmm4
cvtsi2ss %r11, %xmm4
ucomiss %xmm4, %xmm14
setp %r9b
setne %r10b
orb %r9b, %r10b
andb %al, %r10b
cvttss2si %xmm9, %r15
movzbl %r10b, %eax
xorps %xmm4, %xmm4
cvtsi2ss %r15, %xmm4
subq %rax, %r11
xorps %xmm5, %xmm5
cmpnleps %xmm9, %xmm5
cmpneqps %xmm9, %xmm4
andps %xmm5, %xmm4
movd %xmm4, %eax
xorps %xmm4, %xmm4
cvtsi2sd %ecx, %xmm4
movsd 0x4160(%rip), %xmm5     # 0x331d0
addsd %xmm5, %xmm4
subsd %xmm4, %xmm13
cvtsd2ss %xmm13, %xmm13
addl %eax, %r15d
xorps %xmm4, %xmm4
cvtsi2sd %r11d, %xmm4
addsd %xmm5, %xmm4
subsd %xmm4, %xmm0
xorps %xmm14, %xmm14
cvtsi2ss %r15d, %xmm14
xorps %xmm15, %xmm15
cvtsd2ss %xmm0, %xmm15
mulss (%r8,%rdi,8), %xmm12
subss %xmm9, %xmm14
movslq %r11d, %r12
movslq %ecx, %rbp
xorl %ecx, %ecx
movl $0x1, %eax
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
leaq (%rcx,%rbp), %r13
leal -0x2(%r13), %r11d
subss %xmm13, %xmm0
andps %xmm8, %xmm0
mulss %xmm12, %xmm0
shlq $0x5, %r13
addq %rsi, %r13
xorl %r14d, %r14d
cmpl $-0x4, %r11d
setb %al
leaq (%r14,%r12), %rbx
leal -0x2(%rbx), %r9d
cmpl $-0x4, %r9d
setb %r9b
movl $0x1, %r10d
subl %r14d, %r10d
xorps %xmm9, %xmm9
cvtsi2ss %r10d, %xmm9
movl $0x1, %r10d
subss %xmm15, %xmm9
andps %xmm8, %xmm9
mulss %xmm0, %xmm9
shlq $0x7, %rbx
addq %r13, %rbx
orb %al, %r9b
movl %r15d, %eax
testb %r9b, %r9b
jne 0x2f169
xorps %xmm4, %xmm4
cvtsi2ss %r10d, %xmm4
addss %xmm14, %xmm4
andps %xmm8, %xmm4
leal 0x7(%rax), %r8d
testl %eax, %eax
cmovnsl %eax, %r8d
mulss %xmm9, %xmm4
andl $-0x8, %r8d
movl %eax, %edx
subl %r8d, %edx
movslq %edx, %rdx
addss (%rbx,%rdx,4), %xmm4
movss %xmm4, (%rbx,%rdx,4)
incl %eax
decl %r10d
je 0x2f12e
leaq 0x1(%r14), %rax
testq %r14, %r14
movq %rax, %r14
je 0x2f0e4
leaq 0x1(%rcx), %rax
testq %rcx, %rcx
movq %rax, %rcx
je 0x2f0b6
incq %rdi
cmpl %edi, 0x70(%rsp)
movq 0x8(%rsp), %r8
jne 0x2ee83
movq 0x38(%rsp), %rax
incq %rax
movq %rax, 0x38(%rsp)
cmpl %eax, 0x58(%rsp)
jne 0x2edfb
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 0x2f1c4
xorps %xmm1, %xmm1
cvtss2sd %xmm2, %xmm1
movsd 0x41bc(%rip), %xmm0     # 0x333a8
ucomisd %xmm1, %xmm0
movq 0x28(%rsp), %rdx
jbe 0x2f201
movss 0x4155(%rip), %xmm1     # 0x33354
jmp 0x2f255
movd %xmm2, %eax
sarl %eax
movl $0x5f3759df, %ecx       # imm = 0x5F3759DF
subl %eax, %ecx
movd %ecx, %xmm3
movss 0x412e(%rip), %xmm1     # 0x33348
mulss %xmm2, %xmm1
movaps %xmm1, %xmm4
mulss %xmm3, %xmm4
mulss %xmm3, %xmm4
movss 0x4137(%rip), %xmm5     # 0x33368
addss %xmm5, %xmm4
mulss %xmm3, %xmm4
mulss %xmm4, %xmm1
mulss %xmm4, %xmm1
addss %xmm5, %xmm1
mulss %xmm4, %xmm1
mulss %xmm2, %xmm1
addss 0x40ff(%rip), %xmm1     # 0x33354
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 0x2f25e
movsd 0x98(%rdx), %xmm2
xorps %xmm3, %xmm3
ucomisd %xmm3, %xmm2
jne 0x2f288
jnp 0x2f2af
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x2f2af
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9400
xorl %eax, %eax
movsd 0x46ff(%rip), %xmm1     # 0x339b8
movapd 0x471f(%rip), %xmm2     # 0x339e0
cvtps2pd 0x8(%rdi,%rax,4), %xmm3
cvtps2pd (%rdi,%rax,4), %xmm4
ucomisd %xmm1, %xmm4
jbe 0x2f2d7
movl $0x3e4ccccd, (%rdi,%rax,4) # imm = 0x3E4CCCCD
movapd %xmm2, %xmm5
cmpltpd %xmm4, %xmm5
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x2f2f2
movl $0x3e4ccccd, 0x4(%rdi,%rax,4) # imm = 0x3E4CCCCD
movapd %xmm2, %xmm4
cmpltpd %xmm3, %xmm4
pextrw $0x0, %xmm4, %ecx
testb $0x1, %cl
je 0x2f30d
movl $0x3e4ccccd, 0x8(%rdi,%rax,4) # imm = 0x3E4CCCCD
pextrw $0x4, %xmm4, %ecx
testb $0x1, %cl
je 0x2f31f
movl $0x3e4ccccd, 0xc(%rdi,%rax,4) # imm = 0x3E4CCCCD
addq $0x4, %rax
cmpq $0x80, %rax
jne 0x2f2c1
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 0x2f331
xorps %xmm2, %xmm2
cvtss2sd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x2f361
movss 0x3ff5(%rip), %xmm0     # 0x33354
jmp 0x2f3b5
movd %xmm1, %eax
sarl %eax
movl $0x5f3759df, %ecx       # imm = 0x5F3759DF
subl %eax, %ecx
movd %ecx, %xmm2
movss 0x3fce(%rip), %xmm0     # 0x33348
mulss %xmm1, %xmm0
movaps %xmm0, %xmm3
mulss %xmm2, %xmm3
mulss %xmm2, %xmm3
movss 0x3fd7(%rip), %xmm4     # 0x33368
addss %xmm4, %xmm3
mulss %xmm2, %xmm3
mulss %xmm3, %xmm0
mulss %xmm3, %xmm0
addss %xmm4, %xmm0
mulss %xmm3, %xmm0
mulss %xmm1, %xmm0
addss 0x3f9f(%rip), %xmm0     # 0x33354
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 0x2f3bb
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq