// File: /workspace/github_c_makefile_star2_O0/josch[P]stride/nsc.c
// Function: divarc
void divarc(double x1, double y1, double z1,
            double x2, double y2, double z2,
            int div1, int div2, double *xr, double *yr, double *zr) {

  double xd, yd, zd, dd, d1, d2, s, x, y, z;
  double phi, sphi, cphi;

  xd = y1*z2-y2*z1;
  yd = z1*x2-z2*x1;
  zd = x1*y2-x2*y1;
  dd = sqrt(xd*xd+yd*yd+zd*zd);
  if (dd < DP_TOL) ERROR("divarc: rotation axis of length %f", dd);

  d1 = x1*x1+y1*y1+z1*z1;
  if (d1 < 0.5) ERROR("divarc: vector 1 of sq.length %f", d1);
  d2 = x2*x2+y2*y2+z2*z2;
  if (d2 < 0.5) ERROR("divarc: vector 2 of sq.length %f", d2);

  phi = ASIN(dd/sqrt(d1*d2));
  phi = phi*((double)div1)/((double)div2);
  sphi = sin(phi); cphi = cos(phi);
  s  = (x1*xd+y1*yd+z1*zd)/dd;

  x = xd*s*(1.-cphi)/dd + x1 * cphi + (yd*z1-y1*zd)*sphi/dd;
  y = yd*s*(1.-cphi)/dd + y1 * cphi + (zd*x1-z1*xd)*sphi/dd;
  z = zd*s*(1.-cphi)/dd + z1 * cphi + (xd*y1-x1*yd)*sphi/dd;
  dd = sqrt(x*x+y*y+z*z);
  *xr = x/dd; *yr = y/dd; *zr = z/dd;
  }

