#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 cos(double);
double fabs(double);
double pow(double, double);
double sin(double);
void GPS_Math_Sinusoid_EN_To_LatLon(double E, double N, double *phi,
                                    double *lambda, double M0, double E0,
                                    double N0, double a, double b) {
  double a2;
  double b2;
  double e2;
  double e4;
  double e6;
  double p2;
  double po2;
  double c0;
  double c1;
  double c2;
  double c3;
  double A1;
  double A0;
  double A2;
  double A3;
  double E1;
  double E2;
  double E3;
  double E4;
  double j;
  double om0;
  double som0;
  double dx;
  double dy;
  double mu;
  double mu2s;
  double mu4s;
  double mu6s;
  double mu8s;
  double phis;
  M0 = GPS_Math_Deg_To_Rad(M0);
  po2 = (double)3.141592653589 / (double)2.0;
  p2 = (double)3.141592653589 * (double)2.0;
  a2 = a * a;
  b2 = b * b;
  e2 = (a2 - b2) / a2;
  e4 = e2 * e2;
  e6 = e4 * e2;
  j = (double)45. * e6 / (double)1024.;
  c0 = (double)1. - e2 / (double)4. - (double)3. * e4 / (double)64. -
       (double)5. * e6 / (double)256.;
  c1 = (double)3. * e2 / (double)8. + (double)3. * e4 / (double)32. + j;
  c2 = (double)15. * e4 / (double)256. + j;
  c3 = (double)35. * e6 / (double)3072.;
  om0 = (double)1. - e2;
  som0 = pow(om0, (double).5);
  E1 = ((double)1. - som0) / ((double)1. + som0);
  E2 = E1 * E1;
  E3 = E1 * E2;
  E4 = E1 * E3;
  A0 = (double)3. * E1 / (double)2. - (double)27. * E3 / (double)32.;
  A1 = (double)21. * E2 / (double)16. - (double)55. * E4 / (double)32.;
  A2 = (double)151. * E3 / (double)96.;
  A3 = (double)1097. * E4 / (double)512.;
  dx = E - E0;
  dy = N - N0;
  mu = dy / (c0 * a);
  mu2s = A0 * sin((double)2. * mu);
  mu4s = A1 * sin((double)4. * mu);
  mu6s = A2 * sin((double)6. * mu);
  mu8s = A3 * sin((double)8. * mu);
  *phi = mu + mu2s + mu4s + mu6s + mu8s;
  if (*phi > po2)
    *phi = po2;
  else if (*phi < -po2)
    *phi = -po2;
  if ((((po2 - (double)1.0e-8) < fabs(*phi)) &&
       (fabs(*phi) < (po2 + (double)1.0e-8))))
    *lambda = M0;
  else {
    phis = sin(*phi);
    *lambda = M0 + dx * pow((double)1.0 - e2 * phis * phis, (double).5) /
                       (a * cos(*phi));
  }
  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_Sinusoid_EN_To_LatLon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%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  -0x28(%rbp),%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xf2b(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xf16(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xeb1(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  0xe9c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x60(%rbp),%xmm1
movsd  0xde3(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe37(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xe23(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
movsd  0xe56(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  0xe3e(%rip),%xmm1
mulsd  -0x70(%rbp),%xmm1
movsd  0xe21(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xde1(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  0xd6c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xdc8(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
movsd  0xd93(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xdcb(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  0xdb6(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xd92(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  0xd7d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xd59(%rip),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movsd  0xd44(%rip),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  0xd27(%rip),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  0xd17(%rip),%xmm1
addsd  -0xf8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0xcab(%rip),%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  0xc4b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc87(%rip),%xmm1
mulsd  -0xd8(%rbp),%xmm1
ff
movsd  0xc57(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xc57(%rip),%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  0xc3f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc2b(%rip),%xmm1
mulsd  -0xe0(%rbp),%xmm1
ff
movsd  0xc13(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xbf3(%rip),%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
movsd  0xbdb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xbbf(%rip),%xmm0
mulsd  -0xe0(%rbp),%xmm0
ff
movsd  0xba7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x158(%rbp)
ff
movsd  0xb36(%rip),%xmm0
mulsd  -0x110(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x158(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x150(%rbp)
ff
movsd  0xaf2(%rip),%xmm0
mulsd  -0x110(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x150(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
movsd  0xaae(%rip),%xmm0
mulsd  -0x110(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x148(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x140(%rbp)
ff
movsd  0xa6a(%rip),%xmm0
mulsd  -0x110(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x140(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
addsd  -0x118(%rbp),%xmm0
ff
addsd  -0x120(%rbp),%xmm0
ff
addsd  -0x128(%rbp),%xmm0
ff
addsd  -0x130(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x80(%rbp),%xmm0
jbe    160f <GPS_Math_Sinusoid_EN_To_LatLon+0x4bf>
movsd  -0x80(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1666 <GPS_Math_Sinusoid_EN_To_LatLon+0x516>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
ucomisd %xmm1,%xmm0
jbe    1661 <GPS_Math_Sinusoid_EN_To_LatLon+0x511>
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1666 <GPS_Math_Sinusoid_EN_To_LatLon+0x516>
movsd  -0x80(%rbp),%xmm1
movsd  0xa5d(%rip),%xmm0
subsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movaps 0xa6a(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    16d0 <GPS_Math_Sinusoid_EN_To_LatLon+0x580>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movaps 0xa4d(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xa21(%rip),%xmm0
addsd  -0x80(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    16d0 <GPS_Math_Sinusoid_EN_To_LatLon+0x580>
movsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    17ab <GPS_Math_Sinusoid_EN_To_LatLon+0x65b>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0x138(%rbp),%xmm0
ff
movsd  -0x138(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x936(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x932(%rip),%xmm1
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x178(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <cos@plt>
movsd  -0x170(%rbp),%xmm2
ff
movsd  -0x168(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x160(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x91d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    17da <GPS_Math_Sinusoid_EN_To_LatLon+0x68a>
movsd  -0x78(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0x8fa(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    1801 <GPS_Math_Sinusoid_EN_To_LatLon+0x6b1>
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x8c7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1830 <GPS_Math_Sinusoid_EN_To_LatLon+0x6e0>
mov    -0x20(%rbp),%rax
movsd  0x8b1(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    185b <GPS_Math_Sinusoid_EN_To_LatLon+0x70b>
mov    -0x20(%rbp),%rax
movsd  0x8a4(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    1856 <GPS_Math_Sinusoid_EN_To_LatLon+0x706>
mov    -0x20(%rbp),%rax
movsd  0x88e(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    185b <GPS_Math_Sinusoid_EN_To_LatLon+0x70b>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1050 <GPS_Math_Rad_To_Deg@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1050 <GPS_Math_Rad_To_Deg@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPS_Math_Sinusoid_EN_To_LatLon>:
push   %r14
push   %rbx
sub    $0x88,%rsp
movsd  %xmm6,0x8(%rsp)
movsd  %xmm5,0x18(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x48(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x10(%rsp)
movaps %xmm2,%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movaps %xmm0,0x30(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe38(%rip),%xmm3
mulsd  %xmm2,%xmm3
movsd  0xe34(%rip),%xmm4
addsd  %xmm4,%xmm3
unpcklpd %xmm1,%xmm0
mulpd  0xeac(%rip),%xmm0
mulpd  0xeb4(%rip),%xmm0
subsd  %xmm0,%xmm3
unpckhpd %xmm0,%xmm0
subsd  %xmm0,%xmm3
movsd  %xmm3,0x8(%rsp)
movapd %xmm4,%xmm0
movsd  %xmm2,0x40(%rsp)
subsd  %xmm2,%xmm0
movsd  0xdfc(%rip),%xmm1
call   1070 <pow@plt>
movsd  0xde7(%rip),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm1,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm1,%xmm2
unpcklpd %xmm0,%xmm1
mulpd  0xe5f(%rip),%xmm1
mulpd  0xe67(%rip),%xmm1
mulsd  %xmm3,%xmm2
movapd %xmm3,%xmm0
unpcklpd %xmm2,%xmm0
mulpd  0xe63(%rip),%xmm0
mulpd  0xe6b(%rip),%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,0x50(%rsp)
mulsd  0xd91(%rip),%xmm3
divsd  0xd91(%rip),%xmm3
movapd %xmm3,0x60(%rsp)
mulsd  0xd8b(%rip),%xmm2
mulsd  0xd8b(%rip),%xmm2
movapd %xmm2,0x70(%rsp)
movsd  (%rsp),%xmm1
subsd  0x20(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sin@plt>
movapd %xmm0,0x20(%rsp)
movsd  0xd52(%rip),%xmm0
mulsd  (%rsp),%xmm0
call   1040 <sin@plt>
movapd 0x20(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x50(%rsp),%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0xd32(%rip),%xmm0
mulsd  (%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0x60(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xd1c(%rip),%xmm0
mulsd  (%rsp),%xmm0
call   1040 <sin@plt>
movapd 0x20(%rsp),%xmm2
mulsd  0x70(%rsp),%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm2,%xmm1
unpckhpd %xmm2,%xmm2
addsd  %xmm1,%xmm2
addsd  0x8(%rsp),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx)
movsd  0xce7(%rip),%xmm0
ucomisd %xmm0,%xmm2
ja     137d <GPS_Math_Sinusoid_EN_To_LatLon+0x22d>
movsd  0xce1(%rip),%xmm0
ucomisd %xmm2,%xmm0
jbe    1385 <GPS_Math_Sinusoid_EN_To_LatLon+0x235>
movsd  %xmm0,(%rbx)
movapd %xmm0,%xmm2
movapd 0xd63(%rip),%xmm0
andpd  %xmm2,%xmm0
ucomisd 0xcc7(%rip),%xmm0
jbe    13a9 <GPS_Math_Sinusoid_EN_To_LatLon+0x259>
movsd  0xcc5(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     141e <GPS_Math_Sinusoid_EN_To_LatLon+0x2ce>
movsd  0x10(%rsp),%xmm0
subsd  0x48(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movapd %xmm2,%xmm0
call   1040 <sin@plt>
movsd  0x40(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xc2e(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xc2a(%rip),%xmm1
call   1070 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rbx),%xmm0
call   1060 <cos@plt>
mulsd  0x18(%rsp),%xmm0
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd 0x30(%rsp),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xc4a(%rip),%xmm0
movapd 0x30(%rsp),%xmm3
addsd  %xmm3,%xmm0
movsd  0xc40(%rip),%xmm1
movapd %xmm1,%xmm2
cmpltsd %xmm3,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm3,%xmm2
orpd   %xmm0,%xmm2
movsd  0xc2b(%rip),%xmm3
addsd  %xmm2,%xmm3
movapd %xmm2,%xmm0
cmpltsd 0xc22(%rip),%xmm0
andpd  %xmm0,%xmm3
andnpd %xmm2,%xmm0
orpd   %xmm3,%xmm0
movlpd %xmm0,(%r14)
ucomisd %xmm1,%xmm0
ja     148b <GPS_Math_Sinusoid_EN_To_LatLon+0x33b>
movsd  0xc03(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1494 <GPS_Math_Sinusoid_EN_To_LatLon+0x344>
movsd  %xmm1,(%r14)
movapd %xmm1,%xmm0
call   1050 <GPS_Math_Rad_To_Deg@plt>
movsd  %xmm0,(%r14)
movsd  (%rbx),%xmm0
call   1050 <GPS_Math_Rad_To_Deg@plt>
movsd  %xmm0,(%rbx)
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

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

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