user: Demonstrate the C code that generates the assembly output below:

```asm
<countsort>:
  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     L53
L89:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L89
L53:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L97
L9:
  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    L48
  lea    -0x1(%r8),%eax
  mov    %rdi,%r11
  mov    %rax,%r10
  lea    0x4(%rdi,%rax,4),%rbx
L3:
  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    %rbx,%r11
  jne    L3
L48:
  mov    -0x48(%rbp),%edx
  mov    -0x44(%rbp),%ebx
  mov    -0x50(%rbp),%r11d
  add    -0x4c(%rbp),%r11d
  mov    -0x40(%rbp),%eax
  add    %r11d,%edx
  mov    -0x3c(%rbp),%r13d
  add    %edx,%ebx
  mov    -0x38(%rbp),%r12d
  movd   -0x30(%rbp),%xmm4
  movd   %edx,%xmm3
  add    %ebx,%eax
  movd   -0x38(%rbp),%xmm5
  movd   -0x34(%rbp),%xmm1
  add    %eax,%r13d
  movd   -0x3c(%rbp),%xmm0
  mov    -0x34(%rbp),%r14d
  add    %r13d,%r12d
  punpckldq %xmm4,%xmm1
  movd   %r13d,%xmm6
  movd   -0x40(%rbp),%xmm7
  punpckldq %xmm5,%xmm0
  add    %r12d,%r14d
  movd   %r12d,%xmm2
  movd   -0x48(%rbp),%xmm4
  punpcklqdq %xmm1,%xmm0
  movd   %r14d,%xmm1
  movd   %ebx,%xmm5
  punpckldq %xmm1,%xmm2
  movd   %eax,%xmm1
  punpckldq %xmm5,%xmm3
  punpckldq %xmm6,%xmm1
  movd   %r11d,%xmm6
  punpcklqdq %xmm2,%xmm1
  movd   -0x44(%rbp),%xmm2
  paddd  %xmm1,%xmm0
  movd   -0x50(%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   -0x4c(%rbp),%xmm2
  punpckldq %xmm6,%xmm2
  punpcklqdq %xmm3,%xmm2
  paddd  %xmm2,%xmm1
  movups %xmm1,-0x4c(%rbp)
  test   %r10d,%r10d
  js     L31
  movslq %r10d,%r10
  nopw   0x0(%rax,%rax,1)
L39:
  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    L39
L31:
  test   %r8d,%r8d
  jle    L19
  lea    0x0(,%r9,4),%rdx
  call   <memcpy@plt>
L19:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L65
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L97:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L9
L65:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void countsort(int arr[], int n, int exp) {
  int output[n];
  int i, count[10] = {};
  for (i = 0; i < n; i++) {
    count[(arr[i] / exp) % 10]++;
  }
  for (i = 1; i < 10; i++) {
    count[i] = count[i] + count[i - 1];
  }
  for (i = n - 1; i >= 0; i--) {
    output[count[(arr[i] / exp) % 10] - 1] = arr[i];
    count[(arr[i] / exp) % 10]--;
  }
  for (i = 0; i < n; i++) {
    arr[i] = output[i];
  }
}
```