// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/hog.c
// Function: vl_hog_new
VlHog *
vl_hog_new (VlHogVariant variant, vl_size numOrientations, vl_bool transposed)
{
  vl_index o, k ;
  VlHog * self = vl_calloc(1, sizeof(VlHog)) ;

  assert(numOrientations >= 1) ;

  self->variant = variant ;
  self->numOrientations = numOrientations ;
  self->glyphSize = 21 ;
  self->transposed = transposed ;
  self->useBilinearOrientationAssigment = VL_FALSE ;
  self->orientationX = vl_malloc(sizeof(float) * self->numOrientations) ;
  self->orientationY = vl_malloc(sizeof(float) * self->numOrientations) ;

  /*
   Create a vector along the center of each orientation bin. These
   are used to map gradients to bins. If the image is transposed,
   then this can be adjusted here by swapping X and Y in these
   vectors.
   */
  for(o = 0 ; o < (signed)self->numOrientations ; ++o) {
    double angle = o * VL_PI / self->numOrientations ;
    if (!self->transposed) {
      self->orientationX[o] = (float) cos(angle) ;
      self->orientationY[o] = (float) sin(angle) ;
    } else {
      self->orientationX[o] = (float) sin(angle) ;
      self->orientationY[o] = (float) cos(angle) ;
    }
  }

  /*
   If the number of orientation is equal to 9, one gets:

   Uoccti:: 18 directed orientations + 9 undirected orientations + 4 texture
   DalalTriggs:: 9 undirected orientations x 4 blocks.
   */
  switch (self->variant) {
    case VlHogVariantUoctti:
      self->dimension = 3*self->numOrientations + 4 ;
      break ;

    case VlHogVariantDalalTriggs:
      self->dimension = 4*self->numOrientations ;
      break ;

    default:
      assert(0) ;
  }

  /*
   A permutation specifies how to permute elements in a HOG
   descriptor to flip it horizontally. Since the first orientation
   of index 0 points to the right, this must be swapped with orientation
   self->numOrientation that points to the left (for the directed case,
   and to itself for the undirected one).
   */

  self->permutation = vl_malloc(self->dimension * sizeof(vl_index)) ;
  switch (self->variant) {
    case VlHogVariantUoctti:
      for(o = 0 ; o < (signed)self->numOrientations ; ++o) {
        vl_index op = self->numOrientations - o ;
        self->permutation[o] = op ;
        self->permutation[o + self->numOrientations] = (op + self->numOrientations) % (2*self->numOrientations) ;
        self->permutation[o + 2*self->numOrientations] = (op % self->numOrientations) + 2*self->numOrientations ;
      }
      for (k = 0 ; k < 4 ; ++k) {
        /* The texture features correspond to four displaced block around
         a cell. These permute with a lr flip as for DalalTriggs. */
        vl_index blockx = k % 2 ;
        vl_index blocky = k / 2 ;
        vl_index q = (1 - blockx) + blocky * 2 ;
        self->permutation[k + self->numOrientations * 3] = q + self->numOrientations * 3 ;
      }
      break ;

    case VlHogVariantDalalTriggs:
      for(k = 0 ; k < 4 ; ++k) {
        /* Find the corresponding block. Blocks are listed in order 1,2,3,4,...
           from left to right and top to bottom */
        vl_index blockx = k % 2 ;
        vl_index blocky = k / 2 ;
        vl_index q = (1 - blockx) + blocky * 2 ;
        for(o = 0 ; o < (signed)self->numOrientations ; ++o) {
          vl_index op = self->numOrientations - o ;
          self->permutation[o + k*self->numOrientations] = (op % self->numOrientations) + q*self->numOrientations ;
        }
      }
      break ;

    default:
      assert(0) ;
  }

  /*
   Create glyphs for representing the HOG features/ filters. The glyphs
   are simple bars, oriented orthogonally to the gradients to represent
   image edges. If the object is configured to work on transposed image,
   the glyphs images are also stored in column-major.
   */
  self->glyphs = vl_calloc(self->glyphSize * self->glyphSize * self->numOrientations, sizeof(float)) ;
#define atglyph(x,y,k) self->glyphs[(x) + self->glyphSize * (y) + self->glyphSize * self->glyphSize * (k)]
  for (o = 0 ; o < (signed)self->numOrientations ; ++o) {
    double angle = fmod(o * VL_PI / self->numOrientations + VL_PI/2, VL_PI) ;
    double x2 = self->glyphSize * cos(angle) / 2 ;
    double y2 = self->glyphSize * sin(angle) / 2 ;

    if (angle <= VL_PI / 4 || angle >= VL_PI * 3 / 4) {
      /* along horizontal direction */
      double slope = y2 / x2 ;
      double offset = (1 - slope) * (self->glyphSize - 1) / 2 ;
      vl_index skip = (1 - fabs(cos(angle))) / 2 * self->glyphSize ;
      vl_index i, j ;
      for (i = skip ; i < (signed)self->glyphSize - skip ; ++i) {
        j = vl_round_d(slope * i + offset) ;
        if (! self->transposed) {
          atglyph(i,j,o) = 1 ;
        } else {
          atglyph(j,i,o) = 1 ;
        }
      }
    } else {
      /* along vertical direction */
      double slope = x2 / y2 ;
      double offset = (1 - slope) * (self->glyphSize - 1) / 2 ;
      vl_index skip = (1 - sin(angle)) / 2 * self->glyphSize ;
      vl_index i, j ;
      for (j = skip ; j < (signed)self->glyphSize - skip; ++j) {
        i = vl_round_d(slope * j + offset) ;
        if (! self->transposed) {
          atglyph(i,j,o) = 1 ;
        } else {
          atglyph(j,i,o) = 1 ;
        }
      }
    }
  }
  return self ;
}

