#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 GPS_Math_Deg_To_Rad(double);
double asin(double);
double cos(double);
double fabs(double);
double pow(double, double);
double sin(double);
double tan(double);
void GPS_Math_VderGrinten_LatLon_To_EN(double phi, double lambda, double *E,
                                       double *N, double M0, double E0,
                                       double N0, double a, double b) {
  double po2;
  double p2;
  double a2;
  double b2;
  double e2;
  double e4;
  double e6;
  double Ra;
  double pRa;
  double gg;
  double pp;
  double pp2;
  double gm0;
  double ppa;
  double thetai;
  double theta;
  double thetas;
  double thetac;
  double qq;
  double tol;
  double aa;
  double aa2;
  double dlam;
  lambda = GPS_Math_Deg_To_Rad(lambda);
  phi = GPS_Math_Deg_To_Rad(phi);
  M0 = GPS_Math_Deg_To_Rad(M0);
  p2 = (double)3.141592653589 * (double)2.0;
  po2 = (double)3.141592653589 / (double)2.0;
  if (M0 > 3.141592653589)
    M0 -= p2;
  a2 = a * a;
  b2 = b * b;
  e2 = (a2 - b2) / a2;
  e4 = e2 * e2;
  e6 = e2 * e4;
  Ra = a * ((double)1. - e2 / (double)6. - (double)17. * e4 / (double)360. -
            (double)67. * e6 / (double)3024.);
  pRa = (double)3.141592653589 * Ra;
  dlam = lambda - M0;
  if (dlam > 3.141592653589)
    dlam -= p2;
  if (dlam < -3.141592653589)
    dlam += p2;
  tol = (double)1.0e-5;
  if (!phi) {
    *N = (double)0.0;
    *E = Ra * dlam + E0;
  } else if (!dlam || (((po2 - tol) < tol) && (phi < (po2 + tol))) ||
             (((-po2 - tol) < tol) && (phi < (-po2 + tol)))) {
    thetai = fabs(((double)2. / (double)3.141592653589) * phi);
    if (thetai > (double)1.)
      thetai = (double)1.;
    else if (thetai < (double)-1.)
      thetai = (double)-1.;
    theta = asin(thetai);
    *E = 0;
    *N = pRa * tan(theta / (double)2.) * N0;
    if (phi < (double)0.0)
      *N *= (double)-1.;
  } else {
    aa = (double).5 *
         fabs((double)3.141592653589 / dlam - dlam / (double)3.141592653589);
    thetai = fabs(((double)2. / (double)3.141592653589) * phi);
    if (thetai > (double)1.)
      thetai = (double)1.;
    else if (thetai < (double)-1.)
      thetai = (double)-1.;
    theta = asin(thetai);
    thetas = sin(theta);
    thetac = cos(theta);
    gg = thetac / (thetas + thetac - (double)1.);
    pp = gg * ((double)2. / thetas - (double)1.);
    aa2 = aa * aa;
    pp2 = pp * pp;
    gm0 = gg - pp2;
    ppa = pp2 + aa2;
    qq = aa2 + gg;
    *E = pRa *
             (aa * gm0 +
              pow(aa2 * gm0 * gm0 - ppa * (gg * gg - pp2), (double).5)) /
             ppa +
         E0;
    if (dlam < (double)0.0)
      *E *= (double)-1.;
    *N = pRa *
             (pp * qq -
              aa * pow((aa2 + (double)1.) * ppa - qq * qq, (double).5)) /
             ppa +
         N0;
    if (phi < (double)0.0)
      *N *= (double)-1.;
  }
  return;
}


