#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double M_PI;
double atan2(double, double);
double cos(double);
double fabs(double);
double sqrt(double);
void DEM_Bearing2LL(double flat, double flon, double *tlat, double *tlon,
                    double az, double *baz, double dist) {
  static double eps = 5e-14;
  double a = 6378206.4;
  double f = 1.0 / 298.25722210088;
  double d1;
  double sin(), cos(), atan2(), sqrt();
  static double c, d, e, r, x, y, cf, sa, cu, sf, cy, cz, su, tu, sy, c2a, s,
      faz, rbaz;
  double glat1, glon1, glat2, glon2;
  s = dist * 1000.0;
  faz = az * M_PI / 180.0;
  glat1 = flat * M_PI / 180.0;
  glon1 = flon * M_PI / 180.0;
  r = 1.0 - f;
  tu = r * sin(glat1) / cos(glat1);
  sf = sin(faz);
  cf = cos(faz);
  rbaz = 0.0;
  if (cf != 0.0) {
    rbaz = atan2(tu, cf) * 2.0;
  }
  cu = 1.0 / sqrt(tu * tu + 1.0);
  su = tu * cu;
  sa = cu * sf;
  c2a = -sa * sa + 1.0;
  x = sqrt((1.0 / r / r - 1.0) * c2a + 1.0) + (float)1.;
  x = (x - 2.0) / x;
  c = 1.0 - x;
  c = (x * x / 4.0 + 1) / c;
  d = (x * .375 * x - 1.0) * x;
  tu = s / r / a / c;
  y = tu;
L100:
  sy = sin(y);
  cy = cos(y);
  cz = cos(rbaz + y);
  e = cz * cz * 2.0 - 1.0;
  c = y;
  x = e * cy;
  y = e + e - 1.0;
  y = (((sy * sy * 4.0 - 3.0) * y * cz * d / 6.0 + x) * d / (float)4. - cz) *
          sy * d +
      tu;
  if (fabs(y - c) > eps) {
    goto L100;
  }
  rbaz = cu * cy * cf - su * sy;
  c = r * sqrt(sa * sa + rbaz * rbaz);
  d = su * cy + cu * sy * cf;
  glat2 = atan2(d, c);
  c = cu * cy - su * sy * cf;
  x = atan2(sy * sf, c);
  c = ((c2a * -3.0 + 4.0) * f + 4.0) * c2a * f / 16.0;
  d = ((e * cy * c + cz) * sy * c + y) * sa;
  glon2 = glon1 + x - (1.0 - c) * d * f;
  rbaz = atan2(sa, *baz) + M_PI;
  *tlat = glat2 * 180.0 / M_PI;
  *tlon = glon2 * 180.0 / M_PI;
  *baz = rbaz * 180.0 / M_PI;
  return;
}


