user: 这段汇编代码用C语言表示是什么样的？

```asm
<cntsrtna>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %ecx,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L37
L30:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x30(%rbp)
L37:
  mov    -0x30(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L30
  mov    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L139
L103:
  movl   $0x0,-0x30(%rbp)
  jmp    L106
L76:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x30(%rbp)
L106:
  mov    -0x30(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L76
  movl   $0x0,-0x30(%rbp)
  jmp    L75
L14:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x40(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  add    $0x1,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x30(%rbp)
L75:
  mov    -0x30(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L14
  mov    -0x20(%rbp),%rax
  movl   $0x0,(%rax)
  movl   $0x1,-0x30(%rbp)
  jmp    L44
L77:
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x20(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x30(%rbp)
L44:
  mov    -0x30(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L77
  movl   $0x0,-0x30(%rbp)
  jmp    L74
L16:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  lea    0x1(%rdx),%ecx
  mov    %ecx,(%rax)
  movslq %edx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    (%rsi),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x30(%rbp)
L74:
  mov    -0x30(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L16
  movl   $0x0,-0x30(%rbp)
  jmp    L118
L63:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x30(%rbp)
L118:
  mov    -0x30(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L63
  subl   $0x1,-0x2c(%rbp)
L139:
  cmpl   $0x0,-0x2c(%rbp)
  jns    L103
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
unsigned int *cntsrtna(unsigned int *sx, int k, int r, int na) {
  int *sxc = (int *)malloc(na * sizeof(int));
  int *bc = (int *)malloc(na * sizeof(int));
  int *sxl = (int *)malloc(r * sizeof(int));
  int *cc = (int *)malloc(r * sizeof(int));
  int *regroup = (int *)malloc(r * sizeof(int));
  int i, j;
  for (i = 0; i < r; ++i)
    regroup[i] = i;
  for (j = k - 1; j >= 0; --j) {
    for (i = 0; i < na; ++i)
      sxc[i] = 0;
    for (i = 0; i < r; ++i) {
      cc[i] = sx[regroup[i] + j * r];
      sxc[cc[i]]++;
    }
    bc[0] = 0;
    for (i = 1; i < na; ++i)
      bc[i] = bc[i - 1] + sxc[i - 1];
    for (i = 0; i < r; ++i)
      sxl[bc[cc[i]]++] = regroup[i];
    for (i = 0; i < r; ++i) {
      regroup[i] = sxl[i];
    }
  }
  free(sxl);
  free(bc);
  free(sxc);
  free(cc);
  return regroup;
}
```