user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<lgndr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %edi,-0x3c(%rbp)
  mov    %rsi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  movsd  -0x38(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L17
  mov    -0x58(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x3c(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x1,-0x20(%rbp)
  jmp    L37
L58:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x20(%rbp)
L37:
  mov    -0x20(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L58
L17:
  mov    -0x48(%rbp),%rax
  movsd  D35(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mov    -0x48(%rbp),%rax
  add    $0x8,%rax
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm5
  movsd  %xmm5,-0x60(%rbp)
  movsd  D35(%rip),%xmm0
  subsd  -0x18(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  mulsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  cmpl   $0x1,-0x3c(%rbp)
  je     L81
  movl   $0x2,-0x24(%rbp)
  jmp    L32
L61:
  movl   $0x0,-0x20(%rbp)
  jmp    L54
L89:
  mov    -0x24(%rbp),%eax
  add    %eax,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x24(%rbp),%eax
  sub    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  mov    -0x24(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  divsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  mov    %edx,%edi
  call   <indx@plt>
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x24(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x24(%rbp),%eax
  add    %eax,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x18(%rax),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x24(%rbp),%eax
  sub    -0x20(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x24(%rbp),%eax
  sub    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,-0x68(%rbp)
  mov    -0x24(%rbp),%eax
  lea    -0x2(%rax),%edx
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  mov    %edx,%edi
  call   <indx@plt>
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm4
  mulsd  -0x68(%rbp),%xmm4
  movsd  %xmm4,-0x68(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <indx@plt>
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x60(%rbp),%xmm0
  subsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x20(%rbp)
L54:
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x20(%rbp)
  jl     L89
  mov    -0x24(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <indx@plt>
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm6
  movsd  %xmm6,-0x68(%rbp)
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x24(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <indx@plt>
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x60(%rbp),%xmm0
  mulsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  add    %eax,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D35(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D35(%rip),%xmm0
  subsd  -0x18(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x24(%rbp),%eax
  add    %eax,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <indx@plt>
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm7
  movsd  %xmm7,-0x68(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <indx@plt>
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x60(%rbp),%xmm0
  mulsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x24(%rbp)
L32:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L61
  jmp    L27
L81:
  nop
L27:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D35
data_type: f64

tool: D35: 1

assistant: ```c
void lgndr(double t, int NMAX, double *P_bar_nm, double *SQT, int *IX) {
  int n, m;
  double t2 = t * t;
  if (*IX == 0) {
    *IX = 1;
    int NSQRTS = NMAX + NMAX + 1;
#pragma omp parallel for
    for (m = 1; m <= NSQRTS; m++)
      SQT[m] = sqrt(m);
  }
  P_bar_nm[0] = 1.0;
  P_bar_nm[1] = SQT[3] * t;
  P_bar_nm[2] = SQT[3] * sqrt(1.0 - t2);
  if (NMAX == 1)
    return;
  for (n = 2; n <= NMAX; n++) {
    for (m = 0; m < n - 1; m++) {
      P_bar_nm[indx(n, m)] = ((SQT[2 * n - 1] / SQT[n - m]) * (SQT[2 * n + 1] / SQT[n + m])) * t * P_bar_nm[indx(n - 1, m)] - ((SQT[2 * n + 1] / SQT[2 * n - 3]) * (SQT[n + m - 1] / SQT[n + m]) * (SQT[n - m - 1] / SQT[n - m])) * P_bar_nm[indx(n - 2, m)];
    }
    P_bar_nm[indx(n, n - 1)] = SQT[2 * n + 1] * t * P_bar_nm[indx(n - 1, n - 1)];
    P_bar_nm[indx(n, n)] = sqrt((2 * n + 1.0) * (1 - t2) / (2 * n)) * P_bar_nm[indx(n - 1, n - 1)];
  }
}
```