x86 assembly (clang, -O0):
<DEM_Bearing2LL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  0xead(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe83(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,0x2f36(%rip)
movsd  -0x28(%rbp),%xmm0
mov    0x2e42(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xe56(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x2f1a(%rip)
movsd  -0x8(%rbp),%xmm0
mov    0x2e1e(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xe32(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    0x2dfd(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xe11(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xdf8(%rip),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,0x2e53(%rip)
movsd  0x2e4b(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x2e5d(%rip)
movsd  0x2e75(%rip),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x2e28(%rip)
movsd  0x2e60(%rip),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,0x2dfb(%rip)
xorps  %xmm0,%xmm0
movsd  %xmm0,0x2e50(%rip)
movsd  0x2de8(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12b0 <DEM_Bearing2LL+0x170>
jp     12b0 <DEM_Bearing2LL+0x170>
jmp    12d9 <DEM_Bearing2LL+0x199>
movsd  0x2e00(%rip),%xmm0
movsd  0x2dc0(%rip),%xmm1
call   1030 <atan2@plt>
movsd  0xd5b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x2e07(%rip)
movsd  0x2dd7(%rip),%xmm0
movsd  0x2dcf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd0b(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xcf7(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x2d7b(%rip)
movsd  0x2d9b(%rip),%xmm0
mulsd  0x2d6b(%rip),%xmm0
movsd  %xmm0,0x2d83(%rip)
movsd  0x2d5b(%rip),%xmm0
mulsd  0x2d5b(%rip),%xmm0
movsd  %xmm0,0x2d43(%rip)
movsd  0x2d3b(%rip),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x2d1c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc88(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2d44(%rip)
movsd  0xc74(%rip),%xmm0
divsd  0x2cd4(%rip),%xmm0
divsd  0x2ccc(%rip),%xmm0
movsd  0xc5c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0x2d18(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc44(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movsd  0xc33(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2c97(%rip)
movsd  0x2c8f(%rip),%xmm0
movsd  0xc3f(%rip),%xmm1
subsd  %xmm1,%xmm0
divsd  0x2c7b(%rip),%xmm0
movsd  %xmm0,0x2c73(%rip)
movsd  0xbfb(%rip),%xmm0
subsd  0x2c63(%rip),%xmm0
movsd  %xmm0,0x2c3b(%rip)
movsd  0x2c53(%rip),%xmm0
mulsd  0x2c4b(%rip),%xmm0
movsd  0xc13(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xbc7(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  0x2c0b(%rip),%xmm0
movsd  %xmm0,0x2c03(%rip)
movsd  0xbe3(%rip),%xmm0
mulsd  0x2c13(%rip),%xmm0
movsd  0x2c0b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbbf(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  0x2bf3(%rip),%xmm0
movsd  %xmm0,0x2bd3(%rip)
movsd  0x2c43(%rip),%xmm0
divsd  0x2bd3(%rip),%xmm0
divsd  -0x40(%rbp),%xmm0
divsd  0x2bae(%rip),%xmm0
movsd  %xmm0,0x2c0e(%rip)
movsd  0x2c06(%rip),%xmm0
movsd  %xmm0,0x2bbe(%rip)
movsd  0x2bb6(%rip),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x2bf1(%rip)
movsd  0x2ba1(%rip),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,0x2bbc(%rip)
movsd  0x2bf4(%rip),%xmm0
addsd  0x2b84(%rip),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,0x2ba7(%rip)
movsd  0x2b9f(%rip),%xmm0
mulsd  0x2b97(%rip),%xmm0
addsd  %xmm0,%xmm0
movsd  0xb13(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2b37(%rip)
movsd  0x2b47(%rip),%xmm0
movsd  %xmm0,0x2b17(%rip)
movsd  0x2b1f(%rip),%xmm0
mulsd  0x2b57(%rip),%xmm0
movsd  %xmm0,0x2b1f(%rip)
movsd  0x2b07(%rip),%xmm0
addsd  0x2aff(%rip),%xmm0
movsd  0xa97(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2b03(%rip)
movsd  0x2b43(%rip),%xmm0
mulsd  0x2b3b(%rip),%xmm0
movsd  0xab3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xab7(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  0x2ad3(%rip),%xmm0
mulsd  0x2afb(%rip),%xmm0
mulsd  0x2aa3(%rip),%xmm0
movsd  0xa8b(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  0x2aa7(%rip),%xmm0
mulsd  0x2a87(%rip),%xmm0
movsd  0xa67(%rip),%xmm1
divsd  %xmm1,%xmm0
subsd  0x2ac3(%rip),%xmm0
mulsd  0x2ad3(%rip),%xmm0
movsd  0x2a63(%rip),%xmm2
movsd  0x2abb(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2a6b(%rip)
movsd  0x2a63(%rip),%xmm0
subsd  0x2a33(%rip),%xmm0
movaps 0xa3c(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd 0x2a10(%rip),%xmm0
jbe    163b <DEM_Bearing2LL+0x4fb>
jmp    14ba <DEM_Bearing2LL+0x37a>
movsd  0x2a4d(%rip),%xmm0
mulsd  0x2a55(%rip),%xmm0
movsd  0x2a2d(%rip),%xmm2
movsd  0x2a55(%rip),%xmm1
mulsd  0x2a5d(%rip),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2a56(%rip)
movsd  0x29d6(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0x29e6(%rip),%xmm0
movsd  0x29de(%rip),%xmm2
movsd  0x2a2e(%rip),%xmm1
mulsd  0x2a26(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x2972(%rip)
movsd  0x29ca(%rip),%xmm0
movsd  0x29b2(%rip),%xmm2
movsd  0x299a(%rip),%xmm1
mulsd  0x29c2(%rip),%xmm1
mulsd  0x297a(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2942(%rip)
movsd  0x293a(%rip),%xmm0
movsd  0x292a(%rip),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0x2958(%rip),%xmm0
movsd  0x2960(%rip),%xmm2
movsd  0x2968(%rip),%xmm1
mulsd  0x2970(%rip),%xmm1
mulsd  0x2928(%rip),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x28d1(%rip)
movsd  0x2939(%rip),%xmm0
mulsd  0x2909(%rip),%xmm0
movsd  0x28b9(%rip),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,0x28cc(%rip)
movsd  0x291c(%rip),%xmm0
movsd  0x89c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x880(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x86b(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  0x28e7(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  0x86a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x2856(%rip)
movsd  0x285e(%rip),%xmm0
mulsd  0x2896(%rip),%xmm0
movsd  0x283e(%rip),%xmm2
movsd  0x288e(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  0x2896(%rip),%xmm0
movsd  0x281e(%rip),%xmm2
movsd  0x283e(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  0x283e(%rip),%xmm0
movsd  %xmm0,0x2806(%rip)
movsd  -0x60(%rbp),%xmm1
addsd  0x2811(%rip),%xmm1
movsd  0x799(%rip),%xmm0
subsd  0x27e1(%rip),%xmm0
mulsd  0x27e1(%rip),%xmm0
movsd  -0x48(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0x27e0(%rip),%xmm0
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm1
call   1030 <atan2@plt>
mov    0x272c(%rip),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,0x2818(%rip)
movsd  0x738(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
mov    0x270c(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0x718(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
mov    0x26ec(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0x6f8(%rip),%xmm0
mulsd  0x27c8(%rip),%xmm0
mov    0x26c9(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DEM_Bearing2LL>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mulsd  0xead(%rip),%xmm3
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
movsd  %xmm1,0x8(%rsp)
movsd  %xmm3,0x2f4e(%rip)
mov    0x2e77(%rip),%r12
movsd  (%r12),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe85(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,0x2f31(%rip)
movsd  %xmm3,0x10(%rsp)
mulsd  %xmm3,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
movabs $0x3fefe488a578c9d3,%rax
e4 ef 3f
mov    %rax,0x2ea4(%rip)
call   1040 <sin@plt>
mulsd  0xe4f(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
call   1050 <cos@plt>
movsd  0x18(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x2ebc(%rip)
movsd  0x2ed4(%rip),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x2e87(%rip)
movsd  0x2ebf(%rip),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,0x2e5a(%rip)
movq   $0x0,0x2eaf(%rip)
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    1225 <DEM_Bearing2LL+0xe5>
jnp    1246 <DEM_Bearing2LL+0x106>
movapd %xmm0,%xmm1
movsd  0x2e6f(%rip),%xmm0
call   1030 <atan2@plt>
xorpd  %xmm2,%xmm2
addsd  %xmm0,%xmm0
movsd  %xmm0,0x2e82(%rip)
movsd  0x2e52(%rip),%xmm0
mulsd  %xmm0,%xmm0
addsd  0xdbe(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     1266 <DEM_Bearing2LL+0x126>
sqrtsd %xmm0,%xmm0
jmp    126b <DEM_Bearing2LL+0x12b>
call   1060 <sqrt@plt>
movsd  0xda5(%rip),%xmm3
movapd %xmm3,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x2df5(%rip)
movsd  0x2e15(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x2e01(%rip)
mulsd  0x2de1(%rip),%xmm1
movsd  %xmm1,0x2dc9(%rip)
mulsd  %xmm1,%xmm1
movapd %xmm3,%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,0x2df5(%rip)
movsd  0x2d95(%rip),%xmm1
movapd %xmm3,%xmm0
divsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
addsd  0xd49(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12ef <DEM_Bearing2LL+0x1af>
sqrtsd %xmm0,%xmm0
jmp    12f4 <DEM_Bearing2LL+0x1b4>
call   1060 <sqrt@plt>
movsd  0xd1c(%rip),%xmm3
addsd  %xmm3,%xmm0
movsd  0xd20(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm3,%xmm0
subsd  %xmm1,%xmm0
movsd  0xd18(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  0xcf0(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm1
mulsd  0xcf0(%rip),%xmm1
addsd  %xmm3,%xmm1
movsd  0x2d6c(%rip),%xmm3
unpcklpd %xmm1,%xmm3
movsd  0x2d00(%rip),%xmm1
unpcklpd %xmm0,%xmm1
divpd  %xmm1,%xmm3
movapd %xmm3,%xmm0
divsd  0xcd4(%rip),%xmm0
movsd  %xmm2,0x2cd4(%rip)
unpckhpd %xmm3,%xmm3
divsd  %xmm3,%xmm0
movsd  %xmm0,0x2d1c(%rip)
movsd  %xmm0,0x2cd4(%rip)
nopl   0x0(%rax)
call   1040 <sin@plt>
movsd  %xmm0,0x2d0b(%rip)
movsd  0x2cbb(%rip),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,0x2cd6(%rip)
movsd  0x2d0e(%rip),%xmm0
addsd  0x2c9e(%rip),%xmm0
call   1050 <cos@plt>
movsd  0xc79(%rip),%xmm6
movapd %xmm0,%xmm1
movsd  %xmm0,0x2cb5(%rip)
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm4,%xmm4
movsd  0xc31(%rip),%xmm0
addsd  %xmm0,%xmm4
movsd  %xmm4,0x2c55(%rip)
movsd  0x2c85(%rip),%xmm2
movapd %xmm4,%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm4,%xmm4
addsd  %xmm0,%xmm4
movsd  0x2c8d(%rip),%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm6,%xmm0
addsd  0xc21(%rip),%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x2c09(%rip),%xmm4
mulsd  %xmm4,%xmm0
divsd  0xc0d(%rip),%xmm0
addsd  %xmm5,%xmm0
mulsd  %xmm4,%xmm0
mulsd  0xbd5(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm0
addsd  0x2c31(%rip),%xmm0
movapd %xmm0,%xmm1
subsd  0x2be5(%rip),%xmm1
andpd  0xbfd(%rip),%xmm1
movsd  %xmm0,0x2bd5(%rip)
ucomisd 0xbcd(%rip),%xmm1
ja     1390 <DEM_Bearing2LL+0x250>
movsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
divsd  0xb5b(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  0x2bbd(%rip),%xmm2
mulsd  0x2bd5(%rip),%xmm3
mulsd  0x2b9d(%rip),%xmm2
subsd  %xmm3,%xmm2
movsd  0x2b81(%rip),%xmm1
movsd  0x2b91(%rip),%xmm0
mulsd  %xmm2,%xmm2
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     14fb <DEM_Bearing2LL+0x3bb>
sqrtsd %xmm0,%xmm0
jmp    150c <DEM_Bearing2LL+0x3cc>
movsd  %xmm1,0x8(%rsp)
call   1060 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x2b60(%rip),%xmm2
mulsd  0x2b88(%rip),%xmm2
mulsd  0x2b40(%rip),%xmm2
movsd  0x2b68(%rip),%xmm0
mulsd  0x2b50(%rip),%xmm0
addsd  %xmm2,%xmm0
call   1030 <atan2@plt>
movsd  0x2b2f(%rip),%xmm1
movsd  0x2b57(%rip),%xmm2
movsd  0x2b3f(%rip),%xmm3
mulsd  %xmm2,%xmm3
mulsd  0x2b03(%rip),%xmm3
mulsd  0x2b1b(%rip),%xmm1
movsd  %xmm0,0x8(%rsp)
subsd  %xmm3,%xmm1
mulsd  0x2b01(%rip),%xmm2
movapd %xmm2,%xmm0
call   1030 <atan2@plt>
movsd  0x2b20(%rip),%xmm2
movsd  0xab8(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xaa4(%rip),%xmm4
addsd  %xmm4,%xmm1
movsd  0xab8(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm4,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm1
mulsd  0xaa8(%rip),%xmm1
movsd  0x2a80(%rip),%xmm4
mulsd  0x2ab0(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0x2aac(%rip),%xmm4
mulsd  0x2abc(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0x2a68(%rip),%xmm4
movsd  0x2a70(%rip),%xmm2
mulsd  %xmm2,%xmm4
movsd  %xmm4,0x2a3c(%rip)
movsd  0x10(%rsp),%xmm5
addsd  %xmm0,%xmm5
movsd  0x9fa(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm3,%xmm0
subsd  %xmm0,%xmm5
movsd  %xmm5,0x10(%rsp)
movsd  (%rbx),%xmm1
movapd %xmm2,%xmm0
call   1030 <atan2@plt>
movsd  (%r12),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2a75(%rip)
movsd  0x9ad(%rip),%xmm2
movsd  0x8(%rsp),%xmm3
mulsd  %xmm2,%xmm3
divsd  %xmm1,%xmm3
movsd  %xmm3,(%r15)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm2,%xmm1
divsd  (%r12),%xmm1
movsd  %xmm1,(%r14)
mulsd  %xmm2,%xmm0
divsd  (%r12),%xmm0
movsd  %xmm0,(%rbx)
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@DEM_Bearing2LL.d = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.e = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.r = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.y = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.cf = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.sa = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.cu = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.sf = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.cy = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.cz = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.su = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.tu = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.sy = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.c2a = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.s = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.faz = internal unnamed_addr global double 0.000000e+00
@DEM_Bearing2LL.rbaz = internal unnamed_addr global double 0.000000e+00
@M_PI = global double 0.000000e+00
define void @DEM_Bearing2LL(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3, double %4, double* nocapture %5, double %6) {
%8 = fmul double %6, 1.000000e+03
store double %8, double* @DEM_Bearing2LL.s
%9 = load double, double* @M_PI
%10 = fmul double %9, %4
%11 = fdiv double %10, 1.800000e+02
store double %11, double* @DEM_Bearing2LL.faz
%12 = fmul double %9, %0
%13 = fdiv double %12, 1.800000e+02
store double 0x3FEFE488A578C9D3, double* @DEM_Bearing2LL.r
%14 = tail call double @sin(double %13)
%15 = fmul double %14, 0x3FEFE488A578C9D3
%16 = tail call double @cos(double %13)
%17 = fdiv double %15, %16
store double %17, double* @DEM_Bearing2LL.tu
%18 = load double, double* @DEM_Bearing2LL.faz
%19 = tail call double @sin(double %18)
store double %19, double* @DEM_Bearing2LL.sf
%20 = load double, double* @DEM_Bearing2LL.faz
%21 = tail call double @cos(double %20)
store double %21, double* @DEM_Bearing2LL.cf
store double 0.000000e+00, double* @DEM_Bearing2LL.rbaz
%22 = fcmp une double %21, 0.000000e+00
br i1 %22, label %23, label %27
23: ; preds = %7
%24 = load double, double* @DEM_Bearing2LL.tu
%25 = tail call double @atan2(double %24, double %21)
%26 = fmul double %25, 2.000000e+00
store double %26, double* @DEM_Bearing2LL.rbaz
br label %27
27: ; preds = %23, %7
%28 = load double, double* @DEM_Bearing2LL.tu
%29 = tail call double @llvm.fmuladd.f64(double %28, double %28, double 1.000000e+00)
%30 = tail call double @sqrt(double %29)
%31 = fdiv double 1.000000e+00, %30
store double %31, double* @DEM_Bearing2LL.cu
%32 = load double, double* @DEM_Bearing2LL.tu
%33 = fmul double %31, %32
store double %33, double* @DEM_Bearing2LL.su
%34 = load double, double* @DEM_Bearing2LL.sf
%35 = fmul double %31, %34
store double %35, double* @DEM_Bearing2LL.sa
%36 = fneg double %35
%37 = tail call double @llvm.fmuladd.f64(double %36, double %35, double 1.000000e+00)
store double %37, double* @DEM_Bearing2LL.c2a
%38 = load double, double* @DEM_Bearing2LL.r
%39 = fdiv double 1.000000e+00, %38
%40 = fdiv double %39, %38
%41 = fadd double %40, -1.000000e+00
%42 = tail call double @llvm.fmuladd.f64(double %41, double %37, double 1.000000e+00)
%43 = tail call double @sqrt(double %42)
%44 = fadd double %43, 1.000000e+00
%45 = fadd double %44, -2.000000e+00
%46 = fdiv double %45, %44
%47 = fsub double 1.000000e+00, %46
%48 = fmul double %46, %46
%49 = fmul double %48, 2.500000e-01
%50 = fadd double %49, 1.000000e+00
%51 = fmul double %46, 3.750000e-01
%52 = tail call double @llvm.fmuladd.f64(double %51, double %46, double -1.000000e+00)
%53 = fmul double %46, %52
store double %53, double* @DEM_Bearing2LL.d
%54 = load double, double* @DEM_Bearing2LL.s
%55 = load double, double* @DEM_Bearing2LL.r
%56 = insertelement <2 x double> poison, double %54, i64 0
%57 = insertelement <2 x double> %56, double %50, i64 1
%58 = insertelement <2 x double> poison, double %55, i64 0
%59 = insertelement <2 x double> %58, double %47, i64 1
%60 = fdiv <2 x double> %57, %59
%61 = extractelement <2 x double> %60, i64 0
%62 = fdiv double %61, 0x415854B79999999A
%63 = extractelement <2 x double> %60, i64 1
%64 = fdiv double %62, %63
store double %64, double* @DEM_Bearing2LL.tu
store double %64, double* @DEM_Bearing2LL.y
br label %65
65: ; preds = %65, %27
%66 = phi double [ %95, %65 ], [ %64, %27 ]
%67 = tail call double @sin(double %66)
store double %67, double* @DEM_Bearing2LL.sy
%68 = load double, double* @DEM_Bearing2LL.y
%69 = tail call double @cos(double %68)
store double %69, double* @DEM_Bearing2LL.cy
%70 = load double, double* @DEM_Bearing2LL.rbaz
%71 = load double, double* @DEM_Bearing2LL.y
%72 = fadd double %70, %71
%73 = tail call double @cos(double %72)
store double %73, double* @DEM_Bearing2LL.cz
%74 = fmul double %73, %73
%75 = tail call double @llvm.fmuladd.f64(double %74, double 2.000000e+00, double -1.000000e+00)
store double %75, double* @DEM_Bearing2LL.e
%76 = load double, double* @DEM_Bearing2LL.y
%77 = load double, double* @DEM_Bearing2LL.cy
%78 = fmul double %75, %77
%79 = fadd double %75, %75
%80 = fadd double %79, -1.000000e+00
%81 = load double, double* @DEM_Bearing2LL.sy
%82 = fmul double %81, %81
%83 = tail call double @llvm.fmuladd.f64(double %82, double 4.000000e+00, double -3.000000e+00)
%84 = fmul double %80, %83
%85 = fmul double %73, %84
%86 = load double, double* @DEM_Bearing2LL.d
%87 = fmul double %86, %85
%88 = fdiv double %87, 6.000000e+00
%89 = fadd double %78, %88
%90 = fmul double %86, %89
%91 = fmul double %90, 2.500000e-01
%92 = fsub double %91, %73
%93 = fmul double %81, %92
%94 = load double, double* @DEM_Bearing2LL.tu
%95 = tail call double @llvm.fmuladd.f64(double %93, double %86, double %94)
store double %95, double* @DEM_Bearing2LL.y
%96 = fsub double %95, %76
%97 = tail call double @llvm.fabs.f64(double %96)
%98 = fcmp ogt double %97, 5.000000e-14
br i1 %98, label %65, label %99
99: ; preds = %65
%100 = fmul double %9, %1
%101 = fdiv double %100, 1.800000e+02
%102 = load double, double* @DEM_Bearing2LL.cu
%103 = fmul double %77, %102
%104 = load double, double* @DEM_Bearing2LL.cf
%105 = load double, double* @DEM_Bearing2LL.su
%106 = fneg double %105
%107 = fmul double %81, %106
%108 = tail call double @llvm.fmuladd.f64(double %103, double %104, double %107)
%109 = load double, double* @DEM_Bearing2LL.r
%110 = load double, double* @DEM_Bearing2LL.sa
%111 = fmul double %108, %108
%112 = tail call double @llvm.fmuladd.f64(double %110, double %110, double %111)
%113 = tail call double @sqrt(double %112)
%114 = fmul double %109, %113
%115 = load double, double* @DEM_Bearing2LL.su
%116 = load double, double* @DEM_Bearing2LL.cy
%117 = load double, double* @DEM_Bearing2LL.cu
%118 = load double, double* @DEM_Bearing2LL.sy
%119 = fmul double %117, %118
%120 = load double, double* @DEM_Bearing2LL.cf
%121 = fmul double %119, %120
%122 = tail call double @llvm.fmuladd.f64(double %115, double %116, double %121)
%123 = tail call double @atan2(double %122, double %114)
%124 = load double, double* @DEM_Bearing2LL.cu
%125 = load double, double* @DEM_Bearing2LL.cy
%126 = load double, double* @DEM_Bearing2LL.su
%127 = load double, double* @DEM_Bearing2LL.sy
%128 = load double, double* @DEM_Bearing2LL.cf
%129 = fneg double %126
%130 = fmul double %127, %129
%131 = fmul double %130, %128
%132 = tail call double @llvm.fmuladd.f64(double %124, double %125, double %131)
%133 = load double, double* @DEM_Bearing2LL.sf
%134 = fmul double %127, %133
%135 = tail call double @atan2(double %134, double %132)
%136 = load double, double* @DEM_Bearing2LL.c2a
%137 = tail call double @llvm.fmuladd.f64(double %136, double -3.000000e+00, double 4.000000e+00)
%138 = tail call double @llvm.fmuladd.f64(double %137, double 0x3F6B775A87362D2B, double 4.000000e+00)
%139 = fmul double %136, %138
%140 = fmul double %139, 0x3F6B775A87362D2B
%141 = fmul double %140, 6.250000e-02
%142 = load double, double* @DEM_Bearing2LL.e
%143 = load double, double* @DEM_Bearing2LL.cy
%144 = fmul double %142, %143
%145 = load double, double* @DEM_Bearing2LL.cz
%146 = tail call double @llvm.fmuladd.f64(double %144, double %141, double %145)
%147 = load double, double* @DEM_Bearing2LL.sy
%148 = fmul double %147, %146
%149 = load double, double* @DEM_Bearing2LL.y
%150 = tail call double @llvm.fmuladd.f64(double %148, double %141, double %149)
%151 = load double, double* @DEM_Bearing2LL.sa
%152 = fmul double %151, %150
store double %152, double* @DEM_Bearing2LL.d
%153 = fadd double %101, %135
%154 = fsub double 1.000000e+00, %141
%155 = fneg double %154
%156 = fmul double %152, %155
%157 = tail call double @llvm.fmuladd.f64(double %156, double 0x3F6B775A87362D2B, double %153)
%158 = load double, double* %5
%159 = tail call double @atan2(double %151, double %158)
%160 = load double, double* @M_PI
%161 = fadd double %159, %160
store double %161, double* @DEM_Bearing2LL.rbaz
%162 = fmul double %123, 1.800000e+02
%163 = fdiv double %162, %160
store double %163, double* %2
%164 = fmul double %157, 1.800000e+02
%165 = load double, double* @M_PI
%166 = fdiv double %164, %165
store double %166, double* %3
%167 = fmul double %161, 1.800000e+02
%168 = load double, double* @M_PI
%169 = fdiv double %167, %168
store double %169, double* %5
ret void
}