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

```asm
<QSufSortTransform>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r15
  mov    %rsi,%rbx
  mov    %edx,%r12d
  mov    %r8d,%ebp
  mov    %r9d,%r14d
  sub    %r8d,%ecx
  lea    0x1(%rcx),%r13d
  mov    %r13d,%edi
  call   <leadingZero@plt>
  mov    $0x20,%edx
  sub    %eax,%edx
  mov    D4(%rip),%rcx
  mov    (%rcx),%r10d
  mov    %edx,%ecx
  sar    %cl,%r10d
  test   %r12d,%r12d
  setg   %sil
  cmp    %r14d,%r13d
  setle  %cl
  test   %cl,%sil
  je     L96
  test   %r10d,%r10d
  js     L96
  mov    %r15,%r9
  mov    %r13d,%edi
  mov    $0x0,%eax
  mov    $0x0,%esi
  mov    %edx,%ecx
L121:
  shl    %cl,%eax
  mov    (%r9),%edx
  sub    %ebp,%edx
  add    $0x1,%edx
  or     %edx,%eax
  mov    %edi,%edx
  shl    %cl,%edx
  mov    %edi,%r8d
  mov    %edx,%edi
  or     %r13d,%edi
  mov    %esi,0xc(%rsp)
  add    $0x1,%esi
  add    $0x4,%r9
  cmp    %esi,%r12d
  setg   %r11b
  cmp    %r8d,%r10d
  setge  %dl
  test   %dl,%r11b
  je     L164
  cmp    %edi,%r14d
  jge    L121
L164:
  mov    %ecx,%edx
  mov    0xc(%rsp),%ecx
  imul   %edx,%ecx
  mov    $0x1,%r9d
  shl    %cl,%r9d
  sub    $0x1,%r9d
  movslq %r12d,%rcx
  lea    (%r15,%rcx,4),%r11
  lea    -0x1(%rbp),%ecx
  mov    %ecx,(%r11)
  test   %r8d,%r8d
  js     L199
  mov    $0x0,%ecx
L163:
  movl   $0x0,(%rbx,%rcx,4)
  add    $0x1,%rcx
  cmp    %ecx,%r8d
  jge    L163
L199:
  cmp    %r12d,%esi
  jg     L196
  movslq %esi,%rdi
  lea    (%r15,%rdi,4),%r10
  mov    %r12d,%ecx
  sub    %esi,%ecx
  add    %rdi,%rcx
  lea    0x4(%r15,%rcx,4),%r13
  mov    %eax,%edi
  mov    %edx,%ecx
L210:
  movslq %edi,%rdx
  movl   $0x1,(%rbx,%rdx,4)
  and    %r9d,%edi
  shl    %cl,%edi
  mov    (%r10),%edx
  sub    %ebp,%edx
  add    $0x1,%edx
  or     %edx,%edi
  add    $0x4,%r10
  cmp    %r13,%r10
  jne    L210
  mov    %ecx,%edx
  mov    %edi,%ecx
L93:
  cmp    $0x1,%esi
  jle    L81
  mov    $0x1,%edi
  mov    %ecx,%r10d
  mov    %edx,%ecx
L133:
  movslq %r10d,%r13
  movl   $0x1,(%rbx,%r13,4)
  and    %r9d,%r10d
  shl    %cl,%r10d
  add    $0x1,%edi
  cmp    %edi,%esi
  jne    L133
  mov    %ecx,%edx
L81:
  test   %r8d,%r8d
  js     L152
  mov    %rbx,%rcx
  mov    %r8d,%r8d
  lea    0x4(%rbx,%r8,4),%rdi
  mov    $0x1,%r8d
  jmp    L27
L196:
  mov    %eax,%ecx
  jmp    L93
L139:
  add    $0x4,%rcx
  cmp    %rdi,%rcx
  je     L45
L27:
  cmpl   $0x0,(%rcx)
  je     L139
  mov    %r8d,(%rcx)
  add    $0x1,%r8d
  jmp    L139
L152:
  mov    $0x1,%r8d
L45:
  cmp    %r12d,%esi
  jg     L149
  mov    %r15,%rdi
  mov    %r12d,%r14d
  sub    %esi,%r14d
  mov    %r14d,%ecx
  lea    0x4(%r15,%rcx,4),%r13
  movslq %esi,%r10
  mov    %edx,%ecx
L77:
  movslq %eax,%rdx
  mov    (%rbx,%rdx,4),%edx
  mov    %edx,(%rdi)
  and    %r9d,%eax
  shl    %cl,%eax
  mov    %eax,%edx
  mov    (%rdi,%r10,4),%eax
  sub    %ebp,%eax
  add    $0x1,%eax
  or     %edx,%eax
  add    $0x4,%rdi
  cmp    %r13,%rdi
  jne    L77
  mov    %ecx,%edx
  add    $0x1,%r14d
L148:
  cmp    %r14d,%r12d
  jle    L215
  movslq %r14d,%rcx
  lea    (%r15,%rcx,4),%rdi
  sub    $0x1,%r12d
  sub    %r14d,%r12d
  add    %rcx,%r12
  lea    0x4(%r15,%r12,4),%r10
  mov    %edx,%ecx
L15:
  movslq %eax,%rbp
  mov    (%rbx,%rbp,4),%ebp
  mov    %ebp,(%rdi)
  and    %r9d,%eax
  shl    %cl,%eax
  add    $0x4,%rdi
  cmp    %r10,%rdi
  jne    L15
L215:
  movl   $0x0,(%r11)
  mov    0x50(%rsp),%rax
  mov    %esi,(%rax)
  mov    %r8d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L149:
  mov    $0x0,%r14d
  jmp    L148
L96:
  lea    -0x20(%rax),%ecx
  mov    $0x1,%r9d
  shl    %cl,%r9d
  sub    $0x1,%r9d
  movslq %r12d,%rax
  lea    (%r15,%rax,4),%r11
  lea    -0x1(%rbp),%eax
  mov    %eax,(%r11)
  movl   $0x0,(%rbx)
  mov    $0x0,%r8d
  mov    $0x0,%eax
  mov    $0x0,%esi
  jmp    L199
```

