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

```asm
<SKP_Silk_NLSF_VQ_weights_laroia>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <SKP_max_int@plt>
  mov    %eax,-0x4(%rbp)
  mov    $0x200000,%eax
  cltd
  idivl  -0x4(%rbp)
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <SKP_max_int@plt>
  mov    %eax,-0x8(%rbp)
  mov    $0x200000,%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,-0x8(%rbp)
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    $0x7fff,%esi
  mov    %eax,%edi
  call   <SKP_min_int@plt>
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  movl   $0x1,-0xc(%rbp)
  jmp    L10
L16:
  mov    -0xc(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <SKP_max_int@plt>
  mov    %eax,-0x4(%rbp)
  mov    $0x200000,%eax
  cltd
  idivl  -0x4(%rbp)
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    $0x7fff,%esi
  mov    %eax,%edi
  call   <SKP_min_int@plt>
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,(%rdx)
  mov    -0xc(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <SKP_max_int@plt>
  mov    %eax,-0x8(%rbp)
  mov    $0x200000,%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,-0x8(%rbp)
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    $0x7fff,%esi
  mov    %eax,%edi
  call   <SKP_min_int@plt>
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,(%rdx)
  addl   $0x2,-0xc(%rbp)
L10:
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jl     L16
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    $0x8000,%eax
  sub    %edx,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <SKP_max_int@plt>
  mov    %eax,-0x4(%rbp)
  mov    $0x200000,%eax
  cltd
  idivl  -0x4(%rbp)
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    $0x7fff,%esi
  mov    %eax,%edi
  call   <SKP_min_int@plt>
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  lea    -0x4(%rdx),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,(%rdx)
  nop
  leave
  ret
```

assistant: ```c
void SKP_Silk_NLSF_VQ_weights_laroia(int *pNLSFW_Q6, const int *pNLSF_Q15, const int D) {
  int k;
  int tmp1_int, tmp2_int;
  ;
  ;
  tmp1_int = SKP_max_int(pNLSF_Q15[0], 3);
  tmp1_int = ((int)((1 << (15 + 6)) / (tmp1_int)));
  tmp2_int = SKP_max_int(pNLSF_Q15[1] - pNLSF_Q15[0], 3);
  tmp2_int = ((int)((1 << (15 + 6)) / (tmp2_int)));
  pNLSFW_Q6[0] = (int)SKP_min_int(tmp1_int + tmp2_int, 0x7FFF);
  ;
  for (k = 1; k < D - 1; k += 2) {
    tmp1_int = SKP_max_int(pNLSF_Q15[k + 1] - pNLSF_Q15[k], 3);
    tmp1_int = ((int)((1 << (15 + 6)) / (tmp1_int)));
    pNLSFW_Q6[k] = (int)SKP_min_int(tmp1_int + tmp2_int, 0x7FFF);
    ;
    tmp2_int = SKP_max_int(pNLSF_Q15[k + 2] - pNLSF_Q15[k + 1], 3);
    tmp2_int = ((int)((1 << (15 + 6)) / (tmp2_int)));
    pNLSFW_Q6[k + 1] = (int)SKP_min_int(tmp1_int + tmp2_int, 0x7FFF);
    ;
  }
  tmp1_int = SKP_max_int((1 << 15) - pNLSF_Q15[D - 1], 3);
  tmp1_int = ((int)((1 << (15 + 6)) / (tmp1_int)));
  pNLSFW_Q6[D - 1] = (int)SKP_min_int(tmp1_int + tmp2_int, 0x7FFF);
  ;
}
```