user: 请将以下的汇编代码转换成C语言代码：

```asm
<kernel_ref>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L56
L22:
  mov    -0x24(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L16
L26:
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L30
L27:
  mov    -0xc(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0xa,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0xc(%rbp),%eax
  shl    $0x5,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0xa,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0xc(%rbp),%eax
  shl    $0x5,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0xa,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0xa,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0xa,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0xc(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  shl    $0xa,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0xc(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
  shl    $0xa,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0xa,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x8(%rbp)
L30:
  mov    $0x20,%eax
  sub    -0x24(%rbp),%eax
  cmp    %eax,-0x8(%rbp)
  jl     L27
  addl   $0x1,-0xc(%rbp)
L16:
  mov    $0x20,%eax
  sub    -0x24(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jl     L26
  addl   $0x1,-0x10(%rbp)
L56:
  mov    $0x20,%eax
  sub    -0x24(%rbp),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L22
  nop
  pop    %rbp
  ret
```

assistant: ```c
void kernel_ref(float *input, float *output, int halo_width) {
  int i, j, k;
  for (i = halo_width; i < 32 - halo_width; ++i) {
    for (j = halo_width; j < 32 - halo_width; ++j) {
      for (k = halo_width; k < 32 - halo_width; ++k) {
        float v = input[(i) + (j)*32 + (k)*32 * 32] + input[(i - 1) + (j)*32 + (k)*32 * 32] + input[(i + 1) + (j)*32 + (k)*32 * 32] + input[(i) + (j - 1) * 32 + (k)*32 * 32] + input[(i) + (j + 1) * 32 + (k)*32 * 32] + input[(i) + (j)*32 + (k - 1) * 32 * 32] + input[(i) + (j)*32 + (k + 1) * 32 * 32];
        output[(i) + (j)*32 + (k)*32 * 32] = v;
      }
    }
  }
  return;
}
```