#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 cos(double);
double sin(double);
void GPS_Math_EckertIV_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 Ra0;
  double Ra1;
  double po2;
  double p2;
  double Ra;
  double theta;
  double thetas;
  double thetac;
  double n;
  double dx;
  double dy;
  double i;
  M0 = GPS_Math_Deg_To_Rad(M0);
  p2 = (double)3.141592653589 * (double)2.;
  po2 = (double)3.141592653589 / (double)2.;
  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.);
  Ra0 = Ra * (double)0.4222382;
  Ra1 = Ra * (double)1.3265004;
  dx = E - E0;
  dy = N - N0;
  i = dy / Ra1;
  if (i > (double)1.)
    i = (double)1.;
  else if (i < (double)-1.)
    i = (double)-1.;
  theta = asin(i);
  thetas = sin(theta);
  thetac = cos(theta);
  n = theta + thetas * thetac + (double)2. * thetas;
  *phi = asin(n / ((double)2. + po2));
  *lambda = M0 + dx / (Ra0 * ((double)1. + thetac));
  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_EckertIV_EN_To_LatLon>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%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  0xe73(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xe5b(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xe3e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11e2 <GPS_Math_EckertIV_EN_To_LatLon+0x92>
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%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  -0x60(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  0xe0c(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  0xdc8(%rip),%xmm1
subsd  %xmm2,%xmm1
movsd  0xdec(%rip),%xmm2
mulsd  -0x68(%rbp),%xmm2
movsd  0xdd7(%rip),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
movsd  0xdbf(%rip),%xmm2
mulsd  -0x70(%rbp),%xmm2
movsd  0xdaa(%rip),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xd86(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
movsd  0xd69(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
divsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  0xd0b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    132c <GPS_Math_EckertIV_EN_To_LatLon+0x1dc>
movsd  0xcf9(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    1357 <GPS_Math_EckertIV_EN_To_LatLon+0x207>
movsd  0xd24(%rip),%xmm0
ucomisd -0xd0(%rbp),%xmm0
ff
jbe    1352 <GPS_Math_EckertIV_EN_To_LatLon+0x202>
movsd  0xd0e(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    1357 <GPS_Math_EckertIV_EN_To_LatLon+0x207>
movsd  -0xd0(%rbp),%xmm0
ff
call   1050 <asin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1070 <cos@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  0xc82(%rip),%xmm1
addsd  -0x88(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
call   1050 <asin@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm2
movsd  0xc07(%rip),%xmm3
addsd  -0xb0(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x88(%rbp),%xmm0
ff
jbe    1458 <GPS_Math_EckertIV_EN_To_LatLon+0x308>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14b5 <GPS_Math_EckertIV_EN_To_LatLon+0x365>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
ucomisd %xmm1,%xmm0
jbe    14b0 <GPS_Math_EckertIV_EN_To_LatLon+0x360>
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14b5 <GPS_Math_EckertIV_EN_To_LatLon+0x365>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xb3b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14e7 <GPS_Math_EckertIV_EN_To_LatLon+0x397>
movsd  -0x90(%rbp),%xmm1
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xb75(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    1511 <GPS_Math_EckertIV_EN_To_LatLon+0x3c1>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xadf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1540 <GPS_Math_EckertIV_EN_To_LatLon+0x3f0>
mov    -0x20(%rbp),%rax
movsd  0xac9(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    156b <GPS_Math_EckertIV_EN_To_LatLon+0x41b>
mov    -0x20(%rbp),%rax
movsd  0xb1c(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    1566 <GPS_Math_EckertIV_EN_To_LatLon+0x416>
mov    -0x20(%rbp),%rax
movsd  0xb06(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    156b <GPS_Math_EckertIV_EN_To_LatLon+0x41b>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <GPS_Math_Rad_To_Deg@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <GPS_Math_Rad_To_Deg@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPS_Math_EckertIV_EN_To_LatLon>:
push   %r14
push   %rbx
sub    $0x48,%rsp
movsd  %xmm6,0x10(%rsp)
movsd  %xmm5,0x28(%rsp)
movsd  %xmm4,(%rsp)
movsd  %xmm3,0x18(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x20(%rsp)
movapd %xmm2,%xmm0
call   1030 <GPS_Math_Deg_To_Rad@plt>
movsd  0xe6f(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe6b(%rip),%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x30(%rsp)
movsd  0x28(%rsp),%xmm4
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm2
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
divsd  0xe20(%rip),%xmm1
movsd  0xe20(%rip),%xmm0
unpcklpd %xmm3,%xmm2
mulpd  0xe5c(%rip),%xmm2
addsd  %xmm0,%xmm1
divpd  0xe60(%rip),%xmm2
subsd  %xmm2,%xmm1
unpckhpd %xmm2,%xmm2
subsd  %xmm2,%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  %xmm4,%xmm1
movsd  0xdf2(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  %xmm3,0x10(%rsp)
mulsd  0xde8(%rip),%xmm1
movsd  0x20(%rsp),%xmm3
subsd  0x18(%rsp),%xmm3
movsd  %xmm3,0x20(%rsp)
subsd  (%rsp),%xmm2
divsd  %xmm1,%xmm2
ucomisd %xmm0,%xmm2
ja     1277 <GPS_Math_EckertIV_EN_To_LatLon+0x127>
movsd  0xdc7(%rip),%xmm1
ucomisd %xmm2,%xmm1
movapd %xmm2,%xmm0
jbe    1277 <GPS_Math_EckertIV_EN_To_LatLon+0x127>
movapd %xmm1,%xmm0
call   1050 <asin@plt>
movsd  %xmm0,(%rsp)
call   1040 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rsp),%xmm1
addsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
divsd  0xd79(%rip),%xmm2
movapd %xmm2,%xmm0
call   1050 <asin@plt>
movsd  %xmm0,(%rbx)
movsd  0x18(%rsp),%xmm0
addsd  0xd3e(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
divsd  %xmm1,%xmm0
movapd 0x30(%rsp),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%r14)
movsd  (%rbx),%xmm1
movsd  0xd37(%rip),%xmm0
ucomisd %xmm0,%xmm1
ja     131d <GPS_Math_EckertIV_EN_To_LatLon+0x1cd>
movsd  0xd31(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1326 <GPS_Math_EckertIV_EN_To_LatLon+0x1d6>
movsd  %xmm0,(%rbx)
movsd  (%r14),%xmm2
movsd  0xcda(%rip),%xmm3
ucomisd %xmm3,%xmm2
movsd  0xcc6(%rip),%xmm0
addsd  %xmm2,%xmm0
movapd %xmm3,%xmm1
cmpltsd %xmm2,%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm0,%xmm1
movsd  0xcf5(%rip),%xmm2
movapd %xmm1,%xmm0
cmpltsd 0xcf0(%rip),%xmm0
addsd  %xmm1,%xmm2
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
ja     1390 <GPS_Math_EckertIV_EN_To_LatLon+0x240>
movsd  0xcd6(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     1390 <GPS_Math_EckertIV_EN_To_LatLon+0x240>
ucomisd %xmm3,%xmm0
jbe    139b <GPS_Math_EckertIV_EN_To_LatLon+0x24b>
jmp    13a9 <GPS_Math_EckertIV_EN_To_LatLon+0x259>
movsd  %xmm0,(%r14)
ucomisd %xmm3,%xmm0
ja     13a9 <GPS_Math_EckertIV_EN_To_LatLon+0x259>
movsd  0xcb5(%rip),%xmm3
ucomisd %xmm0,%xmm3
jbe    13b2 <GPS_Math_EckertIV_EN_To_LatLon+0x262>
movsd  %xmm3,(%r14)
movapd %xmm3,%xmm0
call   1060 <GPS_Math_Rad_To_Deg@plt>
movsd  %xmm0,(%r14)
movsd  (%rbx),%xmm0
call   1060 <GPS_Math_Rad_To_Deg@plt>
movsd  %xmm0,(%rbx)
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @GPS_Math_EckertIV_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
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
%36 = load double, double* %14
%37 = call double @GPS_Math_Deg_To_Rad(double %36)
store double %37, double* %14
store double 0x401921FB5444261E, double* %27
store double 0x3FF921FB5444261E, double* %26
%38 = load double, double* %14
%39 = fcmp ogt double %38, 0x400921FB5444261E
br i1 %39, label %40, label %44
40: ; preds = %9
%41 = load double, double* %27
%42 = load double, double* %14
%43 = fsub double %42, %41
store double %43, double* %14
br label %44
44: ; preds = %40, %9
%45 = load double, double* %17
%46 = load double, double* %17
%47 = fmul double %45, %46
store double %47, double* %19
%48 = load double, double* %18
%49 = load double, double* %18
%50 = fmul double %48, %49
store double %50, double* %20
%51 = load double, double* %19
%52 = load double, double* %20
%53 = fsub double %51, %52
%54 = load double, double* %19
%55 = fdiv double %53, %54
store double %55, double* %21
%56 = load double, double* %21
%57 = load double, double* %21
%58 = fmul double %56, %57
store double %58, double* %22
%59 = load double, double* %21
%60 = load double, double* %22
%61 = fmul double %59, %60
store double %61, double* %23
%62 = load double, double* %17
%63 = load double, double* %21
%64 = fdiv double %63, 6.000000e+00
%65 = fsub double 1.000000e+00, %64
%66 = load double, double* %22
%67 = fmul double 1.700000e+01, %66
%68 = fdiv double %67, 3.600000e+02
%69 = fsub double %65, %68
%70 = load double, double* %23
%71 = fmul double 6.700000e+01, %70
%72 = fdiv double %71, 3.024000e+03
%73 = fsub double %69, %72
%74 = fmul double %62, %73
store double %74, double* %28
%75 = load double, double* %28
%76 = fmul double %75, 0x3FDB05F35F07CD54
store double %76, double* %24
%77 = load double, double* %28
%78 = fmul double %77, 0x3FF539587BC2183E
store double %78, double* %25
%79 = load double, double* %10
%80 = load double, double* %15
%81 = fsub double %79, %80
store double %81, double* %33
%82 = load double, double* %11
%83 = load double, double* %16
%84 = fsub double %82, %83
store double %84, double* %34
%85 = load double, double* %34
%86 = load double, double* %25
%87 = fdiv double %85, %86
store double %87, double* %35
%88 = load double, double* %35
%89 = fcmp ogt double %88, 1.000000e+00
br i1 %89, label %90, label %91
90: ; preds = %44
store double 1.000000e+00, double* %35
br label %96
91: ; preds = %44
%92 = load double, double* %35
%93 = fcmp olt double %92, -1.000000e+00
br i1 %93, label %94, label %95
94: ; preds = %91
store double -1.000000e+00, double* %35
br label %95
95: ; preds = %94, %91
br label %96
96: ; preds = %95, %90
%97 = load double, double* %35
%98 = call double @asin(double %97)
store double %98, double* %29
%99 = load double, double* %29
%100 = call double @sin(double %99)
store double %100, double* %30
%101 = load double, double* %29
%102 = call double @cos(double %101)
store double %102, double* %31
%103 = load double, double* %29
%104 = load double, double* %30
%105 = load double, double* %31
%106 = call double @llvm.fmuladd.f64(double %104, double %105, double %103)
%107 = load double, double* %30
%108 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %107, double %106)
store double %108, double* %32
%109 = load double, double* %32
%110 = load double, double* %26
%111 = fadd double 2.000000e+00, %110
%112 = fdiv double %109, %111
%113 = call double @asin(double %112)
%114 = load double*, double** %12
store double %113, double* %114
%115 = load double, double* %14
%116 = load double, double* %33
%117 = load double, double* %24
%118 = load double, double* %31
%119 = fadd double 1.000000e+00, %118
%120 = fmul double %117, %119
%121 = fdiv double %116, %120
%122 = fadd double %115, %121
%123 = load double*, double** %13
store double %122, double* %123
%124 = load double*, double** %12
%125 = load double, double* %124
%126 = load double, double* %26
%127 = fcmp ogt double %125, %126
br i1 %127, label %128, label %131
128: ; preds = %96
%129 = load double, double* %26
%130 = load double*, double** %12
store double %129, double* %130
br label %142
131: ; preds = %96
%132 = load double*, double** %12
%133 = load double, double* %132
%134 = load double, double* %26
%135 = fneg double %134
%136 = fcmp olt double %133, %135
br i1 %136, label %137, label %141
137: ; preds = %131
%138 = load double, double* %26
%139 = fneg double %138
%140 = load double*, double** %12
store double %139, double* %140
br label %141
141: ; preds = %137, %131
br label %142
142: ; preds = %141, %128
%143 = load double*, double** %13
%144 = load double, double* %143
%145 = fcmp ogt double %144, 0x400921FB5444261E
br i1 %145, label %146, label %151
146: ; preds = %142
%147 = load double, double* %27
%148 = load double*, double** %13
%149 = load double, double* %148
%150 = fsub double %149, %147
store double %150, double* %148
br label %151
151: ; preds = %146, %142
%152 = load double*, double** %13
%153 = load double, double* %152
%154 = fcmp olt double %153, 0xC00921FB5444261E
br i1 %154, label %155, label %160
155: ; preds = %151
%156 = load double, double* %27
%157 = load double*, double** %13
%158 = load double, double* %157
%159 = fadd double %158, %156
store double %159, double* %157
br label %160
160: ; preds = %155, %151
%161 = load double*, double** %13
%162 = load double, double* %161
%163 = fcmp ogt double %162, 0x400921FB5444261E
br i1 %163, label %164, label %166
164: ; preds = %160
%165 = load double*, double** %13
store double 0x400921FB5444261E, double* %165
br label %173
166: ; preds = %160
%167 = load double*, double** %13
%168 = load double, double* %167
%169 = fcmp olt double %168, 0xC00921FB5444261E
br i1 %169, label %170, label %172
170: ; preds = %166
%171 = load double*, double** %13
store double 0xC00921FB5444261E, double* %171
br label %172
172: ; preds = %170, %166
br label %173
173: ; preds = %172, %164
%174 = load double*, double** %13
%175 = load double, double* %174
%176 = call double @GPS_Math_Rad_To_Deg(double %175)
%177 = load double*, double** %13
store double %176, double* %177
%178 = load double*, double** %12
%179 = load double, double* %178
%180 = call double @GPS_Math_Rad_To_Deg(double %179)
%181 = load double*, double** %12
store double %180, double* %181
ret void
}

LLVM IR (-O2):
define void @GPS_Math_EckertIV_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 = fcmp ogt double %10, 0x400921FB5444261E
%12 = fadd double %10, 0xC01921FB5444261E
%13 = select i1 %11, double %12, double %10
%14 = fmul double %7, %7
%15 = fmul double %8, %8
%16 = fsub double %14, %15
%17 = fdiv double %16, %14
%18 = fmul double %17, %17
%19 = fmul double %17, %18
%20 = fdiv double %17, 6.000000e+00
%21 = fsub double 1.000000e+00, %20
%22 = insertelement <2 x double> poison, double %18, i64 0
%23 = insertelement <2 x double> %22, double %19, i64 1
%24 = fmul <2 x double> %23, <double 1.700000e+01, double 6.700000e+01>
%25 = fdiv <2 x double> %24, <double 3.600000e+02, double 3.024000e+03>
%26 = extractelement <2 x double> %25, i64 0
%27 = fsub double %21, %26
%28 = extractelement <2 x double> %25, i64 1
%29 = fsub double %27, %28
%30 = fmul double %29, %7
%31 = fmul double %30, 0x3FDB05F35F07CD54
%32 = fmul double %30, 0x3FF539587BC2183E
%33 = fsub double %0, %5
%34 = fsub double %1, %6
%35 = fdiv double %34, %32
%36 = fcmp ogt double %35, 1.000000e+00
br i1 %36, label %40, label %37
37: ; preds = %9
%38 = fcmp olt double %35, -1.000000e+00
br i1 %38, label %39, label %40
39: ; preds = %37
br label %40
40: ; preds = %9, %37, %39
%41 = phi double [ -1.000000e+00, %39 ], [ %35, %37 ], [ 1.000000e+00, %9 ]
%42 = tail call double @asin(double %41)
%43 = tail call double @sin(double %42)
%44 = tail call double @cos(double %42)
%45 = tail call double @llvm.fmuladd.f64(double %43, double %44, double %42)
%46 = tail call double @llvm.fmuladd.f64(double %43, double 2.000000e+00, double %45)
%47 = fdiv double %46, 0x400C90FDAA22130F
%48 = tail call double @asin(double %47)
store double %48, double* %2
%49 = fadd double %44, 1.000000e+00
%50 = fmul double %31, %49
%51 = fdiv double %33, %50
%52 = fadd double %13, %51
store double %52, double* %3
%53 = load double, double* %2
%54 = fcmp ogt double %53, 0x3FF921FB5444261E
br i1 %54, label %57, label %55
55: ; preds = %40
%56 = fcmp olt double %53, 0xBFF921FB5444261E
br i1 %56, label %57, label %60
57: ; preds = %55, %40
%58 = phi double [ 0x3FF921FB5444261E, %40 ], [ 0xBFF921FB5444261E, %55 ]
store double %58, double* %2
%59 = load double, double* %3
br label %60
60: ; preds = %57, %55
%61 = phi double [ %59, %57 ], [ %52, %55 ]
%62 = fcmp ogt double %61, 0x400921FB5444261E
%63 = fadd double %61, 0xC01921FB5444261E
%64 = select i1 %62, double %63, double %61
%65 = fcmp olt double %64, 0xC00921FB5444261E
%66 = fadd double %64, 0x401921FB5444261E
%67 = select i1 %65, double %66, double %64
%68 = or i1 %62, %65
br i1 %68, label %69, label %70
69: ; preds = %60
store double %67, double* %3
br label %70
70: ; preds = %60, %69
%71 = fcmp ogt double %67, 0x400921FB5444261E
br i1 %71, label %74, label %72
72: ; preds = %70
%73 = fcmp olt double %67, 0xC00921FB5444261E
br i1 %73, label %74, label %76
74: ; preds = %72, %70
%75 = phi double [ 0x400921FB5444261E, %70 ], [ 0xC00921FB5444261E, %72 ]
store double %75, double* %3
br label %76
76: ; preds = %74, %72
%77 = phi double [ %67, %72 ], [ %75, %74 ]
%78 = tail call double @GPS_Math_Rad_To_Deg(double %77)
store double %78, double* %3
%79 = load double, double* %2
%80 = tail call double @GPS_Math_Rad_To_Deg(double %79)
store double %80, double* %2
ret void
}