// File: /workspace/github_c_makefile_star2_O1/josch[P]stride/nsc.c
// Function: ico_dot_dod
int ico_dot_dod(int densit) { /* densit...required dots per unit sphere */
/* dot distribution on a unit sphere based on an icosaeder *
 * great circle average refining of icosahedral face       */

  int i, j, k, tl, tl2, tn, tess, j1, j2;
  double a, d, x, y, z, x2, y2, z2, x3, y3, z3, ai_d, adod;
  double xij, yij, zij, xji, yji, zji, xik, yik, zik, xki, yki, zki,
    xjk, yjk, zjk, xkj, ykj, zkj;
  point_double xus=NULL;
/* calculate tesselation level */
  a = sqrt((((double) densit)-2.)/30.);
  tess = MAXIMUM((int) ceil(a), 1);
  n_dot = 30*tess*tess+2;
  if (n_dot < densit) {
    ERROR("ico_dot_dod: error in formula for tessalation level (%d->%d, %d)",
      tess, n_dot, densit);
    }

  xus = (double *) CALLOC(3*n_dot, sizeof(double));
  xpunsp = xus;
  icosaeder_vertices(xus);

  tn=12;
/* square of the edge of an icosaeder */
    a = rh*rh*2.*(1.-cos(TORAD(72.)));
/* dodecaeder vertices */
  for (i=0; i<10; i++) {
    for (j=i+1; j<11; j++) {
      x = xus[3*i]-xus[3*j];
      y = xus[1+3*i]-xus[1+3*j]; z = xus[2+3*i]-xus[2+3*j];
      d = x*x+y*y+z*z;
      if (fabs(a-d) > DP_TOL) continue;
      for (k=j+1; k<12; k++) {
        x = xus[3*i]-xus[3*k];
        y = xus[1+3*i]-xus[1+3*k]; z = xus[2+3*i]-xus[2+3*k];
        d = x*x+y*y+z*z;
        if (fabs(a-d) > DP_TOL) continue;
        x = xus[3*j]-xus[3*k];
        y = xus[1+3*j]-xus[1+3*k]; z = xus[2+3*j]-xus[2+3*k];
        d = x*x+y*y+z*z;
        if (fabs(a-d) > DP_TOL) continue;
        x = xus[  3*i]+xus[  3*j]+xus[  3*k];
        y = xus[1+3*i]+xus[1+3*j]+xus[1+3*k];
        z = xus[2+3*i]+xus[2+3*j]+xus[2+3*k];
        d = sqrt(x*x+y*y+z*z);
        xus[3*tn]=x/d; xus[1+3*tn]=y/d; xus[2+3*tn]=z/d;
        tn++;
        }
      }
    }

  if (tess > 1) {
    tn = 32;
/* square of the edge of an dodecaeder */
    adod = 4.*(cos(TORAD(108.))-cos(TORAD(120.)))/(1.-cos(TORAD(120.)));
/* square of the distance of two adjacent vertices of ico- and dodecaeder */
    ai_d = 2.*(1.-sqrt(1.-a/3.));

/* calculate tessalation of mixed edges */
    for (i=0; i<31; i++) {
      j1 = 12; j2 = 32; a = ai_d;
      if (i>=12) { j1=i+1; a = adod; }
      for (j=j1; j<j2; j++) {
        x = xus[3*i]-xus[3*j];
        y = xus[1+3*i]-xus[1+3*j]; z = xus[2+3*i]-xus[2+3*j];
        d = x*x+y*y+z*z;
        if (fabs(a-d) > DP_TOL) continue;
        for (tl=1; tl<tess; tl++) {
          if (tn >= n_dot) {
            ERROR("ico_dot: tn exceeds dimension of xus");
            }
          divarc(xus[3*i], xus[1+3*i], xus[2+3*i],
                 xus[3*j], xus[1+3*j], xus[2+3*j],
            tl, tess, &xus[3*tn], &xus[1+3*tn], &xus[2+3*tn]);
          tn++;
          }
        }
      }
/* calculate tessalation of pentakisdodecahedron faces */
    for (i=0; i<12; i++) {
      for (j=12; j<31; j++) {
        x = xus[3*i]-xus[3*j];
        y = xus[1+3*i]-xus[1+3*j]; z = xus[2+3*i]-xus[2+3*j];
        d = x*x+y*y+z*z;
        if (fabs(ai_d-d) > DP_TOL) continue;

        for (k=j+1; k<32; k++) {
          x = xus[3*i]-xus[3*k];
          y = xus[1+3*i]-xus[1+3*k]; z = xus[2+3*i]-xus[2+3*k];
          d = x*x+y*y+z*z;
          if (fabs(ai_d-d) > DP_TOL) continue;
          x = xus[3*j]-xus[3*k];
          y = xus[1+3*j]-xus[1+3*k]; z = xus[2+3*j]-xus[2+3*k];
          d = x*x+y*y+z*z;
          if (fabs(adod-d) > DP_TOL) continue;
          for (tl=1; tl<tess-1; tl++) {
            divarc(xus[3*j], xus[1+3*j], xus[2+3*j],
                   xus[3*i], xus[1+3*i], xus[2+3*i],
              tl, tess, &xji, &yji, &zji);
            divarc(xus[3*k], xus[1+3*k], xus[2+3*k],
                   xus[3*i], xus[1+3*i], xus[2+3*i],
              tl, tess, &xki, &yki, &zki);

            for (tl2=1; tl2<tess-tl; tl2++) {
              divarc(xus[3*i], xus[1+3*i], xus[2+3*i],
                     xus[3*j], xus[1+3*j], xus[2+3*j],
                tl2, tess, &xij, &yij, &zij);
              divarc(xus[3*k], xus[1+3*k], xus[2+3*k],
                     xus[3*j], xus[1+3*j], xus[2+3*j],
                tl2, tess, &xkj, &ykj, &zkj);
              divarc(xus[3*i], xus[1+3*i], xus[2+3*i],
                     xus[3*k], xus[1+3*k], xus[2+3*k],
                tess-tl-tl2, tess, &xik, &yik, &zik);
              divarc(xus[3*j], xus[1+3*j], xus[2+3*j],
                     xus[3*k], xus[1+3*k], xus[2+3*k],
                tess-tl-tl2, tess, &xjk, &yjk, &zjk);
              if (tn >= n_dot) {
                ERROR("ico_dot: tn exceeds dimension of xus");
                }
              divarc(xki, yki, zki, xji, yji, zji, tl2, tess-tl,
                &x, &y, &z);
              divarc(xkj, ykj, zkj, xij, yij, zij, tl, tess-tl2,
                &x2, &y2, &z2);
              divarc(xjk, yjk, zjk, xik, yik, zik, tl, tl+tl2,
                &x3, &y3, &z3);
              x = x+x2+x3; y = y+y2+y3; z = z+z2+z3;
              d = sqrt(x*x+y*y+z*z);
              xus[3*tn] = x/d;
              xus[1+3*tn] = y/d;
              xus[2+3*tn] = z/d;
              tn++;
              }		/* cycle tl2 */
            }		/* cycle tl */
          }		/* cycle k */
        }		/* cycle j */
      }			/* cycle i */
    if (n_dot != tn) {
      ERROR("ico_dot: n_dot(%d) and tn(%d) differ", n_dot, tn);
      }
    }		/* end of if (tess > 1) */
  return n_dot;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movl %edi, %ebx
cvtsi2sd %edi, %xmm0
addsd 0x8418(%rip), %xmm0     # 0x1a898
divsd 0x8428(%rip), %xmm0     # 0x1a8b0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x12498
sqrtsd %xmm0, %xmm0
jmp 0x1249d
callq 0x2250
callq 0x2260
cvttsd2si %xmm0, %eax
cmpl $0x2, %eax
movl $0x1, %r14d
movq %rax, 0x78(%rsp)
cmovgel %eax, %r14d
movl %r14d, %edx
imull %edx, %edx
leal (%rdx,%rdx), %eax
shll $0x5, %edx
subl %eax, %edx
addl $0x2, %edx
movl %edx, 0x10189(%rip)     # 0x22658
cmpl %ebx, %edx
jl 0x13242
movq %r14, 0x48(%rsp)
movslq 0x10175(%rip), %rax     # 0x22658
leaq (%rax,%rax,2), %rdx
leaq 0x846b(%rip), %rdi      # 0x1a959
movl $0x8, %ecx
movl $0x129, %esi            # imm = 0x129
callq 0x1139d
movq %rax, %r15
movq %rax, 0x10109(%rip)     # 0x22610
movq %rax, %rdi
callq 0x11443
movsd 0x10130(%rip), %xmm10   # 0x22648
mulsd %xmm10, %xmm10
addsd %xmm10, %xmm10
mulsd 0x837d(%rip), %xmm10    # 0x1a8a8
leaq 0x38(%r15), %rbx
movl $0xc, %r14d
movl $0x1, %edx
xorl %r12d, %r12d
movapd 0x736b(%rip), %xmm2     # 0x198b0
xorpd %xmm11, %xmm11
movsd %xmm10, 0x30(%rsp)
leaq 0x1(%r12), %rax
movq %rax, 0x50(%rsp)
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %r13
movq %rbx, 0x40(%rsp)
movq %rdx, 0x58(%rsp)
movsd (%r15,%r13), %xmm12
leaq (,%rdx,8), %rax
leaq (%rax,%rax,2), %rbp
subsd (%r15,%rbp), %xmm12
movupd 0x8(%r15,%r13), %xmm13
movupd 0x8(%r15,%rbp), %xmm0
subpd %xmm0, %xmm13
movapd %xmm13, %xmm0
mulsd %xmm13, %xmm0
movapd %xmm12, %xmm1
mulsd %xmm12, %xmm1
addsd %xmm0, %xmm1
movapd %xmm13, %xmm0
unpckhpd %xmm13, %xmm0           # xmm0 = xmm0[1],xmm13[1]
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movapd %xmm10, %xmm1
subsd %xmm0, %xmm1
andpd %xmm2, %xmm1
ucomisd 0x829d(%rip), %xmm1     # 0x1a878
seta %al
movq %rdx, 0x28(%rsp)
cmpq $0xb, %rdx
setae %cl
orb %al, %cl
movq %r12, 0x60(%rsp)
movq %rbx, 0x8(%rsp)
jne 0x127bc
movsd (%r15,%r13), %xmm0
movsd -0x8(%rbx), %xmm12
movapd %xmm0, %xmm2
subsd %xmm12, %xmm2
movupd 0x8(%r15,%r13), %xmm1
movupd (%rbx), %xmm13
movapd %xmm1, %xmm3
subpd %xmm13, %xmm3
movapd %xmm3, %xmm4
mulsd %xmm3, %xmm4
movapd %xmm2, %xmm5
mulsd %xmm2, %xmm5
addsd %xmm4, %xmm5
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
mulsd %xmm4, %xmm4
addsd %xmm5, %xmm4
movapd %xmm10, %xmm5
subsd %xmm4, %xmm5
movapd 0x7254(%rip), %xmm8     # 0x198b0
andpd %xmm8, %xmm5
movsd 0x820e(%rip), %xmm9     # 0x1a878
ucomisd %xmm9, %xmm5
jbe 0x12680
movapd %xmm2, %xmm12
movapd %xmm3, %xmm13
jmp 0x127ab
movsd (%r15,%rbp), %xmm3
movapd %xmm3, %xmm4
subsd %xmm12, %xmm4
movupd 0x8(%r15,%rbp), %xmm2
movapd %xmm2, %xmm5
subpd %xmm13, %xmm5
movapd %xmm5, %xmm6
mulsd %xmm5, %xmm6
movapd %xmm4, %xmm7
mulsd %xmm4, %xmm7
addsd %xmm6, %xmm7
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6            # xmm6 = xmm6[1],xmm5[1]
mulsd %xmm6, %xmm6
addsd %xmm7, %xmm6
movapd %xmm10, %xmm7
subsd %xmm6, %xmm7
andpd %xmm8, %xmm7
ucomisd %xmm9, %xmm7
jbe 0x126e7
movapd %xmm4, %xmm12
movapd %xmm5, %xmm13
jmp 0x127ab
addsd %xmm3, %xmm0
addsd %xmm0, %xmm12
addpd %xmm2, %xmm1
addpd %xmm1, %xmm13
movapd %xmm13, %xmm0
mulsd %xmm13, %xmm0
movapd %xmm12, %xmm1
mulsd %xmm12, %xmm1
addsd %xmm0, %xmm1
movapd %xmm13, %xmm2
unpckhpd %xmm13, %xmm2           # xmm2 = xmm2[1],xmm13[1]
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm11, %xmm0
jb 0x12734
sqrtsd %xmm0, %xmm0
jmp 0x1277f
movapd %xmm12, 0xa0(%rsp)
movapd %xmm13, 0x90(%rsp)
movapd %xmm2, 0xb0(%rsp)
callq 0x2250
movapd 0xb0(%rsp), %xmm2
movapd 0x90(%rsp), %xmm13
movapd 0xa0(%rsp), %xmm12
xorpd %xmm11, %xmm11
movsd 0x30(%rsp), %xmm10
leal (%r14,%r14,2), %eax
cltq
movapd %xmm12, %xmm1
unpcklpd %xmm13, %xmm1           # xmm1 = xmm1[0],xmm13[0]
divsd %xmm0, %xmm2
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm1
movupd %xmm1, (%r15,%rax,8)
movsd %xmm2, 0x10(%r15,%rax,8)
incl %r14d
incq %r12
addq $0x18, %rbx
cmpq $0xa, %r12
jb 0x125fc
movq 0x28(%rsp), %rdx
incq %rdx
movq 0x60(%rsp), %r12
incq %r12
movq 0x8(%rsp), %rbx
addq $0x18, %rbx
cmpq $0xb, %rdx
movapd 0x70cf(%rip), %xmm2     # 0x198b0
jne 0x12571
movq 0x58(%rsp), %rdx
incq %rdx
movq 0x40(%rsp), %rbx
addq $0x18, %rbx
movq 0x50(%rsp), %r12
cmpq $0xa, %r12
jne 0x12551
movsd %xmm12, 0x20(%rsp)
movlpd %xmm13, 0x18(%rsp)
movhpd %xmm13, 0x10(%rsp)
cmpl $0x2, 0x78(%rsp)
jl 0x1322a
divsd 0x8088(%rip), %xmm10    # 0x1a8b8
addsd 0x702f(%rip), %xmm10    # 0x19868
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm10
jb 0x1284e
xorps %xmm0, %xmm0
sqrtsd %xmm10, %xmm0
jmp 0x12860
movapd %xmm10, %xmm0
callq 0x2250
movapd 0x7050(%rip), %xmm2     # 0x198b0
movq 0x48(%rsp), %r14
movsd 0x6ffb(%rip), %xmm1     # 0x19868
subsd %xmm0, %xmm1
addsd %xmm1, %xmm1
movsd %xmm1, 0x80(%rsp)
movsd 0x20(%rsp), %xmm3
movsd 0x18(%rsp), %xmm4
movhpd 0x10(%rsp), %xmm4       # xmm4 = xmm4[0],mem[0]
movq 0x78(%rsp), %rax
decl %eax
movq %rax, 0xa0(%rsp)
movl $0x20, %r12d
xorl %ecx, %ecx
movsd 0x80(%rsp), %xmm5
cmpq $0xc, %rcx
jb 0x128be
movsd 0x8002(%rip), %xmm5     # 0x1a8c0
cmpq $0x1e, %rcx
movq %rcx, 0x28(%rsp)
ja 0x12a42
cmpq $0xc, %rcx
movl $0xb, %edx
cmovaeq %rcx, %rdx
movl %edx, %esi
orl $0x20, %esi
cmpl $0xc, %ecx
movl $0xb, %eax
cmovael %ecx, %eax
subl %eax, %esi
incq %rdx
leaq (,%rcx,8), %rax
leaq (%rax,%rax,2), %r13
movsd %xmm5, 0x60(%rsp)
movq %rsi, 0x8(%rsp)
movsd (%r15,%r13), %xmm3
leaq (,%rdx,8), %rax
leaq (%rax,%rax,2), %rbp
subsd (%r15,%rbp), %xmm3
movupd 0x8(%r15,%r13), %xmm4
movupd 0x8(%r15,%rbp), %xmm0
subpd %xmm0, %xmm4
movapd %xmm4, %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm1
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movapd %xmm4, %xmm0
unpckhpd %xmm4, %xmm0            # xmm0 = xmm0[1],xmm4[1]
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movapd %xmm5, %xmm1
subsd %xmm0, %xmm1
andpd %xmm2, %xmm1
ucomisd 0x7f10(%rip), %xmm1     # 0x1a878
ja 0x12a36
movq %rdx, 0x30(%rsp)
movapd %xmm4, 0xb0(%rsp)
movsd %xmm3, 0x90(%rsp)
movl %r12d, 0x3c(%rsp)
movslq %r12d, %r12
leaq (%r12,%r12,2), %rax
leaq (%r15,%rax,8), %r14
xorl %ebx, %ebx
leaq (%r12,%rbx), %rax
movslq 0xfcb6(%rip), %rcx      # 0x22658
cmpq %rcx, %rax
jge 0x129f8
incq %rbx
movsd (%r15,%r13), %xmm0
movsd 0x8(%r15,%r13), %xmm1
movsd 0x10(%r15,%r13), %xmm2
movsd (%r15,%rbp), %xmm3
movsd 0x8(%r15,%rbp), %xmm4
movsd 0x10(%r15,%rbp), %xmm5
leaq 0x8(%r14), %rcx
leaq 0x10(%r14), %r8
movl %ebx, %edi
movq 0x48(%rsp), %rsi
movq %r14, %rdx
callq 0x11555
addq $0x18, %r14
cmpl %ebx, 0xa0(%rsp)
jne 0x12997
jmp 0x129ff
callq 0x26c5
jmp 0x129a7
movl 0x3c(%rsp), %r12d
addl %ebx, %r12d
movq 0x48(%rsp), %r14
movapd 0x6e9c(%rip), %xmm2     # 0x198b0
movsd 0x90(%rsp), %xmm3
movapd 0xb0(%rsp), %xmm4
movsd 0x60(%rsp), %xmm5
movq 0x30(%rsp), %rdx
movq 0x8(%rsp), %rsi
incq %rdx
cmpq %rsi, %rdx
jne 0x12906
movq 0x28(%rsp), %rcx
incq %rcx
cmpq $0x1f, %rcx
jne 0x128a7
leaq 0x20(%rsp), %rax
movsd %xmm3, (%rax)
leaq 0x18(%rsp), %rax
movlpd %xmm4, (%rax)
leaq 0x10(%rsp), %rax
movhpd %xmm4, (%rax)
leal -0x1(%r14), %eax
cmpl $0x3, %eax
movl $0x2, %ebp
cmovgel %eax, %ebp
movq %r15, %rax
addq $0x10, %rax
movq %rax, 0x100(%rsp)
movl %r14d, %eax
negl %eax
cltq
addq $0x2, %rax
movq %rax, 0xf0(%rsp)
xorl %eax, %eax
leaq 0xd8(%rsp), %r13
movl %ebp, 0x88(%rsp)
movq %rax, 0xe0(%rsp)
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x40(%rsp)
movl $0xc, %edx
movq 0x40(%rsp), %rcx
movsd (%r15,%rcx), %xmm0
leaq (,%rdx,8), %rax
leaq (%rax,%rax,2), %rax
subsd (%r15,%rax), %xmm0
movsd 0x8(%r15,%rcx), %xmm1
subsd 0x8(%r15,%rax), %xmm1
movsd %xmm0, 0x20(%rsp)
movsd 0x10(%r15,%rcx), %xmm2
movq %rax, 0x50(%rsp)
subsd 0x10(%r15,%rax), %xmm2
movsd %xmm1, 0x18(%rsp)
movsd %xmm2, 0x10(%rsp)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
movsd 0x80(%rsp), %xmm0
subsd %xmm2, %xmm0
andpd 0x6d68(%rip), %xmm0     # 0x198b0
ucomisd 0x7d28(%rip), %xmm0     # 0x1a878
movq %rdx, 0xe8(%rsp)
ja 0x131f5
movq 0x40(%rsp), %rcx
movsd (%r15,%rcx), %xmm3
movq %rdx, 0xf8(%rsp)
leaq 0x8(,%rdx,8), %rax
leaq (%rax,%rax,2), %rax
movsd (%r15,%rax), %xmm0
subsd %xmm0, %xmm3
movsd %xmm3, 0x20(%rsp)
movsd 0x8(%r15,%rcx), %xmm4
movsd 0x8(%r15,%rax), %xmm1
subsd %xmm1, %xmm4
movsd %xmm4, 0x18(%rsp)
movsd 0x10(%r15,%rcx), %xmm5
movq %rax, 0x58(%rsp)
movsd 0x10(%r15,%rax), %xmm2
subsd %xmm2, %xmm5
movsd %xmm5, 0x10(%rsp)
mulsd %xmm4, %xmm4
mulsd %xmm3, %xmm3
addsd %xmm4, %xmm3
mulsd %xmm5, %xmm5
addsd %xmm3, %xmm5
movsd 0x80(%rsp), %xmm3
subsd %xmm5, %xmm3
movapd 0x6cc5(%rip), %xmm4     # 0x198b0
andpd %xmm4, %xmm3
movsd 0x7c81(%rip), %xmm5     # 0x1a878
ucomisd %xmm5, %xmm3
ja 0x131e0
movq 0x50(%rsp), %rax
movsd (%r15,%rax), %xmm3
subsd %xmm0, %xmm3
movsd %xmm3, 0x20(%rsp)
movsd 0x8(%r15,%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%r15,%rax), %xmm1
subsd %xmm2, %xmm1
movsd %xmm1, 0x10(%rsp)
mulsd %xmm0, %xmm0
mulsd %xmm3, %xmm3
addsd %xmm0, %xmm3
mulsd %xmm1, %xmm1
addsd %xmm3, %xmm1
movsd 0x7c6c(%rip), %xmm0     # 0x1a8c0
subsd %xmm1, %xmm0
andpd %xmm4, %xmm0
ucomisd %xmm5, %xmm0
ja 0x131e0
cmpl $0x2, 0x78(%rsp)
je 0x131e0
movl $0x1, %eax
movl $0x2, %ecx
movq %rcx, 0xd0(%rsp)
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
movq %rcx, 0x28(%rsp)
movq 0xf0(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movl %eax, 0x8(%rsp)
movq 0x50(%rsp), %rax
movsd (%r15,%rax), %xmm0
movsd 0x8(%r15,%rax), %xmm1
movsd 0x10(%r15,%rax), %xmm2
movq %r14, %rbx
movq 0x40(%rsp), %r14
movsd (%r15,%r14), %xmm3
movsd 0x8(%r15,%r14), %xmm4
movsd 0x10(%r15,%r14), %xmm5
movl 0x8(%rsp), %edi
movl %ebx, %esi
movq %r13, %rdx
leaq 0x1a8(%rsp), %rcx
leaq 0x1a0(%rsp), %r8
callq 0x11555
movq 0x58(%rsp), %rax
movsd (%r15,%rax), %xmm0
movsd 0x8(%r15,%rax), %xmm1
movsd 0x10(%r15,%rax), %xmm2
movsd (%r15,%r14), %xmm3
movsd 0x8(%r15,%r14), %xmm4
movsd 0x10(%r15,%r14), %xmm5
movq %rbx, %r14
movl 0x8(%rsp), %edi
movl %r14d, %esi
leaq 0x180(%rsp), %rdx
leaq 0x178(%rsp), %rcx
leaq 0x170(%rsp), %r8
callq 0x11555
movl 0x8(%rsp), %eax
movl %r14d, %ecx
subl %eax, %ecx
movl %ecx, 0x8c(%rsp)
cmpl $0x2, %ecx
jl 0x131ba
movsd 0x180(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movsd 0x178(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movsd 0x170(%rsp), %xmm0
movsd %xmm0, 0x128(%rsp)
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, 0x120(%rsp)
movsd 0x1a8(%rsp), %xmm0
movsd %xmm0, 0x118(%rsp)
movsd 0x1a0(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
movl %r12d, 0x3c(%rsp)
movslq %r12d, %rax
movq %rax, 0x108(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x100(%rsp), %rcx
leaq (%rcx,%rax,8), %rcx
movl %r14d, %eax
movq %rax, 0xa0(%rsp)
xorl %edx, %edx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x90(%rsp)
movq 0x108(%rsp), %rax
addq %rdx, %rax
movq %rax, 0x60(%rsp)
leaq 0x1(%rdx), %r12
movq %r14, %rbx
movq 0x40(%rsp), %r14
movsd (%r15,%r14), %xmm0
movsd 0x8(%r15,%r14), %xmm1
movsd 0x10(%r15,%r14), %xmm2
movq 0x50(%rsp), %rbp
movsd (%r15,%rbp), %xmm3
movsd 0x8(%r15,%rbp), %xmm4
movsd 0x10(%r15,%rbp), %xmm5
movl %r12d, %edi
movl %ebx, %esi
leaq 0x1c0(%rsp), %rdx
leaq 0x1b8(%rsp), %rcx
leaq 0x1b0(%rsp), %r8
callq 0x11555
movq 0x58(%rsp), %r13
movsd (%r15,%r13), %xmm0
movsd 0x8(%r15,%r13), %xmm1
movsd 0x10(%r15,%r13), %xmm2
movsd (%r15,%rbp), %xmm3
movsd 0x8(%r15,%rbp), %xmm4
movsd 0x10(%r15,%rbp), %xmm5
movq %r12, 0xb0(%rsp)
movl %r12d, %edi
movl %ebx, %esi
leaq 0x150(%rsp), %rdx
leaq 0x148(%rsp), %rcx
leaq 0x140(%rsp), %r8
callq 0x11555
movsd (%r15,%r14), %xmm0
movsd 0x8(%r15,%r14), %xmm1
movsd 0x10(%r15,%r14), %xmm2
movsd (%r15,%r13), %xmm3
movsd 0x8(%r15,%r13), %xmm4
movsd 0x10(%r15,%r13), %xmm5
movq 0x28(%rsp), %rax
movq 0xa0(%rsp), %rbx
leal (%rax,%rbx), %r14d
movl %r14d, %edi
movq 0x48(%rsp), %rsi
leaq 0x198(%rsp), %rdx
leaq 0x190(%rsp), %rcx
leaq 0x188(%rsp), %r8
callq 0x11555
movsd (%r15,%rbp), %xmm0
movsd 0x8(%r15,%rbp), %xmm1
movsd 0x10(%r15,%rbp), %xmm2
movsd (%r15,%r13), %xmm3
movsd 0x8(%r15,%r13), %xmm4
movsd 0x10(%r15,%r13), %xmm5
movl %r14d, %edi
movq 0x48(%rsp), %r14
movl %r14d, %esi
leaq 0x168(%rsp), %rdx
leaq 0x160(%rsp), %rcx
leaq 0x158(%rsp), %r8
callq 0x11555
movslq 0xf6da(%rip), %rax      # 0x22658
cmpq %rax, 0x60(%rsp)
jge 0x13195
movsd 0x138(%rsp), %xmm0
movsd 0x130(%rsp), %xmm1
movsd 0x128(%rsp), %xmm2
movsd 0x120(%rsp), %xmm3
movsd 0x118(%rsp), %xmm4
movsd 0x110(%rsp), %xmm5
movq 0xb0(%rsp), %r13
movl %r13d, %edi
movl 0x8c(%rsp), %esi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x11555
movsd 0x150(%rsp), %xmm0
movsd 0x148(%rsp), %xmm1
movsd 0x140(%rsp), %xmm2
movsd 0x1c0(%rsp), %xmm3
movsd 0x1b8(%rsp), %xmm4
movsd 0x1b0(%rsp), %xmm5
decl %ebx
movq %rbx, %rsi
movl 0x8(%rsp), %ebx
movl %ebx, %edi
movq %rsi, 0xa0(%rsp)
leaq 0x1f0(%rsp), %rdx
leaq 0x1e8(%rsp), %rcx
leaq 0x1e0(%rsp), %r8
callq 0x11555
movsd 0x168(%rsp), %xmm0
movsd 0x160(%rsp), %xmm1
movsd 0x158(%rsp), %xmm2
movsd 0x198(%rsp), %xmm3
movsd 0x190(%rsp), %xmm4
movsd 0x188(%rsp), %xmm5
movq 0x30(%rsp), %rsi
addl 0xd0(%rsp), %esi
movl %ebx, %edi
leaq 0x1d8(%rsp), %rdx
leaq 0x1d0(%rsp), %rcx
leaq 0x1c8(%rsp), %r8
callq 0x11555
movsd 0x10(%rsp), %xmm2
addsd 0x1e0(%rsp), %xmm2
addsd 0x1c8(%rsp), %xmm2
movsd %xmm2, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
movhpd 0x18(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
movsd 0x1f0(%rsp), %xmm1
movhpd 0x1e8(%rsp), %xmm1      # xmm1 = xmm1[0],mem[0]
addpd %xmm0, %xmm1
movsd 0x1d8(%rsp), %xmm3
movhpd 0x1d0(%rsp), %xmm3      # xmm3 = xmm3[0],mem[0]
addpd %xmm1, %xmm3
movlpd %xmm3, 0x20(%rsp)
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
movhpd %xmm3, 0x18(%rsp)
mulsd %xmm0, %xmm0
movapd %xmm3, %xmm1
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x7756(%rip), %xmm0     # 0x1a890
jb 0x13142
sqrtsd %xmm0, %xmm0
jmp 0x1315f
movsd %xmm2, 0x30(%rsp)
movapd %xmm3, 0x60(%rsp)
callq 0x2250
movapd 0x60(%rsp), %xmm3
movsd 0x30(%rsp), %xmm2
movq 0x90(%rsp), %rcx
divsd %xmm0, %xmm2
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm3
movupd %xmm3, -0x10(%rcx)
movsd %xmm2, (%rcx)
addq $0x18, %rcx
movl %r13d, %eax
movq %r13, %rdx
addl 0xc8(%rsp), %eax
jne 0x12dfa
jmp 0x1319f
callq 0x26eb
jmp 0x12f89
movl 0x3c(%rsp), %r12d
addl %r13d, %r12d
movl 0x88(%rsp), %ebp
leaq 0xd8(%rsp), %r13
movl 0x8(%rsp), %eax
incl %eax
incq 0xc8(%rsp)
incq 0xd0(%rsp)
movq 0x28(%rsp), %rcx
decl %ecx
movq %rcx, 0x28(%rsp)
cmpl %ebp, %eax
jne 0x12c9d
movq 0xf8(%rsp), %rdx
incq %rdx
cmpq $0x1f, %rdx
jne 0x12b5e
movq 0xe8(%rsp), %rdx
incq %rdx
cmpq $0x1f, %rdx
jne 0x12acf
movq 0xe0(%rsp), %rax
incq %rax
cmpq $0xc, %rax
jne 0x12ab1
movl 0xf433(%rip), %esi      # 0x22658
cmpl %r12d, %esi
jne 0x13272
movl 0xf428(%rip), %eax      # 0x22658
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7710(%rip), %rax      # 0x1a959
movq %rax, 0xf3f0(%rip)      # 0x22640
movl $0x125, 0xf3de(%rip)    # imm = 0x125
leaq 0x7856(%rip), %rdi      # 0x1aab7
movl %r14d, %esi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x24b8
jmp 0x124d7
leaq 0x76e0(%rip), %rax      # 0x1a959
movq %rax, 0xf3c0(%rip)      # 0x22640
movl $0x1a0, 0xf3ae(%rip)    # imm = 0x1A0
leaq 0x7801(%rip), %rdi      # 0x1aa92
movl %r12d, %edx
xorl %eax, %eax
callq 0x24b8
jmp 0x1322a