user: 请将以下的汇编代码转换成C语言代码:

```asm
<GPS_Math_Polycon_EN_To_LatLon>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x198,%rsp
  movsd  %xmm0,-0x148(%rbp)
  movsd  %xmm1,-0x150(%rbp)
  mov    %rdi,-0x158(%rbp)
  mov    %rsi,-0x160(%rbp)
  movsd  %xmm2,-0x168(%rbp)
  movsd  %xmm3,-0x170(%rbp)
  movsd  %xmm4,-0x178(%rbp)
  movsd  %xmm5,-0x180(%rbp)
  movsd  %xmm6,-0x188(%rbp)
  movsd  %xmm7,-0x190(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x140(%rbp)
  mov    -0x168(%rbp),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Deg_To_Rad@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x168(%rbp)
  mov    -0x170(%rbp),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Deg_To_Rad@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x170(%rbp)
  movsd  D486(%rip),%xmm0
  movsd  %xmm0,-0x128(%rbp)
  movsd  D424(%rip),%xmm0
  movsd  %xmm0,-0x120(%rbp)
  movsd  -0x170(%rbp),%xmm0
  comisd D126(%rip),%xmm0
  jbe    L109
  movsd  -0x170(%rbp),%xmm0
  subsd  -0x128(%rbp),%xmm0
  movsd  %xmm0,-0x170(%rbp)
L109:
  movsd  -0x188(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x118(%rbp)
  movsd  -0x190(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x110(%rbp)
  movsd  -0x118(%rbp),%xmm0
  subsd  -0x110(%rbp),%xmm0
  divsd  -0x118(%rbp),%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  -0x108(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  -0x108(%rbp),%xmm0
  mulsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  movsd  -0xf8(%rbp),%xmm1
  movsd  D329(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D359(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  movsd  -0x100(%rbp),%xmm1
  movsd  D22(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movsd  -0x108(%rbp),%xmm0
  movsd  D36(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D360(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0xe8(%rbp),%xmm1
  movsd  D366(%rip),%xmm2
  divsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0xf8(%rbp),%xmm2
  movsd  D489(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  D456(%rip),%xmm2
  divsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  movsd  -0x108(%rbp),%xmm1
  movsd  D22(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D186(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0xe8(%rbp),%xmm0
  movsd  D446(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0xf0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0x100(%rbp),%xmm1
  movsd  D412(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D456(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0xf0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movsd  -0xf8(%rbp),%xmm1
  movsd  D275(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D116(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movsd  -0xe0(%rbp),%xmm0
  mulsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  movsd  -0x168(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0xd8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  -0x168(%rbp),%xmm1
  movsd  D36(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0xd0(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x168(%rbp),%xmm1
  movsd  D377(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0xc8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  -0xc0(%rbp),%xmm0
  subsd  -0xb8(%rbp),%xmm0
  addsd  -0xb0(%rbp),%xmm0
  subsd  -0xa8(%rbp),%xmm0
  movsd  -0x188(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  D103(%rip),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0x148(%rbp),%xmm0
  subsd  -0x178(%rbp),%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x150(%rbp),%xmm0
  subsd  -0x180(%rbp),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x90(%rbp),%xmm0
  divsd  -0x188(%rbp),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  movq   D373(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  D360(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x88(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L88
  movsd  D360(%rip),%xmm0
  subsd  -0xa0(%rbp),%xmm0
  comisd -0x88(%rbp),%xmm0
  jbe    L88
  mov    -0x158(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x80(%rbp),%xmm0
  addsd  -0x170(%rbp),%xmm0
  mov    -0x160(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L166
L88:
  movsd  -0xa0(%rbp),%xmm0
  addsd  -0x88(%rbp),%xmm0
  divsd  -0x188(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x80(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x78(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x138(%rbp)
  movsd  D360(%rip),%xmm0
  movsd  %xmm0,-0x130(%rbp)
  jmp    L116
L105:
  mov    -0x138(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x68(%rbp)
  movsd  -0x108(%rbp),%xmm0
  mulsd  -0x68(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x68(%rbp),%xmm1
  movsd  D360(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D129(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  %xmm0,-0x198(%rbp)
  mov    -0x138(%rbp),%rax
  movq   %rax,%xmm0
  call   <tan@plt>
  mulsd  -0x198(%rbp),%xmm0
  movsd  %xmm0,-0x140(%rbp)
  movsd  -0x138(%rbp),%xmm0
  mulsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x138(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0xd8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x138(%rbp),%xmm1
  movsd  D36(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0xd0(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x138(%rbp),%xmm1
  movsd  D377(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0xc8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x60(%rbp),%xmm0
  subsd  -0x58(%rbp),%xmm0
  addsd  -0x50(%rbp),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movsd  -0x188(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x198(%rbp)
  movsd  -0x138(%rbp),%xmm0
  movapd %xmm0,%xmm4
  addsd  %xmm0,%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  -0x198(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0xe0(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x198(%rbp)
  movsd  -0xd0(%rbp),%xmm1
  movsd  D36(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,-0x1a0(%rbp)
  movsd  -0x138(%rbp),%xmm1
  movsd  D36(%rip),%xmm0
  movapd %xmm1,%xmm6
  mulsd  %xmm0,%xmm6
  movq   %xmm6,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x1a0(%rbp),%xmm0
  addsd  -0x198(%rbp),%xmm0
  movsd  %xmm0,-0x198(%rbp)
  movsd  -0xc8(%rbp),%xmm1
  movsd  D377(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,-0x1a0(%rbp)
  movsd  -0x138(%rbp),%xmm1
  movsd  D377(%rip),%xmm0
  movapd %xmm1,%xmm7
  mulsd  %xmm0,%xmm7
  movq   %xmm7,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  -0x1a0(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x198(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x40(%rbp),%xmm0
  divsd  -0x188(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x78(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x70(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x78(%rbp),%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x28(%rbp),%xmm0
  mulsd  -0x140(%rbp),%xmm0
  addsd  -0x18(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  D129(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x140(%rbp),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x108(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x58(%rbp),%xmm2
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm3
  addsd  %xmm0,%xmm3
  movsd  -0x20(%rbp),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  %xmm2,%xmm0
  movsd  D36(%rip),%xmm2
  divsd  %xmm2,%xmm0
  movapd %xmm0,%xmm3
  mulsd  -0x140(%rbp),%xmm3
  movsd  -0x140(%rbp),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  movsd  D21(%rip),%xmm2
  divsd  -0x58(%rbp),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  -0x18(%rbp),%xmm0
  addsd  %xmm3,%xmm0
  movapd %xmm0,%xmm2
  subsd  -0x38(%rbp),%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x130(%rbp)
  movsd  -0x138(%rbp),%xmm0
  subsd  -0x130(%rbp),%xmm0
  movsd  %xmm0,-0x138(%rbp)
L116:
  movsd  -0x130(%rbp),%xmm0
  movq   D46(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x98(%rbp),%xmm0
  ja     L105
  mov    -0x158(%rbp),%rax
  movsd  -0x138(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x158(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x120(%rbp),%xmm0
  jbe    L64
  mov    -0x158(%rbp),%rax
  movsd  -0x120(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L102
L64:
  mov    -0x158(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x120(%rbp),%xmm0
  movq   D373(%rip),%xmm2
  xorpd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jbe    L102
  movsd  -0x120(%rbp),%xmm0
  movq   D373(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x158(%rbp),%rax
  movsd  %xmm0,(%rax)
L102:
  movsd  -0x120(%rbp),%xmm0
  movsd  D408(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  mov    -0x158(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D46(%rip),%xmm2
  andpd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jbe    L126
  mov    -0x158(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D46(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x120(%rbp),%xmm2
  movsd  D408(%rip),%xmm0
  addsd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jbe    L126
  mov    -0x160(%rbp),%rax
  movsd  -0x170(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L166
L126:
  movsd  -0x80(%rbp),%xmm0
  mulsd  -0x140(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <asin@plt>
  movq   %xmm0,%rbx
  mov    -0x158(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  divsd  %xmm1,%xmm0
  addsd  -0x170(%rbp),%xmm0
  mov    -0x160(%rbp),%rax
  movsd  %xmm0,(%rax)
L166:
  mov    -0x160(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd D126(%rip),%xmm0
  jbe    L11
  mov    -0x160(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x128(%rbp),%xmm0
  mov    -0x160(%rbp),%rax
  movsd  %xmm0,(%rax)
L11:
  mov    -0x160(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D135(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L84
  mov    -0x160(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  -0x128(%rbp),%xmm0
  mov    -0x160(%rbp),%rax
  movsd  %xmm0,(%rax)
L84:
  mov    -0x160(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd D126(%rip),%xmm0
  jbe    L128
  mov    -0x160(%rbp),%rax
  movsd  D126(%rip),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L7
L128:
  mov    -0x160(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D135(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L7
  mov    -0x160(%rbp),%rax
  movsd  D135(%rip),%xmm0
  movsd  %xmm0,(%rax)
L7:
  mov    -0x160(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Rad_To_Deg@plt>
  movq   %xmm0,%rax
  mov    -0x160(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x158(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <GPS_Math_Rad_To_Deg@plt>
  movq   %xmm0,%rax
  mov    -0x158(%rbp),%rdx
  mov    %rax,(%rdx)
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D486
type: byte[8]
name: disassemble_data
arguments: label: D424
type: byte[8]
name: disassemble_data
arguments: label: D126
type: f64[2]
name: disassemble_data
arguments: label: D329
type: f64
name: disassemble_data
arguments: label: D359
type: f64
name: disassemble_data
arguments: label: D22
type: f64
name: disassemble_data
arguments: label: D36
type: f64
name: disassemble_data
arguments: label: D360
type: f64
name: disassemble_data
arguments: label: D366
type: f64
name: disassemble_data
arguments: label: D489
type: f64
name: disassemble_data
arguments: label: D456
type: f64
name: disassemble_data
arguments: label: D186
type: f64
name: disassemble_data
arguments: label: D446
type: f64
name: disassemble_data
arguments: label: D412
type: f64
name: disassemble_data
arguments: label: D275
type: f64
name: disassemble_data
arguments: label: D116
type: f64
name: disassemble_data
arguments: label: D377
type: f64
name: disassemble_data
arguments: label: D103
type: byte[8]
name: disassemble_data
arguments: label: D373
type: f32[2]
name: disassemble_data
arguments: label: D129
type: f32[2]
name: disassemble_data
arguments: label: D21
type: f64
name: disassemble_data
arguments: label: D46
type: qword
name: disassemble_data
arguments: label: D408
type: byte[8]
name: disassemble_data
arguments: label: D135
type: byte[8]

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

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

tool: {"D126": [3.141592653589,45.0]}

tool: D329: 45

tool: D359: 1024

tool: D22: 3

tool: D36: 4

tool: D360: 1

tool: D366: 64

tool: D489: 5

tool: D456: 256

tool: D186: 8

tool: D446: 32

tool: D412: 15

tool: D275: 35

tool: D116: 3072

tool: D377: 6

tool: {"D103": [0x11,0xea,0x2d,0x81,0x99,0x97,0x71,0x3d]}

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

tool: {"D129": [0.0,1.75]}

tool: D21: 2

tool: D46: 9223372036854775807

tool: {"D408": [0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0x3e]}

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

assistant: ```c
void GPS_Math_Polycon_EN_To_LatLon(double E, double N, double *phi, double *lambda, double phi0, double M0, double E0, double N0, double a, double b) {
  double p2;
  double po2;
  double a2;
  double b2;
  double e2;
  double e4;
  double e6;
  double AM0;
  double c0;
  double c1;
  double c2;
  double c3;
  double j;
  double te4;
  double phi0s2;
  double phi0s4;
  double phi0s6;
  double dx;
  double dy;
  double dxoa;
  double AA;
  double BB;
  double CC = (double)0.;
  double PHIn;
  double PHId;
  double PHIs;
  double PHI;
  double PHIs2;
  double PHIs4;
  double PHIs6;
  double Mn;
  double Mnp;
  double Ma;
  double AAMa;
  double mpb;
  double AAmin;
  double tol;
  double lat;
  phi0 = GPS_Math_Deg_To_Rad(phi0);
  M0 = GPS_Math_Deg_To_Rad(M0);
  p2 = (double)3.141592653589 * (double)2.0;
  po2 = (double)3.141592653589 / (double)2.0;
  if (M0 > 3.141592653589)
    M0 -= p2;
  a2 = a * a;
  b2 = b * b;
  e2 = (a2 - b2) / a2;
  e4 = e2 * e2;
  e6 = e2 * e4;
  j = (double)45.0 * e6 / (double)1024.0;
  te4 = (double)3.0 * e4;
  c0 = (double)1.0 - e2 / (double)4.0 - te4 / (double)64.0 - (double)5.0 * e6 / (double)256.0;
  c1 = (double)3.0 * e2 / (double)8.0 + te4 / (double)32.0 + j;
  c2 = (double)15.0 * e4 / (double)256.0 + j;
  c3 = (double)35.0 * e6 / (double)3072.0;
  lat = c0 * phi0;
  phi0s2 = c1 * sin((double)2.0 * phi0);
  phi0s4 = c2 * sin((double)4.0 * phi0);
  phi0s6 = c3 * sin((double)6.0 * phi0);
  AM0 = a * (lat - phi0s2 + phi0s4 - phi0s6);
  tol = (double)1.0e-12;
  dx = E - E0;
  dy = N - N0;
  dxoa = dx / a;
  if ((((-AM0 - (double)1.) < dy) && (dy < (-AM0 + (double)1.)))) {
    *phi = (double)0.;
    *lambda = dxoa + M0;
  } else {
    AA = (AM0 + dy) / a;
    BB = dxoa * dxoa + (AA * AA);
    PHIn = AA;
    PHId = (double)1.;
    while (fabs(PHId) > tol) {
      PHIs = sin(PHIn);
      CC = pow((double)1. - e2 * PHIs * PHIs, (double).5) * tan(PHIn);
      PHI = PHIn * c0;
      PHIs2 = c1 * sin((double)2.0 * PHIn);
      PHIs4 = c2 * sin((double)4.0 * PHIn);
      PHIs6 = c3 * sin((double)6.0 * PHIn);
      Mn = a * (PHI - PHIs2 + PHIs4 - PHIs6);
      Mnp = c0 - (double)2. * c1 * cos((double)2. * PHIn) + (double)4. * c2 * cos((double)4. * PHIn) - (double)6. * c3 * cos((double)6. * PHIn);
      Ma = Mn / a;
      AAMa = AA * Ma;
      mpb = Ma * Ma + BB;
      AAmin = AA - Ma;
      PHId = (AAMa * CC + AAmin - (double).5 * mpb * CC) / (e2 * PHIs2 * (mpb - (double)2. * AAMa) / (double)4. * CC + AAmin * (CC * Mnp - (double)2. / PHIs2) - Mnp);
      PHIn -= PHId;
    }
    *phi = PHIn;
    if (*phi > po2)
      *phi = po2;
    else if (*phi < -po2)
      *phi = -po2;
    if ((((po2 - (double).00001) < fabs(*phi)) && (fabs(*phi) < (po2 + (double).00001))))
      *lambda = M0;
    else
      *lambda = (asin(dxoa * CC)) / sin(*phi) + M0;
  }
  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;
}
```