user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<wigNaiveSynthesis_symX>:
  endbr64
  mov    %esi,%r10d
  mov    %edi,%eax
  mov    %edx,%edi
  mov    %rcx,%rsi
  mov    %r10d,%edx
  mov    %eax,%ecx
  push   %r14
  neg    %edx
  push   %r13
  cmovs  %r10d,%edx
  neg    %ecx
  push   %r12
  cmovs  %eax,%ecx
  push   %rbp
  push   %rbx
  lea    (%rdi,%rdi,1),%ebx
  cmp    %ecx,%edx
  cmovl  %ecx,%edx
  mov    %eax,%ecx
  sub    %r10d,%eax
  sub    %r10d,%ecx
  and    $0x1,%eax
  mov    %ecx,%r11d
  and    $0x1,%r11d
  test   %ecx,%ecx
  cmovg  %r11d,%eax
  cmp    $0x1,%al
  sbb    %eax,%eax
  and    $0x2,%eax
  sub    $0x1,%eax
  test   %ebx,%ebx
  jle    L65
  sub    %edx,%edi
  pxor   %xmm4,%xmm4
  pxor   %xmm3,%xmm3
  xor    %r10d,%r10d
  mov    %edi,%edx
  cvtsi2sd %eax,%xmm4
  lea    -0x1(%rbx),%eax
  movslq %edi,%r11
  sar    $0x1f,%edx
  shl    $0x3,%r11
  lea    0x8(%r9,%rax,8),%rbx
  lea    -0x1(%rdi),%eax
  shr    $0x1e,%edx
  lea    (%rdi,%rdx,1),%ecx
  and    $0x3,%ecx
  sub    %edx,%ecx
  test   %ecx,%ecx
  cmovns %ecx,%r10d
  sub    %r10,%rax
  movslq %r10d,%rdx
  and    $0xfffffffc,%eax
  lea    0x0(,%rdx,8),%rbp
  add    %rdx,%rax
  lea    (%rsi,%rbp,1),%r13
  lea    0x20(,%rax,8),%r12
  nopl   0x0(%rax)
L6:
  xor    %eax,%eax
  movapd %xmm3,%xmm1
  test   %ecx,%ecx
  jle    L20
L37:
  movsd  (%r8,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm1
  cmp    %eax,%ecx
  jg     L37
L20:
  cmp    %r10d,%edi
  jle    L59
  lea    (%r8,%rbp,1),%rax
  lea    (%r8,%r12,1),%r14
  movapd %xmm3,%xmm2
  mov    %r13,%rdx
  movapd %xmm3,%xmm5
  movapd %xmm3,%xmm6
  nopl   0x0(%rax)
L31:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  add    $0x20,%rax
  add    $0x20,%rdx
  addsd  %xmm0,%xmm1
  movsd  -0x18(%rax),%xmm0
  mulsd  -0x18(%rdx),%xmm0
  addsd  %xmm0,%xmm6
  movsd  -0x10(%rax),%xmm0
  mulsd  -0x10(%rdx),%xmm0
  addsd  %xmm0,%xmm5
  movsd  -0x8(%rax),%xmm0
  mulsd  -0x8(%rdx),%xmm0
  addsd  %xmm0,%xmm2
  cmp    %rax,%r14
  jne    L31
L2:
  addsd  %xmm6,%xmm1
  add    $0x8,%r9
  add    %r11,%r8
  addsd  %xmm5,%xmm1
  addsd  %xmm2,%xmm1
  mulsd  %xmm4,%xmm1
  movsd  %xmm1,-0x8(%r9)
  cmp    %r9,%rbx
  jne    L6
L65:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L59:
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm5
  movapd %xmm3,%xmm6
  jmp    L2
```

assistant: ```c
void wigNaiveSynthesis_symX(int m1, int m2, int bw, double *coeffs, double *wignersTrans, double *signal, double *workspace) {
  int i, j, m, n;
  int fudge;
  double tmp0, tmp1, tmp2, tmp3;
  m = ((((m1) > 0 ? (m1) : (-m1))) > (((m2) > 0 ? (m2) : (-m2))) ? (((m1) > 0 ? (m1) : (-m1))) : (((m2) > 0 ? (m2) : (-m2))));
  n = 2 * bw;
  if (((m1 - m2) > 0 ? (m1 - m2) : (-m1 - m2)) % 2)
    fudge = -1;
  else
    fudge = 1;
  for (i = 0; i < n; i++) {
    tmp0 = 0.;
    tmp1 = 0.;
    tmp2 = 0.;
    tmp3 = 0.;
    for (j = 0; j < (bw - m) % 4; ++j)
      tmp0 += wignersTrans[j] * coeffs[j];
    for (; j < (bw - m); j += 4) {
      tmp0 += wignersTrans[j] * coeffs[j];
      tmp1 += wignersTrans[j + 1] * coeffs[j + 1];
      tmp2 += wignersTrans[j + 2] * coeffs[j + 2];
      tmp3 += wignersTrans[j + 3] * coeffs[j + 3];
    }
    signal[i] = fudge * (tmp0 + tmp1 + tmp2 + tmp3);
    wignersTrans += (bw - m);
  }
}
```