// File: /workspace/github_c_makefile_star2_O1/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 0x5215
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 0x8f34(%rip), %xmm7     # 0xe020
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 0x8ef6(%rip), %xmm9     # 0xe008
movss 0x8ef1(%rip), %xmm10    # 0xe00c
movss 0x8eec(%rip), %xmm11    # 0xe010
movswl (%rdx), %edi
xorps %xmm8, %xmm8
cvtsi2ss %edi, %xmm8
movswl 0x2(%rdx), %edi
xorps %xmm12, %xmm12
cvtsi2ss %edi, %xmm12
subss %xmm1, %xmm8
movswl 0x4(%rdx), %edi
subss %xmm3, %xmm12
xorps %xmm13, %xmm13
cvtsi2ss %edi, %xmm13
subss %xmm0, %xmm13
movaps %xmm6, %xmm15
mulss %xmm12, %xmm15
movaps %xmm8, %xmm14
mulss %xmm2, %xmm15
mulss %xmm5, %xmm14
addss %xmm15, %xmm14
movaps %xmm6, %xmm15
mulss %xmm13, %xmm15
mulss %xmm7, %xmm15
addss %xmm14, %xmm15
movaps %xmm5, %xmm14
mulss %xmm12, %xmm14
mulss %xmm2, %xmm14
mulss %xmm6, %xmm8
subss %xmm8, %xmm14
movaps %xmm5, %xmm8
mulss %xmm13, %xmm8
mulss %xmm7, %xmm8
addss %xmm14, %xmm8
movss 0x8e48(%rip), %xmm14    # 0xe004
maxss %xmm8, %xmm14
divss %xmm14, %xmm15
mulss %xmm9, %xmm15
addss %xmm10, %xmm15
cvttss2si %xmm15, %edi
mulss %xmm2, %xmm13
mulss %xmm4, %xmm12
addss %xmm13, %xmm12
divss %xmm14, %xmm12
mulss %xmm9, %xmm12
movaps %xmm11, %xmm8
subss %xmm12, %xmm8
cvttss2si %xmm8, %r8d
movw %di, (%rcx,%rsi,4)
movw %r8w, 0x2(%rcx,%rsi,4)
addq $0x6, %rdx
incq %rsi
cmpl %esi, %eax
jne 0x5124
retq