// Assembly:
subq $0xc8, %rsp
movsd %xmm0, 0xc0(%rsp)
movsd %xmm1, 0xb8(%rsp)
movsd %xmm2, 0xb0(%rsp)
movsd %xmm3, 0xa8(%rsp)
movsd %xmm4, 0xa0(%rsp)
movsd %xmm5, 0x98(%rsp)
movl %edi, 0x94(%rsp)
movl %esi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movq %rcx, 0x80(%rsp)
movq %r8, 0x78(%rsp)
movsd 0xb8(%rsp), %xmm0
movsd 0x98(%rsp), %xmm2
movsd 0xa0(%rsp), %xmm1
mulsd 0xb0(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0xb0(%rsp), %xmm0
movsd 0xa8(%rsp), %xmm2
movsd 0x98(%rsp), %xmm1
mulsd 0xc0(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
movsd 0xc0(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm2
movsd 0xa8(%rsp), %xmm1
mulsd 0xb8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x70(%rsp), %xmm1
movsd 0x70(%rsp), %xmm2
movsd 0x68(%rsp), %xmm0
mulsd 0x68(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x60(%rsp), %xmm0
movsd 0x60(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x2220
movsd %xmm0, 0x58(%rsp)
movsd 0xe5a6(%rip), %xmm0     # 0x2c648
ucomisd 0x58(%rsp), %xmm0
jbe 0x1e0d6
leaq 0xe690(%rip), %rax      # 0x2c741
movq %rax, 0x13de8(%rip)     # 0x31ea0
movl $0x9b, 0x13dd6(%rip)    # 0x31e98
movsd 0x58(%rsp), %xmm0
leaq 0xe6e0(%rip), %rdi      # 0x2c7af
movb $0x1, %al
callq 0x1d4c0
movsd 0xc0(%rsp), %xmm1
movsd 0xc0(%rsp), %xmm2
movsd 0xb8(%rsp), %xmm0
mulsd 0xb8(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0xb0(%rsp), %xmm0
movsd 0xb0(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0xd9de(%rip), %xmm0     # 0x2bb08
ucomisd 0x50(%rsp), %xmm0
jbe 0x1e15e
leaq 0xe608(%rip), %rax      # 0x2c741
movq %rax, 0x13d60(%rip)     # 0x31ea0
movl $0x9e, 0x13d4e(%rip)    # 0x31e98
movsd 0x50(%rsp), %xmm0
leaq 0xe67b(%rip), %rdi      # 0x2c7d2
movb $0x1, %al
callq 0x1d4c0
movsd 0xa8(%rsp), %xmm1
movsd 0xa8(%rsp), %xmm2
movsd 0xa0(%rsp), %xmm0
mulsd 0xa0(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x98(%rsp), %xmm0
movsd 0x98(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0xd956(%rip), %xmm0     # 0x2bb08
ucomisd 0x48(%rsp), %xmm0
jbe 0x1e1e6
leaq 0xe580(%rip), %rax      # 0x2c741
movq %rax, 0x13cd8(%rip)     # 0x31ea0
movl $0xa0, 0x13cc6(%rip)    # 0x31e98
movsd 0x48(%rsp), %xmm0
leaq 0xe614(%rip), %rdi      # 0x2c7f3
movb $0x1, %al
callq 0x1d4c0
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x50(%rsp), %xmm0
mulsd 0x48(%rsp), %xmm0
callq 0x2220
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x1d6e0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
cvtsi2sdl 0x94(%rsp), %xmm1
mulsd %xmm1, %xmm0
cvtsi2sdl 0x90(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x21b0
movsd %xmm0, 0x18(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x20f0
movsd %xmm0, 0x10(%rsp)
movsd 0xc0(%rsp), %xmm1
movsd 0x70(%rsp), %xmm2
movsd 0xb8(%rsp), %xmm0
mulsd 0x68(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0xb0(%rsp), %xmm0
movsd 0x60(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x70(%rsp), %xmm1
mulsd 0x40(%rsp), %xmm1
movsd 0xd538(%rip), %xmm0     # 0x2b7f8
subsd 0x10(%rsp), %xmm0
mulsd %xmm0, %xmm1
divsd 0x58(%rsp), %xmm1
movsd 0xc0(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x68(%rsp), %xmm1
movsd 0xb0(%rsp), %xmm3
movsd 0xb8(%rsp), %xmm2
mulsd 0x60(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd 0x18(%rsp), %xmm1
divsd 0x58(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x68(%rsp), %xmm1
mulsd 0x40(%rsp), %xmm1
movsd 0xd4aa(%rip), %xmm0     # 0x2b7f8
subsd 0x10(%rsp), %xmm0
mulsd %xmm0, %xmm1
divsd 0x58(%rsp), %xmm1
movsd 0xb8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x60(%rsp), %xmm1
movsd 0xc0(%rsp), %xmm3
movsd 0xb0(%rsp), %xmm2
mulsd 0x70(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd 0x18(%rsp), %xmm1
divsd 0x58(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x60(%rsp), %xmm1
mulsd 0x40(%rsp), %xmm1
movsd 0xd41c(%rip), %xmm0     # 0x2b7f8
subsd 0x10(%rsp), %xmm0
mulsd %xmm0, %xmm1
divsd 0x58(%rsp), %xmm1
movsd 0xb0(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x70(%rsp), %xmm1
movsd 0xb8(%rsp), %xmm3
movsd 0xc0(%rsp), %xmm2
mulsd 0x68(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd 0x18(%rsp), %xmm1
divsd 0x58(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x38(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movsd 0x30(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x2220
movsd %xmm0, 0x58(%rsp)
movsd 0x38(%rsp), %xmm0
divsd 0x58(%rsp), %xmm0
movq 0x88(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x30(%rsp), %xmm0
divsd 0x58(%rsp), %xmm0
movq 0x80(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x28(%rsp), %xmm0
divsd 0x58(%rsp), %xmm0
movq 0x78(%rsp), %rax
movsd %xmm0, (%rax)
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)