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

```asm
<mse_pfdr_deltaapprox>:
  endbr64
  push   %r15
  pxor   %xmm6,%xmm6
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x38,%rsp
  comisd %xmm6,%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm1,(%rsp)
  jb     L25
  movsd  D33(%rip),%xmm7
  xor    %edi,%edi
  comisd %xmm0,%xmm7
  movsd  %xmm7,0x8(%rsp)
  setae  %dil
L1:
  call   <assert@plt>
  movsd  (%rsp),%xmm5
  pxor   %xmm7,%xmm7
  xor    %edi,%edi
  comisd %xmm7,%xmm5
  jb     L8
  movsd  0x8(%rsp),%xmm6
  xor    %edi,%edi
  comisd %xmm5,%xmm6
  setae  %dil
L8:
  call   <assert@plt>
  mov    $0x1,%edi
  lea    0x0(%r13,%r12,1),%r15d
  add    %ebp,%ebx
  call   <assert@plt>
  mov    $0x1,%edi
  add    %r15d,%ebx
  call   <assert@plt>
  mov    $0x1,%edi
  call   <assert@plt>
  mov    $0x1,%edi
  call   <assert@plt>
  xor    %edi,%edi
  cmp    %r14d,%ebx
  sete   %dil
  call   <assert@plt>
  pxor   %xmm2,%xmm2
  mov    %r12d,%eax
  pxor   %xmm3,%xmm3
  cvtsi2sd %r15,%xmm2
  sub    %ebp,%eax
  pxor   %xmm4,%xmm4
  movsd  (%rsp),%xmm0
  cvtsi2sd %rax,%xmm3
  pxor   %xmm1,%xmm1
  lea    0x0(%r13,%rbp,1),%eax
  cvtsi2sd %rax,%xmm4
  xorpd  D23(%rip),%xmm0
  cvtsi2sd %r14,%xmm1
  mulsd  %xmm2,%xmm2
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm2,0x28(%rsp)
  call   <pow1pm1@plt>
  pxor   %xmm1,%xmm1
  movsd  0x8(%rsp),%xmm0
  subsd  0x10(%rsp),%xmm0
  cvtsi2sd %eax,%xmm1
  movsd  0x20(%rsp),%xmm3
  mov    %ebp,%eax
  movsd  0x18(%rsp),%xmm4
  movsd  0x28(%rsp),%xmm2
  mulsd  %xmm1,%xmm0
  movsd  D16(%rip),%xmm1
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  divsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13,%xmm0
  mulsd  %xmm3,%xmm0
  mulsd  %xmm3,%xmm0
  pxor   %xmm3,%xmm3
  cvtsi2sd %r12,%xmm3
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  mulsd  %xmm4,%xmm3
  mulsd  %xmm4,%xmm3
  addsd  %xmm3,%xmm0
  pxor   %xmm3,%xmm3
  cvtsi2sd %rax,%xmm3
  mulsd  %xmm1,%xmm1
  mulsd  %xmm2,%xmm3
  mulsd  %xmm2,%xmm2
  addsd  %xmm3,%xmm0
  divsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm0
  ret
  nop
L25:
  movsd  D33(%rip),%xmm4
  xor    %edi,%edi
  movsd  %xmm4,0x8(%rsp)
  jmp    L1
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D33
datatype: f64
name: extract_symbolic_data
arguments: data_tag: D23
datatype: f32[4]
name: extract_symbolic_data
arguments: data_tag: D16
datatype: f32[2]

tool: D33: 1

tool: {"D23": [0.0,-0.0,0.0,0.0]}

tool: {"D16": [0.0,-1.875]}

assistant: ```c
double mse_pfdr_deltaapprox(const double lambda, const double gamma, const unsigned int a, const unsigned int b, const unsigned int c, const unsigned int d, const unsigned int m) {
  assert(lambda >= 0. && lambda <= 1.);
  assert(gamma >= 0. && gamma <= 1.);
  assert(a >= 0);
  assert(b >= 0);
  assert(c >= 0);
  assert(d >= 0);
  assert(a + b + c + d == m);
  const double apb = a + b;
  const double apb_sqr = apb * apb;
  const double bmc = b - c;
  const double apc = a + c;
  const double Klambda = -1. / ((1. - lambda) * pow1pm1(-gamma, (double)m));
  return Klambda * Klambda / (apb_sqr * apb_sqr) * (a * bmc * bmc + b * apc * apc + c * apb_sqr);
}
```