user: Please show me the C implementation that matches the assembly code listed below:

```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     L28
  movsd  D1(%rip),%xmm7
  xor    %edi,%edi
  comisd %xmm0,%xmm7
  movsd  %xmm7,0x8(%rsp)
  setae  %dil
L6:
  call   <assert@plt>
  movsd  (%rsp),%xmm5
  pxor   %xmm7,%xmm7
  xor    %edi,%edi
  comisd %xmm7,%xmm5
  jb     L23
  movsd  0x8(%rsp),%xmm6
  xor    %edi,%edi
  comisd %xmm5,%xmm6
  setae  %dil
L23:
  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  D36(%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  D9(%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
L28:
  movsd  D1(%rip),%xmm4
  xor    %edi,%edi
  movsd  %xmm4,0x8(%rsp)
  jmp    L6
```

tool_calls: name: disassemble_data
arguments: data_tag: D1
type: f64
name: disassemble_data
arguments: data_tag: D36
type: f32[4]
name: disassemble_data
arguments: data_tag: D9
type: f32[2]

tool: D1: 1

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

tool: {"D9": [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);
}
```