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

```asm
<smooth_histogram>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L54:
  cmp    %rdx,%rsp
  je     L24
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L54
L24:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L74
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L74:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x3c(%rbp),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <zero_histogram@plt>
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  add    %rdx,%rax
  shr    %rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  add    %rdx,%rax
  shr    %rax
  mov    %rax,%rcx
  mov    -0x20(%rbp),%rax
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  mov    %rcx,(%rax,%rdx,8)
  movl   $0x1,-0x2c(%rbp)
  jmp    L39
L18:
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  add    %rdx,%rax
  movabs $0xaaaaaaaaaaaaaaab,%rdx
  mul    %rdx
  mov    %rdx,%rcx
  shr    %rcx
  mov    -0x20(%rbp),%rax
  mov    -0x2c(%rbp),%edx
  movslq %edx,%rdx
  mov    %rcx,(%rax,%rdx,8)
  addl   $0x1,-0x2c(%rbp)
L39:
  mov    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L18
  movl   $0x0,-0x2c(%rbp)
  jmp    L58
L44:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rax
  mov    -0x2c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,8),%rax
  mov    %rax,(%rcx)
  addl   $0x1,-0x2c(%rbp)
L58:
  mov    -0x2c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L44
  mov    $0x1,%eax
  mov    %rbx,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L73
  call   <__stack_chk_fail@plt>
L73:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int smooth_histogram(histogram, gray_levels)
int gray_levels;
unsigned long histogram[];
{
  int i;
  unsigned long new_hist[gray_levels];
  zero_histogram(new_hist, gray_levels);
  new_hist[0] = (histogram[0] + histogram[1]) / 2;
  new_hist[gray_levels] = (histogram[gray_levels] + histogram[gray_levels - 1]) / 2;
  for (i = 1; i < gray_levels - 1; i++) {
    new_hist[i] = (histogram[i - 1] + histogram[i] + histogram[i + 1]) / 3;
  }
  for (i = 0; i < gray_levels; i++)
    histogram[i] = new_hist[i];
  return (1);
}
```