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

```asm
<selfunc_lf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  movss  %xmm0,-0x34(%rbp)
  mov    %rdi,-0x40(%rbp)
  mov    %rsi,-0x48(%rbp)
  mov    %edx,-0x38(%rbp)
  movss  %xmm1,-0x4c(%rbp)
  movss  %xmm2,-0x50(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x50(%rbp),%xmm0
  jbe    L0
  pxor   %xmm0,%xmm0
  jmp    L77
L0:
  mov    -0x48(%rbp),%rax
  movss  (%rax),%xmm1
  movss  -0x4c(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L1
  pxor   %xmm0,%xmm0
  jmp    L77
L1:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x4c(%rbp),%xmm0
  jbe    L20
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x4c(%rbp)
L20:
  mov    -0x48(%rbp),%rax
  movss  (%rax),%xmm1
  movss  -0x50(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L55
  mov    -0x48(%rbp),%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x50(%rbp)
L55:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x50(%rbp),%xmm1
  movsd  D29(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D39(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  mov    $0xa,%edi
  call   <pow@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x1c(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x4c(%rbp),%xmm1
  movsd  D29(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D39(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  mov    $0xa,%edi
  call   <pow@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L41
L51:
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    $0x1,%esi
  mov    %edx,%edi
  movd   %eax,%xmm0
  call   <H@plt>
  movd   %xmm0,%ebx
  mov    -0x24(%rbp),%edx
  mov    -0x18(%rbp),%eax
  mov    $0x1,%esi
  mov    %edx,%edi
  movd   %eax,%xmm0
  call   <H@plt>
  movaps %xmm0,%xmm1
  movd   %ebx,%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  -0x34(%rbp),%xmm0
  mulss  -0x14(%rbp),%xmm0
  movss  -0x20(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x20(%rbp)
  addl   $0x1,-0x24(%rbp)
L41:
  mov    -0x24(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jl     L51
  movss  -0x20(%rbp),%xmm0
L77:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D29
type_infered: f64
name: disassemble_data
arguments: label: D39
type_infered: byte[8]

tool: D29: 20

tool: {"D39": [0x9a,0x99,0x99,0x99,0x99,0x99,0xd9,0xbf]}

assistant: ```c
float selfunc_lf(float n1, float phi[], float M[], int nparam, float Mmin, float Mmax) {
  int i;
  float val;
  float Hfactor;
  float lmin, lmax;
  if (Mmax < M[nparam])
    return (0.);
  if (Mmin > M[0])
    return (0.);
  if (Mmin < M[nparam])
    Mmin = M[nparam];
  if (Mmax > M[0])
    Mmax = M[0];
  lmin = pow(10., -0.4 * (Mmax + 20.));
  lmax = pow(10., -0.4 * (Mmin + 20.));
  val = 0.;
  for (i = 0; i < nparam; i++) {
    Hfactor = H(lmin, i, 1.) - H(lmax, i, 1.);
    val += n1 * phi[i] * Hfactor;
  }
  return (val);
}
```