user: 请将以下的汇编代码转换成C语言代码：

```asm
<sppdist_sqeuclidean>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  push   %r14
  mov    %r8,%r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  lea    0x0(,%rsi,4),%r12d
  push   %rbp
  movslq %r12d,%r12
  push   %rbx
  mov    %rdi,%rbx
  lea    (%rsi,%rsi,1),%edi
  shl    $0x2,%r12
  sub    $0x68,%rsp
  mov    %edi,0x28(%rsp)
  mov    (%r9),%rdi
  mov    %esi,0x18(%rsp)
  mov    %r12,%rsi
  mov    %ecx,0x14(%rsp)
  mov    %r8,0x50(%rsp)
  mov    %r9,0x58(%rsp)
  movsd  %xmm0,0x20(%rsp)
  call   <realloc@plt>
  mov    (%r14),%rdi
  mov    %r12,%rsi
  mov    %rax,%rbp
  call   <realloc@plt>
  mov    %rax,0x8(%rsp)
  test   %r15d,%r15d
  jle    L155
  movslq %r13d,%rax
  movl   $0x0,0x1c(%rsp)
  xor    %r14d,%r14d
  lea    0x0(,%rax,8),%rdx
  mov    0x14(%rsp),%eax
  add    %rdx,%rbx
  mov    %rdx,(%rsp)
  and    $0xfffffffd,%eax
  mov    %rbx,0x30(%rsp)
  mov    %eax,0x2c(%rsp)
L26:
  cmpl   $0x2,0x14(%rsp)
  ja     L82
  mov    0x1c(%rsp),%ecx
  lea    (%r14,%r14,1),%eax
  mov    0x8(%rsp),%rdi
  add    $0x1,%r14d
  cltq
  mov    %ecx,0x0(%rbp,%rax,4)
  mov    %ecx,0x4(%rbp,%rax,4)
  movq   $0x0,(%rdi,%rax,4)
  cmp    0x28(%rsp),%r14d
  je     L102
L82:
  mov    0x1c(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x40(%rsp)
  cmp    %eax,0x18(%rsp)
  je     L6
  mov    0x30(%rsp),%r12
  mov    0x40(%rsp),%ebx
  mov    %r12,%r15
  sub    (%rsp),%r15
  nopw   0x0(%rax,%rax,1)
L110:
  xor    %eax,%eax
  mov    %r13d,%edx
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <sqeuclidean_distance@plt>
  pxor   %xmm0,%xmm0
  movsd  0x20(%rsp),%xmm1
  cvtsi2sd %eax,%xmm0
  comisd %xmm0,%xmm1
  jb     L38
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  mov    0x14(%rsp),%eax
  sete   %dl
  cmp    $0x3,%eax
  je     L14
  cmp    $0x1,%eax
  ja     L90
L14:
  lea    (%r14,%r14,1),%eax
  mov    0x1c(%rsp),%ecx
  mov    0x8(%rsp),%rdi
  add    $0x1,%r14d
  cltq
  mov    %ebx,0x0(%rbp,%rax,4)
  mov    %ecx,0x4(%rbp,%rax,4)
  movsd  %xmm0,(%rdi,%rax,4)
  cmp    0x28(%rsp),%r14d
  je     L157
L90:
  lea    (%r14,%r14,1),%esi
  cmpl   $0x4,0x14(%rsp)
  movslq %esi,%rax
  je     L43
  test   %dl,%dl
  je     L38
L43:
  mov    0x1c(%rsp),%ecx
  mov    0x8(%rsp),%rdx
  mov    %ebx,0x4(%rbp,%rax,4)
  add    $0x1,%r14d
  mov    %ecx,0x0(%rbp,%rax,4)
  movsd  %xmm0,(%rdx,%rax,4)
  cmp    %r14d,0x28(%rsp)
  je     L165
L38:
  add    $0x1,%ebx
  add    (%rsp),%r12
  cmp    %ebx,0x18(%rsp)
  jne    L110
  mov    0x40(%rsp),%eax
  mov    (%rsp),%rdi
  add    %rdi,0x30(%rsp)
  mov    %eax,0x1c(%rsp)
  jmp    L26
L157:
  lea    0x0(,%r14,4),%esi
  mov    %rbp,%rdi
  lea    (%r14,%r14,1),%eax
  mov    %dl,0x47(%rsp)
  movslq %esi,%rsi
  movsd  %xmm0,0x48(%rsp)
  shl    $0x2,%rsi
  mov    %eax,0x28(%rsp)
  mov    %rsi,0x38(%rsp)
  call   <realloc@plt>
  mov    0x38(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  mov    %rax,%rbp
  call   <realloc@plt>
  movsd  0x48(%rsp),%xmm0
  movzbl 0x47(%rsp),%edx
  mov    %rax,0x8(%rsp)
  jmp    L90
  nopl   (%rax)
L165:
  lea    0x2(%rsi),%eax
  lea    0x0(,%r14,4),%esi
  mov    %rbp,%rdi
  movslq %esi,%rsi
  mov    %eax,0x28(%rsp)
  shl    $0x2,%rsi
  mov    %rsi,0x38(%rsp)
  call   <realloc@plt>
  mov    0x38(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  mov    %rax,%rbp
  call   <realloc@plt>
  mov    %rax,0x8(%rsp)
  jmp    L38
  nopw   0x0(%rax,%rax,1)
L6:
  lea    (%r14,%r14,1),%r13d
  movslq %r13d,%r13
  shl    $0x2,%r13
L81:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <realloc@plt>
  mov    0x8(%rsp),%rdi
  mov    %r13,%rsi
  mov    %rax,%rbx
  call   <realloc@plt>
  mov    0x58(%rsp),%rdi
  mov    0x50(%rsp),%rdx
  mov    %rbx,(%rdi)
  mov    %rax,(%rdx)
  mov    0xa0(%rsp),%rax
  mov    %r14d,(%rax)
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  lea    0x0(,%r14,4),%eax
  mov    %rbp,%rdi
  lea    (%r14,%r14,1),%r15d
  cltq
  lea    0x0(,%rax,4),%r12
  mov    %r12,%rsi
  call   <realloc@plt>
  mov    0x8(%rsp),%rdi
  mov    %r12,%rsi
  mov    %rax,%rbp
  call   <realloc@plt>
  mov    %r15d,0x28(%rsp)
  mov    %rax,0x8(%rsp)
  jmp    L82
L155:
  xor    %r13d,%r13d
  xor    %r14d,%r14d
  jmp    L81
```

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