#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 cos(double);
double fabs(double);
double pow(double, double);
double sin(double);
double tan(double);
void GPS_Math_PolarSt_LatLon_To_EN(double phi, double lambda, double *E,
                                   double *N, double phi1, double lambda1,
                                   double E0, double N0, double a, double b) {
  double p2;
  double po2;
  double a2;
  double b2;
  double e2;
  double e4 = (double)0.;
  double e;
  double eo2;
  double sh;
  double mc;
  double tc = (double)0.;
  double amc = (double)0.;
  double ta;
  double phi1s;
  double phi1c;
  double es;
  double op;
  double om;
  double pe;
  double polat;
  double polon;
  double dlam;
  double phis;
  double t;
  double rho;
  lambda1 = GPS_Math_Deg_To_Rad(lambda1);
  phi1 = GPS_Math_Deg_To_Rad(phi1);
  lambda = GPS_Math_Deg_To_Rad(lambda);
  phi = GPS_Math_Deg_To_Rad(phi);
  p2 = (double)3.141592653589 * (double)2.0;
  po2 = (double)3.141592653589 / (double)2.0;
  ta = a * (double)2.0;
  if (lambda1 > 3.141592653589)
    lambda1 -= p2;
  if (phi1 < (double)0.0) {
    sh = (double)1.0;
    polat = -phi1;
    polon = -lambda1;
  } else {
    sh = (double)0.0;
    polat = phi1;
    polon = lambda1;
  }
  a2 = a * a;
  b2 = b * b;
  e2 = (a2 - b2) / a2;
  e = pow(e2, (double).5);
  eo2 = e / (double)2.;
  if (fabs(fabs(polat) - po2) > (double)1.0e-10) {
    phi1s = sin(polat);
    phi1c = cos(polat);
    es = e * phi1s;
    pe = pow(((double)1. - es) / ((double)1. + es), eo2);
    mc = phi1c / pow((double)1. - es * es, (double).5);
    amc = mc * a;
    tc = tan(((double)3.141592653589 / (double)4.) - polat / (double)2.) / pe;
  } else {
    op = (double)1. + e;
    om = (double)1. - e;
    e4 = pow(pow(op, op) * pow(om, om), (double).5);
  }
  if (fabs(fabs(phi) - po2) < (double)1.0e-10)
    *E = *N = (double)0.0;
  else {
    if (sh) {
      phi *= (double)-1.0;
      lambda *= (double)-1.0;
    }
    dlam = lambda - polon;
    if (dlam > 3.141592653589)
      dlam -= p2;
    if (dlam < -3.141592653589)
      dlam += p2;
    phis = sin(phi);
    es = e * phis;
    pe = pow(((double)1. - es) / ((double)1. + es), eo2);
    t = tan(((double)3.141592653589 / (double)4.) - phi / (double)2.) / pe;
    if (fabs(fabs(polat) - po2) > (double)1.0e-10)
      rho = amc * t / tc;
    else
      rho = ta * t / e4;
    *E = rho * sin(dlam) + E0;
    if (sh) {
      *E *= (double)-1.;
      *N = rho * cos(dlam) + N0;
    } else
      *N = -rho * cos(dlam) + N0;
  }
  return;
}


