user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<doubles_xytcov_inv>:
  endbr64
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x38,%rsp
  movsd  (%rdi),%xmm4
  movsd  0x8(%rdi),%xmm13
  movsd  0x10(%rdi),%xmm0
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm13,0x10(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <sin@plt>
  pxor   %xmm5,%xmm5
  movsd  0x8(%rsp),%xmm0
  cvtsi2sd %rax,%xmm5
  movsd  %xmm5,(%rsp)
  call   <cos@plt>
  pxor   %xmm0,%xmm0
  movsd  0x18(%rsp),%xmm4
  movq   D9(%rip),%xmm9
  cvtsi2sd %rax,%xmm0
  movsd  0x10(%rsp),%xmm13
  movsd  (%rsp),%xmm5
  movapd %xmm4,%xmm7
  movsd  0x0(%rbp),%xmm8
  movsd  0x28(%rbp),%xmm10
  movapd %xmm13,%xmm3
  movapd %xmm5,%xmm2
  movsd  0x10(%rbp),%xmm11
  movsd  0x40(%rbp),%xmm12
  mulsd  %xmm5,%xmm7
  xorpd  %xmm9,%xmm2
  mulsd  %xmm0,%xmm4
  movapd %xmm0,%xmm1
  movsd  0x8(%rbp),%xmm0
  mulsd  %xmm5,%xmm13
  xorpd  %xmm9,%xmm1
  mulsd  %xmm1,%xmm3
  movapd %xmm1,%xmm15
  mulsd  %xmm8,%xmm15
  mulsd  %xmm5,%xmm8
  movsd  %xmm4,0x10(%rsp)
  movapd %xmm4,%xmm6
  movapd %xmm0,%xmm4
  addsd  %xmm0,%xmm4
  addsd  %xmm13,%xmm6
  addsd  %xmm7,%xmm3
  movsd  0x20(%rbp),%xmm7
  movsd  %xmm12,0x40(%rbx)
  movapd %xmm11,%xmm12
  addsd  %xmm11,%xmm12
  movsd  %xmm7,0x28(%rsp)
  mulsd  %xmm5,%xmm8
  movapd %xmm7,%xmm14
  movapd %xmm10,%xmm7
  movsd  %xmm4,0x18(%rsp)
  mulsd  %xmm1,%xmm4
  addsd  %xmm10,%xmm7
  movsd  %xmm12,(%rsp)
  mulsd  %xmm2,%xmm14
  movsd  0x40(%rbx),%xmm12
  movsd  %xmm7,0x8(%rsp)
  mulsd  %xmm3,%xmm12
  movapd %xmm15,%xmm7
  mulsd  %xmm1,%xmm7
  mulsd  %xmm2,%xmm4
  addsd  %xmm4,%xmm7
  movsd  (%rsp),%xmm4
  mulsd  %xmm1,%xmm4
  mulsd  %xmm3,%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm14,%xmm7
  mulsd  %xmm2,%xmm7
  addsd  %xmm4,%xmm7
  movsd  0x8(%rsp),%xmm4
  mulsd  %xmm2,%xmm4
  mulsd  %xmm3,%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm12,%xmm7
  mulsd  %xmm3,%xmm7
  addsd  %xmm7,%xmm4
  movapd %xmm2,%xmm7
  mulsd  %xmm10,%xmm7
  movsd  %xmm4,(%rbx)
  movapd %xmm1,%xmm4
  mulsd  %xmm11,%xmm4
  movsd  %xmm7,0x20(%rsp)
  movapd %xmm2,%xmm7
  mulsd  %xmm0,%xmm7
  mulsd  %xmm1,%xmm0
  mulsd  %xmm11,%xmm2
  addsd  %xmm15,%xmm7
  movapd %xmm3,%xmm15
  addsd  %xmm14,%xmm0
  mulsd  %xmm11,%xmm15
  movapd %xmm3,%xmm14
  mulsd  %xmm10,%xmm14
  addsd  %xmm15,%xmm7
  movsd  0x20(%rsp),%xmm15
  addsd  %xmm14,%xmm0
  movapd %xmm15,%xmm14
  mulsd  %xmm5,%xmm7
  addsd  %xmm4,%xmm14
  xorpd  %xmm9,%xmm4
  mulsd  %xmm1,%xmm0
  subsd  %xmm15,%xmm4
  subsd  %xmm12,%xmm4
  addsd  %xmm7,%xmm0
  movapd %xmm14,%xmm7
  movsd  0x28(%rsp),%xmm14
  addsd  %xmm12,%xmm7
  movsd  %xmm4,0x10(%rbx)
  mulsd  %xmm1,%xmm14
  mulsd  %xmm6,%xmm7
  addsd  %xmm7,%xmm0
  movsd  0x18(%rsp),%xmm7
  mulsd  %xmm5,%xmm7
  mulsd  (%rsp),%xmm5
  movsd  %xmm0,0x8(%rbx)
  movsd  %xmm0,0x18(%rbx)
  movsd  0x40(%rbx),%xmm0
  mulsd  %xmm6,%xmm0
  mulsd  %xmm1,%xmm7
  mulsd  %xmm6,%xmm5
  addsd  %xmm8,%xmm7
  addsd  %xmm7,%xmm5
  movapd %xmm14,%xmm7
  mulsd  %xmm1,%xmm7
  addsd  %xmm7,%xmm5
  movsd  0x8(%rsp),%xmm7
  mulsd  %xmm1,%xmm7
  mulsd  %xmm10,%xmm1
  mulsd  %xmm6,%xmm7
  mulsd  %xmm0,%xmm6
  subsd  %xmm1,%xmm2
  subsd  %xmm0,%xmm2
  movapd %xmm13,%xmm0
  addsd  %xmm7,%xmm5
  xorpd  %xmm9,%xmm0
  movsd  %xmm2,0x28(%rbx)
  addsd  %xmm6,%xmm5
  movsd  %xmm5,0x20(%rbx)
  movsd  %xmm4,0x30(%rbx)
  subsd  0x10(%rsp),%xmm0
  movsd  %xmm2,0x38(%rbx)
  movsd  %xmm3,0x8(%r13)
  movsd  %xmm0,0x0(%r13)
  movsd  0x10(%r12),%xmm0
  xorpd  %xmm9,%xmm0
  movsd  %xmm0,0x10(%r13)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D9
type: f32[2]

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

assistant: ```c
void doubles_xytcov_inv(const double xyta[3], const double Ca[9], double xytr[3], double Cr[9]) {
  double x = xyta[0], y = xyta[1], theta = xyta[2];
  double s = (double)sin(theta), c = (double)cos(theta);
  double J11 = -c, J12 = -s, J13 = -c * y + s * x;
  double J21 = s, J22 = -c, J23 = s * y + c * x;
  double P11 = Ca[0], P12 = Ca[1], P13 = Ca[2];
  double P22 = Ca[4], P23 = Ca[5];
  double P33 = Ca[8];
  Cr[0] = P11 * J11 * J11 + 2 * P12 * J11 * J12 + 2 * P13 * J11 * J13 + P22 * J12 * J12 + 2 * P23 * J12 * J13 + P33 * J13 * J13;
  Cr[1] = J21 * (J11 * P11 + J12 * P12 + J13 * P13) + J22 * (J11 * P12 + J12 * P22 + J13 * P23) + J23 * (J11 * P13 + J12 * P23 + J13 * P33);
  Cr[2] = -J11 * P13 - J12 * P23 - J13 * P33;
  Cr[3] = Cr[1];
  Cr[4] = P11 * J21 * J21 + 2 * P12 * J21 * J22 + 2 * P13 * J21 * J23 + P22 * J22 * J22 + 2 * P23 * J22 * J23 + P33 * J23 * J23;
  Cr[5] = -J21 * P13 - J22 * P23 - J23 * P33;
  Cr[6] = Cr[2];
  Cr[7] = Cr[5];
  Cr[8] = P33;
  xytr[0] = -s * y - c * x;
  xytr[1] = -c * y + s * x;
  xytr[2] = -xyta[2];
}
```