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

```asm
<dist_az>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movss  %xmm0,-0x34(%rbp)
  movss  %xmm1,-0x38(%rbp)
  movss  %xmm2,-0x3c(%rbp)
  movss  %xmm3,-0x40(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x3c(%rbp),%xmm1
  movsd  D126(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D112(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm6,%xmm6
  cvtsd2ss %xmm0,%xmm6
  movd   %xmm6,%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x10(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x3c(%rbp),%xmm1
  movsd  D126(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D112(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm0,%xmm7
  movd   %xmm7,%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movd   %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x34(%rbp),%xmm1
  movsd  D126(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D112(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm0,%xmm2
  movd   %xmm2,%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x8(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x34(%rbp),%xmm1
  movsd  D126(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D112(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm3
  movd   %xmm3,%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x4(%rbp)
  movss  -0x38(%rbp),%xmm0
  subss  -0x40(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D126(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D112(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0xc(%rbp),%xmm0
  mulss  -0x4(%rbp),%xmm0
  movss  %xmm0,-0x44(%rbp)
  movss  -0x10(%rbp),%xmm0
  movaps %xmm0,%xmm5
  mulss  -0x8(%rbp),%xmm5
  movss  %xmm5,-0x48(%rbp)
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  mulss  -0x48(%rbp),%xmm0
  addss  -0x44(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  cmp    $0x1,%eax
  jle    L52
  movss  D118(%rip),%xmm0
  movss  %xmm0,-0x18(%rbp)
L52:
  movss  -0x18(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mulss  %xmm0,%xmm1
  movss  D118(%rip),%xmm0
  subss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  mov    %edx,%edi
  call   <atan2@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x18(%rbp)
  movss  -0x18(%rbp),%xmm1
  movss  D209(%rip),%xmm0
  mulss  %xmm1,%xmm0
  mov    -0x28(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x28(%rbp),%rax
  movss  (%rax),%xmm1
  movss  D71(%rip),%xmm0
  comiss %xmm1,%xmm0
  jbe    L104
  mov    -0x28(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  jmp    L58
L104:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x1c(%rbp),%xmm1
  movsd  D33(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L46
  pxor   %xmm1,%xmm1
  cvtss2sd -0x1c(%rbp),%xmm1
  movsd  D95(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
L46:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x1c(%rbp),%xmm0
  comisd D126(%rip),%xmm0
  jbe    L7
  pxor   %xmm0,%xmm0
  cvtss2sd -0x1c(%rbp),%xmm0
  movsd  D95(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
L7:
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movd   %xmm0,%eax
  movd   %eax,%xmm1
  mulss  -0x4(%rbp),%xmm1
  movss  -0xc(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x44(%rbp)
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movd   %xmm0,%eax
  movd   %eax,%xmm1
  mulss  -0x8(%rbp),%xmm1
  movss  -0x44(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  cmp    $0x1,%eax
  jle    L42
  movss  D118(%rip),%xmm0
  movss  %xmm0,-0x14(%rbp)
L42:
  movss  -0x14(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mulss  %xmm0,%xmm1
  movss  D118(%rip),%xmm0
  subss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  movd   %eax,%xmm0
  mov    %edx,%edi
  call   <atan2@plt>
  movd   %xmm0,%eax
  mov    -0x30(%rbp),%rdx
  mov    %eax,(%rdx)
  pxor   %xmm0,%xmm0
  ucomiss -0x1c(%rbp),%xmm0
  jp     L66
  pxor   %xmm0,%xmm0
  ucomiss -0x1c(%rbp),%xmm0
  jne    L66
  movss  -0x34(%rbp),%xmm0
  comiss -0x3c(%rbp),%xmm0
  jbe    L53
  mov    -0x30(%rbp),%rax
  movss  D200(%rip),%xmm0
  movss  %xmm0,(%rax)
  jmp    L58
L53:
  mov    -0x30(%rbp),%rax
  movss  D140(%rip),%xmm0
  movss  %xmm0,(%rax)
  jmp    L58
L66:
  movss  -0x1c(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm1,%xmm0
  jbe    L58
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D95(%rip),%xmm0
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    -0x30(%rbp),%rax
  movss  %xmm0,(%rax)
L58:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D126
data_type: f64[2]
name: read_data
arguments: tag: D112
data_type: byte[8]
name: read_data
arguments: tag: D118
data_type: byte[4]
name: read_data
arguments: tag: D209
data_type: byte[4]
name: read_data
arguments: tag: D71
data_type: byte[4]
name: read_data
arguments: tag: D33
data_type: byte[8]
name: read_data
arguments: tag: D95
data_type: byte[8]
name: read_data
arguments: tag: D200
data_type: byte[4]
name: read_data
arguments: tag: D140
data_type: byte[4]

tool: {"D126": [3.141592653589793,180.0]}

tool: {"D112": [0x00,0x00,0x00,0x00,0x00,0x80,0x66,0x40]}

tool: {"D118": [0x00,0x00,0x80,0x3f]}

tool: {"D209": [0x00,0xf0,0xc6,0x45]}

tool: {"D71": [0x00,0x00,0xa0,0x40]}

tool: {"D33": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x09,0xc0]}

tool: {"D95": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0x40]}

tool: {"D200": [0xdb,0x0f,0x49,0x40]}

tool: {"D140": [0xdb,0x0f,0xc9,0x40]}

assistant: ```c
void dist_az(float *dist, float *azimuth, float lat, float lon, float dxlat, float dxlon) {
  float sin_dxl, cos_dxl;
  float sin_lat, cos_lat;
  float t1, t2, t3;
  cos_dxl = cos(3.1415926535897932 * dxlat / 180);
  sin_dxl = sin(3.1415926535897932 * dxlat / 180);
  cos_lat = cos(3.1415926535897932 * lat / 180);
  sin_lat = sin(3.1415926535897932 * lat / 180);
  t1 = 3.1415926535897932 * (lon - dxlon) / 180;
  t2 = sin_dxl * sin_lat + cos_dxl * cos_lat * cos(t1);
  if (fabs(t2) > 1)
    t2 = 1;
  t2 = atan2(sqrt(1 - t2 * t2), t2);
  dist[0] = t2 * 6366;
  if (dist[0] < 5) {
    dist[0] = 0;
    azimuth[0] = 0;
    return;
  }
  if (t1 < -3.1415926535897932)
    t1 += 2 * 3.1415926535897932;
  if (t1 > 3.1415926535897932)
    t1 -= 2 * 3.1415926535897932;
  t3 = (sin_dxl - sin_lat * cos(t2)) / (cos_lat * sin(t2));
  if (fabs(t3) > 1)
    t3 = 1;
  azimuth[0] = atan2(sqrt(1 - t3 * t3), t3);
  if (t1 == 0) {
    if (dxlat < lat) {
      azimuth[0] = 3.1415926535897932;
    } else {
      azimuth[0] = 2 * 3.1415926535897932;
    }
  } else {
    if (t1 > 0)
      azimuth[0] = 2 * 3.1415926535897932 - azimuth[0];
  }
}
```