assistant: ```c
int QSufSortTransform(int *__restrict V, int *__restrict I, const int numChar, const int largestInputSymbol, const int smallestInputSymbol, const int maxNewAlphabetSize, int *numSymbolAggregated) {
  int c, i, j;
  int a;
  int mask;
  int minSymbolInChunk = 0, maxSymbolInChunk = 0;
  int newAlphabetSize;
  int maxNumInputSymbol, maxNumBit, maxSymbol;
  maxNumInputSymbol = largestInputSymbol - smallestInputSymbol + 1;
  maxNumBit = 32 - leadingZero(maxNumInputSymbol);
  maxSymbol = INT_MAX >> maxNumBit;
  c = maxNumInputSymbol;
  for (a = 0; a < numChar && maxSymbolInChunk <= maxSymbol && c <= maxNewAlphabetSize; a++) {
    minSymbolInChunk = (minSymbolInChunk << maxNumBit) | (V[a] - smallestInputSymbol + 1);
    maxSymbolInChunk = c;
    c = (maxSymbolInChunk << maxNumBit) | maxNumInputSymbol;
  }
  mask = (1 << (a - 1) * maxNumBit) - 1;
  V[numChar] = smallestInputSymbol - 1;
  for (i = 0; i <= maxSymbolInChunk; i++) {
    I[i] = 0;
  }
  c = minSymbolInChunk;
  for (i = a; i <= numChar; i++) {
    I[c] = 1;
    c = ((c & mask) << maxNumBit) | (V[i] - smallestInputSymbol + 1);
  }
  for (i = 1; i < a; i++) {
    I[c] = 1;
    c = (c & mask) << maxNumBit;
  }
  newAlphabetSize = 1;
  for (i = 0; i <= maxSymbolInChunk; i++) {
    if (I[i]) {
      I[i] = newAlphabetSize;
      newAlphabetSize++;
    }
  }
  c = minSymbolInChunk;
  for (i = 0, j = a; j <= numChar; i++, j++) {
    V[i] = I[c];
    c = ((c & mask) << maxNumBit) | (V[j] - smallestInputSymbol + 1);
  }
  for (; i < numChar; i++) {
    V[i] = I[c];
    c = (c & mask) << maxNumBit;
  }
  V[numChar] = 0;
  *numSymbolAggregated = a;
  return newAlphabetSize;
}
```