user: Translate the below assembly code into C programming language:

```asm
<SortInt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    -0x44(%rbp),%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x50(%rbp),%rsi
  mov    -0x44(%rbp),%eax
  mov    %eax,%edi
  call   <SortUnstableInt@plt>
  movl   $0x0,-0x3c(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x1,-0x38(%rbp)
  jmp    L81
L77:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L96
  cmpl   $0x0,-0x30(%rbp)
  je     L0
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L89
L0:
  addl   $0x1,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x38(%rbp),%edx
  sub    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x2,(%rax)
  movl   $0x1,-0x30(%rbp)
  jmp    L89
L96:
  movl   $0x0,-0x30(%rbp)
L89:
  addl   $0x1,-0x38(%rbp)
L81:
  mov    -0x38(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L77
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x0,-0x3c(%rbp)
  jmp    L2
L18:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rdx
  mov    %eax,%edi
  call   <SortInt>
  movl   $0x0,-0x34(%rbp)
  jmp    L45
L94:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%ecx
  mov    -0x34(%rbp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x60(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x34(%rbp)
L45:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x34(%rbp)
  jl     L94
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addl   $0x1,-0x3c(%rbp)
L2:
  mov    -0x3c(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L18
  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>
  nop
  leave
  ret
```

assistant: ```c
void SortInt(int N, int *A, int *C, int *idx) {
  int u, n, j, U;
  int *run_length, *run_start, *run_idx, *run_sort;
  int run_flag;
  int *idx_temp;
  run_length = (int *)calloc(N, sizeof(int));
  run_start = (int *)malloc(N * sizeof(int));
  SortUnstableInt(N, A, C, idx);
  u = 0;
  run_flag = 0;
  for (n = 1; n < N; n++)
    if (C[n] == C[n - 1])
      if (run_flag)
        run_length[u - 1]++;
      else {
        u++;
        run_start[u - 1] = n - 1;
        run_length[u - 1] = 2;
        run_flag = 1;
      }
    else
      run_flag = 0;
  U = u;
  idx_temp = (int *)malloc(N * sizeof(int));
  memcpy(idx_temp, idx, N * sizeof(int));
  for (u = 0; u < U; u++) {
    run_idx = (int *)malloc(run_length[u] * sizeof(int));
    run_sort = (int *)malloc(run_length[u] * sizeof(int));
    SortInt(run_length[u], &idx[run_start[u]], run_sort, run_idx);
    for (j = 0; j < run_length[u]; j++)
      idx[run_start[u] + j] = idx_temp[run_start[u] + run_idx[j]];
    free(run_idx);
    free(run_sort);
  }
  free(idx_temp);
  free(run_start);
  free(run_length);
}
```