// File: /workspace/github_c_makefile_star2_O1/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 0x5479
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), %xmm4
movss 0x11c(%rdi), %xmm3
movaps %xmm0, %xmm1
mulss %xmm3, %xmm1
movss 0x120(%rdi), %xmm11
mulss %xmm11, %xmm1
movaps %xmm7, %xmm2
mulss %xmm4, %xmm2
addss %xmm1, %xmm2
movaps %xmm3, %xmm1
mulss %xmm6, %xmm1
movss 0x124(%rdi), %xmm12
mulss %xmm12, %xmm1
subss %xmm1, %xmm2
movss %xmm2, -0x2c(%rsp)
movaps %xmm0, %xmm2
mulss %xmm4, %xmm2
mulss %xmm11, %xmm2
mulss %xmm3, %xmm7
subss %xmm7, %xmm2
movaps %xmm4, %xmm1
mulss %xmm6, %xmm1
mulss %xmm12, %xmm1
subss %xmm1, %xmm2
movaps %xmm2, -0x28(%rsp)
movaps 0x8d52(%rip), %xmm13    # 0xe020
xorps %xmm13, %xmm0
mulss %xmm11, %xmm6
mulss %xmm12, %xmm0
subss %xmm6, %xmm0
movaps %xmm0, -0x18(%rsp)
movss 0x24(%r8), %xmm6
movaps %xmm4, %xmm7
mulss %xmm6, %xmm7
movss 0x28(%r8), %xmm8
movaps %xmm3, %xmm1
mulss %xmm8, %xmm1
movaps %xmm3, %xmm9
mulss %xmm6, %xmm9
movaps %xmm4, %xmm14
mulss %xmm8, %xmm14
movaps %xmm1, %xmm10
mulss %xmm11, %xmm10
addss %xmm7, %xmm10
movaps %xmm14, %xmm2
mulss %xmm11, %xmm2
subss %xmm9, %xmm2
xorps %xmm13, %xmm8
mulss %xmm12, %xmm8
mulss %xmm11, %xmm9
subss %xmm14, %xmm9
movaps %xmm11, %xmm5
mulss %xmm11, %xmm7
addss %xmm1, %xmm7
xorps %xmm13, %xmm6
mulss %xmm12, %xmm6
mulss %xmm12, %xmm3
movaps %xmm3, %xmm0
mulss %xmm12, %xmm4
movaps %xmm4, %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
movss 0x8c7e(%rip), %xmm13    # 0xe008
movswl (%rdx), %edi
xorps %xmm4, %xmm4
cvtsi2ss %edi, %xmm4
movswl 0x2(%rdx), %edi
xorps %xmm15, %xmm15
cvtsi2ss %edi, %xmm15
movswl 0x4(%rdx), %edi
subss -0x2c(%rsp), %xmm4
xorps %xmm1, %xmm1
cvtsi2ss %edi, %xmm1
subss -0x28(%rsp), %xmm15
subss -0x18(%rsp), %xmm1
movaps %xmm2, %xmm11
mulss %xmm15, %xmm11
movaps %xmm4, %xmm12
mulss %xmm10, %xmm12
movaps %xmm1, %xmm14
mulss %xmm8, %xmm14
addss %xmm11, %xmm12
addss %xmm12, %xmm14
movaps %xmm7, %xmm11
movaps %xmm4, %xmm12
mulss %xmm15, %xmm11
mulss %xmm9, %xmm12
addss %xmm11, %xmm12
movaps %xmm1, %xmm11
mulss %xmm6, %xmm11
addss %xmm12, %xmm11
movss 0x8bf2(%rip), %xmm12    # 0xe004
maxss %xmm11, %xmm12
mulss %xmm3, %xmm15
mulss %xmm0, %xmm4
addss %xmm15, %xmm4
divss %xmm12, %xmm14
mulss %xmm13, %xmm14
addss 0x8bd4(%rip), %xmm14    # 0xe00c
cvttss2si %xmm14, %edi
mulss %xmm5, %xmm1
addss %xmm4, %xmm1
divss %xmm12, %xmm1
mulss %xmm13, %xmm1
movss 0x8bb9(%rip), %xmm4     # 0xe010
subss %xmm1, %xmm4
cvttss2si %xmm4, %r8d
movw %di, (%rcx,%rsi,4)
movw %r8w, 0x2(%rcx,%rsi,4)
addq $0x6, %rdx
incq %rsi
cmpl %esi, %eax
jne 0x538a
retq