#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 GPS_Math_Rad_To_Deg(double);
double asin(double);
double atan(double);
double cos(double);
double pow(double, double);
double sin(double);
void GPS_Math_Orthog_EN_To_LatLon(double E, double N, double *phi,
                                  double *lambda, double phi0, double lambda0,
                                  double E0, double N0, double a, double b) {
  double p2;
  double po2;
  double a2;
  double b2;
  double e2;
  double e4;
  double e6;
  double Ra;
  double phi0s;
  double phi0c;
  double dx;
  double dy;
  double rho;
  double adod;
  double ror;
  double cc;
  double ccs;
  double ccc;
  phi0 = GPS_Math_Deg_To_Rad(phi0);
  lambda0 = GPS_Math_Deg_To_Rad(lambda0);
  p2 = (double)3.141592653589 * (double)2.0;
  po2 = (double)3.141592653589 / (double)2.0;
  if (lambda0 > 3.141592653589)
    lambda0 -= 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.);
  phi0s = sin(phi0);
  phi0c = cos(phi0);
  dx = E - E0;
  dy = N - N0;
  adod = atan(dx / dy);
  rho = pow(dx * dx + dy * dy, (double).5);
  if (!rho) {
    *phi = phi0;
    *lambda = lambda0;
  } else {
    ror = rho / Ra;
    if (ror > (double)1.)
      ror = (double)1.;
    else if (ror < (double)-1.)
      ror = (double)-1.;
    cc = asin(ror);
    ccs = sin(cc);
    ccc = cos(cc);
    *phi = asin(ccc * phi0s + (dy * ccs * phi0c / rho));
    if (phi0 == po2)
      *lambda = lambda0 - adod;
    else if (phi0 == -po2)
      *lambda = lambda0 + adod;
    else
      *lambda =
          lambda0 + atan(dx * ccs / (rho * phi0c * ccc - dy * phi0s * ccs));
  }
  if (*phi > po2)
    *phi = po2;
  else if (*phi < -po2)
    *phi = -po2;
  if (*lambda > 3.141592653589)
    *lambda -= p2;
  if (*lambda < -3.141592653589)
    *lambda += p2;
  if (*lambda > 3.141592653589)
    *lambda = 3.141592653589;
  else if (*lambda < -3.141592653589)
    *lambda = -3.141592653589;
  *lambda = GPS_Math_Rad_To_Deg(*lambda);
  *phi = GPS_Math_Rad_To_Deg(*phi);
  return;
}


