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

```asm
<kff_synthese_einzelpunkt_s>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    0x80(%rsp),%rax
  mov    %ecx,0x3c(%rsp)
  movsd  %xmm0,0x30(%rsp)
  movq   $0x0,(%rax)
  xor    %eax,%eax
  test   %edx,%edx
  cmovns %edx,%eax
  mov    %eax,%ebp
  cmp    $0x41,%dil
  jne    L64
  movsd  D16(%rip),%xmm4
  mulsd  %xmm0,%xmm4
  movsd  %xmm4,0x30(%rsp)
L64:
  mov    %ebp,%eax
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    %eax,%eax
  or     $0x1,%eax
  mov    %eax,0x38(%rsp)
  cmp    0x3c(%rsp),%ebp
  jg     L18
  movslq %ebp,%rax
  shl    $0x3,%rax
  lea    0x0(%r13,%rax,1),%rdx
  lea    (%r9,%rax,1),%r14
  mov    %rdx,0x28(%rsp)
  lea    (%r8,%rax,1),%rdx
  mov    %rdx,0x20(%rsp)
  nopl   0x0(%rax,%rax,1)
L74:
  mov    0x38(%rsp),%edx
  mov    %edx,%eax
  neg    %edx
  mov    %edx,0x38(%rsp)
  mov    0x28(%rsp),%rdx
  mov    (%rdx),%rsi
  mov    0x20(%rsp),%rdx
  mov    (%rdx),%rdi
  movsd  (%rsi),%xmm0
  movsd  (%rdi),%xmm1
  cmp    $0x1,%eax
  je     L31
  mulsd  %xmm0,%xmm1
  mov    0x38(%rsp),%ecx
L35:
  mov    $0x8,%r12d
  mov    $0x1,%r15d
  test   %ebp,%ebp
  jg     L27
  jmp    L75
  nopw   0x0(%rax,%rax,1)
L65:
  call   <cos@plt>
  mov    (%r14),%rcx
  mov    %r13d,%edi
  add    $0x1,%r15d
  mulsd  0x8(%rsp),%xmm0
  movsd  (%rcx,%r12,1),%xmm7
  add    $0x8,%r12
  movsd  %xmm7,0x10(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <sin@plt>
  mulsd  0x10(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm1
  addsd  0x8(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  addsd  %xmm0,%xmm1
  cmp    %ebp,%r15d
  jg     L75
L29:
  mov    0x28(%rsp),%rax
  mov    %ebx,%ecx
  mov    (%rax),%rsi
  mov    0x20(%rsp),%rax
  mov    (%rax),%rdi
L27:
  pxor   %xmm0,%xmm0
  movsd  (%rdi,%r12,1),%xmm3
  movsd  (%rsi,%r12,1),%xmm2
  mov    %ecx,%ebx
  cvtsi2sd %r15d,%xmm0
  mulsd  0x30(%rsp),%xmm0
  neg    %ebx
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm2,(%rsp)
  movsd  %xmm3,0x8(%rsp)
  cvttsd2si %xmm0,%r13d
  mov    %r13d,%edi
  cmp    $0x1,%ecx
  jne    L65
  call   <cos@plt>
  mov    (%r14),%rcx
  mov    %r13d,%edi
  add    $0x1,%r15d
  mulsd  0x8(%rsp),%xmm0
  movsd  (%rcx,%r12,1),%xmm2
  add    $0x8,%r12
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <sin@plt>
  mulsd  0x10(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm1
  addsd  0x8(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  subsd  %xmm0,%xmm1
  cmp    %ebp,%r15d
  jle    L29
L75:
  mov    0x80(%rsp),%rax
  addq   $0x8,0x28(%rsp)
  add    $0x1,%ebp
  add    $0x8,%r14
  addq   $0x8,0x20(%rsp)
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  cmp    %ebp,0x3c(%rsp)
  jge    L74
L18:
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L31:
  xorpd  D10(%rip),%xmm0
  mov    $0xffffffff,%ecx
  mulsd  %xmm0,%xmm1
  jmp    L35
```

tool_calls: name: retrieve_data
arguments: label: D16
type_guessed: byte[8]
name: retrieve_data
arguments: label: D10
type_guessed: f32[4]

tool: {"D16": [0x39,0x9d,0x52,0xa2,0x46,0xdf,0x91,0x3f]}

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

assistant: ```c
int kff_synthese_einzelpunkt_s(double lambda, char winkelmass, double **leg_func, int mindeg, int maxdeg, double **c_lm, double **s_lm, double *f) {
  double fzw;
  int l;
  int m;
  int sig_alt;
  int sig_alt_st;
  *f = 0.;
  mindeg = (mindeg < 0) ? 0 : mindeg;
  if (winkelmass == 'A')
    lambda *= (3.141592653589793 / 180.0);
  if (mindeg % 2 == 0)
    sig_alt_st = -1;
  else
    sig_alt_st = 1;
  for (l = mindeg; l <= maxdeg; l++) {
    sig_alt_st = -sig_alt_st;
    sig_alt = sig_alt_st;
    if (sig_alt == -1) {
      fzw = -leg_func[l][0] * c_lm[l][0];
    } else {
      fzw = leg_func[l][0] * c_lm[l][0];
    }
    for (m = 1; m <= l; m++) {
      sig_alt = -sig_alt;
      if (sig_alt == -1) {
        fzw -= (leg_func[l][m] * (c_lm[l][m] * cos(m * lambda) + s_lm[l][m] * sin(m * lambda)));
      } else {
        fzw += (leg_func[l][m] * (c_lm[l][m] * cos(m * lambda) + s_lm[l][m] * sin(m * lambda)));
      }
    }
    *f += fzw;
  }
  return 0;
}
```