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

```asm
<dscalRef>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jle    L105
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jg     L18
L105:
  mov    $0x0,%eax
  jmp    L7
L18:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  je     L6
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  mov    %eax,-0x4(%rbp)
  movl   $0x1,-0x10(%rbp)
  jmp    L82
L38:
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    %eax,-0x10(%rbp)
L82:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L16
  mov    -0x10(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  setge  %al
  jmp    L130
L16:
  mov    -0x10(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  setle  %al
L130:
  test   %al,%al
  jne    L38
  mov    $0x0,%eax
  jmp    L7
L6:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    %edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0xc(%rbp)
  mov    -0xc(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x2,%edx
  add    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  je     L50
  movl   $0x1,-0x10(%rbp)
  jmp    L134
L34:
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x10(%rbp)
L134:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L34
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x4,%eax
  jg     L50
  mov    $0x0,%eax
  jmp    L7
L50:
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L147
L64:
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  add    $0x2,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x10(%rbp),%eax
  add    $0x2,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  add    $0x3,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x10(%rbp),%eax
  add    $0x3,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  add    $0x4,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x10(%rbp),%eax
  add    $0x4,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x5,-0x10(%rbp)
L147:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x10(%rbp)
  jle    L64
  mov    $0x0,%eax
L7:
  pop    %rbp
  ret
```

assistant: ```c
int dscalRef(int *n, double *da, double *dx, int *incx) {
  int i, m, nincx, mp1;
  if (*n <= 0 || *incx <= 0)
    return 0;
  if (*incx != 1) {
    nincx = *n * *incx;
    for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
      dx[(i)-1] = *da * dx[(i)-1];
    }
    return 0;
  }
  m = *n % 5;
  if (m != 0) {
    for (i = 1; i <= m; ++i) {
      dx[(i)-1] = *da * dx[(i)-1];
    }
    if (*n < 5) {
      return 0;
    }
  }
  mp1 = m + 1;
  for (i = mp1; i <= *n; i += 5) {
    dx[(i)-1] = *da * dx[(i)-1];
    dx[(i + 1) - 1] = *da * dx[(i + 1) - 1];
    dx[(i + 2) - 1] = *da * dx[(i + 2) - 1];
    dx[(i + 3) - 1] = *da * dx[(i + 3) - 1];
    dx[(i + 4) - 1] = *da * dx[(i + 4) - 1];
  }
  return 0;
}
```