user: Demonstrate the C code that generates the assembly output below:

```asm
<convert_COO_SSS>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %esi,0x10(%rsp)
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  mov    %r8,%r12
  mov    %r9,(%rsp)
  mov    0x60(%rsp),%r13
  mov    0x68(%rsp),%r14
  mov    %edi,0x14(%rsp)
  movslq %edi,%rax
  mov    %rax,0x8(%rsp)
  lea    0x0(,%rax,4),%rcx
  mov    %rcx,0x18(%rsp)
  mov    %rcx,%rdi
  call   <malloc@plt>
  mov    %rax,%r15
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <assert@plt>
  mov    0x8(%rsp),%rax
  lea    0x0(,%rax,8),%rdi
  call   <malloc@plt>
  mov    0x70(%rsp),%rcx
  mov    %rax,(%rcx)
  mov    0x14(%rsp),%edi
  test   %edi,%edi
  jle    L60
  mov    %edi,%ecx
  mov    $0x0,%eax
  mov    0x70(%rsp),%rsi
L54:
  movl   $0x0,(%r15,%rax,4)
  mov    (%rsi),%rdx
  movq   $0x0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L54
L60:
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jle    L5
  mov    %eax,%edi
  mov    $0x0,%eax
  mov    $0x0,%r8d
  mov    0x70(%rsp),%r9
  jmp    L85
L9:
  movsd  (%r12,%rax,8),%xmm0
  movslq %edx,%rdx
  mov    (%r9),%rcx
  movsd  %xmm0,(%rcx,%rdx,8)
  jmp    L59
L89:
  movslq (%rbx,%rax,4),%rdx
  lea    (%r15,%rdx,4),%rdx
  mov    (%rdx),%ecx
  mov    %ecx,(%rbx,%rax,4)
  mov    %esi,(%rdx)
  add    $0x1,%r8d
L59:
  add    $0x1,%rax
  cmp    %rax,%rdi
  je     L11
L85:
  mov    %eax,%esi
  mov    (%rbx,%rax,4),%edx
  mov    0x0(%rbp,%rax,4),%ecx
  cmp    %ecx,%edx
  je     L9
  jge    L89
  mov    %ecx,(%rbx,%rax,4)
  mov    %edx,0x0(%rbp,%rax,4)
  jmp    L89
L11:
  mov    %r8d,0x10(%rsp)
L128:
  mov    0x18(%rsp),%rdi
  add    $0x4,%rdi
  call   <malloc@plt>
  mov    (%rsp),%rdi
  mov    %rax,(%rdi)
  movslq 0x10(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0x0(,%rax,8),%rdi
  call   <malloc@plt>
  mov    %rax,(%r14)
  mov    0x18(%rsp),%rax
  lea    0x0(,%rax,4),%rdi
  call   <malloc@plt>
  mov    %rax,0x0(%r13)
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L42
  mov    %eax,%r8d
  shl    $0x2,%r8
  mov    $0x0,%edi
  mov    $0x0,%ecx
  mov    (%rsp),%r9
L50:
  mov    (%r9),%rax
  mov    %ecx,(%rax,%rdi,1)
  mov    (%r15,%rdi,1),%eax
  test   %eax,%eax
  je     L137
  movslq %ecx,%rdx
  shl    $0x2,%rdx
L44:
  cltq
  mov    0x0(%rbp,%rax,4),%r10d
  mov    0x0(%r13),%rsi
  mov    %r10d,(%rsi,%rdx,1)
  movsd  (%r12,%rax,8),%xmm0
  mov    (%r14),%rsi
  movsd  %xmm0,(%rsi,%rdx,2)
  add    $0x1,%ecx
  mov    (%rbx,%rax,4),%eax
  add    $0x4,%rdx
  test   %eax,%eax
  jne    L44
L137:
  add    $0x4,%rdi
  cmp    %rdi,%r8
  jne    L50
L100:
  mov    (%rsp),%rax
  mov    (%rax),%rax
  mov    0x8(%rsp),%rdi
  mov    %ecx,(%rax,%rdi,4)
  cmp    0x10(%rsp),%ecx
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%eax
  call   <assert@plt>
  mov    %r15,%rdi
  call   <free@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  movl   $0x0,0x10(%rsp)
  jmp    L128
L42:
  mov    $0x0,%ecx
  jmp    L100
```

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