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

```asm
<sppdist_sqeuclidean>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r14d
  mov    %esi,0x1c(%rsp)
  mov    %edx,0x34(%rsp)
  movsd  %xmm0,0x38(%rsp)
  mov    %ecx,%r12d
  mov    %r8,%r15
  mov    %r8,0x60(%rsp)
  mov    %r9,0x68(%rsp)
  lea    (%rsi,%rsi,1),%edi
  mov    %edi,0x8(%rsp)
  lea    0x0(,%rsi,4),%ebp
  movslq %ebp,%rbp
  shl    $0x2,%rbp
  mov    %rbp,%rsi
  mov    (%r9),%rdi
  call   <realloc@plt>
  mov    %rax,%r13
  mov    %rbp,%rsi
  mov    (%r15),%rdi
  call   <realloc@plt>
  mov    %rax,0x10(%rsp)
  test   %r14d,%r14d
  jle    L106
  movslq 0x34(%rsp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    %rdx,0x20(%rsp)
  add    %rdx,%rbx
  mov    %rbx,0x48(%rsp)
  neg    %rax
  shl    $0x3,%rax
  mov    %rax,0x58(%rsp)
  mov    $0x0,%r15d
  mov    $0x0,%r14d
  mov    %r12d,%eax
  and    $0xfffffffd,%eax
  mov    %eax,0x44(%rsp)
  mov    %r14d,0x30(%rsp)
  mov    %r13,%r14
  mov    0x8(%rsp),%r13d
  jmp    L147
L20:
  lea    0x0(%r13,%r13,1),%ebp
  lea    0x0(,%r13,4),%eax
  cltq
  lea    0x0(,%rax,4),%rbx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <realloc@plt>
  mov    %rax,%r14
  mov    %rbx,%rsi
  mov    0x10(%rsp),%rdi
  call   <realloc@plt>
  mov    %rax,0x10(%rsp)
  mov    %ebp,%r13d
  jmp    L148
L149:
  lea    0x0(%r13,%r13,1),%eax
  mov    %eax,0x54(%rsp)
  shl    $0x2,%r13d
  movslq %r13d,%r13
  shl    $0x2,%r13
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <realloc@plt>
  mov    %rax,%r14
  mov    %r13,%rsi
  mov    0x10(%rsp),%rdi
  call   <realloc@plt>
  mov    %rax,0x10(%rsp)
  mov    0x54(%rsp),%r13d
  jmp    L2
L130:
  lea    (%r15,%r15,1),%edx
  movslq %edx,%rax
  mov    0x30(%rsp),%esi
  mov    %esi,(%r14,%rax,4)
  mov    %ebx,0x4(%r14,%rax,4)
  mov    0x10(%rsp),%rdi
  movsd  0x8(%rsp),%xmm4
  movsd  %xmm4,(%rdi,%rax,4)
  add    $0x1,%r15d
  cmp    %r15d,%r13d
  je     L84
L164:
  add    $0x1,%ebx
  add    0x20(%rsp),%rbp
  cmp    %ebx,0x1c(%rsp)
  je     L183
L62:
  mov    0x34(%rsp),%edx
  mov    0x28(%rsp),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <sqeuclidean_distance@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  %xmm1,0x8(%rsp)
  movsd  0x38(%rsp),%xmm2
  comisd %xmm1,%xmm2
  jb     L164
  cmpl   $0x0,0x44(%rsp)
  sete   0x43(%rsp)
  cmp    $0x3,%r12d
  je     L92
  cmp    $0x1,%r12d
  ja     L2
L92:
  lea    (%r15,%r15,1),%eax
  cltq
  mov    %ebx,(%r14,%rax,4)
  mov    0x30(%rsp),%ecx
  mov    %ecx,0x4(%r14,%rax,4)
  mov    0x10(%rsp),%rcx
  movsd  0x8(%rsp),%xmm3
  movsd  %xmm3,(%rcx,%rax,4)
  add    $0x1,%r15d
  cmp    %r13d,%r15d
  je     L149
L2:
  cmp    $0x4,%r12d
  je     L130
  cmpb   $0x0,0x43(%rsp)
  jne    L130
  jmp    L164
L84:
  lea    0x2(%rdx),%r13d
  lea    0x0(,%r15,4),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%rsi
  mov    %r14,%rdi
  call   <realloc@plt>
  mov    %rax,%r14
  mov    0x8(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <realloc@plt>
  mov    %rax,0x10(%rsp)
  jmp    L164
L183:
  mov    0x20(%rsp),%rcx
  add    %rcx,0x48(%rsp)
  mov    0x50(%rsp),%eax
  mov    %eax,0x30(%rsp)
L147:
  cmp    $0x2,%r12d
  ja     L148
  lea    (%r15,%r15,1),%eax
  cltq
  mov    0x30(%rsp),%ecx
  mov    %ecx,(%r14,%rax,4)
  mov    %ecx,0x4(%r14,%rax,4)
  mov    0x10(%rsp),%rdx
  movq   $0x0,(%rdx,%rax,4)
  add    $0x1,%r15d
  cmp    %r13d,%r15d
  je     L20
L148:
  mov    0x30(%rsp),%eax
  lea    0x1(%rax),%ebx
  mov    %ebx,0x50(%rsp)
  cmp    %ebx,0x1c(%rsp)
  je     L10
  mov    0x48(%rsp),%rbp
  mov    %rbp,%rax
  add    0x58(%rsp),%rax
  mov    %rax,0x28(%rsp)
  jmp    L62
L106:
  mov    $0x0,%r15d
  jmp    L94
L10:
  mov    %r14,%r13
L94:
  lea    (%r15,%r15,1),%ebx
  movslq %ebx,%rbx
  shl    $0x2,%rbx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <realloc@plt>
  mov    %rax,%rbp
  mov    %rbx,%rsi
  mov    0x10(%rsp),%rdi
  call   <realloc@plt>
  mov    0x68(%rsp),%rdx
  mov    %rbp,(%rdx)
  mov    0x60(%rsp),%rdx
  mov    %rax,(%rdx)
  mov    0xb0(%rsp),%rax
  mov    %r15d,(%rax)
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void sppdist_sqeuclidean(const double *X, int m, int n, double threshold, int form, double **out_Dx, int **out_Dij, int *out_nzmax) {
  int i, j;
  int nz, nzmax;
  double d;
  const double *x1, *x2;
  int *Dij;
  double *Dx;
  nzmax = 2 * m;
  Dij = realloc(*out_Dij, 2 * nzmax * sizeof(int));
  Dx = realloc(*out_Dx, nzmax * sizeof(double));
  nz = 0;
  for (j = 0; j < m; j++) {
    if ((((form) == 0) || ((form) == 1) || ((form) == 2))) {
      Dij[2 * nz] = j;
      Dij[2 * nz + 1] = j;
      Dx[nz] = 0.0;
      nz++;
      {
        if (nz == nzmax) {
          nzmax *= 2;
          Dij = realloc(Dij, 2 * nzmax * sizeof(int));
          Dx = realloc(Dx, nzmax * sizeof(double));
        }
      };
    }
    for (i = j + 1; i < m; i++) {
      x1 = X + i * n;
      x2 = X + j * n;
      d = sqeuclidean_distance(x1, x2, n);
      if (d <= threshold) {
        if ((((form) == 1) || ((form) == 3) || ((form) == 0))) {
          Dij[2 * nz] = i;
          Dij[2 * nz + 1] = j;
          Dx[nz] = d;
          nz++;
          {
            if (nz == nzmax) {
              nzmax *= 2;
              Dij = realloc(Dij, 2 * nzmax * sizeof(int));
              Dx = realloc(Dx, nzmax * sizeof(double));
            }
          };
        }
        if ((((form) == 2) || ((form) == 4) || ((form) == 0))) {
          Dij[2 * nz] = j;
          Dij[2 * nz + 1] = i;
          Dx[nz] = d;
          nz++;
          {
            if (nz == nzmax) {
              nzmax *= 2;
              Dij = realloc(Dij, 2 * nzmax * sizeof(int));
              Dx = realloc(Dx, nzmax * sizeof(double));
            }
          };
        }
      }
    }
  }
  nzmax = nz;
  Dij = realloc(Dij, 2 * nzmax * sizeof(int));
  Dx = realloc(Dx, nzmax * sizeof(double));
  *out_Dij = Dij;
  *out_Dx = Dx;
  *out_nzmax = nzmax;
  return;
}
```