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

```asm
<bucketSort>:
  endbr64
  push   %rbp
  movslq %esi,%r9
  mov    %edx,%ecx
  mov    %r9,%r8
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  lea    0xf(,%r9,4),%rax
  mov    %rsp,%rsi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L63
L58:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L58
L63:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L1
L10:
  pxor   %xmm0,%xmm0
  movq   $0x0,-0x30(%rbp)
  mov    %rsp,%rsi
  lea    -0x1(%r8),%r10d
  movaps %xmm0,-0x50(%rbp)
  movaps %xmm0,-0x40(%rbp)
  test   %r8d,%r8d
  jle    L95
  lea    -0x1(%r8),%eax
  mov    %rdi,%r11
  mov    %rax,%r10
  lea    0x4(%rdi,%rax,4),%rbx
L97:
  mov    (%r11),%eax
  add    $0x4,%r11
  cltd
  idiv   %ecx
  movslq %eax,%rdx
  mov    %eax,%r12d
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%r12d
  sar    $0x22,%rdx
  sub    %r12d,%edx
  lea    (%rdx,%rdx,4),%r12d
  add    %r12d,%r12d
  sub    %r12d,%eax
  movslq %eax,%rdx
  addl   $0x1,-0x50(%rbp,%rdx,4)
  cmp    %r11,%rbx
  jne    L97
L95:
  mov    -0x48(%rbp),%edx
  mov    -0x44(%rbp),%r12d
  mov    -0x50(%rbp),%ebx
  add    -0x4c(%rbp),%ebx
  mov    -0x40(%rbp),%eax
  add    %ebx,%edx
  mov    -0x3c(%rbp),%r13d
  add    %edx,%r12d
  mov    -0x38(%rbp),%r11d
  mov    -0x34(%rbp),%r14d
  add    %r12d,%eax
  movd   -0x30(%rbp),%xmm5
  movd   -0x38(%rbp),%xmm6
  movd   %r12d,%xmm7
  add    %eax,%r13d
  movd   -0x34(%rbp),%xmm2
  movd   -0x44(%rbp),%xmm3
  add    %r13d,%r11d
  movd   %r13d,%xmm4
  add    %r11d,%r14d
  movd   %r11d,%xmm1
  punpckldq %xmm5,%xmm2
  movd   -0x40(%rbp),%xmm5
  movd   %r14d,%xmm0
  punpckldq %xmm0,%xmm1
  movd   %eax,%xmm0
  punpckldq %xmm5,%xmm3
  punpckldq %xmm4,%xmm0
  movd   %ebx,%xmm4
  punpcklqdq %xmm1,%xmm0
  movd   -0x3c(%rbp),%xmm1
  punpckldq %xmm6,%xmm1
  movd   -0x48(%rbp),%xmm6
  punpcklqdq %xmm2,%xmm1
  movd   %edx,%xmm2
  paddd  %xmm1,%xmm0
  movd   -0x4c(%rbp),%xmm1
  punpckldq %xmm7,%xmm2
  movups %xmm0,-0x3c(%rbp)
  pshufd $0xff,%xmm0,%xmm0
  punpckldq %xmm4,%xmm1
  movd   %xmm0,%eax
  add    %eax,-0x2c(%rbp)
  punpcklqdq %xmm2,%xmm1
  movd   -0x50(%rbp),%xmm2
  punpckldq %xmm6,%xmm2
  punpcklqdq %xmm3,%xmm2
  paddd  %xmm2,%xmm1
  movups %xmm1,-0x4c(%rbp)
  test   %r10d,%r10d
  js     L48
  movslq %r10d,%r10
  nopw   0x0(%rax,%rax,1)
L28:
  mov    (%rdi,%r10,4),%r11d
  sub    $0x1,%r10
  mov    %r11d,%eax
  cltd
  idiv   %ecx
  movslq %eax,%rdx
  mov    %eax,%ebx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ebx
  sar    $0x22,%rdx
  sub    %ebx,%edx
  lea    (%rdx,%rdx,4),%ebx
  add    %ebx,%ebx
  sub    %ebx,%eax
  movslq %eax,%rdx
  mov    -0x50(%rbp,%rdx,4),%eax
  sub    $0x1,%eax
  movslq %eax,%rbx
  mov    %eax,-0x50(%rbp,%rdx,4)
  mov    %r11d,(%rsi,%rbx,4)
  test   %r10d,%r10d
  jns    L28
L48:
  test   %r8d,%r8d
  jle    L14
  lea    0x0(,%r9,4),%rdx
  call   <memcpy@plt>
L14:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L77
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L1:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L10
L77:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void bucketSort(int a[], int size, int ex) {
  int count[10];
  int output[size];
  for (int i = 0; i < 10; i++) {
    count[i] = 0;
  }
  for (int i = 0; i < size; i++) {
    count[(a[i] / ex) % 10]++;
  }
  for (int i = 1; i < 10; i++) {
    count[i] = count[i] + count[i - 1];
  }
  for (int i = size - 1; i >= 0; i--) {
    output[count[(a[i] / ex) % 10] - 1] = a[i];
    count[(a[i] / ex) % 10]--;
  }
  for (int i = 0; i < size; i++) {
    a[i] = output[i];
  }
}
```