user: What would the C source look like for the assembly code provided here?

```asm
<vq>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,-0x18(%rsp)
  mov    %rdx,%rdi
  mov    %rsi,-0x10(%rsp)
  mov    %r8d,-0x28(%rsp)
  test   %r8d,%r8d
  jle    L70
  movslq %r9d,%r15
  lea    -0x1(%r9),%ebx
  movss  (%rcx),%xmm4
  mov    %rcx,%rdx
  lea    0x0(,%r15,4),%rax
  xor    %r12d,%r12d
  xor    %esi,%esi
  xor    %r11d,%r11d
  mov    %ebx,-0x20(%rsp)
  movss  D7(%rip),%xmm3
  lea    0x4(%rdi),%rcx
  mov    %rax,-0x30(%rsp)
  lea    -0x2(%r9),%eax
  mov    %eax,-0x24(%rsp)
  mov    %ebx,%eax
  and    $0xfffffffc,%ebx
  shr    $0x2,%eax
  mov    %ebx,%r14d
  lea    -0x1(%rax),%r10d
  lea    0x1(%rbx),%eax
  xor    %ebx,%ebx
  mov    %eax,-0x1c(%rsp)
  add    $0x1,%r10
  shl    $0x4,%r10
  nopl   0x0(%rax)
L42:
  movaps %xmm4,%xmm1
  subss  -0x4(%rcx),%xmm1
  mulss  %xmm1,%xmm1
  cmp    $0x1,%r9d
  jle    L102
  cmpl   $0x2,-0x24(%rsp)
  jbe    L158
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L65:
  movups 0x4(%rdx,%rax,1),%xmm0
  movups (%rcx,%rax,1),%xmm5
  add    $0x10,%rax
  subps  %xmm5,%xmm0
  mulps  %xmm0,%xmm0
  addss  %xmm0,%xmm1
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm1
  addss  %xmm0,%xmm1
  cmp    %rax,%r10
  jne    L65
  cmp    %r14d,-0x20(%rsp)
  je     L102
  mov    -0x1c(%rsp),%eax
  mov    %r14d,%r8d
L8:
  mov    %r9d,%r13d
  sub    %r8d,%r13d
  lea    -0x1(%r13),%ebp
  cmp    $0x2,%r13d
  je     L145
  movq   0x4(%rdx,%r8,4),%xmm0
  lea    0x1(%rbx,%r8,1),%r8
  movq   (%rdi,%r8,4),%xmm2
  mov    %ebp,%r8d
  and    $0xfffffffe,%r8d
  subps  %xmm2,%xmm0
  add    %r8d,%eax
  mulps  %xmm0,%xmm0
  addss  %xmm0,%xmm1
  shufps $0xe5,%xmm0,%xmm0
  addss  %xmm0,%xmm1
  cmp    %r8d,%ebp
  je     L102
L145:
  movslq %eax,%r8
  add    %esi,%eax
  cltq
  movss  (%rdx,%r8,4),%xmm0
  subss  (%rdi,%rax,4),%xmm0
  mulss  %xmm0,%xmm0
  addss  %xmm0,%xmm1
L102:
  comiss %xmm1,%xmm3
  minss  %xmm3,%xmm1
  cmova  %r11d,%r12d
  movaps %xmm1,%xmm3
  add    %r9d,%esi
  add    $0x1,%r11d
  add    %r15,%rbx
  add    -0x30(%rsp),%rcx
  cmp    %r11d,-0x28(%rsp)
  jne    L42
L64:
  test   %r9d,%r9d
  jle    L149
  mov    %r9d,%esi
  mov    -0x18(%rsp),%rbx
  imul   %r12d,%esi
  mov    %rbx,%rcx
  movslq %esi,%rdx
  lea    0x4(,%rdx,4),%rax
  lea    (%rdi,%rax,1),%r8
  sub    %r8,%rcx
  cmp    $0x8,%rcx
  jbe    L159
  lea    -0x1(%r9),%ecx
  cmp    $0x2,%ecx
  jbe    L159
  mov    %r9d,%edx
  lea    -0x4(%rdi,%rax,1),%rcx
  mov    %rbx,%r8
  xor    %eax,%eax
  shr    $0x2,%edx
  shl    $0x4,%rdx
  nopl   0x0(%rax)
L108:
  movups (%rcx,%rax,1),%xmm6
  movups %xmm6,(%r8,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L108
  mov    %r9d,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%r9b
  je     L149
  lea    (%rsi,%rax,1),%edx
  mov    -0x18(%rsp),%rbx
  mov    %eax,%r8d
  movslq %edx,%rdx
  lea    0x0(,%r8,4),%rcx
  movss  (%rdi,%rdx,4),%xmm0
  lea    0x1(%rax),%edx
  movss  %xmm0,(%rbx,%r8,4)
  cmp    %edx,%r9d
  jle    L149
  add    %esi,%edx
  add    $0x2,%eax
  movslq %edx,%rdx
  movss  (%rdi,%rdx,4),%xmm0
  movss  %xmm0,0x4(%rbx,%rcx,1)
  cmp    %eax,%r9d
  jle    L149
  add    %esi,%eax
  cltq
  movss  (%rdi,%rax,4),%xmm0
  movss  %xmm0,0x8(%rbx,%rcx,1)
L149:
  mov    -0x10(%rsp),%rax
  mov    %r12d,(%rax)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L158:
  xor    %r8d,%r8d
  mov    $0x1,%eax
  jmp    L8
L159:
  mov    -0x18(%rsp),%rcx
  mov    %r9d,%r9d
  lea    (%rdi,%rdx,4),%rdx
  xor    %eax,%eax
  nopl   0x0(%rax)
L15:
  movss  (%rdx,%rax,4),%xmm0
  movss  %xmm0,(%rcx,%rax,4)
  add    $0x1,%rax
  cmp    %r9,%rax
  jne    L15
  jmp    L149
L70:
  xor    %r12d,%r12d
  jmp    L64
```

tool_calls: name: disassemble_data
arguments: data_label: D7
type_infered: f32

tool: D7: 1e+37

assistant: ```c
void vq(float *Xq, int *strchr, const float *CB, float *X, int n_cb, int dim) {
  int i, j;
  int pos, minindex;
  float dist, tmp, mindist;
  pos = 0;
  mindist = (float)1.0e37;
  minindex = 0;
  for (j = 0; j < n_cb; j++) {
    dist = X[0] - CB[pos];
    dist *= dist;
    for (i = 1; i < dim; i++) {
      tmp = X[i] - CB[pos + i];
      dist += tmp * tmp;
    }
    if (dist < mindist) {
      mindist = dist;
      minindex = j;
    }
    pos += dim;
  }
  for (i = 0; i < dim; i++) {
    Xq[i] = CB[minindex * dim + i];
  }
  *strchr = minindex;
}
```