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

```asm
<stdlib_strided_dmskrange>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  jg     L138
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L83
L138:
  cmpq   $0x0,-0x48(%rbp)
  jns    L99
  mov    $0x1,%eax
  sub    -0x38(%rbp),%rax
  mov    -0x48(%rbp),%rdx
  imul   %rdx,%rax
  mov    %rax,-0x20(%rbp)
  jmp    L146
L99:
  movq   $0x0,-0x20(%rbp)
L146:
  cmpq   $0x0,-0x58(%rbp)
  jns    L117
  mov    $0x1,%eax
  sub    -0x38(%rbp),%rax
  mov    -0x58(%rbp),%rdx
  imul   %rdx,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L82
L117:
  movq   $0x0,-0x18(%rbp)
L82:
  movq   $0x0,-0x10(%rbp)
  jmp    L30
L14:
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L164
  mov    -0x48(%rbp),%rax
  add    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%rax
  add    %rax,-0x18(%rbp)
  addq   $0x1,-0x10(%rbp)
L30:
  mov    -0x10(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jl     L14
  jmp    L190
L164:
  nop
L190:
  mov    -0x10(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jne    L171
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L83
L171:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_nan@plt>
  test   %rax,%rax
  je     L16
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L83
L16:
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addq   $0x1,-0x10(%rbp)
  jmp    L144
L137:
  mov    -0x48(%rbp),%rax
  add    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L103
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_nan@plt>
  test   %rax,%rax
  je     L174
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L83
L174:
  movsd  -0x28(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L165
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L218
L165:
  movsd  -0x8(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jbe    L218
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  jmp    L218
L103:
  nop
L218:
  addq   $0x1,-0x10(%rbp)
L144:
  mov    -0x10(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jl     L137
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x28(%rbp),%xmm0
L83:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double stdlib_strided_dmskrange(const int64_t N, const double *X, const int64_t strideX, const uint8_t *Mask, const int64_t strideMask) {
  double max;
  double min;
  int64_t ix;
  int64_t im;
  int64_t i;
  double v;
  if (N <= 0) {
    return 0.0 / 0.0;
  }
  if (strideX < 0) {
    ix = (1 - N) * strideX;
  } else {
    ix = 0;
  }
  if (strideMask < 0) {
    im = (1 - N) * strideMask;
  } else {
    im = 0;
  }
  for (i = 0; i < N; i++) {
    if (Mask[im] == 0) {
      break;
    }
    ix += strideX;
    im += strideMask;
  }
  if (i == N) {
    return 0.0 / 0.0;
  }
  min = X[ix];
  if (stdlib_base_is_nan(min)) {
    return 0.0 / 0.0;
  }
  max = min;
  i += 1;
  for (; i < N; i++) {
    ix += strideX;
    im += strideMask;
    if (Mask[im]) {
      continue;
    }
    v = X[ix];
    if (stdlib_base_is_nan(v)) {
      return 0.0 / 0.0;
    }
    if (v < min) {
      min = v;
    } else if (v > max) {
      max = v;
    }
  }
  return max - min;
}
```