user: Please show me the C implementation that matches the assembly code listed below:

```asm
<latLongToOsGrid>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,%r13
  mov    %rsi,%rbx
  movsd  D274(%rip),%xmm2
  movapd %xmm2,%xmm5
  mulsd  (%rdi),%xmm5
  mulsd  (%rsi),%xmm2
  movsd  %xmm2,0x38(%rsp)
  movsd  %xmm5,0x10(%rsp)
  cvttsd2si %xmm5,%ebp
  mov    %ebp,%edi
  call   <cos@plt>
  pxor   %xmm14,%xmm14
  cvtsi2sd %eax,%xmm14
  movsd  %xmm14,0x18(%rsp)
  mov    %ebp,%edi
  call   <sin@plt>
  pxor   %xmm15,%xmm15
  cvtsi2sd %eax,%xmm15
  movapd %xmm15,%xmm0
  mulsd  D118(%rip),%xmm0
  movsd  %xmm15,0x40(%rsp)
  mulsd  %xmm15,%xmm0
  movsd  D192(%rip),%xmm1
  subsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%ebp
  mov    %ebp,%edi
  call   <sqrt@plt>
  movsd  D193(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x20(%rsp)
  movsd  D44(%rip),%xmm0
  mov    %ebp,%edi
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movsd  D141(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  0x20(%rsp),%xmm3
  divsd  %xmm0,%xmm3
  movapd %xmm3,%xmm12
  movsd  %xmm3,0x30(%rsp)
  subsd  D192(%rip),%xmm12
  movsd  %xmm12,0x48(%rsp)
  movsd  0x10(%rsp),%xmm7
  subsd  D275(%rip),%xmm7
  movsd  %xmm7,(%rsp)
  cvttsd2si %xmm7,%edi
  call   <sin@plt>
  mov    %eax,%ebp
  movsd  D275(%rip),%xmm2
  addsd  0x10(%rsp),%xmm2
  movsd  %xmm2,0x8(%rsp)
  cvttsd2si %xmm2,%edi
  call   <cos@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  mulsd  D16(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x50(%rsp)
  movsd  (%rsp),%xmm4
  movapd %xmm4,%xmm7
  addsd  %xmm4,%xmm7
  cvttsd2si %xmm7,%edi
  call   <sin@plt>
  mov    %eax,%ebp
  movsd  0x8(%rsp),%xmm2
  movapd %xmm2,%xmm6
  addsd  %xmm2,%xmm6
  cvttsd2si %xmm6,%edi
  call   <cos@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  mulsd  D291(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movapd %xmm0,%xmm9
  mulsd  %xmm1,%xmm9
  movsd  %xmm9,0x58(%rsp)
  movsd  D256(%rip),%xmm1
  mulsd  (%rsp),%xmm1
  cvttsd2si %xmm1,%edi
  call   <sin@plt>
  mov    %eax,%r12d
  movsd  D256(%rip),%xmm1
  mulsd  0x8(%rsp),%xmm1
  cvttsd2si %xmm1,%edi
  call   <cos@plt>
  mov    %eax,%ebp
  movsd  0x18(%rsp),%xmm14
  movapd %xmm14,%xmm7
  mulsd  %xmm14,%xmm7
  mulsd  %xmm14,%xmm7
  movapd %xmm7,%xmm6
  movapd %xmm14,%xmm7
  movsd  %xmm6,0x8(%rsp)
  mulsd  %xmm6,%xmm7
  movapd %xmm7,%xmm1
  mulsd  %xmm14,%xmm1
  movsd  %xmm1,0x28(%rsp)
  movsd  0x10(%rsp),%xmm0
  call   <tan@plt>
  movapd %xmm0,%xmm6
  mulsd  %xmm0,%xmm6
  movapd %xmm6,%xmm5
  mulsd  %xmm6,%xmm5
  movapd %xmm5,%xmm4
  movapd %xmm6,%xmm5
  mulsd  D5(%rip),%xmm5
  movsd  0x38(%rsp),%xmm2
  addsd  D34(%rip),%xmm2
  movapd %xmm2,%xmm9
  mulsd  %xmm2,%xmm9
  movapd %xmm2,%xmm8
  mulsd  %xmm9,%xmm8
  movapd %xmm8,%xmm10
  movapd %xmm2,%xmm7
  mulsd  %xmm8,%xmm7
  movapd %xmm2,%xmm8
  mulsd  %xmm7,%xmm8
  movapd %xmm8,%xmm3
  movapd %xmm6,%xmm1
  mulsd  D20(%rip),%xmm1
  movsd  D142(%rip),%xmm8
  movapd %xmm8,%xmm0
  subsd  %xmm1,%xmm0
  addsd  %xmm4,%xmm0
  movsd  0x48(%rsp),%xmm12
  movapd %xmm12,%xmm1
  mulsd  D11(%rip),%xmm1
  addsd  %xmm1,%xmm0
  movapd %xmm12,%xmm1
  mulsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm0
  movsd  0x20(%rsp),%xmm13
  movapd %xmm13,%xmm1
  divsd  D297(%rip),%xmm1
  mulsd  0x28(%rsp),%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  movapd %xmm13,%xmm1
  divsd  D212(%rip),%xmm1
  mulsd  0x8(%rsp),%xmm1
  movsd  0x30(%rsp),%xmm11
  subsd  %xmm6,%xmm11
  mulsd  %xmm11,%xmm1
  mulsd  %xmm10,%xmm1
  movsd  0x18(%rsp),%xmm14
  movapd %xmm14,%xmm10
  mulsd  %xmm13,%xmm10
  mulsd  %xmm2,%xmm10
  addsd  D273(%rip),%xmm10
  addsd  %xmm10,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%r13)
  movsd  (%rsp),%xmm0
  mulsd  D154(%rip),%xmm0
  subsd  0x50(%rsp),%xmm0
  addsd  0x58(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %r12d,%xmm1
  mulsd  D99(%rip),%xmm1
  pxor   %xmm10,%xmm10
  cvtsi2sd %ebp,%xmm10
  mulsd  %xmm10,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  D262(%rip),%xmm0
  subsd  D55(%rip),%xmm0
  movapd %xmm13,%xmm1
  mulsd  D254(%rip),%xmm1
  movsd  0x40(%rsp),%xmm15
  mulsd  %xmm15,%xmm1
  mulsd  %xmm14,%xmm1
  mulsd  %xmm9,%xmm1
  addsd  %xmm1,%xmm0
  movapd %xmm13,%xmm1
  divsd  D271(%rip),%xmm1
  mulsd  %xmm15,%xmm1
  mulsd  0x8(%rsp),%xmm1
  subsd  %xmm6,%xmm8
  movapd %xmm12,%xmm6
  mulsd  D26(%rip),%xmm6
  addsd  %xmm6,%xmm8
  mulsd  %xmm8,%xmm1
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  divsd  D29(%rip),%xmm13
  movapd %xmm13,%xmm1
  mulsd  %xmm15,%xmm1
  mulsd  0x28(%rsp),%xmm1
  movsd  D76(%rip),%xmm6
  subsd  %xmm5,%xmm6
  addsd  %xmm6,%xmm4
  mulsd  %xmm4,%xmm1
  mulsd  %xmm3,%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx)
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: parse_data
arguments: label: D274
datatype: byte[8]
name: parse_data
arguments: label: D118
datatype: byte[8]
name: parse_data
arguments: label: D192
datatype: f64
name: parse_data
arguments: label: D193
datatype: byte[8]
name: parse_data
arguments: label: D44
datatype: f64
name: parse_data
arguments: label: D141
datatype: byte[8]
name: parse_data
arguments: label: D275
datatype: byte[8]
name: parse_data
arguments: label: D16
datatype: byte[8]
name: parse_data
arguments: label: D291
datatype: byte[8]
name: parse_data
arguments: label: D256
datatype: f64
name: parse_data
arguments: label: D5
datatype: f64
name: parse_data
arguments: label: D34
datatype: byte[8]
name: parse_data
arguments: label: D20
datatype: f64
name: parse_data
arguments: label: D142
datatype: f64
name: parse_data
arguments: label: D11
datatype: f64
name: parse_data
arguments: label: D297
datatype: f64
name: parse_data
arguments: label: D212
datatype: f64
name: parse_data
arguments: label: D273
datatype: byte[8]
name: parse_data
arguments: label: D154
datatype: byte[8]
name: parse_data
arguments: label: D99
datatype: byte[8]
name: parse_data
arguments: label: D262
datatype: byte[8]
name: parse_data
arguments: label: D55
datatype: byte[8]
name: parse_data
arguments: label: D254
datatype: byte[8]
name: parse_data
arguments: label: D271
datatype: f64
name: parse_data
arguments: label: D26
datatype: f64
name: parse_data
arguments: label: D29
datatype: f64
name: parse_data
arguments: label: D76
datatype: f64

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

tool: {"D118": [0x00,0x2a,0x71,0x77,0x91,0x52,0x7b,0x3f]}

tool: D192: 1

tool: {"D193": [0xf7,0x85,0xc8,0x1e,0x9b,0x51,0x58,0x41]}

tool: D44: 1.5

tool: {"D141": [0x18,0x7d,0xb0,0xe9,0x13,0x28,0x58,0x41]}

tool: {"D275": [0xbf,0x80,0x8e,0x28,0xe4,0x5d,0xeb,0x3f]}

tool: {"D16": [0xc1,0xe3,0x0b,0x17,0x50,0x98,0x74,0x3f]}

tool: {"D291": [0x09,0xcf,0xe7,0x1d,0x4c,0x86,0xc7,0x3e]}

tool: D256: 3

tool: D5: 58

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

tool: D20: 18

tool: D142: 5

tool: D11: 14

tool: D297: 120

tool: D212: 6

tool: {"D273": [0x00,0x00,0x00,0x00,0x00,0x6a,0x18,0x41]}

tool: {"D154": [0x96,0xfc,0x72,0x70,0xdd,0x06,0xf0,0x3f]}

tool: {"D99": [0xbd,0xe6,0x0c,0xda,0x9d,0x1e,0x34,0x3e]}

tool: {"D262": [0xc8,0xc6,0x53,0x9f,0xce,0x3c,0x58,0x41]}

tool: {"D55": [0x00,0x00,0x00,0x00,0x00,0x6a,0xf8,0x40]}

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

tool: D271: 24

tool: D26: 9

tool: D29: 720

tool: D76: 61

assistant: ```c
void latLongToOsGrid(double *x, double *y) {
  double lat = *x * .0174532925199432958;
  double lon = *y * .0174532925199432958;
  double a = 6377563.396, b = 6356256.909;
  double F0 = 0.9996012717;
  double lat0 = 49 * .0174532925199432958, lon0 = -2 * .0174532925199432958;
  int N0 = -100000, E0 = 400000;
  double e2 = 1 - (b * b) / (a * a);
  double n = (a - b) / (a + b), n2 = n * n, n3 = n * n * n;
  double cosLat = cos(lat), sinLat = sin(lat);
  double nu = a * F0 / sqrt(1 - e2 * sinLat * sinLat);
  double rho = a * F0 * (1 - e2) / pow(1 - e2 * sinLat * sinLat, 1.5);
  double eta2 = nu / rho - 1;
  double Ma = (1 + n + (5 / 4) * n2 + (5 / 4) * n3) * (lat - lat0);
  double Mb = (3 * n + 3 * n * n + (21 / 8) * n3) * sin(lat - lat0) * cos(lat + lat0);
  double Mc = ((15 / 8) * n2 + (15 / 8) * n3) * sin(2 * (lat - lat0)) * cos(2 * (lat + lat0));
  double Md = (35 / 24) * n3 * sin(3 * (lat - lat0)) * cos(3 * (lat + lat0));
  double M = b * F0 * (Ma - Mb + Mc - Md);
  double cos3lat = cosLat * cosLat * cosLat;
  double cos5lat = cos3lat * cosLat * cosLat;
  double tan2lat = tan(lat) * tan(lat);
  double tan4lat = tan2lat * tan2lat;
  double I = M + N0;
  double II = (nu / 2) * sinLat * cosLat;
  double III = (nu / 24) * sinLat * cos3lat * (5 - tan2lat + 9 * eta2);
  double IIIA = (nu / 720) * sinLat * cos5lat * (61 - 58 * tan2lat + tan4lat);
  double IV = nu * cosLat;
  double V = (nu / 6) * cos3lat * (nu / rho - tan2lat);
  double VI = (nu / 120) * cos5lat * (5 - 18 * tan2lat + tan4lat + 14 * eta2 - 58 * tan2lat * eta2);
  double dLon = lon - lon0;
  double dLon2 = dLon * dLon, dLon3 = dLon2 * dLon, dLon4 = dLon3 * dLon, dLon5 = dLon4 * dLon, dLon6 = dLon5 * dLon;
  double N = I + II * dLon2 + III * dLon4 + IIIA * dLon6;
  double E = E0 + IV * dLon + V * dLon3 + VI * dLon5;
  *x = E;
  *y = N;
}
```