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

```asm
<kernel>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    %r8d,-0x4c(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L101
L114:
  movl   $0x0,-0x24(%rbp)
  jmp    L169
L145:
  movl   $0x0,-0x20(%rbp)
  jmp    L84
L103:
  mov    -0x24(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%eax
  imul   -0x44(%rbp),%eax
  imul   -0x48(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L123
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  jmp    L49
L123:
  mov    -0x1c(%rbp),%eax
L49:
  mov    %eax,-0x18(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x20(%rbp)
  je     L13
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  jmp    L91
L13:
  mov    -0x1c(%rbp),%eax
L91:
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L18
  mov    -0x1c(%rbp),%eax
  sub    -0x48(%rbp),%eax
  jmp    L125
L18:
  mov    -0x1c(%rbp),%eax
L125:
  mov    %eax,-0x10(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x24(%rbp)
  je     L173
  mov    -0x1c(%rbp),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  jmp    L108
L173:
  mov    -0x1c(%rbp),%eax
L108:
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0x28(%rbp)
  je     L159
  mov    -0x44(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  sub    %edx,%eax
  jmp    L163
L159:
  mov    -0x1c(%rbp),%eax
L163:
  mov    %eax,-0x8(%rbp)
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x28(%rbp)
  je     L150
  mov    -0x44(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  jmp    L179
L150:
  mov    -0x1c(%rbp),%eax
L179:
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x20(%rbp)
L84:
  mov    -0x20(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L103
  addl   $0x1,-0x24(%rbp)
L169:
  mov    -0x24(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L145
  addl   $0x1,-0x28(%rbp)
L101:
  mov    -0x28(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L114
  nop
  pop    %rbp
  ret
```

assistant: ```c
void kernel(float *g1, float *g2, int nx, int ny, int nz) {
  int z;
  for (z = 0; z < nz; z++) {
    int y;
    for (y = 0; y < ny; y++) {
      int x;
      for (x = 0; x < nx; x++) {
        int c, w, e, n, s, b, t;
        c = x + y * nx + z * nx * ny;
        w = (x == 0) ? c : c - 1;
        e = (x == nx - 1) ? c : c + 1;
        n = (y == 0) ? c : c - ny;
        s = (y == ny - 1) ? c : c + ny;
        b = (z == 0) ? c : c - nx * ny;
        t = (z == nz - 1) ? c : c + nx * ny;
        g2[c] = g1[c] + g1[w] + g1[e] + g1[s] + g1[n] + g1[b] + g1[t];
      }
    }
  }
  return;
}
```