user: 请从给定的汇编指令推导出C源代码:

```asm
<c_sdsdot>:
  endbr64
  test   %edi,%edi
  jle    L31
  cvtss2sd %xmm0,%xmm0
  cmp    $0x1,%edx
  jne    L65
  cmp    $0x1,%r8d
  jne    L65
  movslq %edi,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x21,%rax
  mov    %edi,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  mov    %edi,%eax
  sub    %edx,%eax
  test   %eax,%eax
  jle    L48
  mov    $0x0,%edx
L7:
  pxor   %xmm1,%xmm1
  cvtss2sd (%rsi,%rdx,4),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd (%rcx,%rdx,4),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  add    $0x1,%rdx
  cmp    %edx,%eax
  jg     L7
L48:
  cltq
  cmp    $0x4,%edi
  jg     L75
  cvtsd2ss %xmm0,%xmm0
  ret
L75:
  pxor   %xmm1,%xmm1
  cvtss2sd (%rsi,%rax,4),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd (%rcx,%rax,4),%xmm2
  mulsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x4(%rsi,%rax,4),%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd 0x4(%rcx,%rax,4),%xmm3
  mulsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x8(%rsi,%rax,4),%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd 0x8(%rcx,%rax,4),%xmm3
  mulsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0xc(%rsi,%rax,4),%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd 0xc(%rcx,%rax,4),%xmm3
  mulsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x10(%rsi,%rax,4),%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd 0x10(%rcx,%rax,4),%xmm3
  mulsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  add    $0x5,%rax
  cmp    %eax,%edi
  jg     L75
  cvtsd2ss %xmm0,%xmm0
  ret
L65:
  mov    $0x0,%r10d
  test   %edx,%edx
  js     L112
L61:
  mov    $0x0,%eax
  test   %r8d,%r8d
  js     L56
L58:
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%r9
  movslq %r10d,%r10
  lea    (%rsi,%r10,4),%rsi
  movslq %r8d,%r8
  shl    $0x2,%r8
  cltq
  lea    (%rcx,%rax,4),%rdx
  mov    $0x0,%eax
L78:
  pxor   %xmm1,%xmm1
  cvtss2sd (%rsi),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd (%rdx),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  add    $0x1,%eax
  add    %r9,%rsi
  add    %r8,%rdx
  cmp    %eax,%edi
  jne    L78
  cvtsd2ss %xmm0,%xmm0
L31:
  ret
L112:
  mov    $0x1,%r10d
  sub    %edi,%r10d
  imul   %edx,%r10d
  jmp    L61
L56:
  mov    $0x1,%eax
  sub    %edi,%eax
  imul   %r8d,%eax
  jmp    L58
```

assistant: ```c
float c_sdsdot(const int N, const float scalar, const float *X, const int strideX, const float *Y, const int strideY) {
  double dot;
  int ix;
  int iy;
  int m;
  int i;
  dot = (double)scalar;
  if (N <= 0) {
    return dot;
  }
  if (strideX == 1 && strideY == 1) {
    m = N % 5;
    if (m > 0) {
      for (i = 0; i < m; i++) {
        dot += (double)X[i] * (double)Y[i];
      }
    }
    if (N < 5) {
      return dot;
    }
    for (i = m; i < N; i += 5) {
      dot += ((double)X[i] * (double)Y[i]) + ((double)X[i + 1] * (double)Y[i + 1]) + ((double)X[i + 2] * (double)Y[i + 2]) + ((double)X[i + 3] * (double)Y[i + 3]) + ((double)X[i + 4] * (double)Y[i + 4]);
    }
    return dot;
  }
  if (strideX < 0) {
    ix = (1 - N) * strideX;
  } else {
    ix = 0;
  }
  if (strideY < 0) {
    iy = (1 - N) * strideY;
  } else {
    iy = 0;
  }
  for (i = 0; i < N; i++) {
    dot += (double)X[ix] * (double)Y[iy];
    ix += strideX;
    iy += strideY;
  }
  return dot;
}
```