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

```asm
<GaussProjCal>:
  endbr64
  push   %r12
  mov    $0x10,%edi
  push   %rbp
  sub    $0x48,%rsp
  movsd  %xmm0,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <malloc@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  D87(%rip),%xmm3
  movsd  0x18(%rsp),%xmm0
  subsd  0x8(%rsp),%xmm0
  mov    %rax,%r12
  movapd %xmm1,%xmm6
  mulsd  %xmm3,%xmm6
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  cvttsd2si %xmm6,%ebp
  movsd  %xmm6,0x8(%rsp)
  movsd  %xmm2,0x38(%rsp)
  mov    %ebp,%edi
  call   <sin@plt>
  mov    %ebp,%edi
  movsd  %xmm0,0x10(%rsp)
  call   <sin@plt>
  movsd  0x10(%rsp),%xmm1
  mulsd  D267(%rip),%xmm1
  movapd %xmm0,%xmm3
  movapd %xmm1,%xmm0
  movsd  D240(%rip),%xmm1
  mulsd  %xmm3,%xmm0
  subsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%edi
  call   <sqrt@plt>
  movsd  D187(%rip),%xmm4
  divsd  %xmm0,%xmm4
  movsd  0x8(%rsp),%xmm0
  movsd  %xmm4,0x30(%rsp)
  call   <tan@plt>
  movsd  %xmm0,0x28(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <cos@plt>
  movsd  0x8(%rsp),%xmm6
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm0,%xmm3
  mulsd  D169(%rip),%xmm3
  movapd %xmm6,%xmm0
  addsd  %xmm6,%xmm0
  cvttsd2si %xmm0,%edi
  movsd  %xmm3,0x18(%rsp)
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm6
  movsd  D177(%rip),%xmm5
  mulsd  D128(%rip),%xmm0
  mulsd  %xmm6,%xmm5
  addsd  %xmm0,%xmm5
  movsd  D63(%rip),%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm5,0x10(%rsp)
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  movsd  D42(%rip),%xmm2
  mulsd  0x8(%rsp),%xmm2
  mulsd  D225(%rip),%xmm0
  addsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm2,%edi
  movsd  %xmm0,0x10(%rsp)
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm6
  mulsd  D179(%rip),%xmm6
  mulsd  D148(%rip),%xmm0
  movsd  0x10(%rsp),%xmm2
  cvttsd2si %xmm6,%edi
  addsd  %xmm0,%xmm2
  movsd  %xmm2,0x10(%rsp)
  call   <sin@plt>
  movsd  0x18(%rsp),%xmm3
  mov    %r12,%rax
  movsd  D103(%rip),%xmm5
  movsd  0x28(%rsp),%xmm9
  movapd %xmm0,%xmm11
  movsd  D258(%rip),%xmm0
  mulsd  %xmm3,%xmm5
  movsd  0x30(%rsp),%xmm4
  movsd  0x20(%rsp),%xmm1
  movapd %xmm9,%xmm6
  movapd %xmm0,%xmm7
  movsd  0x38(%rsp),%xmm2
  movsd  D44(%rip),%xmm8
  mulsd  %xmm9,%xmm6
  mulsd  D185(%rip),%xmm11
  addsd  0x10(%rsp),%xmm11
  mulsd  %xmm9,%xmm8
  mulsd  %xmm3,%xmm5
  mulsd  D93(%rip),%xmm11
  subsd  %xmm6,%xmm7
  movapd %xmm6,%xmm10
  mulsd  %xmm9,%xmm10
  mulsd  %xmm9,%xmm8
  addsd  %xmm7,%xmm5
  movsd  D63(%rip),%xmm7
  mulsd  %xmm3,%xmm7
  mulsd  %xmm9,%xmm10
  mulsd  %xmm3,%xmm7
  mulsd  %xmm3,%xmm7
  mulsd  %xmm3,%xmm7
  addsd  %xmm7,%xmm5
  movapd %xmm4,%xmm7
  divsd  D30(%rip),%xmm7
  mulsd  %xmm9,%xmm7
  mulsd  %xmm1,%xmm7
  mulsd  %xmm1,%xmm7
  mulsd  %xmm1,%xmm7
  mulsd  %xmm1,%xmm7
  mulsd  %xmm7,%xmm5
  movsd  D253(%rip),%xmm7
  mulsd  %xmm4,%xmm7
  mulsd  %xmm2,%xmm5
  mulsd  %xmm9,%xmm7
  mulsd  %xmm2,%xmm5
  mulsd  %xmm1,%xmm7
  mulsd  %xmm2,%xmm5
  mulsd  %xmm1,%xmm7
  mulsd  %xmm2,%xmm5
  mulsd  %xmm2,%xmm7
  mulsd  %xmm2,%xmm7
  addsd  %xmm11,%xmm7
  movsd  D286(%rip),%xmm11
  mulsd  %xmm3,%xmm11
  addsd  %xmm7,%xmm5
  movsd  D52(%rip),%xmm7
  subsd  %xmm8,%xmm7
  mulsd  %xmm3,%xmm8
  mulsd  %xmm3,%xmm11
  addsd  %xmm10,%xmm7
  mulsd  %xmm3,%xmm8
  addsd  %xmm11,%xmm7
  movsd  D243(%rip),%xmm11
  mulsd  %xmm3,%xmm11
  mulsd  %xmm3,%xmm11
  mulsd  %xmm9,%xmm11
  mulsd  %xmm9,%xmm11
  subsd  %xmm11,%xmm7
  movapd %xmm4,%xmm11
  divsd  D254(%rip),%xmm11
  mulsd  %xmm9,%xmm11
  mulsd  %xmm1,%xmm11
  mulsd  %xmm1,%xmm11
  mulsd  %xmm1,%xmm11
  mulsd  %xmm1,%xmm11
  mulsd  %xmm1,%xmm11
  mulsd  %xmm1,%xmm11
  mulsd  %xmm11,%xmm7
  mulsd  %xmm2,%xmm7
  mulsd  %xmm2,%xmm7
  mulsd  %xmm2,%xmm7
  mulsd  %xmm2,%xmm7
  mulsd  %xmm2,%xmm7
  mulsd  %xmm2,%xmm7
  addsd  %xmm7,%xmm5
  movsd  D240(%rip),%xmm7
  subsd  %xmm6,%xmm7
  movsd  %xmm5,(%r12)
  movsd  D106(%rip),%xmm5
  mulsd  %xmm9,%xmm5
  mulsd  %xmm9,%xmm5
  subsd  %xmm5,%xmm0
  movsd  D180(%rip),%xmm5
  mulsd  %xmm3,%xmm5
  addsd  %xmm10,%xmm0
  mulsd  %xmm3,%xmm5
  mulsd  %xmm3,%xmm3
  addsd  %xmm5,%xmm0
  movapd %xmm4,%xmm5
  divsd  D203(%rip),%xmm5
  mulsd  %xmm1,%xmm5
  addsd  %xmm7,%xmm3
  subsd  %xmm8,%xmm0
  mulsd  %xmm1,%xmm5
  mulsd  %xmm1,%xmm5
  mulsd  %xmm1,%xmm5
  mulsd  %xmm1,%xmm5
  mulsd  %xmm5,%xmm0
  movapd %xmm4,%xmm5
  divsd  D42(%rip),%xmm5
  mulsd  %xmm1,%xmm5
  mulsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm5
  mulsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm5
  mulsd  %xmm4,%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  %xmm5,%xmm3
  mulsd  %xmm2,%xmm1
  addsd  D56(%rip),%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm3
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm3
  mulsd  %xmm2,%xmm3
  addsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%r12)
  add    $0x48,%rsp
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D87
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D267
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D240
type_infered: f64
name: retrieve_data
arguments: data_label: D187
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D169
type_infered: f64
name: retrieve_data
arguments: data_label: D177
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D128
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D63
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D42
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D225
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D179
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D148
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D103
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D258
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D44
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D185
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D93
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D30
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D253
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D286
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D52
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D243
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D254
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D106
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D180
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D203
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D56
type_infered: byte[8]

tool: {"D87": [0x39,0x9d,0x52,0xa2,0x46,0xdf,0x91,0x3f]}

tool: {"D267": [0x8f,0xf9,0xf6,0xf2,0x90,0x6b,0x7b,0x3f]}

tool: D240: 1

tool: {"D187": [0x00,0x00,0x00,0x40,0xa6,0x54,0x58,0x41]}

tool: D169: 0.0067395

tool: {"D177": [0xf2,0x36,0x9f,0xee,0xb1,0x14,0xf0,0x3f]}

tool: {"D128": [0xa4,0x8a,0x2c,0xdd,0x0d,0xbd,0x64,0xbf]}

tool: {"D63": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: {"D42": [0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x40]}

tool: {"D225": [0x68,0xb6,0x02,0xb4,0xa3,0x49,0xc6,0x3e]}

tool: {"D179": [0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x40]}

tool: {"D148": [0x39,0xb1,0xb4,0xb6,0x93,0xcd,0x2d,0xbe]}

tool: {"D103": [0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x40]}

tool: {"D258": [0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x40]}

tool: {"D44": [0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x40]}

tool: {"D185": [0xda,0xc8,0x6d,0x2e,0x47,0x3a,0x95,0x3d]}

tool: {"D93": [0xdd,0xe3,0xf0,0xd4,0xf3,0x2a,0x58,0x41]}

tool: {"D30": [0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x40]}

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

tool: {"D286": [0x00,0x00,0x00,0x00,0x00,0xe0,0x70,0x40]}

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

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

tool: {"D254": [0x00,0x00,0x00,0x00,0x00,0x80,0x86,0x40]}

tool: {"D106": [0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x40]}

tool: {"D180": [0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0x40]}

tool: {"D203": [0x00,0x00,0x00,0x00,0x00,0x00,0x5e,0x40]}

tool: {"D56": [0x00,0x00,0x00,0x00,0x80,0x84,0x1e,0x41]}

assistant: ```c
double *GaussProjCal(double L, double B, double L0) {
  double a, b, N;
  double f, l, t;
  double e, e1, e2;
  double *xy = (double *)malloc(2 * sizeof(double));
  double A0, A2, A4, A6, A8;
  double X, yt;
  a = 6378137;
  b = 6356752.3142;
  f = 1 / 298.257;
  e1 = 0.006694385;
  e2 = 0.00673950;
  double db = 3.141592653589793 / 180.0;
  B = B * db;
  l = (L - L0) * db;
  L = L * db;
  e = (a * a - b * b) / (a * a);
  N = a / sqrt(1 - e * sin(B) * sin(B));
  t = tan(B);
  yt = e2 * cos(B);
  A0 = 1 + e * 3 / 4 + e * e * 45 / 64 + e * e * e * 350 / 512 + e * e * e * e * 11025 / 16384;
  A2 = -(1.0 / 2) * (e * 3 / 4 + e * e * 60 / 64 + e * e * e * 525 / 512 + e * e * e * e * 17640 / 16384);
  A4 = (1.0 / 4) * (e * e * 15 / 64 + e * e * e * 210 / 512 + e * e * e * e * 8820 / 16384);
  A6 = -(1.0 / 6) * (e * e * e * 35 / 512 + e * e * e * e * 2520 / 16384);
  A8 = (1.0 / 8) * (e * e * e * e * 315 / 16384);
  X = a * (1 - e) * (A0 * B + A2 * sin(B * 2) + A4 * sin(4 * B) + A6 * sin(6 * B) + A8 * sin(8 * B));
  xy[0] = X + (N / 2) * t * cos(B) * cos(B) * l * l + (N / 24) * t * cos(B) * cos(B) * cos(B) * cos(B) * (5 - t * t + 9 * yt * yt + 4 * yt * yt * yt * yt) * l * l * l * l + (N / 720) * t * cos(B) * cos(B) * cos(B) * cos(B) * cos(B) * cos(B) * (61 - 58 * t * t + t * t * t * t + 270 * yt * yt - 330 * yt * yt * t * t) * l * l * l * l * l * l;
  xy[1] = 500000 + N * cos(B) * l + (N / 6) * cos(B) * cos(B) * cos(B) * (1 - t * t + yt * yt) * l * l * l + (N / 120) * cos(B) * cos(B) * cos(B) * cos(B) * cos(B) * (5 - 18 * t * t + t * t * t * t + 14 * yt * yt - 58 * t * t * yt * yt) * l * l * l * l * l;
  return xy;
}
```