user: What is the c source code of the assembly code below?

```asm
<aml_array_dbl_4d_variable_2nd_and_4th>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x28(%rbp)
  mov    %rcx,-0x38(%rbp)
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L62
L68:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  movl   $0x0,-0x14(%rbp)
  jmp    L46
L10:
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  movl   $0x0,-0x10(%rbp)
  jmp    L77
L64:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  movl   $0x0,-0xc(%rbp)
  jmp    L56
L23:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xc(%rbp)
L56:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xc(%rbp)
  jl     L23
  addl   $0x1,-0x10(%rbp)
L77:
  mov    -0x10(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L64
  addl   $0x1,-0x14(%rbp)
L46:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L10
  addl   $0x1,-0x18(%rbp)
L62:
  mov    -0x18(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L68
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
double ****aml_array_dbl_4d_variable_2nd_and_4th(int s1, int *s2, int s3, int *s4, double val) {
  int i, j, k, l;
  double ****arr = (double ****)malloc(s1 * sizeof(double ***));
  for (i = 0; i < s1; i++) {
    arr[i] = (double ***)malloc(s2[i] * sizeof(double **));
    for (j = 0; j < s2[i]; j++) {
      arr[i][j] = (double **)malloc(s3 * sizeof(double *));
      for (k = 0; k < s3; k++) {
        arr[i][j][k] = (double *)malloc(s4[k] * sizeof(double));
        for (l = 0; l < s4[k]; l++)
          arr[i][j][k][l] = val;
      }
    }
  }
  return arr;
}
```