user: What is the c source code of the assembly code below?

```asm
<testKnnSmooth>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rdi
  lea    0x18(%rsp),%rcx
  lea    0x10(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  call   <makeData@plt>
  movapd D59(%rip),%xmm0
  mov    0x8(%rsp),%edi
  movaps %xmm0,0x20(%rsp)
  movapd D65(%rip),%xmm0
  movaps %xmm0,0x30(%rsp)
  test   %edi,%edi
  je     L8
  xor    %ebx,%ebx
  lea    0x20(%rsp),%rbp
  lea    D58(%rip),%r12
L60:
  mov    0x18(%rsp),%rcx
  mov    0x10(%rsp),%rdx
  mov    %ebx,%r9d
  xor    %eax,%eax
  mov    0xc(%rsp),%esi
  mov    $0x1,%r8d
  call   <Knn_smooth@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rdi
  mov    $0xcd,%esi
  cvtsi2sd %eax,%xmm1
  mov    D41(%rip),%rdx
  mov    $0x3,%eax
  movsd  0x0(%rbp,%rbx,8),%xmm0
  add    $0x1,%rbx
  movq   %rdx,%xmm2
  call   <UnitTest_expect_eq_double@plt>
  mov    0x8(%rsp),%edi
  cmp    %ebx,%edi
  ja     L60
  movapd D38(%rip),%xmm0
  movaps %xmm0,0x20(%rsp)
  movapd D34(%rip),%xmm0
  movaps %xmm0,0x30(%rsp)
  test   %edi,%edi
  je     L8
  xor    %ebx,%ebx
L17:
  mov    0x18(%rsp),%rcx
  mov    0x10(%rsp),%rdx
  mov    %ebx,%r9d
  xor    %eax,%eax
  mov    0xc(%rsp),%esi
  mov    $0x2,%r8d
  call   <Knn_smooth@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rdi
  mov    $0xdb,%esi
  cvtsi2sd %eax,%xmm1
  mov    D41(%rip),%rcx
  mov    $0x3,%eax
  movsd  0x0(%rbp,%rbx,8),%xmm0
  add    $0x1,%rbx
  movq   %rcx,%xmm2
  call   <UnitTest_expect_eq_double@plt>
  mov    0x8(%rsp),%edi
  cmp    %ebx,%edi
  ja     L17
  movapd D62(%rip),%xmm0
  movaps %xmm0,0x20(%rsp)
  movapd D27(%rip),%xmm0
  movaps %xmm0,0x30(%rsp)
  test   %edi,%edi
  je     L8
  xor    %ebx,%ebx
L7:
  mov    0x18(%rsp),%rcx
  mov    0x10(%rsp),%rdx
  mov    %ebx,%r9d
  xor    %eax,%eax
  mov    0xc(%rsp),%esi
  mov    $0x3,%r8d
  call   <Knn_smooth@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rdi
  mov    $0xe9,%esi
  cvtsi2sd %eax,%xmm1
  mov    D41(%rip),%rdx
  mov    $0x3,%eax
  movsd  0x0(%rbp,%rbx,8),%xmm0
  add    $0x1,%rbx
  movq   %rdx,%xmm2
  call   <UnitTest_expect_eq_double@plt>
  mov    0x8(%rsp),%edi
  cmp    %ebx,%edi
  ja     L7
L8:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L49
  add    $0x50,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D59
type_guessed: f64[2]
name: unpack_data
arguments: data_label: D65
type_guessed: f64[2]
name: unpack_data
arguments: data_label: D58
type_guessed: string
name: unpack_data
arguments: data_label: D41
type_guessed: byte[8]
name: unpack_data
arguments: data_label: D38
type_guessed: f64[2]
name: unpack_data
arguments: data_label: D34
type_guessed: f64[2]
name: unpack_data
arguments: data_label: D62
type_guessed: f64[2]
name: unpack_data
arguments: data_label: D27
type_guessed: f64[2]

tool: {"D59": [0.0,1.0]}

tool: {"D65": [2.0,3.0]}

tool: D58: testKnnSmooth

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

tool: {"D38": [0.5,0.5]}

tool: {"D34": [1.5,2.5]}

tool: {"D62": [1.0,1.0]}

tool: {"D27": [2.0,2.0]}

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);
    }
  }
}
```