int cryangles(h, k, l, orient, lambda, omega, phi, chi, twoth)
int h, k, l;
double lambda, omega;
double orient[3][3];
double *phi, *chi, *twoth;
{
  static double pi = 3.14159265358979;
  double x, y, z, d, dum, cosomg, sinchi, sinphi, cosphi, q, r;
  double rh = h, rk = k, rl = l;
  double t1, t2, t3;
  omega = omega / 180.0 * pi;
  cosomg = cos(omega);
  x = orient[0][0] * rh + orient[0][1] * rk + orient[0][2] * rl;
  y = orient[1][0] * rh + orient[1][1] * rk + orient[1][2] * rl;
  z = orient[2][0] * rh + orient[2][1] * rk + orient[2][2] * rl;
  d = sqrt(x * x + y * y + z * z);
  dum = lambda * d / 2.0;
  if (dum < .000001 || dum >= 1.0) {
    return 0;
  }
  *twoth = asin(dum) * 2.0;
  t1 = x / d;
  t2 = y / d;
  t3 = z / d;
  if ((t3 < 0.0 ? -t3 : t3) >= (cosomg < 0.0 ? -cosomg : cosomg)) {
    return 0;
  }
  sinchi = -t3 / cosomg;
  *chi = asin(sinchi);
  q = sin(omega);
  r = cosomg * cos(*chi);
  cosphi = (q * t1 + r * t2) / (t1 * t1 + t2 * t2);
  sinphi = (r * t1 - q * t2) / (t1 * t1 + t2 * t2);
  if (sinphi <= -.7)
    *phi = -acos(cosphi);
  else if (sinphi >= .7)
    *phi = acos(cosphi);
  else if (cosphi <= 0.0)
    *phi = pi - asin(sinphi);
  else
    *phi = asin(sinphi);
  *phi *= 180.0 / pi;
  *chi *= 180.0 / pi;
  *twoth *= 180.0 / pi;
  *phi /= 1.25;
  *chi /= 1.5;
  *twoth /= 1.15;
  return 1;
}


