user: Please show me the C implementation that matches the assembly code listed below:

```asm
<boundaryvalues>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L69
L15:
  movl   $0x0,-0x8(%rbp)
  jmp    L57
L50:
  movl   $0x0,-0x4(%rbp)
  jmp    L84
L116:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <getcelltype@plt>
  cmp    $0x6,%eax
  ja     L51
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D1(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D1(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x38(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%esi
  mov    -0xc(%rbp),%eax
  sub    $0x8,%rsp
  push   0x38(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <boundaryvalues_no_slip@plt>
  add    $0x10,%rsp
  jmp    L11
  mov    -0x38(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%esi
  mov    -0xc(%rbp),%eax
  sub    $0x8,%rsp
  push   0x38(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <boundaryvalues_free_slip@plt>
  add    $0x10,%rsp
  jmp    L11
  mov    -0x38(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%esi
  mov    -0xc(%rbp),%eax
  sub    $0x8,%rsp
  push   0x38(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <boundaryvalues_no_slip@plt>
  add    $0x10,%rsp
  mov    -0x40(%rbp),%rdi
  mov    -0x38(%rbp),%r9
  mov    -0x30(%rbp),%r8
  mov    -0x28(%rbp),%rcx
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%esi
  mov    -0xc(%rbp),%eax
  sub    $0x8,%rsp
  push   0x38(%rbp)
  movq   %rdi,%xmm0
  mov    %eax,%edi
  call   <boundaryvalues_inflow@plt>
  add    $0x10,%rsp
  jmp    L11
  mov    -0x38(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%esi
  mov    -0xc(%rbp),%eax
  sub    $0x8,%rsp
  push   0x38(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <boundaryvalues_outflow@plt>
  add    $0x10,%rsp
  jmp    L11
  mov    -0x38(%rbp),%r8
  mov    -0x30(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%esi
  mov    -0xc(%rbp),%eax
  push   0x40(%rbp)
  push   0x38(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <boundaryvalues_moving_wall@plt>
  add    $0x10,%rsp
  jmp    L11
L51:
  nop
L11:
  addl   $0x1,-0x4(%rbp)
L84:
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x4(%rbp)
  jle    L116
  addl   $0x1,-0x8(%rbp)
L57:
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jle    L50
  addl   $0x1,-0xc(%rbp)
L69:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jle    L15
  nop
  nop
  leave
  ret
```

assistant: ```c
void boundaryvalues(int imax, int jmax, int kmax, double ***U, double ***V, double ***W, double ***P, double ***F, double ***G, double ***H, char *problem, int ***Flag, double velIN, double *velMW) {
  int i, j, k;
  for (i = 0; i < imax + 2; i++) {
    for (j = 0; j < jmax + 2; j++) {
      for (k = 0; k < kmax + 2; k++) {
        switch (getcelltype(Flag[i][j][k])) {
        case 2:
          boundaryvalues_no_slip(i, j, k, U, V, W, Flag);
          break;
        case 3:
          boundaryvalues_free_slip(i, j, k, U, V, W, Flag);
          break;
        case 5:
          boundaryvalues_no_slip(i, j, k, U, V, W, Flag);
          boundaryvalues_inflow(i, j, k, U, V, W, Flag, velIN);
          break;
        case 4:
          boundaryvalues_outflow(i, j, k, U, V, W, Flag);
          break;
        case 6:
          boundaryvalues_moving_wall(i, j, k, U, V, W, Flag, velMW);
          break;
        default:
          break;
        }
      }
    }
  }
}
```