// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_extract_affine_shape_for_frame
int
vl_covdet_extract_affine_shape_for_frame (VlCovDet * self,
                                          VlFrameOrientedEllipse * adapted,
                                          VlFrameOrientedEllipse frame)
{
  vl_index iter = 0 ;

  double A [2*2] = {frame.a11, frame.a21, frame.a12, frame.a22} ;
  double T [2] = {frame.x, frame.y} ;
  double U [2*2] ;
  double V [2*2] ;
  double D [2*2] ;
  double M [2*2] ;
  double P [2*2] ;
  double P_ [2*2] ;
  double Q [2*2] ;
  double sigma1, sigma2 ;
  double sigmaD = VL_COVDET_AA_RELATIVE_DERIVATIVE_SIGMA ;
  double factor ;
  double anisotropy ;
  double referenceScale ;
  vl_size const resolution = VL_COVDET_AA_PATCH_RESOLUTION ;
  vl_size const side = 2*VL_COVDET_AA_PATCH_RESOLUTION + 1 ;
  double const extent = VL_COVDET_AA_PATCH_EXTENT ;


  *adapted = frame ;

  while (1) {
    double lxx = 0, lxy = 0, lyy = 0 ;
    vl_index k ;
    int err ;

    /* A = U D V' */
    vl_svd2(D, U, V, A) ;
    anisotropy = VL_MAX(D[0]/D[3], D[3]/D[0]) ;

    /* VL_PRINTF("anisot: %g\n", anisotropy); */

    if (anisotropy > VL_COVDET_AA_MAX_ANISOTROPY) {
      /* diverged, give up with current solution */
      break ;
    }

    /* make sure that the smallest singluar value stays fixed
       after the first iteration */
    if (iter == 0) {
      referenceScale = VL_MIN(D[0], D[3]) ;
      factor = 1.0 ;
    } else {
      factor = referenceScale / VL_MIN(D[0],D[3]) ;
    }

    D[0] *= factor ;
    D[3] *= factor ;

    A[0] = U[0] * D[0] ;
    A[1] = U[1] * D[0] ;
    A[2] = U[2] * D[3] ;
    A[3] = U[3] * D[3] ;

    adapted->a11 = A[0] ;
    adapted->a21 = A[1] ;
    adapted->a12 = A[2] ;
    adapted->a22 = A[3] ;

    if (++iter >= VL_COVDET_AA_MAX_NUM_ITERATIONS) break ;

    err = vl_covdet_extract_patch_helper(self,
                                         &sigma1, &sigma2,
                                         self->aaPatch,
                                         resolution,
                                         extent,
                                         sigmaD,
                                         A, T, D[0], D[3]) ;
    if (err) return err ;

    if (self->aaAccurateSmoothing ) {
      double deltaSigma1 = sqrt(VL_MAX(sigmaD*sigmaD - sigma1*sigma1,0)) ;
      double deltaSigma2 = sqrt(VL_MAX(sigmaD*sigmaD - sigma2*sigma2,0)) ;
      double stephat = extent / resolution ;
      vl_imsmooth_f(self->aaPatch, side,
                    self->aaPatch, side, side, side,
                    deltaSigma1 / stephat, deltaSigma2 / stephat) ;
    }

    /* compute second moment matrix */
    vl_imgradient_f (self->aaPatchX, self->aaPatchY, 1, side,
                     self->aaPatch, side, side, side) ;

    for (k = 0 ; k < (signed)(side*side) ; ++k) {
      double lx = self->aaPatchX[k] ;
      double ly = self->aaPatchY[k] ;
      lxx += lx * lx * self->aaMask[k] ;
      lyy += ly * ly * self->aaMask[k] ;
      lxy += lx * ly * self->aaMask[k] ;
    }
    M[0] = lxx ;
    M[1] = lxy ;
    M[2] = lxy ;
    M[3] = lyy ;

    if (lxx == 0 || lyy == 0) {
      *adapted = frame ;
      break ;
    }

    /* decompose M = P * Q * P' */
    vl_svd2 (Q, P, P_, M) ;

    /*
     Setting A <- A * dA results in M to change approximatively as

     M --> dA'  M dA = dA' P Q P dA

     To make this proportional to the identity, we set

     dA ~= P Q^1/2

     we also make it so the smallest singular value of A is unchanged.
     */

    if (Q[3]/Q[0] < VL_COVDET_AA_CONVERGENCE_THRESHOLD &&
        Q[0]/Q[3] < VL_COVDET_AA_CONVERGENCE_THRESHOLD) {
      break ;
    }

    {
      double Ap [4] ;
      double q0 = sqrt(Q[0]) ;
      double q1 = sqrt(Q[3]) ;
      Ap[0] = (A[0] * P[0] + A[2] * P[1]) / q0 ;
      Ap[1] = (A[1] * P[0] + A[3] * P[1]) / q0 ;
      Ap[2] = (A[0] * P[2] + A[2] * P[3]) / q1 ;
      Ap[3] = (A[1] * P[2] + A[3] * P[3]) / q1 ;
      memcpy(A,Ap,4*sizeof(double)) ;
    }

  } /* next iteration */

  /*
   Make upright.

   Shape adaptation does not estimate rotation. This is fixed by default
   so that a selected axis is not rotated at all (usually this is the
   vertical axis for upright features). To do so, the frame is rotated
   as follows.
   */
  {
    double A [2*2] = {adapted->a11, adapted->a21, adapted->a12, adapted->a22} ;
    double ref [2] ;
    double ref_ [2] ;
    double angle ;
    double angle_ ;
    double dangle ;
    double r1, r2 ;

    if (self->transposed) {
      /* up is the x axis */
      ref[0] = 1 ;
      ref[1] = 0 ;
    } else {
      /* up is the y axis */
      ref[0] = 0 ;
      ref[1] = 1 ;
    }

    vl_solve_linear_system_2 (ref_, A, ref) ;
    angle = atan2(ref[1], ref[0]) ;
    angle_ = atan2(ref_[1], ref_[0]) ;
    dangle = angle_ - angle ;
    r1 = cos(dangle) ;
    r2 = sin(dangle) ;
    adapted->a11 = + A[0] * r1 + A[2] * r2 ;
    adapted->a21 = + A[1] * r1 + A[3] * r2 ;
    adapted->a12 = - A[0] * r2 + A[2] * r1 ;
    adapted->a22 = - A[1] * r2 + A[3] * r1 ;
  }

  return VL_ERR_OK ;
}