x86 assembly (clang, -O0):
<GPS_Math_PolarSt_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  %xmm7,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,-0x28(%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  0xe2b(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe16(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe01(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  0xddf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    123e <GPS_Math_PolarSt_LatLon_To_EN+0xee>
movsd  -0x58(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    12a9 <GPS_Math_PolarSt_LatLon_To_EN+0x159>
movsd  0xdcc(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
jmp    12ce <GPS_Math_PolarSt_LatLon_To_EN+0x17e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xd23(%rip),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xcde(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movaps 0xd0b(%rip),%xmm1
pand   %xmm1,%xmm0
subsd  -0x60(%rbp),%xmm0
movaps 0xcfb(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xcc7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14a0 <GPS_Math_PolarSt_LatLon_To_EN+0x350>
movsd  -0xf0(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
call   1060 <cos@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xc6b(%rip),%xmm0
subsd  -0xd0(%rbp),%xmm0
ff
movsd  0xc5b(%rip),%xmm1
addsd  -0xd0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm1
ff
call   1070 <pow@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xbf7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xbfb(%rip),%xmm1
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm1
ff
movsd  0xb92(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xbb6(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1050 <tan@plt>
divsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1523 <GPS_Math_PolarSt_LatLon_To_EN+0x3d3>
movsd  0xb78(%rip),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0xb60(%rip),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm1
ff
call   1070 <pow@plt>
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm1
ff
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x128(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xb17(%rip),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm1
movaps 0xb21(%rip),%xmm0
pand   %xmm0,%xmm1
subsd  -0x60(%rbp),%xmm1
movaps 0xb11(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xadd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1570 <GPS_Math_PolarSt_LatLon_To_EN+0x420>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    183f <GPS_Math_PolarSt_LatLon_To_EN+0x6ef>
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1590 <GPS_Math_PolarSt_LatLon_To_EN+0x440>
jp     1590 <GPS_Math_PolarSt_LatLon_To_EN+0x440>
jmp    15b4 <GPS_Math_PolarSt_LatLon_To_EN+0x464>
movsd  0xaa8(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xa96(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  0xa27(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15fc <GPS_Math_PolarSt_LatLon_To_EN+0x4ac>
movsd  -0x58(%rbp),%xmm1
movsd  -0x100(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0xa44(%rip),%xmm0
ucomisd -0x100(%rbp),%xmm0
ff
jbe    1627 <GPS_Math_PolarSt_LatLon_To_EN+0x4d7>
movsd  -0x58(%rbp),%xmm0
addsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0x9c7(%rip),%xmm0
subsd  -0xd0(%rbp),%xmm0
ff
movsd  0x9b7(%rip),%xmm1
addsd  -0xd0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm1
ff
call   1070 <pow@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x8(%rbp),%xmm1
movsd  0x971(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0x995(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1050 <tan@plt>
divsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movaps 0x985(%rip),%xmm1
pand   %xmm1,%xmm0
subsd  -0x60(%rbp),%xmm0
movaps 0x975(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x941(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1716 <GPS_Math_PolarSt_LatLon_To_EN+0x5c6>
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0x110(%rbp),%xmm0
divsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
jmp    1733 <GPS_Math_PolarSt_LatLon_To_EN+0x5e3>
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0x110(%rbp),%xmm0
ff
divsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1790 <GPS_Math_PolarSt_LatLon_To_EN+0x640>
jp     1790 <GPS_Math_PolarSt_LatLon_To_EN+0x640>
jmp    17e6 <GPS_Math_PolarSt_LatLon_To_EN+0x696>
mov    -0x18(%rbp),%rax
movsd  0x8a4(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
call   1060 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x138(%rbp),%xmm0
ff
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    183a <GPS_Math_PolarSt_LatLon_To_EN+0x6ea>
movsd  -0x118(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
call   1060 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x140(%rbp),%xmm0
ff
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    183f <GPS_Math_PolarSt_LatLon_To_EN+0x6ef>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPS_Math_PolarSt_LatLon_To_EN>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
movsd  %xmm7,(%rsp)
movsd  %xmm6,0x20(%rsp)
movsd  %xmm5,0x58(%rsp)
movsd  %xmm4,0x78(%rsp)
movsd  %xmm2,0x40(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
movaps %xmm3,%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movaps %xmm0,0x90(%rsp)
movsd  0x40(%rsp),%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>
movaps %xmm0,0x80(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movapd 0x40(%rsp),%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
movapd %xmm0,0x60(%rsp)
ja     11e5 <GPS_Math_PolarSt_LatLon_To_EN+0x95>
movapd %xmm1,0x10(%rsp)
jmp    11f7 <GPS_Math_PolarSt_LatLon_To_EN+0xa7>
movapd %xmm1,%xmm0
xorpd  0xe6f(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movsd  (%rsp),%xmm2
mulsd  %xmm2,%xmm2
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
movsd  0xdf2(%rip),%xmm1
call   1070 <pow@plt>
movapd %xmm0,%xmm1
movapd %xmm0,%xmm3
mulsd  0xddd(%rip),%xmm3
movapd 0xe35(%rip),%xmm2
movapd 0x40(%rsp),%xmm0
andpd  %xmm2,%xmm0
addsd  0xdcb(%rip),%xmm0
andpd  %xmm2,%xmm0
ucomisd 0xdc7(%rip),%xmm0
movsd  %xmm3,0x8(%rsp)
movsd  %xmm1,0x38(%rsp)
jbe    1323 <GPS_Math_PolarSt_LatLon_To_EN+0x1d3>
movaps 0x10(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x50(%rsp)
movaps 0x10(%rsp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,(%rsp)
movsd  0x50(%rsp),%xmm1
mulsd  0x38(%rsp),%xmm1
movsd  %xmm1,0x50(%rsp)
movsd  0xd84(%rip),%xmm3
movapd %xmm3,%xmm0
subsd  %xmm1,%xmm0
addsd  %xmm3,%xmm1
divsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,0x70(%rsp)
movsd  0x50(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movsd  0xd51(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xd2d(%rip),%xmm1
call   1070 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
mulsd  0x20(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movapd 0x10(%rsp),%xmm1
mulsd  0xd06(%rip),%xmm1
movsd  0xd1e(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1050 <tan@plt>
divsd  0x70(%rsp),%xmm0
jmp    1387 <GPS_Math_PolarSt_LatLon_To_EN+0x237>
movsd  0x20(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0xced(%rip),%xmm2
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
subsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm0,%xmm1
call   1070 <pow@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
movapd %xmm0,%xmm1
call   1070 <pow@plt>
mulsd  (%rsp),%xmm0
movsd  0xc99(%rip),%xmm1
call   1070 <pow@plt>
movsd  0x20(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movapd 0x60(%rsp),%xmm5
movapd %xmm5,%xmm2
movapd 0xcd7(%rip),%xmm1
andpd  %xmm1,%xmm2
addsd  0xc73(%rip),%xmm2
andpd  %xmm1,%xmm2
movsd  0xc6f(%rip),%xmm1
ucomisd %xmm2,%xmm1
jbe    13ca <GPS_Math_PolarSt_LatLon_To_EN+0x27a>
movq   $0x0,(%r14)
movq   $0x0,(%rbx)
jmp    15ba <GPS_Math_PolarSt_LatLon_To_EN+0x46a>
movsd  %xmm0,0x10(%rsp)
movsd  0xc30(%rip),%xmm0
movsd  0xc20(%rip),%xmm2
movapd 0x90(%rsp),%xmm3
addsd  %xmm3,%xmm2
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm3,%xmm1
orpd   %xmm2,%xmm1
movapd 0x40(%rsp),%xmm4
movapd %xmm4,%xmm2
cmpltsd 0xc3b(%rip),%xmm2
movapd %xmm2,%xmm3
andnpd %xmm1,%xmm3
movapd 0xc3b(%rip),%xmm6
xorpd  %xmm6,%xmm1
andpd  %xmm2,%xmm1
orpd   %xmm3,%xmm1
xorpd  %xmm7,%xmm7
ucomisd %xmm4,%xmm7
movapd %xmm5,%xmm2
xorpd  %xmm6,%xmm2
ja     144e <GPS_Math_PolarSt_LatLon_To_EN+0x2fe>
movapd 0x80(%rsp),%xmm3
jmp    145f <GPS_Math_PolarSt_LatLon_To_EN+0x30f>
movapd %xmm6,%xmm4
movapd 0x80(%rsp),%xmm3
xorpd  %xmm6,%xmm3
movapd 0x40(%rsp),%xmm4
cmpltsd %xmm7,%xmm4
andpd  %xmm4,%xmm2
andnpd %xmm5,%xmm4
orpd   %xmm2,%xmm4
movapd %xmm4,0x60(%rsp)
subsd  %xmm1,%xmm3
movsd  0xb78(%rip),%xmm1
addsd  %xmm3,%xmm1
cmpltsd %xmm3,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm3,%xmm0
orpd   %xmm1,%xmm0
movsd  0xb93(%rip),%xmm1
movapd %xmm0,%xmm2
cmpltsd 0xb8e(%rip),%xmm2
addsd  %xmm0,%xmm1
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
movapd %xmm4,%xmm0
call   1040 <sin@plt>
movsd  0x38(%rsp),%xmm2
mulsd  %xmm0,%xmm2
movsd  0xb45(%rip),%xmm1
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
addsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x60(%rsp),%xmm0
mulsd  0xb36(%rip),%xmm0
addsd  0xb16(%rip),%xmm0
call   1050 <tan@plt>
movsd  %xmm0,0x38(%rsp)
movapd 0x20(%rsp),%xmm0
call   1040 <sin@plt>
xorpd  %xmm1,%xmm1
ucomisd 0x40(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
divsd  0x8(%rsp),%xmm2
movsd  (%rsp),%xmm1
mulsd  %xmm2,%xmm1
divsd  0x10(%rsp),%xmm1
movsd  %xmm1,(%rsp)
mulsd  %xmm1,%xmm0
addsd  0x78(%rsp),%xmm0
movsd  %xmm0,(%rbx)
jbe    1597 <GPS_Math_PolarSt_LatLon_To_EN+0x447>
xorpd  0xaee(%rip),%xmm0
movlpd %xmm0,(%rbx)
movapd 0x20(%rsp),%xmm0
call   1060 <cos@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x58(%rsp),%xmm1
movsd  %xmm1,(%r14)
jmp    15ba <GPS_Math_PolarSt_LatLon_To_EN+0x46a>
movapd 0x20(%rsp),%xmm0
call   1060 <cos@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x58(%rsp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

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

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