user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<calc_cov>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %esi,0x78(%rsp)
  mov    %edx,0x48(%rsp)
  mov    %rcx,0x70(%rsp)
  test   %esi,%esi
  jle    L41
  movslq %esi,%rax
  lea    0x8(,%rax,8),%rbx
  mov    %rbx,0x68(%rsp)
  mov    %esi,%ebx
  mov    %rbx,0x60(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x38(%rsp)
  mov    %edx,0x58(%rsp)
  mov    %esi,0x5c(%rsp)
  mov    %rcx,0x50(%rsp)
  movq   $0x1,0x28(%rsp)
  lea    -0x1(%rdx),%eax
  mov    %eax,0x7c(%rsp)
  mov    %rdi,%r14
  jmp    L165
L184:
  add    $0x8,%rbx
  add    $0x1,%ebp
  cmp    %r12d,%ebp
  je     L24
L195:
  mov    %rbx,0x8(%rsp)
  movsd  (%rbx),%xmm0
  call   <fabs@plt>
  cmp    $0x9,%eax
  je     L184
  movslq %ebp,%rax
  lea    0x0(%r13,%rax,8),%r14
  movsd  (%r14),%xmm0
  call   <fabs@plt>
  cmp    $0x9,%eax
  je     L184
  mov    0x8(%rsp),%rax
  movsd  (%rax),%xmm0
  mulsd  (%r14),%xmm0
  addsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  add    $0x1,%r15d
  jmp    L184
L24:
  test   %r15d,%r15d
  je     L101
L0:
  mov    0x30(%rsp),%rax
  mov    0x18(%rsp),%rcx
  movsd  0x10(%rsp),%xmm2
  movsd  %xmm2,-0x8(%rax,%rcx,8)
  mov    0x20(%rsp),%rdi
  movsd  %xmm2,(%rdi)
  lea    0x1(%rcx),%rax
  mov    0x38(%rsp),%rsi
  add    %rsi,%rdi
  mov    %rdi,0x20(%rsp)
  add    0x48(%rsp),%r12d
  cmp    0x28(%rsp),%rcx
  je     L178
  mov    %rax,0x18(%rsp)
L104:
  cmpl   $0x0,0x48(%rsp)
  jle    L62
  mov    %r12d,%ebp
  sub    0x48(%rsp),%ebp
  mov    0x40(%rsp),%rbx
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x10(%rsp)
  mov    $0x0,%r15d
  jmp    L195
L62:
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x10(%rsp)
L101:
  mov    0x4c(%rsp),%eax
  lea    0x1(%rax),%esi
  mov    0x18(%rsp),%edx
  lea    D17(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L0
L178:
  mov    %r13,%r14
L60:
  addq   $0x1,0x28(%rsp)
  mov    0x68(%rsp),%rdx
  add    %rdx,0x50(%rsp)
  mov    0x78(%rsp),%esi
  add    %esi,0x5c(%rsp)
  mov    0x48(%rsp),%edx
  add    %edx,0x58(%rsp)
L165:
  mov    0x48(%rsp),%esi
  test   %esi,%esi
  jle    L166
  mov    0x58(%rsp),%eax
  sub    %esi,%eax
  cltq
  lea    (%r14,%rax,8),%rbx
  mov    0x7c(%rsp),%edx
  add    %rdx,%rax
  lea    0x8(%r14,%rax,8),%r12
  mov    D31(%rip),%r13
  mov    $0x0,%ebp
  jmp    L111
L125:
  add    $0x8,%rbx
  cmp    %r12,%rbx
  je     L11
L111:
  movsd  (%rbx),%xmm0
  call   <fabs@plt>
  cmp    $0x9,%eax
  je     L125
  movsd  (%rbx),%xmm0
  mulsd  %xmm0,%xmm0
  movq   %r13,%xmm3
  addsd  %xmm0,%xmm3
  movq   %xmm3,%r13
  add    $0x1,%ebp
  jmp    L125
L11:
  test   %ebp,%ebp
  je     L129
L134:
  mov    0x50(%rsp),%rax
  mov    %r13,(%rax)
  mov    0x28(%rsp),%rax
  mov    %eax,0x4c(%rsp)
  mov    0x60(%rsp),%rsi
  cmp    %rsi,%rax
  je     L41
  test   %eax,%eax
  jle    L60
  mov    0x70(%rsp),%rdx
  lea    (%rdx,%rax,8),%rax
  mov    %rax,0x20(%rsp)
  movslq 0x58(%rsp),%rax
  lea    (%r14,%rax,8),%rax
  mov    %rax,0x40(%rsp)
  movslq 0x5c(%rsp),%rax
  lea    (%rdx,%rax,8),%rax
  mov    %rax,0x30(%rsp)
  mov    0x48(%rsp),%r12d
  movq   $0x1,0x18(%rsp)
  mov    %r14,%r13
  jmp    L104
L166:
  mov    D31(%rip),%r13
L129:
  mov    0x28(%rsp),%esi
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L134
L41:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_label: D17
type_guessed: string
name: read_data
arguments: data_label: D31
type_guessed: f64
name: read_data
arguments: data_label: D1
type_guessed: string

tool: D17: Error: It seems that individuals %d and %d have too many missing data.


tool: D31: 0

tool: D1: Error: It seems that individuals %d has too many missing data.


assistant: ```c
void calc_cov(double *data, int N, int M, double *vect) {
  int nb;
  int i1, i2, j;
  double tmp;
  for (i1 = 0; i1 < N; i1++) {
    for (i2 = 0; i2 < i1; i2++) {
      tmp = 0.0;
      nb = 0;
      for (j = 0; j < M; j++) {
        if (fabs(data[i1 * M + j]) != 9 && fabs(data[i2 * M + j]) != 9) {
          tmp += data[i1 * M + j] * data[i2 * M + j];
          nb++;
        }
      }
      if (!nb) {
        printf("Error: It seems that individuals %d and"
               " %d have too many missing data.\n",
               i1 + 1, i2 + 1);
        exit(1);
      }
      vect[i1 * N + i2] = tmp;
      vect[i2 * N + i1] = tmp;
    }
    tmp = 0.0;
    nb = 0;
    for (j = 0; j < M; j++) {
      if (fabs(data[i1 * M + j]) != 9) {
        tmp += data[i1 * M + j] * data[i1 * M + j];
        nb++;
      }
    }
    if (!nb) {
      printf("Error: It seems that individuals %d has"
             " too many missing data.\n",
             i1 + 1);
      exit(1);
    }
    vect[i1 * N + i1] = tmp;
  }
}
```