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

```asm
<convert_COO_SSS>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %rdx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9,-0x48(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <assert@plt>
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    0x20(%rbp),%rax
  mov    %rdx,(%rax)
  movl   $0x0,-0x1c(%rbp)
  jmp    L4
L89:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L4:
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L89
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L9
L53:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L57
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    0x20(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x30(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L47
L57:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L102
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
L102:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x10(%rbp)
L47:
  addl   $0x1,-0x18(%rbp)
L9:
  mov    -0x18(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L53
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    0x10(%rbp),%rax
  mov    %rdx,(%rax)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L35
L16:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L14
L95:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    0x10(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    0x18(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
L14:
  cmpl   $0x0,-0x14(%rbp)
  jne    L95
  addl   $0x1,-0x1c(%rbp)
L35:
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L16
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <assert@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

assistant: ```c
void convert_COO_SSS(int n, int nz, int *i_coo, int *j_coo, double *v_coo, int **ia, int **ja, double **va, double **da) {
  int i, k, l, t, nnz;
  int *root;
  root = (int *)malloc(n * sizeof(int));
  assert(root);
  (*da) = (double *)malloc(n * sizeof(double));
  for (i = 0; i < n; i++) {
    root[i] = 0;
    (*da)[i] = 0.0;
  }
  nnz = 0;
  for (k = 0; k < nz; k++) {
    if (i_coo[k] == j_coo[k])
      (*da)[i_coo[k]] = v_coo[k];
    else {
      if (i_coo[k] < j_coo[k]) {
        t = i_coo[k];
        i_coo[k] = j_coo[k];
        j_coo[k] = t;
      }
      i = i_coo[k];
      i_coo[k] = root[i];
      root[i] = k;
      nnz++;
    }
  }
  (*ia) = (int *)malloc((n + 1) * sizeof(int));
  (*va) = (double *)malloc((nnz * sizeof(double)));
  (*ja) = (int *)malloc(nnz * sizeof(int));
  k = 0;
  for (i = 0; i < n; i++) {
    (*ia)[i] = k;
    l = root[i];
    while (l != 0) {
      (*ja)[k] = j_coo[l];
      (*va)[k] = v_coo[l];
      k++;
      l = i_coo[l];
    }
  }
  (*ia)[n] = k;
  assert(k == nnz);
  free(root);
}
```