x86 assembly (clang, -O0):
<cryangles>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xe5e(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x2e8a(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x98(%rbp),%xmm2
ff
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm1
movsd  -0x98(%rbp),%xmm2
ff
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm1
movsd  -0x98(%rbp),%xmm2
ff
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0xd15(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xcfc(%rip),%xmm0
ucomisd -0x60(%rbp),%xmm0
ja     1326 <cryangles+0x1d6>
movsd  -0x60(%rbp),%xmm0
movsd  0xcfc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1332 <cryangles+0x1e2>
movl   $0x0,-0x4(%rbp)
jmp    1706 <cryangles+0x5b6>
movsd  -0x60(%rbp),%xmm0
call   1050 <asin@plt>
movsd  0xcc4(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    13c3 <cryangles+0x273>
movsd  -0xc0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    13d3 <cryangles+0x283>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    141a <cryangles+0x2ca>
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1427 <cryangles+0x2d7>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm1
ff
ucomisd %xmm1,%xmm0
jb     144d <cryangles+0x2fd>
movl   $0x0,-0x4(%rbp)
jmp    1706 <cryangles+0x5b6>
movsd  -0xc0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1050 <asin@plt>
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0xb8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xb0(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm3
ff
movsd  -0xb8(%rbp),%xmm2
ff
mulsd  -0xb8(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  -0xb8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xb0(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm3
ff
movsd  -0xb8(%rbp),%xmm2
ff
mulsd  -0xb8(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xa84(%rip),%xmm0
ucomisd -0x78(%rbp),%xmm0
jb     15d5 <cryangles+0x485>
movsd  -0x80(%rbp),%xmm0
call   1030 <acos@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1663 <cryangles+0x513>
movsd  -0x78(%rbp),%xmm0
movsd  0xa46(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1603 <cryangles+0x4b3>
movsd  -0x80(%rbp),%xmm0
call   1030 <acos@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    165e <cryangles+0x50e>
xorps  %xmm0,%xmm0
ucomisd -0x80(%rbp),%xmm0
jb     1647 <cryangles+0x4f7>
movsd  0x2a2f(%rip),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   1050 <asin@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1659 <cryangles+0x509>
movsd  -0x78(%rbp),%xmm0
call   1050 <asin@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    165e <cryangles+0x50e>
jmp    1663 <cryangles+0x513>
movsd  0x9a5(%rip),%xmm0
divsd  0x29d5(%rip),%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  0x989(%rip),%xmm0
divsd  0x29b9(%rip),%xmm0
mov    -0x38(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  0x96d(%rip),%xmm0
divsd  0x299d(%rip),%xmm0
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x979(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x959(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x939(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cryangles>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %r9,%rbx
mov    %r8,%r14
movsd  %xmm0,0x18(%rsp)
mov    %rcx,%rbp
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
movsd  %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movapd %xmm0,(%rsp)
divsd  0xe69(%rip),%xmm1
mulsd  0xe69(%rip),%xmm1
movsd  %xmm1,0x48(%rsp)
movapd %xmm1,%xmm0
call   1060 <cos@plt>
movapd %xmm0,%xmm3
movsd  0x8(%rbp),%xmm0
movsd  0x20(%rsp),%xmm5
mulsd  %xmm5,%xmm0
movsd  0x0(%rbp),%xmm1
movsd  0x30(%rsp),%xmm6
mulsd  %xmm6,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rbp),%xmm2
movapd (%rsp),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm1,%xmm2
movsd  0x20(%rbp),%xmm0
mulsd  %xmm5,%xmm0
movsd  0x18(%rbp),%xmm1
mulsd  %xmm6,%xmm1
addsd  %xmm0,%xmm1
movsd  0x28(%rbp),%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
mulsd  0x38(%rbp),%xmm5
movapd %xmm6,%xmm1
mulsd  0x30(%rbp),%xmm1
addsd  %xmm5,%xmm1
mulsd  0x40(%rbp),%xmm4
addsd  %xmm1,%xmm4
movapd %xmm0,0x20(%rsp)
mulsd  %xmm0,%xmm0
movapd %xmm2,0x30(%rsp)
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm4,(%rsp)
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movapd %xmm3,0x50(%rsp)
jb     126a <cryangles+0x11a>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    1273 <cryangles+0x123>
call   1070 <sqrt@plt>
movapd %xmm0,%xmm2
movsd  0x18(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  0xd8b(%rip),%xmm0
xor    %ebp,%ebp
movsd  0xd89(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1497 <cryangles+0x347>
ucomisd 0xd7f(%rip),%xmm0
jae    1497 <cryangles+0x347>
mov    0x90(%rsp),%r15
movsd  %xmm2,0x18(%rsp)
call   1050 <asin@plt>
movsd  0x18(%rsp),%xmm6
addsd  %xmm0,%xmm0
movsd  %xmm0,(%r15)
movapd (%rsp),%xmm5
divsd  %xmm6,%xmm5
movapd 0xd86(%rip),%xmm1
movapd %xmm5,%xmm0
xorpd  %xmm1,%xmm0
xorpd  %xmm2,%xmm2
movapd %xmm5,%xmm3
cmpltsd %xmm2,%xmm3
movapd %xmm3,%xmm4
andpd  %xmm0,%xmm4
andnpd %xmm5,%xmm3
orpd   %xmm4,%xmm3
movapd 0x50(%rsp),%xmm5
xorpd  %xmm5,%xmm1
movapd %xmm5,%xmm4
cmpltsd %xmm2,%xmm4
andpd  %xmm4,%xmm1
andnpd %xmm5,%xmm4
orpd   %xmm1,%xmm4
ucomisd %xmm4,%xmm3
jae    1497 <cryangles+0x347>
movapd 0x30(%rsp),%xmm1
divsd  %xmm6,%xmm1
movapd %xmm1,0x30(%rsp)
movapd 0x20(%rsp),%xmm1
divsd  %xmm6,%xmm1
movapd %xmm1,0x20(%rsp)
divsd  %xmm5,%xmm0
call   1050 <asin@plt>
movsd  %xmm0,(%rbx)
movsd  0x48(%rsp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,(%rsp)
movsd  (%rbx),%xmm0
call   1060 <cos@plt>
mulsd  0x50(%rsp),%xmm0
movapd 0x20(%rsp),%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm0,%xmm1
movapd (%rsp),%xmm5
movapd %xmm5,%xmm2
movapd 0x30(%rsp),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm1,%xmm2
xorpd  0xcc0(%rip),%xmm5
movapd %xmm3,%xmm1
unpcklpd %xmm3,%xmm5
unpcklpd %xmm3,%xmm1
mulpd  %xmm5,%xmm1
movapd %xmm1,%xmm3
movapd %xmm4,%xmm1
unpcklpd %xmm4,%xmm0
unpcklpd %xmm4,%xmm1
mulpd  %xmm0,%xmm1
addpd  %xmm3,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
divsd  %xmm0,%xmm2
divsd  %xmm0,%xmm1
movsd  0xc48(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    141b <cryangles+0x2cb>
movapd %xmm1,%xmm0
ucomisd 0xc3e(%rip),%xmm1
jae    142e <cryangles+0x2de>
movapd %xmm2,(%rsp)
call   1050 <asin@plt>
xorpd  %xmm1,%xmm1
ucomisd (%rsp),%xmm1
jb     1437 <cryangles+0x2e7>
movsd  0xbf7(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    1437 <cryangles+0x2e7>
movapd %xmm2,%xmm0
call   1030 <acos@plt>
xorpd  0xc34(%rip),%xmm0
jmp    1437 <cryangles+0x2e7>
movapd %xmm2,%xmm0
call   1030 <acos@plt>
movsd  0xbf9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
movsd  (%rbx),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx)
mulsd  (%r15),%xmm1
movsd  %xmm1,(%r15)
movsd  (%r14),%xmm0
divsd  0xbd5(%rip),%xmm0
movsd  %xmm0,(%r14)
movsd  (%rbx),%xmm0
divsd  0xbcc(%rip),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%r15),%xmm0
divsd  0xbc3(%rip),%xmm0
movsd  %xmm0,(%r15)
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@cryangles.pi = internal global double 0x400921FB54442D11
define i32 @cryangles(i32 %0, i32 %1, i32 %2, [3 x double]* %3, double %4, double %5, double* %6, double* %7, double* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [3 x double]*
%15 = alloca double
%16 = alloca double
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store [3 x double]* %3, [3 x double]** %14
store double %4, double* %15
store double %5, double* %16
store double* %6, double** %17
store double* %7, double** %18
store double* %8, double** %19
%37 = load i32, i32* %11
%38 = sitofp i32 %37 to double
store double %38, double* %31
%39 = load i32, i32* %12
%40 = sitofp i32 %39 to double
store double %40, double* %32
%41 = load i32, i32* %13
%42 = sitofp i32 %41 to double
store double %42, double* %33
%43 = load double, double* %16
%44 = fdiv double %43, 1.800000e+02
%45 = load double, double* @cryangles.pi
%46 = fmul double %44, %45
store double %46, double* %16
%47 = load double, double* %16
%48 = call double @cos(double %47)
store double %48, double* %25
%49 = load [3 x double]*, [3 x double]** %14
%50 = getelementptr inbounds [3 x double], [3 x double]* %49, i64 0
%51 = getelementptr inbounds [3 x double], [3 x double]* %50, i64 0, i64 0
%52 = load double, double* %51
%53 = load double, double* %31
%54 = load [3 x double]*, [3 x double]** %14
%55 = getelementptr inbounds [3 x double], [3 x double]* %54, i64 0
%56 = getelementptr inbounds [3 x double], [3 x double]* %55, i64 0, i64 1
%57 = load double, double* %56
%58 = load double, double* %32
%59 = fmul double %57, %58
%60 = call double @llvm.fmuladd.f64(double %52, double %53, double %59)
%61 = load [3 x double]*, [3 x double]** %14
%62 = getelementptr inbounds [3 x double], [3 x double]* %61, i64 0
%63 = getelementptr inbounds [3 x double], [3 x double]* %62, i64 0, i64 2
%64 = load double, double* %63
%65 = load double, double* %33
%66 = call double @llvm.fmuladd.f64(double %64, double %65, double %60)
store double %66, double* %20
%67 = load [3 x double]*, [3 x double]** %14
%68 = getelementptr inbounds [3 x double], [3 x double]* %67, i64 1
%69 = getelementptr inbounds [3 x double], [3 x double]* %68, i64 0, i64 0
%70 = load double, double* %69
%71 = load double, double* %31
%72 = load [3 x double]*, [3 x double]** %14
%73 = getelementptr inbounds [3 x double], [3 x double]* %72, i64 1
%74 = getelementptr inbounds [3 x double], [3 x double]* %73, i64 0, i64 1
%75 = load double, double* %74
%76 = load double, double* %32
%77 = fmul double %75, %76
%78 = call double @llvm.fmuladd.f64(double %70, double %71, double %77)
%79 = load [3 x double]*, [3 x double]** %14
%80 = getelementptr inbounds [3 x double], [3 x double]* %79, i64 1
%81 = getelementptr inbounds [3 x double], [3 x double]* %80, i64 0, i64 2
%82 = load double, double* %81
%83 = load double, double* %33
%84 = call double @llvm.fmuladd.f64(double %82, double %83, double %78)
store double %84, double* %21
%85 = load [3 x double]*, [3 x double]** %14
%86 = getelementptr inbounds [3 x double], [3 x double]* %85, i64 2
%87 = getelementptr inbounds [3 x double], [3 x double]* %86, i64 0, i64 0
%88 = load double, double* %87
%89 = load double, double* %31
%90 = load [3 x double]*, [3 x double]** %14
%91 = getelementptr inbounds [3 x double], [3 x double]* %90, i64 2
%92 = getelementptr inbounds [3 x double], [3 x double]* %91, i64 0, i64 1
%93 = load double, double* %92
%94 = load double, double* %32
%95 = fmul double %93, %94
%96 = call double @llvm.fmuladd.f64(double %88, double %89, double %95)
%97 = load [3 x double]*, [3 x double]** %14
%98 = getelementptr inbounds [3 x double], [3 x double]* %97, i64 2
%99 = getelementptr inbounds [3 x double], [3 x double]* %98, i64 0, i64 2
%100 = load double, double* %99
%101 = load double, double* %33
%102 = call double @llvm.fmuladd.f64(double %100, double %101, double %96)
store double %102, double* %22
%103 = load double, double* %20
%104 = load double, double* %20
%105 = load double, double* %21
%106 = load double, double* %21
%107 = fmul double %105, %106
%108 = call double @llvm.fmuladd.f64(double %103, double %104, double %107)
%109 = load double, double* %22
%110 = load double, double* %22
%111 = call double @llvm.fmuladd.f64(double %109, double %110, double %108)
%112 = call double @sqrt(double %111)
store double %112, double* %23
%113 = load double, double* %15
%114 = load double, double* %23
%115 = fmul double %113, %114
%116 = fdiv double %115, 2.000000e+00
store double %116, double* %24
%117 = load double, double* %24
%118 = fcmp olt double %117, 0x3EB0C6F7A0B5ED8D
br i1 %118, label %122, label %119
119: ; preds = %9
%120 = load double, double* %24
%121 = fcmp oge double %120, 1.000000e+00
br i1 %121, label %122, label %123
122: ; preds = %119, %9
store i32 0, i32* %10
br label %253
123: ; preds = %119
%124 = load double, double* %24
%125 = call double @asin(double %124)
%126 = fmul double %125, 2.000000e+00
%127 = load double*, double** %19
store double %126, double* %127
%128 = load double, double* %20
%129 = load double, double* %23
%130 = fdiv double %128, %129
store double %130, double* %34
%131 = load double, double* %21
%132 = load double, double* %23
%133 = fdiv double %131, %132
store double %133, double* %35
%134 = load double, double* %22
%135 = load double, double* %23
%136 = fdiv double %134, %135
store double %136, double* %36
%137 = load double, double* %36
%138 = fcmp olt double %137, 0.000000e+00
br i1 %138, label %139, label %142
139: ; preds = %123
%140 = load double, double* %36
%141 = fneg double %140
br label %144
142: ; preds = %123
%143 = load double, double* %36
br label %144
144: ; preds = %142, %139
%145 = phi double [ %141, %139 ], [ %143, %142 ]
%146 = load double, double* %25
%147 = fcmp olt double %146, 0.000000e+00
br i1 %147, label %148, label %151
148: ; preds = %144
%149 = load double, double* %25
%150 = fneg double %149
br label %153
151: ; preds = %144
%152 = load double, double* %25
br label %153
153: ; preds = %151, %148
%154 = phi double [ %150, %148 ], [ %152, %151 ]
%155 = fcmp oge double %145, %154
br i1 %155, label %156, label %157
156: ; preds = %153
store i32 0, i32* %10
br label %253
157: ; preds = %153
%158 = load double, double* %36
%159 = fneg double %158
%160 = load double, double* %25
%161 = fdiv double %159, %160
store double %161, double* %26
%162 = load double, double* %26
%163 = call double @asin(double %162)
%164 = load double*, double** %18
store double %163, double* %164
%165 = load double, double* %16
%166 = call double @sin(double %165)
store double %166, double* %29
%167 = load double, double* %25
%168 = load double*, double** %18
%169 = load double, double* %168
%170 = call double @cos(double %169)
%171 = fmul double %167, %170
store double %171, double* %30
%172 = load double, double* %29
%173 = load double, double* %34
%174 = load double, double* %30
%175 = load double, double* %35
%176 = fmul double %174, %175
%177 = call double @llvm.fmuladd.f64(double %172, double %173, double %176)
%178 = load double, double* %34
%179 = load double, double* %34
%180 = load double, double* %35
%181 = load double, double* %35
%182 = fmul double %180, %181
%183 = call double @llvm.fmuladd.f64(double %178, double %179, double %182)
%184 = fdiv double %177, %183
store double %184, double* %28
%185 = load double, double* %30
%186 = load double, double* %34
%187 = load double, double* %29
%188 = load double, double* %35
%189 = fmul double %187, %188
%190 = fneg double %189
%191 = call double @llvm.fmuladd.f64(double %185, double %186, double %190)
%192 = load double, double* %34
%193 = load double, double* %34
%194 = load double, double* %35
%195 = load double, double* %35
%196 = fmul double %194, %195
%197 = call double @llvm.fmuladd.f64(double %192, double %193, double %196)
%198 = fdiv double %191, %197
store double %198, double* %27
%199 = load double, double* %27
%200 = fcmp ole double %199, 0xBFE6666666666666
br i1 %200, label %201, label %206
201: ; preds = %157
%202 = load double, double* %28
%203 = call double @acos(double %202)
%204 = fneg double %203
%205 = load double*, double** %17
store double %204, double* %205
br label %228
206: ; preds = %157
%207 = load double, double* %27
%208 = fcmp oge double %207, 0x3FE6666666666666
br i1 %208, label %209, label %213
209: ; preds = %206
%210 = load double, double* %28
%211 = call double @acos(double %210)
%212 = load double*, double** %17
store double %211, double* %212
br label %227
213: ; preds = %206
%214 = load double, double* %28
%215 = fcmp ole double %214, 0.000000e+00
br i1 %215, label %216, label %222
216: ; preds = %213
%217 = load double, double* @cryangles.pi
%218 = load double, double* %27
%219 = call double @asin(double %218)
%220 = fsub double %217, %219
%221 = load double*, double** %17
store double %220, double* %221
br label %226
222: ; preds = %213
%223 = load double, double* %27
%224 = call double @asin(double %223)
%225 = load double*, double** %17
store double %224, double* %225
br label %226
226: ; preds = %222, %216
br label %227
227: ; preds = %226, %209
br label %228
228: ; preds = %227, %201
%229 = load double, double* @cryangles.pi
%230 = fdiv double 1.800000e+02, %229
%231 = load double*, double** %17
%232 = load double, double* %231
%233 = fmul double %232, %230
store double %233, double* %231
%234 = load double, double* @cryangles.pi
%235 = fdiv double 1.800000e+02, %234
%236 = load double*, double** %18
%237 = load double, double* %236
%238 = fmul double %237, %235
store double %238, double* %236
%239 = load double, double* @cryangles.pi
%240 = fdiv double 1.800000e+02, %239
%241 = load double*, double** %19
%242 = load double, double* %241
%243 = fmul double %242, %240
store double %243, double* %241
%244 = load double*, double** %17
%245 = load double, double* %244
%246 = fdiv double %245, 1.250000e+00
store double %246, double* %244
%247 = load double*, double** %18
%248 = load double, double* %247
%249 = fdiv double %248, 1.500000e+00
store double %249, double* %247
%250 = load double*, double** %19
%251 = load double, double* %250
%252 = fdiv double %251, 1.150000e+00
store double %252, double* %250
store i32 1, i32* %10
br label %253
253: ; preds = %228, %156, %122
%254 = load i32, i32* %10
ret i32 %254
}

LLVM IR (-O2):
define i32 @cryangles(i32 %0, i32 %1, i32 %2, [3 x double]* nocapture %3, double %4, double %5, double* nocapture %6, double* nocapture %7, double* nocapture %8) {
%10 = sitofp i32 %0 to double
%11 = sitofp i32 %1 to double
%12 = sitofp i32 %2 to double
%13 = fdiv double %5, 1.800000e+02
%14 = fmul double %13, 0x400921FB54442D11
%15 = tail call double @cos(double %14)
%16 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%17 = load double, double* %16
%18 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%19 = load double, double* %18
%20 = fmul double %19, %11
%21 = tail call double @llvm.fmuladd.f64(double %17, double %10, double %20)
%22 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%23 = load double, double* %22
%24 = tail call double @llvm.fmuladd.f64(double %23, double %12, double %21)
%25 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 1, i64 0
%26 = load double, double* %25
%27 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 1, i64 1
%28 = load double, double* %27
%29 = fmul double %28, %11
%30 = tail call double @llvm.fmuladd.f64(double %26, double %10, double %29)
%31 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 1, i64 2
%32 = load double, double* %31
%33 = tail call double @llvm.fmuladd.f64(double %32, double %12, double %30)
%34 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 2, i64 0
%35 = load double, double* %34
%36 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 2, i64 1
%37 = load double, double* %36
%38 = fmul double %37, %11
%39 = tail call double @llvm.fmuladd.f64(double %35, double %10, double %38)
%40 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 2, i64 2
%41 = load double, double* %40
%42 = tail call double @llvm.fmuladd.f64(double %41, double %12, double %39)
%43 = fmul double %33, %33
%44 = tail call double @llvm.fmuladd.f64(double %24, double %24, double %43)
%45 = tail call double @llvm.fmuladd.f64(double %42, double %42, double %44)
%46 = tail call double @sqrt(double %45)
%47 = fmul double %46, %4
%48 = fmul double %47, 5.000000e-01
%49 = fcmp olt double %48, 0x3EB0C6F7A0B5ED8D
%50 = fcmp oge double %48, 1.000000e+00
%51 = or i1 %49, %50
br i1 %51, label %115, label %52
52: ; preds = %9
%53 = tail call double @asin(double %48)
%54 = fmul double %53, 2.000000e+00
store double %54, double* %8
%55 = fdiv double %24, %46
%56 = fdiv double %33, %46
%57 = fdiv double %42, %46
%58 = fcmp olt double %57, 0.000000e+00
%59 = fneg double %57
%60 = select i1 %58, double %59, double %57
%61 = fcmp olt double %15, 0.000000e+00
%62 = fneg double %15
%63 = select i1 %61, double %62, double %15
%64 = fcmp ult double %60, %63
br i1 %64, label %65, label %115
65: ; preds = %52
%66 = fdiv double %59, %15
%67 = tail call double @asin(double %66)
store double %67, double* %7
%68 = tail call double @sin(double %14)
%69 = load double, double* %7
%70 = tail call double @cos(double %69)
%71 = fmul double %15, %70
%72 = fmul double %56, %71
%73 = tail call double @llvm.fmuladd.f64(double %68, double %55, double %72)
%74 = fneg double %68
%75 = insertelement <2 x double> poison, double %56, i64 0
%76 = shufflevector <2 x double> %75, <2 x double> poison, <2 x i32> zeroinitializer
%77 = insertelement <2 x double> poison, double %74, i64 0
%78 = insertelement <2 x double> %77, double %56, i64 1
%79 = fmul <2 x double> %76, %78
%80 = insertelement <2 x double> poison, double %71, i64 0
%81 = insertelement <2 x double> %80, double %55, i64 1
%82 = insertelement <2 x double> poison, double %55, i64 0
%83 = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> zeroinitializer
%84 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %81, <2 x double> %83, <2 x double> %79)
%85 = extractelement <2 x double> %84, i64 1
%86 = fdiv double %73, %85
%87 = extractelement <2 x double> %84, i64 0
%88 = fdiv double %87, %85
%89 = fcmp ugt double %88, 0xBFE6666666666666
br i1 %89, label %93, label %90
90: ; preds = %65
%91 = tail call double @acos(double %86)
%92 = fneg double %91
br label %102
93: ; preds = %65
%94 = fcmp ult double %88, 0x3FE6666666666666
br i1 %94, label %97, label %95
95: ; preds = %93
%96 = tail call double @acos(double %86)
br label %102
97: ; preds = %93
%98 = fcmp ugt double %86, 0.000000e+00
%99 = tail call double @asin(double %88)
br i1 %98, label %102, label %100
100: ; preds = %97
%101 = fsub double 0x400921FB54442D11, %99
br label %102
102: ; preds = %97, %95, %100, %90
%103 = phi double [ %96, %95 ], [ %101, %100 ], [ %92, %90 ], [ %99, %97 ]
%104 = fmul double %103, 0x404CA5DC1A63C200
store double %104, double* %6
%105 = load double, double* %7
%106 = fmul double %105, 0x404CA5DC1A63C200
store double %106, double* %7
%107 = load double, double* %8
%108 = fmul double %107, 0x404CA5DC1A63C200
store double %108, double* %8
%109 = load double, double* %6
%110 = fdiv double %109, 1.250000e+00
store double %110, double* %6
%111 = load double, double* %7
%112 = fdiv double %111, 1.500000e+00
store double %112, double* %7
%113 = load double, double* %8
%114 = fdiv double %113, 1.150000e+00
store double %114, double* %8
br label %115
115: ; preds = %52, %9, %102
%116 = phi i32 [ 1, %102 ], [ 0, %9 ], [ 0, %52 ]
ret i32 %116
}