// Assembly:
subq $0x188, %rsp            # imm = 0x188
movl %edi, 0x184(%rsp)
movq %rsi, 0x178(%rsp)
movl %edx, 0x174(%rsp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x9a70
movq %rax, 0x158(%rsp)
movl 0x184(%rsp), %ecx
movq 0x158(%rsp), %rax
movl %ecx, (%rax)
movq 0x178(%rsp), %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x158(%rsp), %rax
movq $0x15, 0x30(%rax)
movl 0x174(%rsp), %ecx
movq 0x158(%rsp), %rax
movl %ecx, 0x18(%rax)
movq 0x158(%rsp), %rax
movl $0x0, 0x1c(%rax)
movq 0x158(%rsp), %rax
movq 0x10(%rax), %rdi
shlq $0x2, %rdi
callq 0x9660
movq %rax, %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x158(%rsp), %rax
movq 0x10(%rax), %rdi
shlq $0x2, %rdi
callq 0x9660
movq %rax, %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x40(%rax)
movq $0x0, 0x168(%rsp)
movq 0x168(%rsp), %rax
movq 0x158(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x1e487
cvtsi2sdq 0x168(%rsp), %xmm0
movsd 0x3b480(%rip), %xmm1    # 0x597f0
mulsd %xmm1, %xmm0
movq 0x158(%rsp), %rax
movq 0x10(%rax), %xmm1
movaps 0x3add8(%rip), %xmm2    # 0x59160
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3addc(%rip), %xmm2    # 0x59170
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x150(%rsp)
movq 0x158(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x1e416
movsd 0x150(%rsp), %xmm0
callq 0x94e0
cvtsd2ss %xmm0, %xmm0
movq 0x158(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x168(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movsd 0x150(%rsp), %xmm0
callq 0x99e0
cvtsd2ss %xmm0, %xmm0
movq 0x158(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x168(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
jmp 0x1e46c
movsd 0x150(%rsp), %xmm0
callq 0x99e0
cvtsd2ss %xmm0, %xmm0
movq 0x158(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x168(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movsd 0x150(%rsp), %xmm0
callq 0x94e0
cvtsd2ss %xmm0, %xmm0
movq 0x158(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x168(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
jmp 0x1e46e
movq 0x168(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x168(%rsp)
jmp 0x1e33e
movq 0x158(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xa4(%rsp)
testl %eax, %eax
je 0x1e4cb
jmp 0x1e49e
movl 0xa4(%rsp), %eax
subl $0x1, %eax
jne 0x1e4e9
jmp 0x1e4ac
movq 0x158(%rsp), %rax
imulq $0x3, 0x10(%rax), %rcx
addq $0x4, %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1e4eb
movq 0x158(%rsp), %rax
movq 0x10(%rax), %rcx
shlq $0x2, %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1e4eb
jmp 0x1e4eb
movq 0x158(%rsp), %rax
movq 0x8(%rax), %rdi
shlq $0x3, %rdi
callq 0x9660
movq %rax, %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x158(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xa0(%rsp)
testl %eax, %eax
je 0x1e72b
jmp 0x1e52a
movl 0xa0(%rsp), %eax
subl $0x1, %eax
jne 0x1e879
jmp 0x1e53c
movq $0x0, 0x168(%rsp)
movq 0x168(%rsp), %rax
movq 0x158(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x1e65b
movq 0x158(%rsp), %rax
movq 0x10(%rax), %rax
subq 0x168(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x148(%rsp), %rdx
movq 0x158(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x168(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x148(%rsp), %rax
movq 0x158(%rsp), %rcx
addq 0x10(%rcx), %rax
movq 0x158(%rsp), %rcx
movq 0x10(%rcx), %rcx
shlq %rcx
xorl %edx, %edx
divq %rcx
movq 0x158(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x168(%rsp), %rcx
movq 0x158(%rsp), %rsi
addq 0x10(%rsi), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x148(%rsp), %rax
movq 0x158(%rsp), %rcx
xorl %edx, %edx
divq 0x10(%rcx)
movq 0x158(%rsp), %rax
movq 0x10(%rax), %rax
shlq %rax
addq %rax, %rdx
movq 0x158(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x168(%rsp), %rcx
movq 0x158(%rsp), %rsi
movq 0x10(%rsi), %rsi
shlq %rsi
addq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x168(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x168(%rsp)
jmp 0x1e548
movq $0x0, 0x160(%rsp)
cmpq $0x4, 0x160(%rsp)
jge 0x1e726
movq 0x160(%rsp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rdx, 0x140(%rsp)
movq 0x160(%rsp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, 0x138(%rsp)
movl $0x1, %eax
subq 0x140(%rsp), %rax
movq 0x138(%rsp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rdx
movq 0x158(%rsp), %rax
imulq $0x3, 0x10(%rax), %rax
addq %rax, %rdx
movq 0x158(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x160(%rsp), %rcx
movq 0x158(%rsp), %rsi
imulq $0x3, 0x10(%rsi), %rsi
addq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x160(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x160(%rsp)
jmp 0x1e667
jmp 0x1e87b
movq $0x0, 0x160(%rsp)
cmpq $0x4, 0x160(%rsp)
jge 0x1e877
movq 0x160(%rsp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rdx, 0x128(%rsp)
movq 0x160(%rsp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, 0x120(%rsp)
movl $0x1, %eax
subq 0x128(%rsp), %rax
movq 0x120(%rsp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, 0x118(%rsp)
movq $0x0, 0x168(%rsp)
movq 0x168(%rsp), %rax
movq 0x158(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x1e85c
movq 0x158(%rsp), %rax
movq 0x10(%rax), %rax
subq 0x168(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq 0x158(%rsp), %rcx
xorl %edx, %edx
divq 0x10(%rcx)
movq 0x118(%rsp), %rax
movq 0x158(%rsp), %rcx
imulq 0x10(%rcx), %rax
addq %rax, %rdx
movq 0x158(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x168(%rsp), %rcx
movq 0x160(%rsp), %rsi
movq 0x158(%rsp), %rdi
imulq 0x10(%rdi), %rsi
addq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x168(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x168(%rsp)
jmp 0x1e7a9
jmp 0x1e85e
movq 0x160(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x160(%rsp)
jmp 0x1e737
jmp 0x1e87b
jmp 0x1e87b
movq 0x158(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x158(%rsp), %rax
imulq 0x30(%rax), %rdi
movq 0x158(%rsp), %rax
imulq 0x10(%rax), %rdi
movl $0x4, %esi
callq 0x9a70
movq %rax, %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x28(%rax)
movq $0x0, 0x168(%rsp)
movq 0x168(%rsp), %rax
movq 0x158(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x1ef15
cvtsi2sdq 0x168(%rsp), %xmm0
movsd 0x3aef8(%rip), %xmm1    # 0x597f0
mulsd %xmm1, %xmm0
movq 0x158(%rsp), %rax
movq 0x10(%rax), %xmm2
movaps 0x3a850(%rip), %xmm3    # 0x59160
movaps %xmm3, 0x70(%rsp)
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movapd 0x3a84f(%rip), %xmm3    # 0x59170
movaps %xmm3, 0x80(%rsp)
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
divsd %xmm2, %xmm0
movsd 0x3a7fc(%rip), %xmm2    # 0x59140
addsd %xmm2, %xmm0
callq 0x94d0
movaps 0x70(%rsp), %xmm2
movaps 0x80(%rsp), %xmm1
movsd %xmm0, 0x108(%rsp)
movq 0x158(%rsp), %rax
movq 0x30(%rax), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x108(%rsp), %xmm0
callq 0x94e0
movaps 0x70(%rsp), %xmm2
movaps 0x80(%rsp), %xmm1
movaps %xmm0, %xmm3
movsd 0x90(%rsp), %xmm0
mulsd %xmm3, %xmm0
movsd 0x3a6c1(%rip), %xmm3    # 0x59080
mulsd %xmm3, %xmm0
movsd %xmm0, 0x100(%rsp)
movq 0x158(%rsp), %rax
movq 0x30(%rax), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0x108(%rsp), %xmm0
callq 0x99e0
movaps %xmm0, %xmm1
movsd 0x98(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd 0x3a6c5(%rip), %xmm1    # 0x590e0
divsd %xmm1, %xmm0
movsd %xmm0, 0xf8(%rsp)
movsd 0x3adb8(%rip), %xmm0    # 0x597e8
ucomisd 0x108(%rsp), %xmm0
jae 0x1ea56
movsd 0x108(%rsp), %xmm0
movsd 0x3adac(%rip), %xmm1    # 0x597f8
ucomisd %xmm1, %xmm0
jb 0x1ecaf
movsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xf0(%rsp)
movsd 0xf0(%rsp), %xmm1
movsd 0x3a652(%rip), %xmm0    # 0x590d8
movsd %xmm0, 0x68(%rsp)
subsd %xmm1, %xmm0
movq 0x158(%rsp), %rax
movq 0x30(%rax), %rax
decq %rax
movq %rax, %xmm1
movaps 0x3a6b5(%rip), %xmm2    # 0x59160
movaps %xmm2, 0x40(%rsp)
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3a6b4(%rip), %xmm2    # 0x59170
movaps %xmm2, 0x50(%rsp)
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x3a5a4(%rip), %xmm1    # 0x59080
movsd %xmm1, 0x38(%rsp)
mulsd %xmm1, %xmm0
movsd %xmm0, 0xe8(%rsp)
movsd 0x108(%rsp), %xmm0
callq 0x94e0
movsd 0x38(%rsp), %xmm1
movaps 0x40(%rsp), %xmm3
movaps 0x50(%rsp), %xmm2
movaps %xmm0, %xmm4
movsd 0x68(%rsp), %xmm0
movaps 0x3a633(%rip), %xmm5    # 0x59150
pand %xmm5, %xmm4
subsd %xmm4, %xmm0
mulsd %xmm1, %xmm0
movq 0x158(%rsp), %rax
movq 0x30(%rax), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rax
movq 0x158(%rsp), %rcx
movq 0x30(%rcx), %rcx
movslq %ecx, %rcx
subq 0xe0(%rsp), %rcx
cmpq %rcx, %rax
jge 0x1ecaa
movsd 0xf0(%rsp), %xmm0
cvtsi2sdq 0xd8(%rsp), %xmm2
movsd 0xe8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x1ef30
movq %rax, 0xd0(%rsp)
movq 0x158(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x1ec31
movq 0x158(%rsp), %rax
movq 0x28(%rax), %rax
movq 0xd8(%rsp), %rcx
movq 0x158(%rsp), %rdx
movq 0x30(%rdx), %rdx
imulq 0xd0(%rsp), %rdx
addq %rdx, %rcx
movq 0x158(%rsp), %rdx
movq 0x30(%rdx), %rdx
movq 0x158(%rsp), %rsi
imulq 0x30(%rsi), %rdx
imulq 0x168(%rsp), %rdx
addq %rdx, %rcx
movss 0x3a566(%rip), %xmm0    # 0x59190
movss %xmm0, (%rax,%rcx,4)
jmp 0x1ec8f
movq 0x158(%rsp), %rax
movq 0x28(%rax), %rax
movq 0xd0(%rsp), %rcx
movq 0x158(%rsp), %rdx
movq 0x30(%rdx), %rdx
imulq 0xd8(%rsp), %rdx
addq %rdx, %rcx
movq 0x158(%rsp), %rdx
movq 0x30(%rdx), %rdx
movq 0x158(%rsp), %rsi
imulq 0x30(%rsi), %rdx
imulq 0x168(%rsp), %rdx
addq %rdx, %rcx
movss 0x3a506(%rip), %xmm0    # 0x59190
movss %xmm0, (%rax,%rcx,4)
jmp 0x1ec91
movq 0xd8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd8(%rsp)
jmp 0x1eb6a
jmp 0x1eefa
movsd 0x100(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xc8(%rsp)
movsd 0xc8(%rsp), %xmm1
movsd 0x3a3f9(%rip), %xmm0    # 0x590d8
movsd %xmm0, 0x30(%rsp)
subsd %xmm1, %xmm0
movq 0x158(%rsp), %rax
movq 0x30(%rax), %rax
decq %rax
movq %rax, %xmm1
movaps 0x3a45c(%rip), %xmm2    # 0x59160
movaps %xmm2, 0x10(%rsp)
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3a45b(%rip), %xmm2    # 0x59170
movaps %xmm2, 0x20(%rsp)
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x3a34b(%rip), %xmm1    # 0x59080
movsd %xmm1, 0x8(%rsp)
mulsd %xmm1, %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0x108(%rsp), %xmm0
callq 0x99e0
movsd 0x8(%rsp), %xmm1
movaps 0x10(%rsp), %xmm3
movaps 0x20(%rsp), %xmm2
movaps %xmm0, %xmm4
movsd 0x30(%rsp), %xmm0
subsd %xmm4, %xmm0
mulsd %xmm1, %xmm0
movq 0x158(%rsp), %rax
movq 0x30(%rax), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq 0x158(%rsp), %rcx
movq 0x30(%rcx), %rcx
movslq %ecx, %rcx
subq 0xb8(%rsp), %rcx
cmpq %rcx, %rax
jge 0x1eef8
movsd 0xc8(%rsp), %xmm0
cvtsi2sdq 0xa8(%rsp), %xmm2
movsd 0xc0(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x1ef30
movq %rax, 0xb0(%rsp)
movq 0x158(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x1ee7f
movq 0x158(%rsp), %rax
movq 0x28(%rax), %rax
movq 0xb0(%rsp), %rcx
movq 0x158(%rsp), %rdx
movq 0x30(%rdx), %rdx
imulq 0xa8(%rsp), %rdx
addq %rdx, %rcx
movq 0x158(%rsp), %rdx
movq 0x30(%rdx), %rdx
movq 0x158(%rsp), %rsi
imulq 0x30(%rsi), %rdx
imulq 0x168(%rsp), %rdx
addq %rdx, %rcx
movss 0x3a318(%rip), %xmm0    # 0x59190
movss %xmm0, (%rax,%rcx,4)
jmp 0x1eedd
movq 0x158(%rsp), %rax
movq 0x28(%rax), %rax
movq 0xa8(%rsp), %rcx
movq 0x158(%rsp), %rdx
movq 0x30(%rdx), %rdx
imulq 0xb0(%rsp), %rdx
addq %rdx, %rcx
movq 0x158(%rsp), %rdx
movq 0x30(%rdx), %rdx
movq 0x158(%rsp), %rsi
imulq 0x30(%rsi), %rdx
imulq 0x168(%rsp), %rdx
addq %rdx, %rcx
movss 0x3a2b8(%rip), %xmm0    # 0x59190
movss %xmm0, (%rax,%rcx,4)
jmp 0x1eedf
movq 0xa8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa8(%rsp)
jmp 0x1edb8
jmp 0x1eefa
jmp 0x1eefc
movq 0x168(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x168(%rsp)
jmp 0x1e8c6
movq 0x158(%rsp), %rax
addq $0x188, %rsp            # imm = 0x188
retq
nopw %cs:(%rax,%rax)