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

```asm
<sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x1,-0x2c(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <find_max@plt>
  mov    %eax,-0x28(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L84
L95:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    -0x4c(%rbp),%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,(%rbx)
  addl   $0x1,-0x38(%rbp)
L84:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L95
  mov    -0x4c(%rbp),%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L22
L50:
  movl   $0x0,-0x38(%rbp)
  jmp    L56
L61:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltd
  idivl  -0x2c(%rbp)
  mov    %eax,%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,-0x24(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rsi
  mov    -0x18(%rbp),%rdx
  add    %rsi,%rdx
  mov    (%rdx),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x38(%rbp)
L56:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L61
  movl   $0x0,-0x38(%rbp)
  jmp    L89
L51:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L80
  movl   $0x0,-0x34(%rbp)
  jmp    L103
L34:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x30(%rbp)
  addl   $0x1,-0x34(%rbp)
L103:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x34(%rbp)
  jl     L34
L80:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x38(%rbp)
L89:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L51
  mov    -0x2c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,-0x2c(%rbp)
  movl   $0x0,-0x30(%rbp)
L22:
  mov    -0x2c(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jle    L50
  mov    -0x48(%rbp),%rax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int *sort(int *number, int length) {
  int i, j;
  int k = 0, n = 1, max, lsd;
  int **temp = malloc(sizeof(int) * length);
  int *order;
  max = find_max(number, length);
  for (i = 0; i < length; i++)
    temp[i] = calloc(length, sizeof(int));
  order = calloc(length, sizeof(int));
  while (n <= max) {
    for (i = 0; i < length; i++) {
      lsd = (number[i] / n) % 10;
      temp[lsd][order[lsd]] = number[i];
      order[lsd] += 1;
    }
    for (i = 0; i < length; i++) {
      if (order[i] != 0) {
        for (j = 0; j < order[i]; j++) {
          number[k] = temp[i][j];
          k += 1;
        }
      }
      order[i] = 0;
    }
    n *= 10;
    k = 0;
  }
  return number;
}
```