user: Converte this assembly snippet into its equivalent C code:

```asm
<radixSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbx
  sub    $0x78,%rsp
  mov    %esi,-0x84(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  lea    0x0(,%rax,4),%rcx
  add    %rcx,%rax
  mov    %rcx,-0x68(%rbp)
  mov    %rsp,%rcx
  lea    0xf(,%rax,8),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rdx
  sub    %rdx,%rcx
  and    $0xfffffffffffffff0,%rax
  cmp    %rcx,%rsp
  je     L78
L64:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L64
L78:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L47
L169:
  mov    -0x84(%rbp),%esi
  mov    (%r12),%eax
  mov    %rsp,-0x80(%rbp)
  test   %esi,%esi
  jle    L12
  lea    -0x1(%rsi),%edx
  cmp    $0x2,%edx
  jbe    L194
  shr    $0x2,%esi
  movd   %eax,%xmm4
  mov    %r12,%rax
  mov    %esi,%edx
  pshufd $0x0,%xmm4,%xmm2
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%r12,%rdx,1),%rdx
L164:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm2,%xmm1
  pand   %xmm1,%xmm0
  pandn  %xmm2,%xmm1
  movdqa %xmm1,%xmm2
  por    %xmm0,%xmm2
  cmp    %rax,%rdx
  jne    L164
  movdqa %xmm2,%xmm1
  mov    -0x84(%rbp),%esi
  psrldq $0x8,%xmm1
  movdqa %xmm1,%xmm0
  mov    %esi,%edx
  pcmpgtd %xmm2,%xmm0
  and    $0xfffffffc,%edx
  and    $0x3,%esi
  pand   %xmm0,%xmm1
  pandn  %xmm2,%xmm0
  por    %xmm1,%xmm0
  movdqa %xmm0,%xmm2
  psrldq $0x4,%xmm2
  movdqa %xmm2,%xmm1
  pcmpgtd %xmm0,%xmm1
  pand   %xmm1,%xmm2
  pandn  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  por    %xmm2,%xmm0
  movd   %xmm0,%eax
  je     L12
L179:
  movslq %edx,%rsi
  mov    -0x84(%rbp),%ebx
  lea    0x0(,%rsi,4),%rcx
  mov    (%r12,%rsi,4),%esi
  cmp    %esi,%eax
  cmovl  %esi,%eax
  lea    0x1(%rdx),%esi
  cmp    %esi,%ebx
  jle    L12
  mov    0x4(%r12,%rcx,1),%esi
  cmp    %esi,%eax
  cmovl  %esi,%eax
  add    $0x2,%edx
  cmp    %edx,%ebx
  jle    L12
  mov    0x8(%r12,%rcx,1),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
L12:
  test   %eax,%eax
  jle    L22
  xor    %ecx,%ecx
  mov    $0xcccccccd,%esi
  nopw   0x0(%rax,%rax,1)
L30:
  mov    %eax,%eax
  mov    %ecx,%edi
  lea    0x1(%rcx),%ecx
  mov    %rax,%rdx
  imul   %rsi,%rax
  shr    $0x23,%rax
  cmp    $0x9,%edx
  jg     L30
  mov    -0x68(%rbp),%rax
  mov    %edi,-0x88(%rbp)
  movl   $0x0,-0x78(%rbp)
  shr    $0x2,%rax
  movl   $0x1,-0x74(%rbp)
  mov    %rax,-0x98(%rbp)
  mov    -0x84(%rbp),%eax
  sub    $0x1,%eax
  lea    0x4(%r12,%rax,4),%rax
  mov    %rax,-0xa0(%rbp)
  lea    -0x60(%rbp),%rax
  mov    %rax,-0x90(%rbp)
  lea    -0x38(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  nopw   0x0(%rax,%rax,1)
L110:
  mov    -0x84(%rbp),%eax
  pxor   %xmm3,%xmm3
  movq   $0x0,-0x40(%rbp)
  mov    %r12,%rcx
  movaps %xmm3,-0x60(%rbp)
  movaps %xmm3,-0x50(%rbp)
  test   %eax,%eax
  jle    L34
  mov    -0x98(%rbp),%r8
  mov    -0x74(%rbp),%edi
  mov    -0xa0(%rbp),%r9
  mov    -0x80(%rbp),%r10
  xchg   %ax,%ax
L82:
  mov    (%rcx),%esi
  add    $0x4,%rcx
  mov    %esi,%eax
  cltd
  idiv   %edi
  movslq %eax,%rdx
  mov    %eax,%r11d
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%r11d
  sar    $0x22,%rdx
  sub    %r11d,%edx
  lea    (%rdx,%rdx,4),%r11d
  add    %r11d,%r11d
  sub    %r11d,%eax
  movslq %eax,%rdx
  movslq -0x60(%rbp,%rdx,4),%rax
  lea    0x1(%rax),%r11d
  mov    %r11d,-0x60(%rbp,%rdx,4)
  imul   %r8,%rdx
  add    %rdx,%rax
  mov    %esi,(%r10,%rax,4)
  cmp    %rcx,%r9
  jne    L82
L34:
  mov    -0x80(%rbp),%r15
  xor    %r14d,%r14d
  mov    -0x90(%rbp),%rbx
  mov    %r15,%rax
  mov    %r14d,%r15d
  mov    %rax,%r14
  nopl   (%rax)
L25:
  mov    (%rbx),%r13d
  test   %r13d,%r13d
  jle    L175
  movslq %r15d,%rax
  movslq %r13d,%rdx
  mov    %r14,%rsi
  add    %r13d,%r15d
  lea    (%r12,%rax,4),%rdi
  shl    $0x2,%rdx
  call   <memcpy@plt>
L175:
  add    $0x4,%rbx
  add    -0x68(%rbp),%r14
  cmp    %rbx,-0x70(%rbp)
  jne    L25
  mov    -0x74(%rbp),%eax
  mov    -0x78(%rbp),%ecx
  lea    (%rax,%rax,4),%ebx
  lea    (%rbx,%rbx,1),%eax
  mov    %eax,-0x74(%rbp)
  lea    0x1(%rcx),%eax
  cmp    %ecx,-0x88(%rbp)
  je     L22
  mov    %eax,-0x78(%rbp)
  jmp    L110
L22:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L61
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L47:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L169
L194:
  xor    %edx,%edx
  jmp    L179
L61:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void radixSort(int A[], int n) {
  int bucket[10][n], app[10];
  int maxn = A[0];
  int i;
  for (i = 0; i < n; i++)
    if (A[i] > maxn)
      maxn = A[i];
  int sizen = 0;
  while (maxn > 0) {
    sizen++;
    maxn = maxn / 10;
  }
  int div = 1;
  int count;
  for (count = 0; count < sizen; count++) {
    for (i = 0; i < 10; i++)
      app[i] = 0;
    for (i = 0; i < n; i++) {
      int digit = (A[i] / div) % 10;
      bucket[digit][app[digit]++] = A[i];
    }
    i = 0;
    int j, k;
    for (k = 0; k < 10; k++)
      for (j = 0; j < app[k]; j++)
        A[i++] = bucket[k][j];
    div *= 10;
  }
}
```