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

```asm
<testKnnSmooth>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x68(%rbp)
  lea    -0x50(%rbp),%rcx
  lea    -0x58(%rbp),%rdx
  lea    -0x78(%rbp),%rsi
  lea    -0x7c(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <makeData@plt>
  movl   $0x1,-0x64(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D47(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D58(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D73(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x74(%rbp)
  jmp    L31
L16:
  mov    -0x50(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x78(%rbp),%esi
  mov    -0x7c(%rbp),%eax
  mov    -0x74(%rbp),%r8d
  mov    -0x64(%rbp),%edi
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <Knn_smooth@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  cmpl   $0x0,-0x68(%rbp)
  je     L96
  mov    -0x74(%rbp),%eax
  mov    %eax,%esi
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L96:
  mov    -0x74(%rbp),%eax
  mov    -0x30(%rbp,%rax,8),%rax
  movsd  D194(%rip),%xmm1
  movsd  -0x38(%rbp),%xmm0
  mov    $0xcd,%esi
  lea    D66(%rip),%rdx
  mov    %rdx,%rdi
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x3,%eax
  call   <UnitTest_expect_eq_double@plt>
  addl   $0x1,-0x74(%rbp)
L31:
  mov    -0x7c(%rbp),%eax
  cmp    %eax,-0x74(%rbp)
  jb     L16
  movl   $0x2,-0x60(%rbp)
  movsd  D5(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D5(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D43(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D176(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x70(%rbp)
  jmp    L52
L63:
  mov    -0x50(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x78(%rbp),%esi
  mov    -0x7c(%rbp),%eax
  mov    -0x70(%rbp),%r8d
  mov    -0x60(%rbp),%edi
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <Knn_smooth@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  cmpl   $0x0,-0x68(%rbp)
  je     L47
  mov    -0x70(%rbp),%eax
  mov    %eax,%esi
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L47:
  mov    -0x70(%rbp),%eax
  mov    -0x30(%rbp,%rax,8),%rax
  movsd  D194(%rip),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mov    $0xdb,%esi
  lea    D66(%rip),%rdx
  mov    %rdx,%rdi
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x3,%eax
  call   <UnitTest_expect_eq_double@plt>
  addl   $0x1,-0x70(%rbp)
L52:
  mov    -0x7c(%rbp),%eax
  cmp    %eax,-0x70(%rbp)
  jb     L63
  movl   $0x3,-0x5c(%rbp)
  movsd  D47(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D47(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D58(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D58(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L64
L70:
  mov    -0x50(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x78(%rbp),%esi
  mov    -0x7c(%rbp),%eax
  mov    -0x6c(%rbp),%r8d
  mov    -0x5c(%rbp),%edi
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <Knn_smooth@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  cmpl   $0x0,-0x68(%rbp)
  je     L21
  mov    -0x6c(%rbp),%eax
  mov    %eax,%esi
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L21:
  mov    -0x6c(%rbp),%eax
  mov    -0x30(%rbp,%rax,8),%rax
  movsd  D194(%rip),%xmm1
  movsd  -0x48(%rbp),%xmm0
  mov    $0xe9,%esi
  lea    D66(%rip),%rdx
  mov    %rdx,%rdi
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x3,%eax
  call   <UnitTest_expect_eq_double@plt>
  addl   $0x1,-0x6c(%rbp)
L64:
  mov    -0x7c(%rbp),%eax
  cmp    %eax,-0x6c(%rbp)
  jb     L70
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L4
  call   <__stack_chk_fail@plt>
L4:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D47
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D58
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D73
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D91
data_type: string
name: extract_symbolic_data
arguments: data_tag: D194
data_type: byte[8]
name: extract_symbolic_data
arguments: data_tag: D66
data_type: string
name: extract_symbolic_data
arguments: data_tag: D5
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D43
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D176
data_type: f64

tool: D47: 1

tool: D58: 2

tool: D73: 3

tool: D91: queryIndex=%u


tool: {"D194": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d]}

tool: D66: testKnnSmooth

tool: D5: 0.5

tool: D43: 1.5

tool: D176: 2.5

assistant: ```c
void testKnnSmooth() {
  const int trace = 0;
  unsigned nObs;
  unsigned nDims;
  double *inputsP;
  double *targetsP;
  makeData(&nObs, &nDims, &inputsP, &targetsP);
  {
    const unsigned k = 1;
    double expected[] = {0.0, 1.0, 2.0, 3.0};
    for (unsigned queryIndex = 0; queryIndex < nObs; queryIndex++) {
      double estimate = Knn_smooth(nObs, nDims, inputsP, targetsP, k, queryIndex);
      if (trace)
        printf("queryIndex=%u\n", queryIndex);
      UnitTest_expect_eq_double((expected[queryIndex]), (estimate), (1e-10), __func__, 205);
    }
  }
  {
    const unsigned k = 2;
    double expected[] = {0.5, 0.5, 1.5, 2.5};
    for (unsigned queryIndex = 0; queryIndex < nObs; queryIndex++) {
      double estimate = Knn_smooth(nObs, nDims, inputsP, targetsP, k, queryIndex);
      if (trace)
        printf("queryIndex=%u\n", queryIndex);
      UnitTest_expect_eq_double((expected[queryIndex]), (estimate), (1e-10), __func__, 219);
    }
  }
  {
    const unsigned k = 3;
    double expected[] = {1.0, 1.0, 2.0, 2.0};
    for (unsigned queryIndex = 0; queryIndex < nObs; queryIndex++) {
      double estimate = Knn_smooth(nObs, nDims, inputsP, targetsP, k, queryIndex);
      if (trace)
        printf("queryIndex=%u\n", queryIndex);
      UnitTest_expect_eq_double((expected[queryIndex]), (estimate), (1e-10), __func__, 233);
    }
  }
}
```