// File: /workspace/github_c_makefile_star2_O2/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:
movq (%rdi), %r9
movslq %edx, %rdx
imulq $0x6, %rdx, %rax
addq (%r9), %rax
movss 0xc(%r8), %xmm0
movss 0x10(%r8), %xmm5
subss 0xc(%rcx), %xmm0
subss 0x100(%rdi), %xmm0
subss 0x10(%rcx), %xmm5
leaq 0x10(%rdi,%rdx,4), %rcx
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 0x801c(%rip), %xmm7     # 0xd010
xorps %xmm4, %xmm7
movl (%rsi), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
movss 0x7ffb(%rip), %xmm8     # 0xd004
movaps 0x800f(%rip), %xmm10    # 0xd020
movsd 0x8016(%rip), %xmm11    # 0xd030
cmpl %esi, %edx
je 0x50f7
movswl (%rax), %edi
cvtsi2ss %edi, %xmm9
subss %xmm1, %xmm9
movswl 0x2(%rax), %edi
cvtsi2ss %edi, %xmm12
subss %xmm3, %xmm12
movswl 0x4(%rax), %edi
cvtsi2ss %edi, %xmm14
subss %xmm0, %xmm14
movaps %xmm6, %xmm13
mulss %xmm12, %xmm13
mulss %xmm2, %xmm13
movaps %xmm9, %xmm15
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
movaps %xmm8, %xmm15
maxss %xmm9, %xmm15
mulss %xmm2, %xmm14
mulss %xmm4, %xmm12
addss %xmm14, %xmm12
xorps 0x7f4b(%rip), %xmm12    # 0xd010
unpcklps %xmm12, %xmm13          # xmm13 = xmm13[0],xmm12[0],xmm13[1],xmm12[1]
shufps $0x0, %xmm15, %xmm15    # xmm15 = xmm15[0,0,0,0]
divps %xmm15, %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, %rax
incq %rsi
jmp 0x501a
retq