user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<counting_sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rsi
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L111
L78:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L111:
  mov    -0x1c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L78
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L23:
  cmp    %rdx,%rsp
  je     L30
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L23
L30:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L60
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L60:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L47
L83:
  mov    -0x10(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  movl   $0x0,(%rax,%rdx,4)
  addl   $0x1,-0x1c(%rbp)
L47:
  mov    -0x1c(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jle    L83
  movl   $0x0,-0x1c(%rbp)
  jmp    L14
L10:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  lea    0x1(%rax),%ecx
  mov    -0x10(%rbp),%rax
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  addl   $0x1,-0x1c(%rbp)
L14:
  mov    -0x1c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L10
  movl   $0x1,-0x1c(%rbp)
  jmp    L102
L124:
  mov    -0x10(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%ecx
  mov    -0x1c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x10(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  addl   $0x1,-0x1c(%rbp)
L102:
  mov    -0x1c(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jle    L124
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L103
L16:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  lea    -0x1(%rax),%ecx
  mov    -0x10(%rbp),%rax
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  subl   $0x1,-0x1c(%rbp)
L103:
  cmpl   $0x0,-0x1c(%rbp)
  jns    L16
  mov    %rsi,%rsp
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L128
  call   <__stack_chk_fail@plt>
L128:
  leave
  ret
```

assistant: ```c
void counting_sort(const int a[], int b[], int size, int maxvalue) {
  int i = 0;
  for (i = 0; i < size; i++) {
    b[i] = 0;
  }
  int temp[maxvalue + 1];
  for (i = 0; i <= maxvalue; i++) {
    temp[i] = 0;
  }
  for (i = 0; i < size; i++) {
    temp[a[i]] += 1;
  }
  for (i = 1; i <= maxvalue; i++) {
    temp[i] = temp[i] + temp[i - 1];
  }
  for (i = size - 1; i >= 0; i--) {
    b[temp[a[i]] - 1] = a[i];
    temp[a[i]] = temp[a[i]] - 1;
  }
}
```