user: Converte this assembly snippet into its equivalent C code:

```asm
<GPS_Math_LambertCC_EN_To_LatLon>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x158,%rsp
  movsd  %xmm0,-0x118(%rbp)
  movsd  %xmm1,-0x120(%rbp)
  mov    %rdi,-0x128(%rbp)
  mov    %rsi,-0x130(%rbp)
  movsd  %xmm2,-0x138(%rbp)
  movsd  %xmm3,-0x140(%rbp)
  movsd  %xmm4,-0x148(%rbp)
  movsd  %xmm5,-0x150(%rbp)
  movsd  %xmm6,-0x158(%rbp)
  movsd  %xmm7,-0x160(%rbp)
  mov    -0x148(%rbp),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Deg_To_Rad@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x148(%rbp)
  mov    -0x138(%rbp),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Deg_To_Rad@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x138(%rbp)
  mov    -0x140(%rbp),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Deg_To_Rad@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x140(%rbp)
  mov    -0x150(%rbp),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Deg_To_Rad@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x150(%rbp)
  movsd  D259(%rip),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  movsd  D102(%rip),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  0x10(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movsd  0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movsd  -0xd0(%rbp),%xmm0
  subsd  -0xc8(%rbp),%xmm0
  divsd  -0xd0(%rbp),%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  movsd  D313(%rip),%xmm0
  mov    -0xc0(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xb8(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  movsd  D195(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  mov    -0x148(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xa8(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  mulsd  -0xa8(%rbp),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0x148(%rbp),%xmm0
  movsd  D195(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0xd8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <tan@plt>
  movq   %xmm0,%rbx
  movsd  D77(%rip),%xmm0
  subsd  -0xa0(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm2
  movsd  D77(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  -0xb0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  mov    -0x138(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x90(%rbp)
  mov    -0x138(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x88(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  mulsd  -0x90(%rbp),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D77(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D313(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movsd  -0x88(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0x138(%rbp),%xmm0
  movsd  D195(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0xd8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <tan@plt>
  movq   %xmm0,%rbx
  movsd  D77(%rip),%xmm0
  subsd  -0xa0(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm2
  movsd  D77(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  -0xb0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x138(%rbp),%xmm0
  subsd  -0x140(%rbp),%xmm0
  movq   D378(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd D251(%rip),%xmm0
  jbe    L129
  mov    -0x140(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x70(%rbp)
  mov    -0x140(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x68(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  mulsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D77(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D313(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x140(%rbp),%xmm0
  movsd  D195(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0xd8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <tan@plt>
  movq   %xmm0,%rbx
  movsd  D77(%rip),%xmm0
  subsd  -0xa0(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm2
  movsd  D77(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  -0xb0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x80(%rbp),%xmm0
  divsd  -0x60(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rbx
  movsd  -0x78(%rbp),%xmm0
  divsd  -0x58(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x110(%rbp)
  jmp    L155
L129:
  movsd  -0x90(%rbp),%xmm0
  movsd  %xmm0,-0x110(%rbp)
L155:
  movsd  -0x110(%rbp),%xmm0
  mov    -0x78(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x110(%rbp),%xmm1
  movsd  -0x80(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x50(%rbp),%xmm0
  mulsd  0x10(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x110(%rbp),%xmm0
  mov    -0x98(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  -0x48(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movsd  D275(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x118(%rbp),%xmm0
  subsd  -0x158(%rbp),%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  -0x120(%rbp),%xmm0
  subsd  -0x160(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  movsd  -0x100(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0xf8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movsd  D313(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x108(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x110(%rbp),%xmm0
  jbe    L26
  movsd  -0xf8(%rbp),%xmm0
  movq   D179(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movq   D179(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x100(%rbp),%xmm0
  movq   D179(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  -0x108(%rbp),%xmm0
  movq   D179(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x108(%rbp)
L26:
  pxor   %xmm0,%xmm0
  ucomisd -0x108(%rbp),%xmm0
  jp     L138
  pxor   %xmm0,%xmm0
  ucomisd -0x108(%rbp),%xmm0
  je     L53
L138:
  movsd  -0xf8(%rbp),%xmm0
  mov    -0x100(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <atan2@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x38(%rbp)
  movsd  D77(%rip),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x110(%rbp),%xmm1
  movsd  -0x108(%rbp),%xmm0
  divsd  -0x48(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  call   <atan@plt>
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0xe0(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  jmp    L81
L9:
  movsd  -0xf0(%rbp),%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  mov    -0xf0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  movsd  D195(%rip),%xmm1
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movsd  D77(%rip),%xmm0
  subsd  -0xa0(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm2
  movsd  D77(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movapd %xmm3,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm4
  mulsd  -0x20(%rbp),%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <atan@plt>
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0xe0(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xf0(%rbp)
L81:
  movsd  -0xf0(%rbp),%xmm0
  subsd  -0xe8(%rbp),%xmm0
  movq   D378(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x30(%rbp),%xmm0
  ja     L9
  mov    -0x128(%rbp),%rax
  movsd  -0xf0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x38(%rbp),%xmm0
  divsd  -0x110(%rbp),%xmm0
  addsd  -0x150(%rbp),%xmm0
  mov    -0x130(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x128(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0xe0(%rbp),%xmm0
  jbe    L72
  mov    -0x128(%rbp),%rax
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L159
L72:
  mov    -0x128(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0xe0(%rbp),%xmm0
  movq   D179(%rip),%xmm2
  xorpd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jbe    L159
  movsd  -0xe0(%rbp),%xmm0
  movq   D179(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x128(%rbp),%rax
  movsd  %xmm0,(%rax)
L159:
  mov    -0x130(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd D402(%rip),%xmm0
  jbe    L38
  mov    -0x130(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  D318(%rip),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x130(%rbp),%rax
  movsd  %xmm0,(%rax)
L38:
  mov    -0x130(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D121(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L162
  mov    -0x130(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D318(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x130(%rbp),%rax
  movsd  %xmm0,(%rax)
L162:
  mov    -0x130(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd D402(%rip),%xmm0
  jbe    L132
  mov    -0x130(%rbp),%rax
  movsd  D402(%rip),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L58
L132:
  mov    -0x130(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D121(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L58
  mov    -0x130(%rbp),%rax
  movsd  D121(%rip),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L58
L53:
  movsd  -0x110(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L35
  mov    -0x128(%rbp),%rax
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L171
L35:
  movsd  -0xe0(%rbp),%xmm0
  movq   D179(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x128(%rbp),%rax
  movsd  %xmm0,(%rax)
L171:
  mov    -0x130(%rbp),%rax
  movsd  -0x150(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L58:
  mov    -0x130(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Rad_To_Deg@plt>
  movq   %xmm0,%rax
  mov    -0x130(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x128(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Rad_To_Deg@plt>
  movq   %xmm0,%rax
  mov    -0x128(%rbp),%rdx
  mov    %rax,(%rdx)
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D259
data_type: byte[8]
name: unpack_data
arguments: data_label: D102
data_type: byte[8]
name: unpack_data
arguments: data_label: D313
data_type: f64
name: unpack_data
arguments: data_label: D195
data_type: f64
name: unpack_data
arguments: data_label: D77
data_type: f64
name: unpack_data
arguments: data_label: D378
data_type: qword
name: unpack_data
arguments: data_label: D251
data_type: byte[16]
name: unpack_data
arguments: data_label: D275
data_type: byte[8]
name: unpack_data
arguments: data_label: D179
data_type: f32[2]
name: unpack_data
arguments: data_label: D402
data_type: f64[2]
name: unpack_data
arguments: data_label: D318
data_type: byte[8]
name: unpack_data
arguments: data_label: D121
data_type: byte[8]

tool: {"D259": [0x1e,0x26,0x44,0x54,0xfb,0x21,0xf9,0x3f]}

tool: {"D102": [0x1e,0x26,0x44,0x54,0xfb,0x21,0xe9,0x3f]}

tool: D313: 0.5

tool: D195: 2

tool: D77: 1

tool: D378: 9223372036854775807

tool: {"D251": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d,0x39,0xfe,0xdd,0xe8,0x1a,0xaa,0x00,0x3e]}

tool: {"D275": [0x39,0xfe,0xdd,0xe8,0x1a,0xaa,0x00,0x3e]}

tool: {"D179": [0.0,-0.0]}

tool: {"D402": [3.141592653589,6.283185307178]}

tool: {"D318": [0x1e,0x26,0x44,0x54,0xfb,0x21,0x19,0x40]}

tool: {"D121": [0x1e,0x26,0x44,0x54,0xfb,0x21,0x09,0xc0]}

assistant: ```c
void GPS_Math_LambertCC_EN_To_LatLon(double E, double N, double *phi, double *lambda, double phi1, double phi2, double phi0, double M0, double E0, double N0, double a, double b) {
  double po2;
  double po4;
  double a2;
  double b2;
  double phi0s;
  double e;
  double esq;
  double ed2;
  double ess;
  double t0;
  double t1;
  double t2;
  double m1;
  double m2;
  double phi1s;
  double phi1c;
  double phi2s;
  double phi2c;
  double n;
  double F;
  double Fa;
  double rho;
  double rho0;
  double phis;
  double t;
  double theta;
  double dx;
  double dy;
  double rhom;
  double lat;
  double tlat;
  double tol;
  phi0 = GPS_Math_Deg_To_Rad(phi0);
  phi1 = GPS_Math_Deg_To_Rad(phi1);
  phi2 = GPS_Math_Deg_To_Rad(phi2);
  M0 = GPS_Math_Deg_To_Rad(M0);
  po2 = (double)3.141592653589 / (double)2.0;
  po4 = (double)3.141592653589 / (double)4.0;
  a2 = a * a;
  b2 = b * b;
  esq = (a2 - b2) / a2;
  e = pow(esq, (double)0.5);
  ed2 = e / (double)2.0;
  phi0s = sin(phi0);
  ess = e * phi0s;
  t0 = tan(po4 - phi0 / (double)2.0) / pow(((double)1.0 - ess) / ((double)1.0 + ess), ed2);
  phi1s = sin(phi1);
  phi1c = cos(phi1);
  ess = e * phi1s;
  m1 = phi1c / pow(((double)1.0 - ess * ess), (double)0.5);
  t1 = tan(po4 - phi1 / (double)2.0) / pow(((double)1.0 - ess) / ((double)1.0 + ess), ed2);
  if (fabs(phi1 - phi2) > 1.0e-10) {
    phi2s = sin(phi2);
    phi2c = cos(phi2);
    ess = e * phi2s;
    m2 = phi2c / pow(((double)1.0 - ess * ess), (double)0.5);
    t2 = tan(po4 - phi2 / (double)2.0) / pow(((double)1.0 - ess) / ((double)1.0 + ess), ed2);
    n = log(m1 / m2) / log(t1 / t2);
  } else
    n = phi1s;
  F = m1 / (n * pow(t1, n));
  Fa = F * a;
  rho0 = pow(t0, n) * Fa;
  tlat = theta = (double)0.0;
  tol = (double)4.85e-10;
  dx = E - E0;
  dy = N - N0;
  rhom = rho0 - dy;
  rho = pow(dx * dx + rhom * rhom, (double)0.5);
  if (n < 0.0) {
    rhom *= (double)-1.0;
    dy *= (double)-1.0;
    dx *= (double)-1.0;
    rho *= (double)-1.0;
  }
  if (rho) {
    theta = atan2(dx, rhom);
    t = pow(rho / Fa, (double)1.0 / n);
    lat = po2 - (double)2.0 * atan(t);
    while (fabs(lat - tlat) > tol) {
      tlat = lat;
      phis = sin(lat);
      ess = e * phis;
      lat = po2 - (double)2.0 * atan(t * pow(((double)1.0 - ess) / ((double)1.0 + ess), e / (double)2.0));
    }
    *phi = lat;
    *lambda = theta / n + M0;
    if (*phi > po2)
      *phi = po2;
    else if (*phi < -po2)
      *phi = -po2;
    if (*lambda > 3.141592653589)
      *lambda -= (double)3.141592653589 * (double)2.0;
    if (*lambda < -3.141592653589)
      *lambda += (double)3.141592653589 * (double)2.0;
    if (*lambda > 3.141592653589)
      *lambda = 3.141592653589;
    else if (*lambda < -3.141592653589)
      *lambda = -3.141592653589;
  } else {
    if (n > 0.0)
      *phi = po2;
    else
      *phi = -po2;
    *lambda = M0;
  }
  *lambda = GPS_Math_Rad_To_Deg(*lambda);
  *phi = GPS_Math_Rad_To_Deg(*phi);
  return;
}
```