user: Converte this assembly snippet into its equivalent C code:

```asm
<c_sdsdot>:
  endbr64
  movslq %edx,%rax
  mov    %rcx,%rdx
  test   %edi,%edi
  jle    L151
  cvtss2sd %xmm0,%xmm0
  cmp    $0x1,%eax
  jne    L172
  cmp    $0x1,%r8d
  jne    L172
  movslq %edi,%rax
  mov    %edi,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x21,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%ecx
  mov    %edi,%eax
  sub    %ecx,%eax
  je     L137
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd (%rsi),%xmm1
  cvtss2sd (%rdx),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  cmp    $0x1,%eax
  je     L137
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x4(%rdx),%xmm1
  cvtss2sd 0x4(%rsi),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  cmp    $0x2,%eax
  je     L137
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x8(%rdx),%xmm1
  cvtss2sd 0x8(%rsi),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  cmp    $0x4,%eax
  jne    L137
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0xc(%rsi),%xmm1
  cvtss2sd 0xc(%rdx),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
L137:
  cmp    $0x4,%edi
  jle    L76
  cltq
  nopw   0x0(%rax,%rax,1)
L126:
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd (%rdx,%rax,4),%xmm2
  cvtss2sd (%rsi,%rax,4),%xmm1
  mulsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x4(%rdx,%rax,4),%xmm3
  cvtss2sd 0x4(%rsi,%rax,4),%xmm2
  mulsd  %xmm3,%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd 0x8(%rdx,%rax,4),%xmm3
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x8(%rsi,%rax,4),%xmm2
  mulsd  %xmm3,%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd 0xc(%rdx,%rax,4),%xmm3
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0xc(%rsi,%rax,4),%xmm2
  mulsd  %xmm3,%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd 0x10(%rdx,%rax,4),%xmm3
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x10(%rsi,%rax,4),%xmm2
  mulsd  %xmm3,%xmm2
  add    $0x5,%rax
  addsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  cmp    %eax,%edi
  jg     L126
L76:
  cvtsd2ss %xmm0,%xmm0
L151:
  ret
  nopl   0x0(%rax,%rax,1)
L172:
  test   %eax,%eax
  js     L180
  test   %r8d,%r8d
  js     L147
  cmp    $0x1,%r8d
  jne    L3
  cmp    $0x1,%eax
  jne    L3
  movslq %edi,%rdi
  xor    %eax,%eax
  nopl   (%rax)
L6:
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd (%rdx,%rax,4),%xmm1
  cvtss2sd (%rsi,%rax,4),%xmm2
  mulsd  %xmm2,%xmm1
  add    $0x1,%rax
  addsd  %xmm1,%xmm0
  cmp    %rax,%rdi
  jne    L6
  cvtsd2ss %xmm0,%xmm0
  jmp    L151
  nopl   0x0(%rax)
L180:
  mov    $0x1,%ecx
  sub    %edi,%ecx
  imul   %eax,%ecx
  movslq %ecx,%r9
  test   %r8d,%r8d
  jns    L163
L165:
  mov    $0x1,%ecx
  sub    %edi,%ecx
  imul   %r8d,%ecx
L178:
  movslq %r8d,%r8
  movslq %ecx,%rcx
  shl    $0x2,%rax
  lea    (%rsi,%r9,4),%rsi
  lea    (%rdx,%rcx,4),%rcx
  shl    $0x2,%r8
  xor    %edx,%edx
  nopl   (%rax)
L189:
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  add    $0x1,%edx
  cvtss2sd (%rsi),%xmm1
  cvtss2sd (%rcx),%xmm2
  mulsd  %xmm2,%xmm1
  add    %rax,%rsi
  add    %r8,%rcx
  addsd  %xmm1,%xmm0
  cmp    %edx,%edi
  jne    L189
  jmp    L76
L3:
  xor    %r9d,%r9d
L163:
  xor    %ecx,%ecx
  jmp    L178
L147:
  xor    %r9d,%r9d
  jmp    L165
```

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;
}
```