// File: /workspace/github_c_makefile_star2_O3/jrrk[P]cbzone/c_explode.c
// Function: calcpointsV
void calcpointsV(dc, method, index, g, pl)
     DCp dc;
     Methodp method;
     int index;
     Genericp g, pl;
{
  int i;
  float dx, dy, dz, xn, yn, zn, cn, sn, cp, sp, rx, ry, rz, prx, pry, prz;
  Coord2dp new;
  Coord3dp old;

  old = dc->s->object+index;
  new = dc->points+index;

  dx = pl->x - g->x - dc->pos.x;
  dy = pl->y - g->y - dc->pos.y;
  dz = - dc->pos.z;
  xn =  dx*dc->cta + dy*dc->sta;
  yn =  -dx*dc->sta*dc->ctp + dy*dc->cta*dc->ctp + dz*dc->stp;
  zn =  dx*dc->sta*dc->stp - dy*dc->cta*dc->stp + dz*dc->ctp;
  cn = pl->ca*dc->cta + pl->sa*dc->sta;
  sn = pl->sa*dc->cta - pl->ca*dc->sta;
  cp = dc->ctp;
  sp = -dc->stp;
  for (i=0; i<method->num; i++, old++, new++) {
    rx =  old->x - xn;
    ry =  old->y - yn;
    rz =  old->z - zn;
    prx =  rx*cn + ry*sn*cp + rz*sn*sp;
    pry = -rx*sn + ry*cn*cp + rz*cn*sp;
    if (pry < 10.0)
      pry = 10.0;
    prz = -ry*sp + rz*cp;
    new->x = 500 + prx / pry * 450;
    new->y = 260 - prz / pry * 450;
  }
}

// Assembly:
movl (%rsi), %eax
testl %eax, %eax
jle 0x51b7
movss 0xc(%r8), %xmm0
movss 0x10(%r8), %xmm5
subss 0xc(%rcx), %xmm0
subss 0x100(%rdi), %xmm0
subss 0x10(%rcx), %xmm5
subss 0x104(%rdi), %xmm5
movss 0x108(%rdi), %xmm6
movss 0x118(%rdi), %xmm8
movss 0x11c(%rdi), %xmm7
movaps %xmm5, %xmm2
mulss %xmm7, %xmm2
movaps %xmm0, %xmm1
mulss %xmm8, %xmm1
addss %xmm2, %xmm1
movss 0x120(%rdi), %xmm2
mulss %xmm8, %xmm5
movaps %xmm5, %xmm3
mulss %xmm2, %xmm3
mulss %xmm7, %xmm0
movaps %xmm0, %xmm4
mulss %xmm2, %xmm4
subss %xmm4, %xmm3
movss 0x124(%rdi), %xmm4
movaps %xmm6, %xmm9
mulss %xmm4, %xmm9
subss %xmm9, %xmm3
mulss %xmm4, %xmm5
mulss %xmm4, %xmm0
subss %xmm5, %xmm0
mulss %xmm2, %xmm6
subss %xmm6, %xmm0
movss 0x24(%r8), %xmm5
movss 0x28(%r8), %xmm6
movaps %xmm7, %xmm9
mulss %xmm6, %xmm9
mulss %xmm5, %xmm7
mulss %xmm8, %xmm5
addss %xmm9, %xmm5
mulss %xmm8, %xmm6
subss %xmm7, %xmm6
movaps 0x8f74(%rip), %xmm7     # 0xe010
xorps %xmm4, %xmm7
movslq %edx, %rdx
leaq (%rdi,%rdx,4), %rcx
addq $0x10, %rcx
movq (%rdi), %rsi
leaq (%rdx,%rdx,2), %rdx
addq %rdx, %rdx
addq (%rsi), %rdx
xorl %esi, %esi
movss 0x8f42(%rip), %xmm8     # 0xe004
movaps 0x8f56(%rip), %xmm10    # 0xe020
movsd 0x8f5d(%rip), %xmm11    # 0xe030
movswl (%rdx), %edi
xorps %xmm9, %xmm9
cvtsi2ss %edi, %xmm9
movswl 0x2(%rdx), %edi
xorps %xmm12, %xmm12
cvtsi2ss %edi, %xmm12
subss %xmm1, %xmm9
movswl 0x4(%rdx), %edi
subss %xmm3, %xmm12
xorps %xmm14, %xmm14
cvtsi2ss %edi, %xmm14
subss %xmm0, %xmm14
movaps %xmm6, %xmm13
mulss %xmm12, %xmm13
movaps %xmm9, %xmm15
mulss %xmm2, %xmm13
mulss %xmm5, %xmm15
addss %xmm13, %xmm15
movaps %xmm6, %xmm13
mulss %xmm14, %xmm13
mulss %xmm7, %xmm13
addss %xmm15, %xmm13
movaps %xmm5, %xmm15
mulss %xmm12, %xmm15
mulss %xmm2, %xmm15
mulss %xmm6, %xmm9
subss %xmm9, %xmm15
movaps %xmm5, %xmm9
mulss %xmm14, %xmm9
mulss %xmm7, %xmm9
addss %xmm15, %xmm9
mulss %xmm2, %xmm14
mulss %xmm4, %xmm12
addss %xmm14, %xmm12
movaps %xmm8, %xmm14
maxss %xmm9, %xmm14
xorps 0x8e8e(%rip), %xmm12    # 0xe010
unpcklps %xmm12, %xmm13          # xmm13 = xmm13[0],xmm12[0],xmm13[1],xmm12[1]
shufps $0x0, %xmm14, %xmm14    # xmm14 = xmm14[0,0,0,0]
divps %xmm14, %xmm13
mulps %xmm10, %xmm13
addps %xmm11, %xmm13
cvttps2dq %xmm13, %xmm9
pshuflw $0xe8, %xmm9, %xmm9     # xmm9 = xmm9[0,2,2,3,4,5,6,7]
movd %xmm9, (%rcx,%rsi,4)
addq $0x6, %rdx
incq %rsi
cmpl %esi, %eax
jne 0x50d3
retq