// Assembly:
subq $0x2b8, %rsp            # imm = 0x2B8
leaq 0x2c0(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq %rdi, 0x2a8(%rsp)
movq %rsi, 0x2a0(%rsp)
movq $0x0, 0x298(%rsp)
movss 0x8(%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x270(%rsp)
movss 0x10(%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x278(%rsp)
movss 0xc(%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x280(%rsp)
movss 0x14(%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x288(%rsp)
movss (%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x260(%rsp)
movss 0x4(%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x268(%rsp)
movsd 0x47c75(%rip), %xmm0    # 0x590d8
movsd %xmm0, 0x168(%rsp)
movq $0x14, 0x148(%rsp)
movq $0x29, 0x140(%rsp)
movsd 0x47c64(%rip), %xmm0    # 0x590f0
movsd %xmm0, 0x138(%rsp)
movq 0x2a0(%rsp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x130(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x128(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x120(%rsp)
leaq 0x200(%rsp), %rdi
leaq 0x240(%rsp), %rsi
leaq 0x220(%rsp), %rdx
leaq 0x270(%rsp), %rcx
callq 0x9730
movsd 0x200(%rsp), %xmm0
divsd 0x218(%rsp), %xmm0
movsd 0x218(%rsp), %xmm1
divsd 0x200(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x11540
movsd 0x200(%rsp), %xmm0
divsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
jmp 0x11558
movsd 0x218(%rsp), %xmm0
divsd 0x200(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x158(%rsp)
movsd 0x158(%rsp), %xmm0
movsd 0x47ba8(%rip), %xmm1    # 0x59120
ucomisd %xmm1, %xmm0
jbe 0x11583
jmp 0x11e04
cmpq $0x0, 0x298(%rsp)
jne 0x115e8
movsd 0x200(%rsp), %xmm1
movsd 0x218(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x115b7
movsd 0x200(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
jmp 0x115c6
movsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x150(%rsp)
movsd 0x47afb(%rip), %xmm0    # 0x590d8
movsd %xmm0, 0x160(%rsp)
jmp 0x11648
movsd 0x150(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x200(%rsp), %xmm1
movsd 0x218(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x11620
movsd 0x200(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x1162f
movsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x160(%rsp)
movsd 0x160(%rsp), %xmm0
mulsd 0x200(%rsp), %xmm0
movsd %xmm0, 0x200(%rsp)
movsd 0x160(%rsp), %xmm0
mulsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x218(%rsp)
movsd 0x240(%rsp), %xmm0
mulsd 0x200(%rsp), %xmm0
movsd %xmm0, 0x270(%rsp)
movsd 0x248(%rsp), %xmm0
mulsd 0x200(%rsp), %xmm0
movsd %xmm0, 0x278(%rsp)
movsd 0x250(%rsp), %xmm0
mulsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x280(%rsp)
movsd 0x258(%rsp), %xmm0
mulsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x288(%rsp)
movsd 0x270(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x2a0(%rsp), %rax
movss %xmm0, 0x8(%rax)
movsd 0x278(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x2a0(%rsp), %rax
movss %xmm0, 0x10(%rax)
movsd 0x280(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x2a0(%rsp), %rax
movss %xmm0, 0xc(%rax)
movsd 0x288(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x2a0(%rsp), %rax
movss %xmm0, 0x14(%rax)
movq 0x298(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x298(%rsp)
cmpq $0xf, %rax
jl 0x11771
jmp 0x11e04
movq 0x2a8(%rsp), %rdi
movq 0x2a8(%rsp), %rcx
addq $0x104, %rcx            # imm = 0x104
movsd 0x168(%rsp), %xmm1
leaq 0x270(%rsp), %r9
leaq 0x260(%rsp), %rax
movsd 0x200(%rsp), %xmm2
movsd 0x218(%rsp), %xmm3
leaq 0x178(%rsp), %rsi
leaq 0x170(%rsp), %rdx
movl $0x14, %r8d
movsd 0x4791f(%rip), %xmm0    # 0x590f0
movq %rax, (%rsp)
callq 0xfdd0
movl %eax, 0x114(%rsp)
cmpl $0x0, 0x114(%rsp)
je 0x117fe
movl 0x114(%rsp), %eax
movl %eax, 0x2b4(%rsp)
jmp 0x1204d
movq 0x2a8(%rsp), %rax
cmpl $0x0, 0x100(%rax)
je 0x119e6
movsd 0x168(%rsp), %xmm0
movsd 0x168(%rsp), %xmm2
movsd 0x178(%rsp), %xmm1
mulsd 0x178(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x118aa
movsd 0x168(%rsp), %xmm0
movsd 0x168(%rsp), %xmm2
movsd 0x178(%rsp), %xmm1
mulsd 0x178(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x118b5
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x118b5
movsd 0x18(%rsp), %xmm0
callq 0x9b20
movsd %xmm0, 0x108(%rsp)
movsd 0x168(%rsp), %xmm0
movsd 0x168(%rsp), %xmm2
movsd 0x170(%rsp), %xmm1
mulsd 0x170(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x11960
movsd 0x168(%rsp), %xmm0
movsd 0x168(%rsp), %xmm2
movsd 0x170(%rsp), %xmm1
mulsd 0x170(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0x1196b
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0x1196b
movsd 0x10(%rsp), %xmm0
callq 0x9b20
movsd %xmm0, 0x100(%rsp)
movsd 0x477a1(%rip), %xmm0    # 0x59128
movsd %xmm0, 0xf8(%rsp)
movq 0x2a8(%rsp), %rdi
addq $0x104, %rdi            # imm = 0x104
movq 0x2a8(%rsp), %rdx
addq $0x104, %rdx            # imm = 0x104
movsd 0x108(%rsp), %xmm0
divsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
divsd 0xf8(%rsp), %xmm1
movl $0x29, %r9d
movq %r9, %rsi
movq %r9, %rcx
movq %r9, %r8
callq 0x98e0
movq 0x2a8(%rsp), %rdi
addq $0x1b48, %rdi           # imm = 0x1B48
movq 0x2a8(%rsp), %rsi
addq $0x358c, %rsi           # imm = 0x358C
movq 0x2a8(%rsp), %r8
addq $0x104, %r8             # imm = 0x104
movl $0x1, %edx
movl $0x29, %r9d
movq %r9, %rcx
movq $0x29, (%rsp)
movq $0x29, 0x8(%rsp)
callq 0x9190
movq $0x0, 0x118(%rsp)
cmpq $0x691, 0x118(%rsp) # imm = 0x691
jge 0x11b95
movq 0x2a8(%rsp), %rax
movq 0x118(%rsp), %rcx
movss 0x1b48(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0xf0(%rsp)
movq 0x2a8(%rsp), %rax
movq 0x118(%rsp), %rcx
movss 0x358c(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0xe8(%rsp)
movsd 0xf0(%rsp), %xmm0
mulsd 0xf0(%rsp), %xmm0
movq 0x2a8(%rsp), %rax
movq 0x118(%rsp), %rcx
movss 0x4fd0(%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x130(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
movsd 0xe8(%rsp), %xmm0
mulsd 0xe8(%rsp), %xmm0
movq 0x2a8(%rsp), %rax
movq 0x118(%rsp), %rcx
movss 0x4fd0(%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x120(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x120(%rsp)
movsd 0xf0(%rsp), %xmm0
mulsd 0xe8(%rsp), %xmm0
movq 0x2a8(%rsp), %rax
movq 0x118(%rsp), %rcx
movss 0x4fd0(%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x128(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x128(%rsp)
movq 0x118(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x118(%rsp)
jmp 0x11a43
movsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x1e0(%rsp)
movsd 0x128(%rsp), %xmm0
movsd %xmm0, 0x1e8(%rsp)
movsd 0x128(%rsp), %xmm0
movsd %xmm0, 0x1f0(%rsp)
movsd 0x120(%rsp), %xmm0
movsd %xmm0, 0x1f8(%rsp)
movsd 0x130(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x11bf3
jp 0x11bf3
jmp 0x11c07
movsd 0x120(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x11c2f
jp 0x11c2f
movq 0x40(%rsp), %rcx
movq 0x2a0(%rsp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x11e04
leaq 0x180(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
leaq 0x1e0(%rsp), %rcx
callq 0x9730
movsd 0x198(%rsp), %xmm1
divsd 0x180(%rsp), %xmm1
movsd 0x474c2(%rip), %xmm0    # 0x59130
ucomisd %xmm1, %xmm0
jbe 0x11c99
movsd 0x180(%rsp), %xmm1
divsd 0x198(%rsp), %xmm1
movsd 0x474a2(%rip), %xmm0    # 0x59130
ucomisd %xmm1, %xmm0
jbe 0x11c99
jmp 0x11e04
movsd 0x180(%rsp), %xmm0
callq 0x9b20
movsd %xmm0, 0xb8(%rsp)
movsd 0x198(%rsp), %xmm0
callq 0x9b20
movsd %xmm0, 0xb0(%rsp)
movsd 0x270(%rsp), %xmm0
movsd 0x1c0(%rsp), %xmm2
movsd 0x280(%rsp), %xmm1
mulsd 0x1c8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0xb8(%rsp), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0x278(%rsp), %xmm0
movsd 0x1c0(%rsp), %xmm2
movsd 0x288(%rsp), %xmm1
mulsd 0x1c8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0xb8(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
movsd 0x270(%rsp), %xmm0
movsd 0x1d0(%rsp), %xmm2
movsd 0x280(%rsp), %xmm1
mulsd 0x1d8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0xb0(%rsp), %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0x278(%rsp), %xmm0
movsd 0x1d0(%rsp), %xmm2
movsd 0x288(%rsp), %xmm1
mulsd 0x1d8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0xb0(%rsp), %xmm0
movsd %xmm0, 0xd8(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x270(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x278(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x280(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x288(%rsp)
jmp 0x114b3
movq 0x2a0(%rsp), %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x90(%rsp)
movq 0x2a0(%rsp), %rax
movss 0x10(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x98(%rsp)
movq 0x2a0(%rsp), %rax
movss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0xa0(%rsp)
movq 0x2a0(%rsp), %rax
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0xa8(%rsp)
movq 0x2a8(%rsp), %rax
cmpl $0x0, 0x78(%rax)
je 0x11e99
movsd 0x47256(%rip), %xmm0    # 0x590d8
movsd %xmm0, 0x80(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x88(%rsp)
jmp 0x11eb6
xorps %xmm0, %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x4722b(%rip), %xmm0    # 0x590d8
movsd %xmm0, 0x88(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x9a60
movsd 0x88(%rsp), %xmm0
movsd 0x80(%rsp), %xmm1
callq 0x9820
movsd %xmm0, 0x68(%rsp)
movsd 0x78(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
callq 0x9820
movsd %xmm0, 0x60(%rsp)
movsd 0x60(%rsp), %xmm0
subsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x58(%rsp), %xmm0
callq 0x94e0
movsd %xmm0, 0x50(%rsp)
movsd 0x58(%rsp), %xmm0
callq 0x99e0
movsd %xmm0, 0x48(%rsp)
movsd 0x90(%rsp), %xmm0
movsd 0x50(%rsp), %xmm2
movsd 0xa0(%rsp), %xmm1
mulsd 0x48(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x2a0(%rsp), %rax
movss %xmm0, 0x8(%rax)
movsd 0x98(%rsp), %xmm0
movsd 0x50(%rsp), %xmm2
movsd 0xa8(%rsp), %xmm1
mulsd 0x48(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x2a0(%rsp), %rax
movss %xmm0, 0x10(%rax)
movsd 0x90(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x48(%rsp), %xmm2
movsd 0xa0(%rsp), %xmm1
mulsd 0x50(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x2a0(%rsp), %rax
movss %xmm0, 0xc(%rax)
movsd 0x98(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x48(%rsp), %xmm2
movsd 0xa8(%rsp), %xmm1
mulsd 0x50(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x2a0(%rsp), %rax
movss %xmm0, 0x14(%rax)
movl $0x0, 0x2b4(%rsp)
movl 0x2b4(%rsp), %eax
addq $0x2b8, %rsp            # imm = 0x2B8
retq
nopl (%rax)