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

```asm
<EllipticToRectangular>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  movsd  %xmm0,-0xb8(%rbp)
  movsd  %xmm1,-0xc0(%rbp)
  mov    %rdi,-0xc8(%rbp)
  movsd  %xmm2,-0xd0(%rbp)
  mov    %rsi,-0xd8(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  movsd  -0xc0(%rbp),%xmm0
  mulsd  -0xd0(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movsd  D39(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <fmod@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xa8(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm3
  movsd  %xmm3,-0xe0(%rbp)
  mov    -0xa8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0xe0(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0xa8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm5
  movsd  %xmm5,-0xe8(%rbp)
  mov    -0xa8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0xe8(%rbp),%xmm0
  addsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
L14:
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xa0(%rbp)
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x98(%rbp)
  movsd  -0xa8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0xb0(%rbp),%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x98(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mulsd  -0xa0(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0xa0(%rbp),%xmm2
  movsd  D36(%rip),%xmm1
  subsd  %xmm2,%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm2
  mulsd  -0x98(%rbp),%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  addsd  -0x90(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  mov    -0x90(%rbp),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jle    L2
  jmp    L14
L2:
  nop
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x88(%rbp)
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x80(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  movq   D113(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x80(%rbp),%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x88(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D36(%rip),%xmm0
  subsd  %xmm1,%xmm0
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm2
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x70(%rbp)
  movsd  -0x70(%rbp),%xmm1
  movsd  D36(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D36(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  movsd  -0x88(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x68(%rbp),%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x78(%rbp),%xmm2
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0xb8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm2
  movsd  -0x80(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x68(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x78(%rbp),%xmm2
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0xb8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  D36(%rip),%xmm0
  subsd  -0x50(%rbp),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  D36(%rip),%xmm0
  subsd  -0x48(%rbp),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  D36(%rip),%xmm0
  subsd  -0x50(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0xc8(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x60(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x38(%rbp),%xmm1
  movsd  -0x58(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xd8(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x60(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x58(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  mov    -0xd8(%rbp),%rax
  add    $0x8,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x60(%rbp),%xmm0
  movq   D113(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x58(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xd8(%rbp),%rax
  add    $0x10,%rax
  mulsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  movq   D113(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mulsd  -0x88(%rbp),%xmm0
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x80(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  mulsd  -0xc0(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  D36(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x80(%rbp),%xmm0
  movq   D113(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  -0x68(%rbp),%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x20(%rbp),%xmm2
  mov    -0xc8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x68(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x88(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x38(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  mov    -0xd8(%rbp),%rax
  add    $0x18,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  mov    -0xd8(%rbp),%rax
  add    $0x20,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x10(%rbp),%xmm0
  movq   D113(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0xc8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xd8(%rbp),%rax
  add    $0x28,%rax
  mulsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D39
datatype: byte[8]
name: disassemble_data
arguments: data_label: D36
datatype: f64
name: disassemble_data
arguments: data_label: D113
datatype: byte[8]

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

tool: D36: 1

tool: {"D113": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
void EllipticToRectangular(const double a, const double n, const double elem[6], const double dt, double xyz[]) {
  const double L = fmod(elem[1] + n * dt, 2.0 * 3.14159265358979323846);
  double Le = L - elem[2] * sin(L) + elem[3] * cos(L);
  for (;;) {
    const double cLe = cos(Le);
    const double sLe = sin(Le);
    const double dLe = (L - Le + elem[2] * sLe - elem[3] * cLe) / (1.0 - elem[2] * cLe - elem[3] * sLe);
    Le += dLe;
    if (fabs(dLe) <= 1e-14)
      break;
  }
  {
    const double cLe = cos(Le);
    const double sLe = sin(Le);
    const double dlf = -elem[2] * sLe + elem[3] * cLe;
    const double phi = sqrt(1.0 - elem[2] * elem[2] - elem[3] * elem[3]);
    const double psi = 1.0 / (1.0 + phi);
    const double x1 = a * (cLe - elem[2] - psi * dlf * elem[3]);
    const double y1 = a * (sLe - elem[3] + psi * dlf * elem[2]);
    const double elem_4q = elem[4] * elem[4];
    const double elem_5q = elem[5] * elem[5];
    const double dwho = 2.0 * sqrt(1.0 - elem_4q - elem_5q);
    const double rtp = 1.0 - elem_5q - elem_5q;
    const double rtq = 1.0 - elem_4q - elem_4q;
    const double rdg = 2.0 * elem[5] * elem[4];
    xyz[0] = x1 * rtp + y1 * rdg;
    xyz[1] = x1 * rdg + y1 * rtq;
    xyz[2] = (-x1 * elem[5] + y1 * elem[4]) * dwho;
    const double rsam1 = -elem[2] * cLe - elem[3] * sLe;
    const double h = a * n / (1.0 + rsam1);
    const double vx1 = h * (-sLe - psi * rsam1 * elem[3]);
    const double vy1 = h * (cLe + psi * rsam1 * elem[2]);
    xyz[3] = vx1 * rtp + vy1 * rdg;
    xyz[4] = vx1 * rdg + vy1 * rtq;
    xyz[5] = (-vx1 * elem[5] + vy1 * elem[4]) * dwho;
  }
}
```