user: Translate the below assembly code into C programming language:

```asm
<ApproxDistance>:
  endbr64
  push   %r14
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  movapd %xmm0,%xmm4
  movq   %xmm1,%r12
  movq   %xmm3,%r14
  movsd  D73(%rip),%xmm0
  movapd %xmm4,%xmm5
  mulsd  %xmm0,%xmm5
  mulsd  %xmm0,%xmm2
  lea    0x48(%rsp),%rbx
  lea    0x40(%rsp),%rbp
  movsd  %xmm5,0x8(%rsp)
  movapd %xmm5,%xmm0
  movsd  %xmm2,0x10(%rsp)
  addsd  %xmm2,%xmm0
  mulsd  D56(%rip),%xmm0
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm7
  movsd  %xmm7,0x18(%rsp)
  movsd  0x48(%rsp),%xmm4
  movsd  %xmm4,0x20(%rsp)
  movsd  0x8(%rsp),%xmm0
  subsd  0x10(%rsp),%xmm0
  mulsd  D56(%rip),%xmm0
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm1
  movsd  %xmm1,0x28(%rsp)
  movsd  0x48(%rsp),%xmm6
  movsd  %xmm6,0x30(%rsp)
  movsd  D27(%rip),%xmm1
  movq   %r12,%xmm3
  mulsd  %xmm1,%xmm3
  movapd %xmm3,%xmm0
  movq   %r14,%xmm3
  mulsd  %xmm3,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  D56(%rip),%xmm0
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm2
  movsd  0x30(%rsp),%xmm8
  movapd %xmm8,%xmm6
  mulsd  %xmm8,%xmm6
  movapd %xmm6,%xmm1
  mulsd  %xmm3,%xmm1
  mulsd  %xmm3,%xmm1
  movsd  0x18(%rsp),%xmm7
  movapd %xmm7,%xmm0
  mulsd  %xmm7,%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm0
  movapd %xmm1,%xmm6
  addsd  %xmm0,%xmm6
  movsd  %xmm6,0x8(%rsp)
  movsd  0x28(%rsp),%xmm5
  movapd %xmm5,%xmm1
  mulsd  %xmm5,%xmm1
  mulsd  %xmm3,%xmm1
  mulsd  %xmm3,%xmm1
  movsd  0x20(%rsp),%xmm4
  movapd %xmm4,%xmm0
  mulsd  %xmm4,%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rsp)
  pxor   %xmm0,%xmm0
  ucomisd %xmm1,%xmm0
  ja     L29
  movapd %xmm1,%xmm6
  sqrtsd %xmm6,%xmm6
  movq   %xmm6,%rbx
L14:
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm5
  ucomisd %xmm5,%xmm0
  ja     L20
  sqrtsd %xmm5,%xmm5
  movapd %xmm5,%xmm0
L59:
  movq   %rbx,%xmm1
  call   <atan2@plt>
  movsd  %xmm0,0x38(%rsp)
  movsd  0x8(%rsp),%xmm1
  mulsd  0x10(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  ucomisd %xmm1,%xmm0
  ja     L0
  sqrtsd %xmm1,%xmm1
L34:
  movsd  0x38(%rsp),%xmm7
  divsd  %xmm7,%xmm1
  mulsd  D52(%rip),%xmm1
  movsd  D77(%rip),%xmm3
  movapd %xmm1,%xmm0
  subsd  %xmm3,%xmm0
  movsd  0x10(%rsp),%xmm2
  addsd  %xmm2,%xmm2
  divsd  %xmm2,%xmm0
  movsd  D86(%rip),%xmm4
  mulsd  %xmm4,%xmm0
  movsd  0x20(%rsp),%xmm5
  mulsd  %xmm5,%xmm0
  mulsd  %xmm5,%xmm0
  movsd  0x28(%rsp),%xmm6
  mulsd  %xmm6,%xmm0
  mulsd  %xmm6,%xmm0
  addsd  %xmm3,%xmm0
  addsd  %xmm3,%xmm1
  movsd  0x8(%rsp),%xmm2
  addsd  %xmm2,%xmm2
  divsd  %xmm2,%xmm1
  mulsd  %xmm4,%xmm1
  movsd  0x18(%rsp),%xmm4
  mulsd  %xmm4,%xmm1
  mulsd  %xmm4,%xmm1
  movsd  0x30(%rsp),%xmm3
  mulsd  %xmm3,%xmm1
  mulsd  %xmm3,%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm7,%xmm1
  addsd  %xmm7,%xmm1
  mulsd  D74(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r14
  ret
L29:
  movsd  0x10(%rsp),%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rbx
  jmp    L14
L20:
  movsd  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  jmp    L59
L0:
  movapd %xmm1,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  jmp    L34
```

tool_calls: name: parse_data
arguments: label: D73
type_infered: f64
name: parse_data
arguments: label: D56
type_infered: byte[8]
name: parse_data
arguments: label: D27
type_infered: byte[8]
name: parse_data
arguments: label: D52
type_infered: byte[8]
name: parse_data
arguments: label: D77
type_infered: f64
name: parse_data
arguments: label: D86
type_infered: byte[8]
name: parse_data
arguments: label: D74
type_infered: f64

tool: D73: 0.01745329252

tool: {"D56": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D27": [0x11,0xdd,0x52,0xa2,0x46,0xdf,0x91,0xbf]}

tool: {"D52": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40]}

tool: D77: 1

tool: {"D86": [0x76,0x38,0x67,0xc3,0x49,0x77,0x6b,0x3f]}

tool: D74: 6378.135

assistant: ```c
double ApproxDistance(double lat1, double lon1, double lat2, double lon2) {
  double F, G, L, sing, cosl, cosf, sinl, sinf, cosg, S, C, W, R, H1, H2, D;
  lat1 = 0.01745329252 * lat1;
  lon1 = -0.01745329252 * lon1;
  lat2 = 0.01745329252 * lat2;
  lon2 = -0.01745329252 * lon2;
  F = (lat1 + lat2) / 2.0;
  G = (lat1 - lat2) / 2.0;
  L = (lon1 - lon2) / 2.0;
  sing = sin(G);
  cosl = cos(L);
  cosf = cos(F);
  sinl = sin(L);
  sinf = sin(F);
  cosg = cos(G);
  S = sing * sing * cosl * cosl + cosf * cosf * sinl * sinl;
  C = cosg * cosg * cosl * cosl + sinf * sinf * sinl * sinl;
  W = atan2(sqrt(S), sqrt(C));
  R = sqrt((S * C)) / W;
  H1 = (3 * R - 1.0) / (2.0 * C);
  H2 = (3 * R + 1.0) / (2.0 * S);
  D = 2 * W * 6378.135;
  return (D * (1 + 1.0 / 298.26 * H1 * sinf * sinf * cosg * cosg - 1.0 / 298.26 * H2 * cosf * cosf * sing * sing));
}
```