user: Please show me the C implementation that matches the assembly code listed below:

```asm
<sCompRow_to_CompCol>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edi,%ebp
  mov    %edx,%edi
  push   %rbx
  mov    %r8,%rbx
  sub    $0x28,%rsp
  mov    0x70(%rsp),%rax
  mov    0x60(%rsp),%r15
  mov    %r9,0x18(%rsp)
  mov    %edx,0x14(%rsp)
  mov    0x68(%rsp),%r13
  mov    %rax,0x8(%rsp)
  call   <doubleMalloc@plt>
  mov    0x14(%rsp),%edi
  mov    %rax,(%r15)
  call   <intMalloc@plt>
  lea    0x1(%r12),%edi
  mov    %rax,0x0(%r13)
  call   <intMalloc@plt>
  mov    0x8(%rsp),%rsi
  mov    %r12d,%edi
  mov    %rax,(%rsi)
  call   <intCalloc@plt>
  test   %ebp,%ebp
  mov    0x18(%rsp),%r9
  mov    %rax,%rdi
  jle    L46
  lea    0x4(%r9),%r8
  lea    -0x1(%rbp),%eax
  mov    %r8,%rcx
  lea    0x8(%r9,%rax,4),%r10
  nopw   0x0(%rax,%rax,1)
L92:
  movslq -0x4(%rcx),%rax
  cmp    (%rcx),%eax
  jge    L69
  nopl   0x0(%rax,%rax,1)
L37:
  movslq (%rbx,%rax,4),%rdx
  add    $0x1,%rax
  addl   $0x1,(%rdi,%rdx,4)
  cmp    %eax,(%rcx)
  jg     L37
L69:
  add    $0x4,%rcx
  cmp    %rcx,%r10
  jne    L92
  mov    0x8(%rsp),%rax
  mov    (%rax),%rax
  movl   $0x0,(%rax)
  test   %r12d,%r12d
  jle    L62
L19:
  lea    -0x1(%r12),%edx
  mov    %rdi,%r8
  lea    0x4(%rax,%rdx,4),%r10
  sub    %rax,%r8
  xor    %edx,%edx
  jmp    L94
L80:
  mov    (%rax),%edx
L94:
  lea    (%r8,%rax,1),%rcx
  add    $0x4,%rax
  add    (%rcx),%edx
  mov    %edx,(%rax)
  mov    -0x4(%rax),%edx
  mov    %edx,(%rcx)
  cmp    %rax,%r10
  jne    L80
  lea    0x4(%r9),%r8
  test   %ebp,%ebp
  jle    L124
L62:
  xor    %r9d,%r9d
  nopl   0x0(%rax,%rax,1)
L14:
  movslq -0x4(%r8),%rax
  cmp    (%r8),%eax
  jge    L22
  mov    0x0(%r13),%r11
  mov    (%r15),%r10
  nopl   0x0(%rax,%rax,1)
L74:
  movslq (%rbx,%rax,4),%rdx
  movsd  (%r14,%rax,8),%xmm0
  add    $0x1,%rax
  lea    (%rdi,%rdx,4),%rdx
  movslq (%rdx),%rcx
  mov    %r9d,(%r11,%rcx,4)
  movsd  %xmm0,(%r10,%rcx,8)
  addl   $0x1,(%rdx)
  cmp    %eax,(%r8)
  jg     L74
L22:
  add    $0x1,%r9d
  add    $0x4,%r8
  cmp    %r9d,%ebp
  jne    L14
L124:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <superlu_free@plt>
L46:
  mov    0x8(%rsp),%rax
  mov    (%rax),%rax
  movl   $0x0,(%rax)
  test   %r12d,%r12d
  jg     L19
  jmp    L124
```

assistant: ```c
void sCompRow_to_CompCol(int m, int n, int nnz, double *a, int *colind, int *rowptr, double **at, int **rowind, int **colptr) {
  register int i, j, col, relpos;
  int *marker;
  *at = (double *)doubleMalloc(nnz);
  *rowind = (int *)intMalloc(nnz);
  *colptr = (int *)intMalloc(n + 1);
  marker = (int *)intCalloc(n);
  for (i = 0; i < m; ++i)
    for (j = rowptr[i]; j < rowptr[i + 1]; ++j)
      ++marker[colind[j]];
  (*colptr)[0] = 0;
  for (j = 0; j < n; ++j) {
    (*colptr)[j + 1] = (*colptr)[j] + marker[j];
    marker[j] = (*colptr)[j];
  }
  for (i = 0; i < m; ++i) {
    for (j = rowptr[i]; j < rowptr[i + 1]; ++j) {
      col = colind[j];
      relpos = marker[col];
      (*rowind)[relpos] = i;
      (*at)[relpos] = a[j];
      ++marker[col];
    }
  }
  superlu_free(marker);
}
```