// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_explode.c
// Function: calcpointsVI
void calcpointsVI(dc, method, index, g, pl)
     DCp dc;
     Methodp method;
     int index;
     Genericp g, pl;
{
  int i;
  float dx, dy, dz, xn, yn, zn, c1, s1, c2, s2, cp, sp;
  float t1, t2, t3, t4, t5, t6, t7, t8, t9, 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*dc->ctp + dz*dc->sta*dc->stp;
  yn =  -dx*dc->sta + dy*dc->cta*dc->ctp + dz*dc->cta*dc->stp;
  zn =  -dy*dc->stp + dz*dc->ctp;
  c1 = pl->ca*dc->cta;
  s1 = pl->sa*dc->sta;
  c2 = pl->ca*dc->sta;
  s2 = pl->sa*dc->cta;
  cp = dc->ctp;
  sp = dc->stp;
  t1 = c1 + s1 * cp;
  t2 = -c2 + s2 * cp;
  t3 = -pl->sa * sp;
  t4 = -s2 + c2 * cp;
  t5 = s1 + c1 * cp;
  t6 = -pl->ca * sp;
  t7 = dc->sta * sp;
  t8 = dc->cta * sp;
  t9 = cp;
  for (i=0; i<method->num; i++, old++, new++) {
    rx = old->x - xn;
    ry = old->y - yn;
    rz = old->z - zn;
    prx = rx * t1 + ry * t2 + rz * t3;
    pry = rx * t4 + ry * t5 + rz * t6;
    prz = rx * t7 + ry * t8 + rz * t9;
    if (pry < 10.0)
      pry = 10.0;
    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), %xmm6
movss 0x10(%r8), %xmm0
subss 0xc(%rcx), %xmm6
subss 0x100(%rdi), %xmm6
subss 0x10(%rcx), %xmm0
subss 0x104(%rdi), %xmm0
leaq 0x10(%rdi,%rdx,4), %rcx
movss 0x108(%rdi), %xmm7
movss 0x118(%rdi), %xmm1
movss 0x11c(%rdi), %xmm2
movaps %xmm0, %xmm5
mulss %xmm2, %xmm5
movss 0x120(%rdi), %xmm3
mulss %xmm3, %xmm5
movaps %xmm6, %xmm4
mulss %xmm1, %xmm4
addss %xmm5, %xmm4
movaps %xmm2, %xmm5
mulss %xmm7, %xmm5
movss 0x124(%rdi), %xmm13
mulss %xmm13, %xmm5
subss %xmm5, %xmm4
movss %xmm4, -0x1c(%rsp)
movaps %xmm0, %xmm5
mulss %xmm1, %xmm5
mulss %xmm3, %xmm5
mulss %xmm2, %xmm6
subss %xmm6, %xmm5
movaps %xmm1, %xmm6
mulss %xmm7, %xmm6
mulss %xmm13, %xmm6
subss %xmm6, %xmm5
movaps 0x7e61(%rip), %xmm4     # 0xd010
xorps %xmm4, %xmm0
mulss %xmm3, %xmm7
mulss %xmm13, %xmm0
subss %xmm7, %xmm0
movaps %xmm0, -0x18(%rsp)
movss 0x24(%r8), %xmm7
movaps %xmm1, %xmm8
mulss %xmm7, %xmm8
movss 0x28(%r8), %xmm9
movaps %xmm2, %xmm6
mulss %xmm9, %xmm6
movaps %xmm2, %xmm10
mulss %xmm7, %xmm10
movaps %xmm1, %xmm14
mulss %xmm9, %xmm14
movaps %xmm6, %xmm11
mulss %xmm3, %xmm11
addss %xmm8, %xmm11
movaps %xmm14, %xmm12
mulss %xmm3, %xmm12
subss %xmm10, %xmm12
xorps %xmm4, %xmm9
mulss %xmm13, %xmm9
mulss %xmm3, %xmm10
subss %xmm14, %xmm10
movaps %xmm3, %xmm0
mulss %xmm3, %xmm8
addss %xmm6, %xmm8
xorps %xmm4, %xmm7
mulss %xmm13, %xmm7
mulss %xmm13, %xmm2
movaps %xmm2, %xmm3
movl (%rsi), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
mulss %xmm13, %xmm1
movaps %xmm1, %xmm4
cmpl %esi, %edx
je 0x532b
movswl (%rax), %edi
cvtsi2ss %edi, %xmm2
subss -0x1c(%rsp), %xmm2
movswl 0x2(%rax), %edi
cvtsi2ss %edi, %xmm15
movswl 0x4(%rax), %edi
cvtsi2ss %edi, %xmm13
subss %xmm5, %xmm15
subss -0x18(%rsp), %xmm13
movaps %xmm12, %xmm14
mulss %xmm15, %xmm14
movaps %xmm2, %xmm6
mulss %xmm11, %xmm6
addss %xmm14, %xmm6
movaps %xmm13, %xmm14
mulss %xmm9, %xmm14
addss %xmm6, %xmm14
movaps %xmm8, %xmm6
mulss %xmm15, %xmm6
movaps %xmm2, %xmm1
mulss %xmm10, %xmm1
addss %xmm6, %xmm1
movaps %xmm13, %xmm6
mulss %xmm7, %xmm6
addss %xmm1, %xmm6
mulss %xmm4, %xmm15
mulss %xmm3, %xmm2
addss %xmm15, %xmm2
mulss %xmm0, %xmm13
addss %xmm2, %xmm13
movss 0x7d1c(%rip), %xmm1     # 0xd004
maxss %xmm6, %xmm1
xorps 0x7d1c(%rip), %xmm13    # 0xd010
unpcklps %xmm13, %xmm14          # xmm14 = xmm14[0],xmm13[0],xmm14[1],xmm13[1]
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
divps %xmm1, %xmm14
mulps 0x7d18(%rip), %xmm14    # 0xd020
addps 0x7d20(%rip), %xmm14    # 0xd030
cvttps2dq %xmm14, %xmm1
pshuflw $0xe8, %xmm1, %xmm1     # xmm1 = xmm1[0,2,2,3,4,5,6,7]
movd %xmm1, (%rcx,%rsi,4)
addq $0x6, %rax
incq %rsi
jmp 0x5250
retq