x86 assembly (clang, -O0):
<GPS_Math_Orthog_EN_To_LatLon>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%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)
movsd  -0x28(%rbp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xe3f(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe2a(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xe10(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    120d <GPS_Math_Orthog_EN_To_LatLon+0x9d>
movsd  -0x58(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
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
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  0xdd6(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  0xdc2(%rip),%xmm1
subsd  %xmm2,%xmm1
movsd  0xdae(%rip),%xmm2
mulsd  -0x80(%rbp),%xmm2
movsd  0xd99(%rip),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
movsd  0xd81(%rip),%xmm2
mulsd  -0x88(%rbp),%xmm2
ff
movsd  0xd69(%rip),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
divsd  -0xb0(%rbp),%xmm0
ff
call   1050 <atan@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0xb0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xcb8(%rip),%xmm1
call   1090 <pow@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13a7 <GPS_Math_Orthog_EN_To_LatLon+0x237>
jp     13a7 <GPS_Math_Orthog_EN_To_LatLon+0x237>
movsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    15ae <GPS_Math_Orthog_EN_To_LatLon+0x43e>
movsd  -0xb8(%rbp),%xmm0
ff
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  0xc71(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13ee <GPS_Math_Orthog_EN_To_LatLon+0x27e>
movsd  0xc5f(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    1419 <GPS_Math_Orthog_EN_To_LatLon+0x2a9>
movsd  0xc5a(%rip),%xmm0
ucomisd -0xc8(%rbp),%xmm0
ff
jbe    1414 <GPS_Math_Orthog_EN_To_LatLon+0x2a4>
movsd  0xc44(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    1419 <GPS_Math_Orthog_EN_To_LatLon+0x2a9>
movsd  -0xc8(%rbp),%xmm0
ff
call   1060 <asin@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
call   1080 <cos@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  -0xa0(%rbp),%xmm1
ff
divsd  -0xb8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <asin@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jne    14cd <GPS_Math_Orthog_EN_To_LatLon+0x35d>
jp     14cd <GPS_Math_Orthog_EN_To_LatLon+0x35d>
movsd  -0x30(%rbp),%xmm0
subsd  -0xc0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    15a9 <GPS_Math_Orthog_EN_To_LatLon+0x439>
movsd  -0x28(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jne    1518 <GPS_Math_Orthog_EN_To_LatLon+0x3a8>
jp     1518 <GPS_Math_Orthog_EN_To_LatLon+0x3a8>
movsd  -0x30(%rbp),%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    15a4 <GPS_Math_Orthog_EN_To_LatLon+0x434>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xd8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
mulsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm3
ff
movsd  -0xb0(%rbp),%xmm2
ff
mulsd  -0x98(%rbp),%xmm2
ff
mulsd  -0xd8(%rbp),%xmm2
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1050 <atan@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    15a9 <GPS_Math_Orthog_EN_To_LatLon+0x439>
jmp    15ae <GPS_Math_Orthog_EN_To_LatLon+0x43e>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    15d3 <GPS_Math_Orthog_EN_To_LatLon+0x463>
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    162a <GPS_Math_Orthog_EN_To_LatLon+0x4ba>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
ucomisd %xmm1,%xmm0
jbe    1625 <GPS_Math_Orthog_EN_To_LatLon+0x4b5>
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    162a <GPS_Math_Orthog_EN_To_LatLon+0x4ba>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x9c6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1659 <GPS_Math_Orthog_EN_To_LatLon+0x4e9>
movsd  -0x58(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0x9f3(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    1680 <GPS_Math_Orthog_EN_To_LatLon+0x510>
movsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x970(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    16af <GPS_Math_Orthog_EN_To_LatLon+0x53f>
mov    -0x20(%rbp),%rax
movsd  0x95a(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    16da <GPS_Math_Orthog_EN_To_LatLon+0x56a>
mov    -0x20(%rbp),%rax
movsd  0x99d(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    16d5 <GPS_Math_Orthog_EN_To_LatLon+0x565>
mov    -0x20(%rbp),%rax
movsd  0x987(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    16da <GPS_Math_Orthog_EN_To_LatLon+0x56a>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <GPS_Math_Rad_To_Deg@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <GPS_Math_Rad_To_Deg@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPS_Math_Orthog_EN_To_LatLon>:
push   %r14
push   %rbx
sub    $0x68,%rsp
movsd  %xmm7,0x8(%rsp)
movsd  %xmm6,0x18(%rsp)
movsd  %xmm5,0x28(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x40(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x38(%rsp)
movaps %xmm2,%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x40(%rsp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  0xe38(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe34(%rip),%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x40(%rsp)
movsd  0x30(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x60(%rsp)
movsd  0x30(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x38(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x10(%rsp),%xmm1
subsd  0x28(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
divsd  %xmm1,%xmm0
call   1050 <atan@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movsd  0x38(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdb0(%rip),%xmm1
call   1090 <pow@plt>
movapd %xmm0,%xmm5
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm5
jne    1279 <GPS_Math_Orthog_EN_To_LatLon+0x109>
jnp    1388 <GPS_Math_Orthog_EN_To_LatLon+0x218>
movsd  0x18(%rsp),%xmm4
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
movsd  0x8(%rsp),%xmm2
mulsd  %xmm2,%xmm2
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm2
movapd %xmm1,%xmm3
divsd  0xd6b(%rip),%xmm3
mulsd  %xmm1,%xmm2
movsd  0xd67(%rip),%xmm0
mulsd  %xmm2,%xmm1
unpcklpd %xmm1,%xmm2
mulpd  0xd87(%rip),%xmm2
divpd  0xd8f(%rip),%xmm2
addsd  %xmm0,%xmm3
subsd  %xmm2,%xmm3
unpckhpd %xmm2,%xmm2
subsd  %xmm2,%xmm3
mulsd  %xmm4,%xmm3
movsd  %xmm5,0x18(%rsp)
divsd  %xmm3,%xmm5
ucomisd %xmm0,%xmm5
ja     130b <GPS_Math_Orthog_EN_To_LatLon+0x19b>
movsd  0xd2b(%rip),%xmm2
ucomisd %xmm5,%xmm2
movapd %xmm5,%xmm0
jbe    130b <GPS_Math_Orthog_EN_To_LatLon+0x19b>
movapd %xmm2,%xmm0
call   1060 <asin@plt>
movsd  %xmm0,0x8(%rsp)
call   1040 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
movsd  0x10(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
mulsd  0x58(%rsp),%xmm1
divsd  0x18(%rsp),%xmm1
movsd  %xmm0,0x8(%rsp)
mulsd  0x60(%rsp),%xmm0
addsd  %xmm1,%xmm0
call   1060 <asin@plt>
movsd  %xmm0,(%rbx)
movsd  0x30(%rsp),%xmm0
ucomisd 0xcc5(%rip),%xmm0
jne    139f <GPS_Math_Orthog_EN_To_LatLon+0x22f>
jp     139f <GPS_Math_Orthog_EN_To_LatLon+0x22f>
movapd 0x40(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
movsd  0xc85(%rip),%xmm3
jmp    1426 <GPS_Math_Orthog_EN_To_LatLon+0x2b6>
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0xc6e(%rip),%xmm3
jmp    1420 <GPS_Math_Orthog_EN_To_LatLon+0x2b0>
movsd  0x8(%rsp),%xmm4
movsd  0x20(%rsp),%xmm1
ucomisd 0xc85(%rip),%xmm0
movsd  0xc4d(%rip),%xmm3
movapd 0x40(%rsp),%xmm0
jne    13cd <GPS_Math_Orthog_EN_To_LatLon+0x25d>
jp     13cd <GPS_Math_Orthog_EN_To_LatLon+0x25d>
addsd  0x28(%rsp),%xmm0
jmp    1426 <GPS_Math_Orthog_EN_To_LatLon+0x2b6>
movsd  0x38(%rsp),%xmm0
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm0
movsd  0x58(%rsp),%xmm2
mulsd  0x18(%rsp),%xmm2
movsd  0x60(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm4,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
call   1050 <atan@plt>
movsd  0xbf8(%rip),%xmm3
movapd 0x40(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,0x40(%rsp)
movapd 0x40(%rsp),%xmm0
movsd  %xmm0,(%r14)
movsd  (%rbx),%xmm1
movsd  0xbf9(%rip),%xmm0
ucomisd %xmm0,%xmm1
ja     144b <GPS_Math_Orthog_EN_To_LatLon+0x2db>
movsd  0xbf3(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    144f <GPS_Math_Orthog_EN_To_LatLon+0x2df>
movsd  %xmm0,(%rbx)
movsd  (%r14),%xmm0
ucomisd %xmm3,%xmm0
movsd  0xba0(%rip),%xmm2
addsd  %xmm0,%xmm2
movapd %xmm3,%xmm1
cmpltsd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movsd  0xbbf(%rip),%xmm2
movapd %xmm1,%xmm0
cmpltsd 0xbba(%rip),%xmm0
addsd  %xmm1,%xmm2
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
ja     14b6 <GPS_Math_Orthog_EN_To_LatLon+0x346>
movsd  0xba0(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     14b6 <GPS_Math_Orthog_EN_To_LatLon+0x346>
ucomisd %xmm3,%xmm0
jbe    14c1 <GPS_Math_Orthog_EN_To_LatLon+0x351>
jmp    14cf <GPS_Math_Orthog_EN_To_LatLon+0x35f>
movsd  %xmm0,(%r14)
ucomisd %xmm3,%xmm0
ja     14cf <GPS_Math_Orthog_EN_To_LatLon+0x35f>
movsd  0xb7f(%rip),%xmm3
ucomisd %xmm0,%xmm3
jbe    14d8 <GPS_Math_Orthog_EN_To_LatLon+0x368>
movsd  %xmm3,(%r14)
movapd %xmm3,%xmm0
call   1070 <GPS_Math_Rad_To_Deg@plt>
movsd  %xmm0,(%r14)
movsd  (%rbx),%xmm0
call   1070 <GPS_Math_Rad_To_Deg@plt>
movsd  %xmm0,(%rbx)
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

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

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