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

```asm
<yyx_calc_posterior>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mov    -0x28(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <log10_add_pow10@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mov    -0x18(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <log10_add_pow10@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,-0x58(%rbp)
  mov    -0x50(%rbp),%rax
  movq   %rax,%xmm0
  call   <log10@plt>
  addsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  mov    -0x18(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <log10_add_pow10@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  mov    -0x48(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x48(%rbp),%rax
  add    $0x8,%rax
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movsd  -0x28(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  -0x8(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x48(%rbp),%rax
  leave
  ret
```

assistant: ```c
double *yyx_calc_posterior(const double *log10_prior_vec, const double *log10_likelihood_vec, double *tmp_four_double_vec, double base_change_relative_rate) {
  double alt_hom_log10_posterior = log10_prior_vec[2] + log10_likelihood_vec[2];
  double ref_hom_log10_posterior = log10_prior_vec[0] + log10_likelihood_vec[0];
  double log10_posterior_normalization_constant = log10_add_pow10(alt_hom_log10_posterior, ref_hom_log10_posterior);
  double het_log10_posterior = log10_prior_vec[1] + log10_likelihood_vec[1];
  log10_posterior_normalization_constant = log10_add_pow10(log10_posterior_normalization_constant, het_log10_posterior);
  double mosaic_log10_posterior = log10_prior_vec[3] + log10_likelihood_vec[3] + log10(base_change_relative_rate);
  log10_posterior_normalization_constant = log10_add_pow10(log10_posterior_normalization_constant, mosaic_log10_posterior);
  tmp_four_double_vec[0] = ref_hom_log10_posterior - log10_posterior_normalization_constant;
  tmp_four_double_vec[1] = het_log10_posterior - log10_posterior_normalization_constant;
  tmp_four_double_vec[2] = alt_hom_log10_posterior - log10_posterior_normalization_constant;
  tmp_four_double_vec[3] = mosaic_log10_posterior - log10_posterior_normalization_constant;
  return tmp_four_double_vec;
}
```