user: Converte this assembly snippet into its equivalent C code:

```asm
<setbv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,%r14
  mov    %esi,0x10(%rsp)
  mov    %ecx,0xc(%rsp)
  mov    %r8d,0x14(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  test   %ecx,%ecx
  jle    L61
  movslq %r8d,%rax
  lea    -0x8(,%rax,8),%r13
  mov    %ecx,%eax
  mov    %rax,0x30(%rsp)
  movq   $0x0,0x28(%rsp)
  lea    0x40(%rsp),%r15
  jmp    L226
L44:
  add    $0x1,%r12
  cmp    0x20(%rsp),%r12
  je     L37
L119:
  sub    $0x8,%rsp
  mov    0x1c(%rsp),%esi
  push   %rsi
  mov    0x1c(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    %r15,%rcx
  mov    $0x0,%edx
  mov    0x28(%rsp),%esi
  mov    %r12d,0x2c(%rsp)
  mov    %r12d,%edi
  call   <exact@plt>
  mov    0x24(%rsp),%eax
  mov    %eax,(%rsp)
  mov    0x1c(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    %rbp,%rcx
  mov    0x48(%rsp),%edx
  mov    0x28(%rsp),%esi
  mov    0x2c(%rsp),%edi
  call   <exact@plt>
  lea    0x0(,%r12,8),%rdx
  add    $0x10,%rsp
  mov    $0x0,%eax
L180:
  mov    (%r14,%rax,1),%rcx
  mov    (%rcx,%rdx,1),%rcx
  mov    (%rcx,%rbx,1),%rcx
  movsd  (%rax,%r15,1),%xmm0
  movsd  %xmm0,(%rcx)
  movsd  (%rax,%rbp,1),%xmm0
  mov    (%r14,%rax,1),%rcx
  mov    (%rcx,%rdx,1),%rcx
  mov    (%rcx,%rbx,1),%rcx
  movsd  %xmm0,(%rcx,%r13,1)
  add    $0x8,%rax
  cmp    $0x28,%rax
  jne    L180
  jmp    L44
L37:
  addq   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%rax
  cmp    0x30(%rsp),%rax
  je     L61
L226:
  mov    0x28(%rsp),%rax
  mov    %eax,0x18(%rsp)
  lea    0x0(,%rax,8),%rbx
  mov    0x10(%rsp),%eax
  mov    %eax,%esi
  mov    %rsi,0x20(%rsp)
  mov    $0x0,%r12d
  lea    0x70(%rsp),%rbp
  mov    0x14(%rsp),%esi
  lea    -0x1(%rsi),%edi
  mov    %edi,0x38(%rsp)
  test   %eax,%eax
  jg     L119
  jmp    L37
L61:
  cmpl   $0x0,0x14(%rsp)
  jle    L9
  movslq 0xc(%rsp),%rax
  lea    -0x8(,%rax,8),%r13
  mov    0x14(%rsp),%eax
  mov    %rax,0x30(%rsp)
  mov    0x10(%rsp),%edi
  test   %edi,%edi
  mov    $0x0,%eax
  cmovns %edi,%eax
  mov    %eax,0x3c(%rsp)
  movq   $0x0,0x28(%rsp)
  lea    0x40(%rsp),%r15
  jmp    L215
L143:
  add    $0x1,%r12
  cmp    %r12,0x20(%rsp)
  je     L59
L212:
  sub    $0x8,%rsp
  mov    0x1c(%rsp),%edi
  push   %rdi
  mov    0x1c(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    %r15,%rcx
  mov    0x28(%rsp),%edx
  mov    $0x0,%esi
  mov    %r12d,0x2c(%rsp)
  mov    %r12d,%edi
  call   <exact@plt>
  mov    0x24(%rsp),%eax
  mov    %eax,(%rsp)
  mov    0x1c(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    %rbp,%rcx
  mov    0x28(%rsp),%edx
  mov    0x48(%rsp),%esi
  mov    0x2c(%rsp),%edi
  call   <exact@plt>
  lea    0x0(,%r12,8),%rdx
  add    $0x10,%rsp
  mov    $0x0,%eax
L201:
  movsd  (%rax,%r15,1),%xmm0
  mov    (%r14,%rax,1),%rcx
  mov    (%rcx,%rdx,1),%rcx
  mov    (%rcx),%rcx
  movsd  %xmm0,(%rcx,%rbx,1)
  movsd  (%rax,%rbp,1),%xmm0
  mov    (%r14,%rax,1),%rcx
  mov    (%rcx,%rdx,1),%rcx
  mov    (%rcx,%r13,1),%rcx
  movsd  %xmm0,(%rcx,%rbx,1)
  add    $0x8,%rax
  cmp    $0x28,%rax
  jne    L201
  jmp    L143
L59:
  addq   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%rax
  cmp    0x30(%rsp),%rax
  je     L3
L215:
  mov    0x28(%rsp),%rax
  mov    %eax,0x18(%rsp)
  lea    0x0(,%rax,8),%rbx
  mov    0x10(%rsp),%eax
  mov    %eax,%edi
  mov    %rdi,0x20(%rsp)
  mov    $0x0,%r12d
  lea    0x70(%rsp),%rbp
  mov    0xc(%rsp),%edi
  lea    -0x1(%rdi),%esi
  mov    %esi,0x38(%rsp)
  test   %eax,%eax
  jg     L212
  jmp    L59
L3:
  movslq 0x10(%rsp),%rax
  lea    -0x8(,%rax,8),%r15
  movq   $0x0,0x20(%rsp)
  lea    0x40(%rsp),%r12
  mov    0x3c(%rsp),%r13d
  jmp    L222
L151:
  add    $0x1,%r13d
  cmp    %r13d,0xc(%rsp)
  je     L19
L169:
  sub    $0x8,%rsp
  mov    0x1c(%rsp),%eax
  push   %rax
  mov    0x1c(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    %r12,%rcx
  mov    0x28(%rsp),%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <exact@plt>
  mov    0x24(%rsp),%eax
  mov    %eax,(%rsp)
  mov    0x1c(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    %rbp,%rcx
  mov    0x28(%rsp),%edx
  mov    $0x0,%esi
  mov    0x2c(%rsp),%edi
  call   <exact@plt>
  add    $0x10,%rsp
  mov    $0x0,%eax
L229:
  movsd  (%rax,%r12,1),%xmm0
  mov    (%r14,%rax,1),%rdx
  mov    0x8(%rdx),%rdx
  mov    (%rdx),%rdx
  movsd  %xmm0,(%rdx,%rbx,1)
  movsd  (%rax,%rbp,1),%xmm0
  mov    (%r14,%rax,1),%rdx
  mov    (%rdx,%r15,1),%rdx
  mov    (%rdx),%rdx
  movsd  %xmm0,(%rdx,%rbx,1)
  add    $0x8,%rax
  cmp    $0x28,%rax
  jne    L229
  jmp    L151
L19:
  addq   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%rax
  cmp    0x30(%rsp),%rax
  je     L9
L222:
  mov    0x20(%rsp),%rax
  mov    %eax,0x18(%rsp)
  lea    0x0(,%rax,8),%rbx
  lea    0x70(%rsp),%rbp
  mov    0x10(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  cmp    %r13d,0xc(%rsp)
  jg     L169
  jmp    L19
L9:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void setbv(double ****u, int nx, int nxmax, int ny, int nz) {
  int i, j, k, m;
  double temp1[5], temp2[5];
  for (j = 0; j < ny; j++) {
    for (i = 0; i < nx; i++) {
      exact(i, j, 0, temp1, nx, ny, nz);
      exact(i, j, nz - 1, temp2, nx, ny, nz);
      for (m = 0; m < 5; m++) {
        u[m][i][j][0] = temp1[m];
        u[m][i][j][nz - 1] = temp2[m];
      }
    }
  }
  for (k = 0; k < nz; k++) {
    for (i = 0; i < nx; i++) {
      exact(i, 0, k, temp1, nx, ny, nz);
      exact(i, ny - 1, k, temp2, nx, ny, nz);
      for (m = 0; m < 5; m++) {
        u[m][i][0][k] = temp1[m];
        u[m][i][ny - 1][k] = temp2[m];
      }
    }
  }
  for (k = 0; k < nz; k++) {
    for (j = 0; i < ny; i++) {
      exact(0, j, k, temp1, nx, ny, nz);
      exact(nx - 1, j, k, temp2, nx, ny, nz);
      for (m = 0; m < 5; m++) {
        u[m][1][j][k] = temp1[m];
        u[m][nx - 1][j][k] = temp2[m];
      }
    }
  }
}
```