// File: /workspace/github_c_makefile_star2_O3/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:
movl (%rsi), %eax
testl %eax, %eax
jle 0x53ff
movss 0xc(%r8), %xmm7
movss 0x10(%r8), %xmm0
subss 0xc(%rcx), %xmm7
subss 0x100(%rdi), %xmm7
subss 0x10(%rcx), %xmm0
subss 0x104(%rdi), %xmm0
movss 0x108(%rdi), %xmm6
movss 0x118(%rdi), %xmm2
movss 0x11c(%rdi), %xmm3
movaps %xmm0, %xmm5
mulss %xmm3, %xmm5
movss 0x120(%rdi), %xmm4
mulss %xmm4, %xmm5
movaps %xmm7, %xmm1
mulss %xmm2, %xmm1
addss %xmm5, %xmm1
movaps %xmm3, %xmm5
mulss %xmm6, %xmm5
movss 0x124(%rdi), %xmm13
mulss %xmm13, %xmm5
subss %xmm5, %xmm1
movss %xmm1, -0x1c(%rsp)
movaps %xmm0, %xmm5
mulss %xmm2, %xmm5
mulss %xmm4, %xmm5
mulss %xmm3, %xmm7
subss %xmm7, %xmm5
movaps %xmm2, %xmm7
mulss %xmm6, %xmm7
mulss %xmm13, %xmm7
subss %xmm7, %xmm5
movaps 0x8da8(%rip), %xmm12    # 0xe010
xorps %xmm12, %xmm0
mulss %xmm4, %xmm6
mulss %xmm13, %xmm0
subss %xmm6, %xmm0
movaps %xmm0, -0x18(%rsp)
movss 0x24(%r8), %xmm7
movaps %xmm2, %xmm8
mulss %xmm7, %xmm8
movss 0x28(%r8), %xmm9
movaps %xmm3, %xmm6
mulss %xmm9, %xmm6
movaps %xmm3, %xmm10
mulss %xmm7, %xmm10
movaps %xmm2, %xmm14
mulss %xmm9, %xmm14
movaps %xmm6, %xmm11
mulss %xmm4, %xmm11
addss %xmm8, %xmm11
movaps %xmm14, %xmm1
mulss %xmm4, %xmm1
subss %xmm10, %xmm1
xorps %xmm12, %xmm9
mulss %xmm13, %xmm9
mulss %xmm4, %xmm10
subss %xmm14, %xmm10
movaps %xmm4, %xmm0
mulss %xmm4, %xmm8
addss %xmm6, %xmm8
xorps %xmm12, %xmm7
mulss %xmm13, %xmm7
mulss %xmm13, %xmm3
movaps %xmm3, %xmm4
mulss %xmm13, %xmm2
movaps %xmm2, %xmm3
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
movswl (%rdx), %edi
xorps %xmm2, %xmm2
cvtsi2ss %edi, %xmm2
movswl 0x2(%rdx), %edi
xorps %xmm15, %xmm15
cvtsi2ss %edi, %xmm15
movswl 0x4(%rdx), %edi
subss -0x1c(%rsp), %xmm2
xorps %xmm13, %xmm13
cvtsi2ss %edi, %xmm13
subss %xmm5, %xmm15
subss -0x18(%rsp), %xmm13
movaps %xmm1, %xmm12
mulss %xmm15, %xmm12
movaps %xmm2, %xmm6
mulss %xmm11, %xmm6
movaps %xmm13, %xmm14
mulss %xmm9, %xmm14
addss %xmm12, %xmm6
addss %xmm6, %xmm14
movaps %xmm8, %xmm6
movaps %xmm2, %xmm12
mulss %xmm15, %xmm6
mulss %xmm10, %xmm12
addss %xmm6, %xmm12
mulss %xmm3, %xmm15
mulss %xmm4, %xmm2
addss %xmm15, %xmm2
movaps %xmm13, %xmm6
mulss %xmm7, %xmm6
addss %xmm12, %xmm6
mulss %xmm0, %xmm13
addss %xmm2, %xmm13
movss 0x8c4b(%rip), %xmm2     # 0xe004
maxss %xmm6, %xmm2
xorps 0x8c4b(%rip), %xmm13    # 0xe010
unpcklps %xmm13, %xmm14          # xmm14 = xmm14[0],xmm13[0],xmm14[1],xmm13[1]
shufps $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
divps %xmm2, %xmm14
mulps 0x8c47(%rip), %xmm14    # 0xe020
addps 0x8c4f(%rip), %xmm14    # 0xe030
cvttps2dq %xmm14, %xmm2
pshuflw $0xe8, %xmm2, %xmm2     # xmm2 = xmm2[0,2,2,3,4,5,6,7]
movd %xmm2, (%rcx,%rsi,4)
addq $0x6, %rdx
incq %rsi
cmpl %esi, %eax
jne 0x531b
retq