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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x84(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x5,-0x84(%rbp)
  je     L33
  mov    -0x90(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L33:
  mov    -0x90(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D133(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x50(%rbp)
  cmpq   $0x0,-0x50(%rbp)
  jne    L118
  mov    -0x90(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L118:
  mov    -0x90(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atol@plt>
  mov    %rax,-0x48(%rbp)
  mov    -0x90(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atol@plt>
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D111(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x48(%rbp),%rax
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  imul   %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  imul   %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x40(%rbp),%rax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L86
  cmpq   $0x0,-0x30(%rbp)
  je     L86
  cmpq   $0x0,-0x28(%rbp)
  je     L86
  cmpq   $0x0,-0x38(%rbp)
  jne    L203
L86:
  lea    D109(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L203:
  movq   $0x0,-0x68(%rbp)
  jmp    L26
L84:
  addq   $0x1,-0x68(%rbp)
L26:
  mov    -0x50(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <fread@plt>
  mov    -0x48(%rbp),%rdx
  cmp    %rdx,%rax
  je     L84
  mov    -0x68(%rbp),%rax
  mov    %rax,%rsi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <rewind@plt>
  mov    -0x48(%rbp),%rax
  imul   -0x40(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x50(%rbp),%rcx
  mov    -0x30(%rbp),%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <fread@plt>
  mov    %eax,-0x74(%rbp)
  movss  D33(%rip),%xmm0
  movss  %xmm0,-0x78(%rbp)
  movq   $0x1,-0x58(%rbp)
L80:
  movss  -0x78(%rbp),%xmm0
  movss  %xmm0,-0x70(%rbp)
  movq   $0x0,-0x60(%rbp)
  jmp    L151
L98:
  mov    -0x60(%rbp),%rax
  imul   -0x48(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <zero@plt>
  mov    -0x60(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  addq   $0x1,-0x60(%rbp)
L151:
  mov    -0x60(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jl     L98
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x7c(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <rewind@plt>
  movq   $0x0,-0x60(%rbp)
  jmp    L102
L124:
  mov    -0x50(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <fread@plt>
  mov    %eax,-0x74(%rbp)
  lea    -0x7c(%rbp),%rdi
  mov    -0x40(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0x38(%rbp),%rsi
  mov    -0x30(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <quantise@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%rax
  imul   -0x48(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <acc@plt>
  addq   $0x1,-0x60(%rbp)
L102:
  mov    -0x60(%rbp),%rax
  cmp    -0x68(%rbp),%rax
  jl     L124
  movss  -0x7c(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ssq -0x68(%rbp),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x78(%rbp)
  movss  -0x70(%rbp),%xmm0
  subss  -0x78(%rbp),%xmm0
  divss  -0x78(%rbp),%xmm0
  movss  %xmm0,-0x6c(%rbp)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x6c(%rbp),%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd -0x78(%rbp),%xmm2
  movq   %xmm2,%rdx
  mov    -0x58(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %rax,%rsi
  lea    D120(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  addq   $0x1,-0x58(%rbp)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x6c(%rbp),%xmm0
  comisd D118(%rip),%xmm0
  jbe    L162
  movq   $0x0,-0x60(%rbp)
  jmp    L137
L16:
  mov    -0x60(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L188
  mov    -0x60(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x60(%rbp),%rax
  imul   -0x48(%rbp),%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rax,%rcx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <norm@plt>
  mov    -0x48(%rbp),%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  imul   -0x48(%rbp),%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rax,%rcx
  mov    -0x60(%rbp),%rax
  imul   -0x48(%rbp),%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x30(%rbp),%rax
  add    %rsi,%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L188:
  addq   $0x1,-0x60(%rbp)
L137:
  mov    -0x60(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jl     L16
L162:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x6c(%rbp),%xmm0
  comisd D118(%rip),%xmm0
  ja     L80
  mov    -0x90(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  lea    D49(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L40
  mov    -0x90(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L40:
  mov    -0x40(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  lea    D85(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  movq   $0x0,-0x58(%rbp)
  jmp    L120
L196:
  movq   $0x0,-0x60(%rbp)
  jmp    L147
L170:
  mov    -0x58(%rbp),%rax
  imul   -0x48(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movq   %xmm3,%rdx
  mov    -0x18(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D24(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  addq   $0x1,-0x60(%rbp)
L147:
  mov    -0x60(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jl     L170
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addq   $0x1,-0x58(%rbp)
L120:
  mov    -0x58(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jl     L196
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L227
  call   <__stack_chk_fail@plt>
L227:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D87
datatype: string
name: disassemble_data
arguments: data_label: D133
datatype: string
name: disassemble_data
arguments: data_label: D15
datatype: string
name: disassemble_data
arguments: data_label: D111
datatype: string
name: disassemble_data
arguments: data_label: D109
datatype: string
name: disassemble_data
arguments: data_label: D125
datatype: string
name: disassemble_data
arguments: data_label: D33
datatype: f32
name: disassemble_data
arguments: data_label: D120
datatype: string
name: disassemble_data
arguments: data_label: D118
datatype: f64
name: disassemble_data
arguments: data_label: D49
datatype: string
name: disassemble_data
arguments: data_label: D68
datatype: string
name: disassemble_data
arguments: data_label: D85
datatype: string
name: disassemble_data
arguments: data_label: D24
datatype: string

tool: D87: usage: %s TrainFile K(dimension) M(codebook size) VQFile


tool: D133: rb

tool: D15: Error opening training database file: %s


tool: D111: dimension K=%ld  number of entries M=%ld


tool: D109: Error in malloc.

tool: D125: J=%ld entries in training set


tool: D33: 1e+32

tool: D120:   Iteration %ld, Dn = %f, Delta = %e


tool: D118: 0.01

tool: D49: wt

tool: D68: Error opening VQ file: %s


tool: D85: %ld %ld


tool: D24: %f  

assistant: ```c
int main(int argc, char *argv[]) {
  long k, m;
  float *vec;
  float *cb;
  float *cent;
  long *n;
  long J;
  long i, j;
  long ind;
  float se;
  float Dn, Dn_1;
  float delta;
  FILE *ftrain;
  FILE *fvq;
  int ret;
  if (argc != 5) {
    printf("usage: %s TrainFile K(dimension) M(codebook size) VQFile\n", argv[0]);
    exit(1);
  }
  ftrain = fopen(argv[1], "rb");
  if (ftrain == NULL) {
    printf("Error opening training database file: %s\n", argv[1]);
    exit(1);
  }
  k = atol(argv[2]);
  m = atol(argv[3]);
  printf("dimension K=%ld  number of entries M=%ld\n", k, m);
  vec = (float *)malloc(sizeof(float) * k);
  cb = (float *)malloc(sizeof(float) * k * m);
  cent = (float *)malloc(sizeof(float) * k * m);
  n = (long *)malloc(sizeof(long) * m);
  if (cb == NULL || cb == NULL || cent == NULL || vec == NULL) {
    printf("Error in malloc.\n");
    exit(1);
  }
  J = 0;
  while (fread(vec, sizeof(float), k, ftrain) == (size_t)k)
    J++;
  printf("J=%ld entries in training set\n", J);
  rewind(ftrain);
  ret = fread(cb, sizeof(float), k * m, ftrain);
  Dn = 1E32;
  j = 1;
  do {
    Dn_1 = Dn;
    for (i = 0; i < m; i++) {
      zero(&cent[i * k], k);
      n[i] = 0;
    }
    se = 0.0;
    rewind(ftrain);
    for (i = 0; i < J; i++) {
      ret = fread(vec, sizeof(float), k, ftrain);
      ind = quantise(cb, vec, k, m, &se);
      n[ind]++;
      acc(&cent[ind * k], vec, k);
    }
    Dn = se / J;
    delta = (Dn_1 - Dn) / Dn;
    printf("\r  Iteration %ld, Dn = %f, Delta = %e\n", j, Dn, delta);
    j++;
    if (delta > 0.01)
      for (i = 0; i < m; i++) {
        if (n[i] != 0) {
          norm(&cent[i * k], k, n[i]);
          memcpy(&cb[i * k], &cent[i * k], k * sizeof(float));
        }
      }
  } while (delta > 0.01);
  fvq = fopen(argv[4], "wt");
  if (fvq == NULL) {
    printf("Error opening VQ file: %s\n", argv[4]);
    exit(1);
  }
  fprintf(fvq, "%ld %ld\n", k, m);
  for (j = 0; j < m; j++) {
    for (i = 0; i < k; i++)
      fprintf(fvq, "%f  ", cb[j * k + i]);
    fprintf(fvq, "\n");
  }
  fclose(fvq);
  return 0;
}
```