x86 assembly (clang, -O0):
<GPS_Math_VderGrinten_LatLon_To_EN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xe45(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe30(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe16(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1207 <GPS_Math_VderGrinten_LatLon_To_EN+0xa7>
movsd  -0x58(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  0xdd7(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  0xdc3(%rip),%xmm1
subsd  %xmm2,%xmm1
movsd  0xdaf(%rip),%xmm2
mulsd  -0x78(%rbp),%xmm2
movsd  0xd9a(%rip),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
movsd  0xd82(%rip),%xmm2
mulsd  -0x80(%rbp),%xmm2
movsd  0xd6d(%rip),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd39(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  0xd07(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    131c <GPS_Math_VderGrinten_LatLon_To_EN+0x1bc>
movsd  -0x58(%rbp),%xmm1
movsd  -0x100(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0xd24(%rip),%xmm0
ucomisd -0x100(%rbp),%xmm0
ff
jbe    1347 <GPS_Math_VderGrinten_LatLon_To_EN+0x1e7>
movsd  -0x58(%rbp),%xmm0
addsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0xd01(%rip),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13a4 <GPS_Math_VderGrinten_LatLon_To_EN+0x244>
jp     13a4 <GPS_Math_VderGrinten_LatLon_To_EN+0x244>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm2
ff
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    197d <GPS_Math_VderGrinten_LatLon_To_EN+0x81d>
movsd  -0x100(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13c4 <GPS_Math_VderGrinten_LatLon_To_EN+0x264>
jp     13c4 <GPS_Math_VderGrinten_LatLon_To_EN+0x264>
jmp    1468 <GPS_Math_VderGrinten_LatLon_To_EN+0x308>
movsd  -0x50(%rbp),%xmm1
subsd  -0xe8(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    13ff <GPS_Math_VderGrinten_LatLon_To_EN+0x29f>
movsd  -0x8(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
addsd  -0xe8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
ja     1468 <GPS_Math_VderGrinten_LatLon_To_EN+0x308>
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
subsd  -0xe8(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    156e <GPS_Math_VderGrinten_LatLon_To_EN+0x40e>
movsd  -0x8(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0xe8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    156e <GPS_Math_VderGrinten_LatLon_To_EN+0x40e>
movsd  0xbe8(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movaps 0xc04(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  0xba0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14b7 <GPS_Math_VderGrinten_LatLon_To_EN+0x357>
movsd  0xb8e(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    14e2 <GPS_Math_VderGrinten_LatLon_To_EN+0x382>
movsd  0xba9(%rip),%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    14dd <GPS_Math_VderGrinten_LatLon_To_EN+0x37d>
movsd  0xb93(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    14e2 <GPS_Math_VderGrinten_LatLon_To_EN+0x382>
movsd  -0xc0(%rbp),%xmm0
ff
call   1050 <asin@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  0xb4e(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1060 <tan@plt>
movaps %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1569 <GPS_Math_VderGrinten_LatLon_To_EN+0x409>
mov    -0x20(%rbp),%rax
movsd  0xb07(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1978 <GPS_Math_VderGrinten_LatLon_To_EN+0x818>
movsd  0xa8a(%rip),%xmm1
divsd  -0x100(%rbp),%xmm1
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  0xa72(%rip),%xmm2
divsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
movaps 0xae3(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xab7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xa9b(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movaps 0xab7(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  0xa53(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1604 <GPS_Math_VderGrinten_LatLon_To_EN+0x4a4>
movsd  0xa41(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    162f <GPS_Math_VderGrinten_LatLon_To_EN+0x4cf>
movsd  0xa5c(%rip),%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    162a <GPS_Math_VderGrinten_LatLon_To_EN+0x4ca>
movsd  0xa46(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    162f <GPS_Math_VderGrinten_LatLon_To_EN+0x4cf>
movsd  -0xc0(%rbp),%xmm0
ff
call   1050 <asin@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
call   1070 <cos@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm1
ff
addsd  -0xd8(%rbp),%xmm1
ff
movsd  0x9aa(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  0x9c2(%rip),%xmm1
divsd  -0xd0(%rbp),%xmm1
ff
movsd  0x97a(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
addsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm3
ff
movsd  -0x98(%rbp),%xmm5
ff
movsd  -0xa8(%rbp),%xmm4
ff
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x868(%rip),%xmm1
call   1080 <pow@plt>
movsd  -0x120(%rbp),%xmm1
ff
movsd  -0x118(%rbp),%xmm3
ff
movaps %xmm0,%xmm2
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0xb8(%rbp),%xmm0
ff
addsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
ucomisd -0x100(%rbp),%xmm0
ff
jbe    185e <GPS_Math_VderGrinten_LatLon_To_EN+0x6fe>
mov    -0x18(%rbp),%rax
movsd  0x812(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x140(%rbp)
ff
movsd  0x792(%rip),%xmm0
addsd  -0xf8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0xe0(%rbp),%xmm1
ff
mulsd  -0xe0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x773(%rip),%xmm1
call   1080 <pow@plt>
movsd  -0x140(%rbp),%xmm2
ff
movsd  -0x138(%rbp),%xmm1
ff
movsd  -0x130(%rbp),%xmm3
ff
movaps %xmm0,%xmm4
movsd  -0x128(%rbp),%xmm0
ff
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0xb8(%rbp),%xmm0
ff
addsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1973 <GPS_Math_VderGrinten_LatLon_To_EN+0x813>
mov    -0x20(%rbp),%rax
movsd  0x6fd(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1978 <GPS_Math_VderGrinten_LatLon_To_EN+0x818>
jmp    197d <GPS_Math_VderGrinten_LatLon_To_EN+0x81d>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPS_Math_VderGrinten_LatLon_To_EN>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
movsd  %xmm6,0x30(%rsp)
movsd  %xmm5,0x20(%rsp)
movsd  %xmm4,0x58(%rsp)
movsd  %xmm3,0x60(%rsp)
movsd  %xmm2,0x10(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
movaps %xmm1,%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movaps %xmm0,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  0xe3b(%rip),%xmm1
movapd %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  0xe33(%rip),%xmm6
movapd %xmm6,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
movsd  0x20(%rsp),%xmm7
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
movsd  0x30(%rsp),%xmm5
mulsd  %xmm5,%xmm5
movapd %xmm0,%xmm4
subsd  %xmm5,%xmm4
divsd  %xmm0,%xmm4
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
movapd %xmm4,%xmm5
mulsd  %xmm0,%xmm5
divsd  0xdee(%rip),%xmm4
addsd  0xdee(%rip),%xmm4
mulsd  0xdee(%rip),%xmm0
divsd  0xdee(%rip),%xmm0
orpd   %xmm3,%xmm2
addsd  %xmm4,%xmm0
mulsd  0xde6(%rip),%xmm5
divsd  0xde6(%rip),%xmm5
addsd  %xmm0,%xmm5
mulsd  %xmm7,%xmm5
movapd 0x40(%rsp),%xmm3
subsd  %xmm2,%xmm3
movsd  0x8(%rsp),%xmm2
addsd  %xmm3,%xmm1
movapd %xmm6,%xmm0
cmpltsd %xmm3,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm3,%xmm0
orpd   %xmm1,%xmm0
movsd  0xdb5(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm0,%xmm3
cmpltsd 0xdac(%rip),%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jne    12b8 <GPS_Math_VderGrinten_LatLon_To_EN+0x158>
jnp    14de <GPS_Math_VderGrinten_LatLon_To_EN+0x37e>
mulsd  %xmm6,%xmm5
ucomisd %xmm0,%xmm3
movapd %xmm5,0x40(%rsp)
jne    12ce <GPS_Math_VderGrinten_LatLon_To_EN+0x16e>
jnp    14f5 <GPS_Math_VderGrinten_LatLon_To_EN+0x395>
movsd  0xd7a(%rip),%xmm0
ucomisd %xmm2,%xmm0
ja     14f5 <GPS_Math_VderGrinten_LatLon_To_EN+0x395>
movapd %xmm3,%xmm0
divsd  %xmm6,%xmm0
divsd  %xmm3,%xmm6
subsd  %xmm0,%xmm6
movapd 0xd88(%rip),%xmm0
andpd  %xmm0,%xmm6
mulsd  0xd54(%rip),%xmm6
movapd %xmm6,0x30(%rsp)
movsd  0xd4e(%rip),%xmm1
mulsd  %xmm2,%xmm1
andpd  %xmm0,%xmm1
movsd  0xcf6(%rip),%xmm0
minsd  %xmm1,%xmm0
movapd %xmm3,0x90(%rsp)
call   1050 <asin@plt>
movsd  %xmm0,0x10(%rsp)
call   1040 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <cos@plt>
movsd  0x20(%rsp),%xmm3
movapd %xmm3,%xmm1
addsd  %xmm0,%xmm1
movsd  0xd02(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0xcfa(%rip),%xmm1
divsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x68(%rsp)
movapd 0x30(%rsp),%xmm3
mulsd  %xmm3,%xmm3
movapd %xmm3,0x80(%rsp)
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm0,%xmm5
subsd  %xmm2,%xmm5
movapd %xmm5,0x70(%rsp)
movapd %xmm3,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm1,%xmm4
movapd %xmm1,0x10(%rsp)
movapd %xmm3,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movapd %xmm3,%xmm1
mulsd  %xmm5,%xmm1
mulsd  %xmm0,%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm5,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd  0xc5f(%rip),%xmm1
call   1080 <pow@plt>
movapd 0x70(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
addsd  %xmm0,%xmm1
mulsd  0x40(%rsp),%xmm1
movapd 0x10(%rsp),%xmm3
divsd  %xmm3,%xmm1
addsd  0x60(%rsp),%xmm1
movapd 0xc64(%rip),%xmm0
xorpd  %xmm1,%xmm0
movapd %xmm1,%xmm4
xorpd  %xmm1,%xmm1
movapd 0x90(%rsp),%xmm2
cmpltsd %xmm1,%xmm2
movapd %xmm2,%xmm1
andnpd %xmm4,%xmm1
andpd  %xmm0,%xmm2
orpd   %xmm1,%xmm2
movlpd %xmm2,(%rbx)
movapd 0x80(%rsp),%xmm1
addsd  0xbad(%rip),%xmm1
movapd 0x20(%rsp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm3,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd  0xbcf(%rip),%xmm1
call   1080 <pow@plt>
mulsd  0x30(%rsp),%xmm0
movapd 0x20(%rsp),%xmm1
mulsd  0x68(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mulsd  0x40(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
addsd  0x58(%rsp),%xmm0
movsd  %xmm0,(%r14)
xorpd  %xmm1,%xmm1
ucomisd 0x8(%rsp),%xmm1
jbe    155c <GPS_Math_VderGrinten_LatLon_To_EN+0x3fc>
xorpd  0xbb9(%rip),%xmm0
movlpd %xmm0,(%r14)
jmp    155c <GPS_Math_VderGrinten_LatLon_To_EN+0x3fc>
movq   $0x0,(%r14)
mulsd  %xmm3,%xmm5
addsd  0x60(%rsp),%xmm5
movsd  %xmm5,(%rbx)
jmp    155c <GPS_Math_VderGrinten_LatLon_To_EN+0x3fc>
movsd  0xb63(%rip),%xmm1
mulsd  %xmm2,%xmm1
andpd  0xb77(%rip),%xmm1
movsd  0xb07(%rip),%xmm0
minsd  %xmm1,%xmm0
call   1050 <asin@plt>
movq   $0x0,(%rbx)
mulsd  0xb2f(%rip),%xmm0
call   1060 <tan@plt>
movapd 0x40(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x58(%rsp),%xmm1
movsd  %xmm1,(%r14)
xorpd  %xmm0,%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    155c <GPS_Math_VderGrinten_LatLon_To_EN+0x3fc>
xorpd  0xb39(%rip),%xmm1
movlpd %xmm1,(%r14)
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @GPS_Math_VderGrinten_LatLon_To_EN(double %0, double %1, double* %2, double* %3, double %4, double %5, double %6, double %7, double %8) {
%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
%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
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
store double %0, double* %10
store double %1, double* %11
store double* %2, double** %12
store double* %3, double** %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
store double %8, double* %18
%42 = load double, double* %11
%43 = call double @GPS_Math_Deg_To_Rad(double %42)
store double %43, double* %11
%44 = load double, double* %10
%45 = call double @GPS_Math_Deg_To_Rad(double %44)
store double %45, double* %10
%46 = load double, double* %14
%47 = call double @GPS_Math_Deg_To_Rad(double %46)
store double %47, double* %14
store double 0x401921FB5444261E, double* %20
store double 0x3FF921FB5444261E, double* %19
%48 = load double, double* %14
%49 = fcmp ogt double %48, 0x400921FB5444261E
br i1 %49, label %50, label %54
50: ; preds = %9
%51 = load double, double* %20
%52 = load double, double* %14
%53 = fsub double %52, %51
store double %53, double* %14
br label %54
54: ; preds = %50, %9
%55 = load double, double* %17
%56 = load double, double* %17
%57 = fmul double %55, %56
store double %57, double* %21
%58 = load double, double* %18
%59 = load double, double* %18
%60 = fmul double %58, %59
store double %60, double* %22
%61 = load double, double* %21
%62 = load double, double* %22
%63 = fsub double %61, %62
%64 = load double, double* %21
%65 = fdiv double %63, %64
store double %65, double* %23
%66 = load double, double* %23
%67 = load double, double* %23
%68 = fmul double %66, %67
store double %68, double* %24
%69 = load double, double* %23
%70 = load double, double* %24
%71 = fmul double %69, %70
store double %71, double* %25
%72 = load double, double* %17
%73 = load double, double* %23
%74 = fdiv double %73, 6.000000e+00
%75 = fsub double 1.000000e+00, %74
%76 = load double, double* %24
%77 = fmul double 1.700000e+01, %76
%78 = fdiv double %77, 3.600000e+02
%79 = fsub double %75, %78
%80 = load double, double* %25
%81 = fmul double 6.700000e+01, %80
%82 = fdiv double %81, 3.024000e+03
%83 = fsub double %79, %82
%84 = fmul double %72, %83
store double %84, double* %26
%85 = load double, double* %26
%86 = fmul double 0x400921FB5444261E, %85
store double %86, double* %27
%87 = load double, double* %11
%88 = load double, double* %14
%89 = fsub double %87, %88
store double %89, double* %41
%90 = load double, double* %41
%91 = fcmp ogt double %90, 0x400921FB5444261E
br i1 %91, label %92, label %96
92: ; preds = %54
%93 = load double, double* %20
%94 = load double, double* %41
%95 = fsub double %94, %93
store double %95, double* %41
br label %96
96: ; preds = %92, %54
%97 = load double, double* %41
%98 = fcmp olt double %97, 0xC00921FB5444261E
br i1 %98, label %99, label %103
99: ; preds = %96
%100 = load double, double* %20
%101 = load double, double* %41
%102 = fadd double %101, %100
store double %102, double* %41
br label %103
103: ; preds = %99, %96
store double 1.000000e-05, double* %38
%104 = load double, double* %10
%105 = fcmp une double %104, 0.000000e+00
br i1 %105, label %113, label %106
106: ; preds = %103
%107 = load double*, double** %13
store double 0.000000e+00, double* %107
%108 = load double, double* %26
%109 = load double, double* %41
%110 = load double, double* %15
%111 = call double @llvm.fmuladd.f64(double %108, double %109, double %110)
%112 = load double*, double** %12
store double %111, double* %112
br label %286
113: ; preds = %103
%114 = load double, double* %41
%115 = fcmp une double %114, 0.000000e+00
br i1 %115, label %116, label %142
116: ; preds = %113
%117 = load double, double* %19
%118 = load double, double* %38
%119 = fsub double %117, %118
%120 = load double, double* %38
%121 = fcmp olt double %119, %120
br i1 %121, label %122, label %128
122: ; preds = %116
%123 = load double, double* %10
%124 = load double, double* %19
%125 = load double, double* %38
%126 = fadd double %124, %125
%127 = fcmp olt double %123, %126
br i1 %127, label %142, label %128
128: ; preds = %122, %116
%129 = load double, double* %19
%130 = fneg double %129
%131 = load double, double* %38
%132 = fsub double %130, %131
%133 = load double, double* %38
%134 = fcmp olt double %132, %133
br i1 %134, label %135, label %173
135: ; preds = %128
%136 = load double, double* %10
%137 = load double, double* %19
%138 = fneg double %137
%139 = load double, double* %38
%140 = fadd double %138, %139
%141 = fcmp olt double %136, %140
br i1 %141, label %142, label %173
142: ; preds = %135, %122, %113
%143 = load double, double* %10
%144 = fmul double 0x3FE45F306DC9CE2B, %143
%145 = call double @llvm.fabs.f64(double %144)
store double %145, double* %33
%146 = load double, double* %33
%147 = fcmp ogt double %146, 1.000000e+00
br i1 %147, label %148, label %149
148: ; preds = %142
store double 1.000000e+00, double* %33
br label %154
149: ; preds = %142
%150 = load double, double* %33
%151 = fcmp olt double %150, -1.000000e+00
br i1 %151, label %152, label %153
152: ; preds = %149
store double -1.000000e+00, double* %33
br label %153
153: ; preds = %152, %149
br label %154
154: ; preds = %153, %148
%155 = load double, double* %33
%156 = call double @asin(double %155)
store double %156, double* %34
%157 = load double*, double** %12
store double 0.000000e+00, double* %157
%158 = load double, double* %27
%159 = load double, double* %34
%160 = fdiv double %159, 2.000000e+00
%161 = call double @tan(double %160)
%162 = fmul double %158, %161
%163 = load double, double* %16
%164 = fmul double %162, %163
%165 = load double*, double** %13
store double %164, double* %165
%166 = load double, double* %10
%167 = fcmp olt double %166, 0.000000e+00
br i1 %167, label %168, label %172
168: ; preds = %154
%169 = load double*, double** %13
%170 = load double, double* %169
%171 = fmul double %170, -1.000000e+00
store double %171, double* %169
br label %172
172: ; preds = %168, %154
br label %285
173: ; preds = %135, %128
%174 = load double, double* %41
%175 = fdiv double 0x400921FB5444261E, %174
%176 = load double, double* %41
%177 = fdiv double %176, 0x400921FB5444261E
%178 = fsub double %175, %177
%179 = call double @llvm.fabs.f64(double %178)
%180 = fmul double 5.000000e-01, %179
store double %180, double* %39
%181 = load double, double* %10
%182 = fmul double 0x3FE45F306DC9CE2B, %181
%183 = call double @llvm.fabs.f64(double %182)
store double %183, double* %33
%184 = load double, double* %33
%185 = fcmp ogt double %184, 1.000000e+00
br i1 %185, label %186, label %187
186: ; preds = %173
store double 1.000000e+00, double* %33
br label %192
187: ; preds = %173
%188 = load double, double* %33
%189 = fcmp olt double %188, -1.000000e+00
br i1 %189, label %190, label %191
190: ; preds = %187
store double -1.000000e+00, double* %33
br label %191
191: ; preds = %190, %187
br label %192
192: ; preds = %191, %186
%193 = load double, double* %33
%194 = call double @asin(double %193)
store double %194, double* %34
%195 = load double, double* %34
%196 = call double @sin(double %195)
store double %196, double* %35
%197 = load double, double* %34
%198 = call double @cos(double %197)
store double %198, double* %36
%199 = load double, double* %36
%200 = load double, double* %35
%201 = load double, double* %36
%202 = fadd double %200, %201
%203 = fsub double %202, 1.000000e+00
%204 = fdiv double %199, %203
store double %204, double* %28
%205 = load double, double* %28
%206 = load double, double* %35
%207 = fdiv double 2.000000e+00, %206
%208 = fsub double %207, 1.000000e+00
%209 = fmul double %205, %208
store double %209, double* %29
%210 = load double, double* %39
%211 = load double, double* %39
%212 = fmul double %210, %211
store double %212, double* %40
%213 = load double, double* %29
%214 = load double, double* %29
%215 = fmul double %213, %214
store double %215, double* %30
%216 = load double, double* %28
%217 = load double, double* %30
%218 = fsub double %216, %217
store double %218, double* %31
%219 = load double, double* %30
%220 = load double, double* %40
%221 = fadd double %219, %220
store double %221, double* %32
%222 = load double, double* %40
%223 = load double, double* %28
%224 = fadd double %222, %223
store double %224, double* %37
%225 = load double, double* %27
%226 = load double, double* %39
%227 = load double, double* %31
%228 = load double, double* %40
%229 = load double, double* %31
%230 = fmul double %228, %229
%231 = load double, double* %31
%232 = load double, double* %32
%233 = load double, double* %28
%234 = load double, double* %28
%235 = load double, double* %30
%236 = fneg double %235
%237 = call double @llvm.fmuladd.f64(double %233, double %234, double %236)
%238 = fmul double %232, %237
%239 = fneg double %238
%240 = call double @llvm.fmuladd.f64(double %230, double %231, double %239)
%241 = call double @pow(double %240, double 5.000000e-01)
%242 = call double @llvm.fmuladd.f64(double %226, double %227, double %241)
%243 = fmul double %225, %242
%244 = load double, double* %32
%245 = fdiv double %243, %244
%246 = load double, double* %15
%247 = fadd double %245, %246
%248 = load double*, double** %12
store double %247, double* %248
%249 = load double, double* %41
%250 = fcmp olt double %249, 0.000000e+00
br i1 %250, label %251, label %255
251: ; preds = %192
%252 = load double*, double** %12
%253 = load double, double* %252
%254 = fmul double %253, -1.000000e+00
store double %254, double* %252
br label %255
255: ; preds = %251, %192
%256 = load double, double* %27
%257 = load double, double* %29
%258 = load double, double* %37
%259 = load double, double* %39
%260 = load double, double* %40
%261 = fadd double %260, 1.000000e+00
%262 = load double, double* %32
%263 = load double, double* %37
%264 = load double, double* %37
%265 = fmul double %263, %264
%266 = fneg double %265
%267 = call double @llvm.fmuladd.f64(double %261, double %262, double %266)
%268 = call double @pow(double %267, double 5.000000e-01)
%269 = fmul double %259, %268
%270 = fneg double %269
%271 = call double @llvm.fmuladd.f64(double %257, double %258, double %270)
%272 = fmul double %256, %271
%273 = load double, double* %32
%274 = fdiv double %272, %273
%275 = load double, double* %16
%276 = fadd double %274, %275
%277 = load double*, double** %13
store double %276, double* %277
%278 = load double, double* %10
%279 = fcmp olt double %278, 0.000000e+00
br i1 %279, label %280, label %284
280: ; preds = %255
%281 = load double*, double** %13
%282 = load double, double* %281
%283 = fmul double %282, -1.000000e+00
store double %283, double* %281
br label %284
284: ; preds = %280, %255
br label %285
285: ; preds = %284, %172
br label %286
286: ; preds = %285, %106
ret void
}

LLVM IR (-O2):
define void @GPS_Math_VderGrinten_LatLon_To_EN(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3, double %4, double %5, double %6, double %7, double %8) {
%10 = tail call double @GPS_Math_Deg_To_Rad(double %1)
%11 = tail call double @GPS_Math_Deg_To_Rad(double %0)
%12 = tail call double @GPS_Math_Deg_To_Rad(double %4)
%13 = fcmp ogt double %12, 0x400921FB5444261E
%14 = fadd double %12, 0xC01921FB5444261E
%15 = select i1 %13, double %14, double %12
%16 = fmul double %7, %7
%17 = fmul double %8, %8
%18 = fsub double %16, %17
%19 = fdiv double %18, %16
%20 = fmul double %19, %19
%21 = fmul double %19, %20
%22 = fdiv double %19, 6.000000e+00
%23 = fsub double 1.000000e+00, %22
%24 = fmul double %20, 1.700000e+01
%25 = fdiv double %24, 3.600000e+02
%26 = fsub double %23, %25
%27 = fmul double %21, 6.700000e+01
%28 = fdiv double %27, 3.024000e+03
%29 = fsub double %26, %28
%30 = fmul double %29, %7
%31 = fmul double %30, 0x400921FB5444261E
%32 = fsub double %10, %15
%33 = fcmp ogt double %32, 0x400921FB5444261E
%34 = fadd double %32, 0xC01921FB5444261E
%35 = select i1 %33, double %34, double %32
%36 = fcmp olt double %35, 0xC00921FB5444261E
%37 = fadd double %35, 0x401921FB5444261E
%38 = select i1 %36, double %37, double %35
%39 = fcmp une double %11, 0.000000e+00
br i1 %39, label %42, label %40
40: ; preds = %9
store double 0.000000e+00, double* %3
%41 = tail call double @llvm.fmuladd.f64(double %30, double %38, double %5)
store double %41, double* %2
br label %111
42: ; preds = %9
%43 = fcmp oeq double %38, 0.000000e+00
%44 = fcmp olt double %11, 0xBFF921F0D7E961AC
%45 = select i1 %43, i1 true, i1 %44
br i1 %45, label %46, label %59
46: ; preds = %42
%47 = fmul double %11, 0x3FE45F306DC9CE2B
%48 = tail call double @llvm.fabs.f64(double %47)
%49 = fcmp ogt double %48, 1.000000e+00
%50 = select i1 %49, double 1.000000e+00, double %48
%51 = tail call double @asin(double %50)
store double 0.000000e+00, double* %2
%52 = fmul double %51, 5.000000e-01
%53 = tail call double @tan(double %52)
%54 = fmul double %31, %53
%55 = fmul double %54, %6
store double %55, double* %3
%56 = fcmp olt double %11, 0.000000e+00
br i1 %56, label %57, label %111
57: ; preds = %46
%58 = fneg double %55
store double %58, double* %3
br label %111
59: ; preds = %42
%60 = fdiv double 0x400921FB5444261E, %38
%61 = fdiv double %38, 0x400921FB5444261E
%62 = fsub double %60, %61
%63 = tail call double @llvm.fabs.f64(double %62)
%64 = fmul double %63, 5.000000e-01
%65 = fmul double %11, 0x3FE45F306DC9CE2B
%66 = tail call double @llvm.fabs.f64(double %65)
%67 = fcmp ogt double %66, 1.000000e+00
%68 = select i1 %67, double 1.000000e+00, double %66
%69 = tail call double @asin(double %68)
%70 = tail call double @sin(double %69)
%71 = tail call double @cos(double %69)
%72 = fadd double %70, %71
%73 = fadd double %72, -1.000000e+00
%74 = fdiv double %71, %73
%75 = fdiv double 2.000000e+00, %70
%76 = fadd double %75, -1.000000e+00
%77 = fmul double %76, %74
%78 = fmul double %64, %64
%79 = fmul double %77, %77
%80 = fsub double %74, %79
%81 = fadd double %78, %79
%82 = fadd double %78, %74
%83 = fmul double %78, %80
%84 = fneg double %79
%85 = tail call double @llvm.fmuladd.f64(double %74, double %74, double %84)
%86 = fneg double %81
%87 = fmul double %85, %86
%88 = tail call double @llvm.fmuladd.f64(double %83, double %80, double %87)
%89 = tail call double @pow(double %88, double 5.000000e-01)
%90 = tail call double @llvm.fmuladd.f64(double %64, double %80, double %89)
%91 = fmul double %31, %90
%92 = fdiv double %91, %81
%93 = fadd double %92, %5
%94 = fcmp olt double %38, 0.000000e+00
%95 = fneg double %93
%96 = select i1 %94, double %95, double %93
store double %96, double* %2
%97 = fadd double %78, 1.000000e+00
%98 = fneg double %82
%99 = fmul double %82, %98
%100 = tail call double @llvm.fmuladd.f64(double %97, double %81, double %99)
%101 = tail call double @pow(double %100, double 5.000000e-01)
%102 = fneg double %64
%103 = fmul double %101, %102
%104 = tail call double @llvm.fmuladd.f64(double %77, double %82, double %103)
%105 = fmul double %31, %104
%106 = fdiv double %105, %81
%107 = fadd double %106, %6
store double %107, double* %3
%108 = fcmp olt double %11, 0.000000e+00
br i1 %108, label %109, label %111
109: ; preds = %59
%110 = fneg double %107
store double %110, double* %3
br label %111
111: ; preds = %57, %46, %109, %59, %40
ret void
}