user: 请将以下的汇编代码转换成C语言代码:

```asm
<c_dsortins>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x34(%rbp)
  movsd  %xmm0,-0x40(%rbp)
  mov    %rsi,-0x48(%rbp)
  mov    %edx,-0x38(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  jle    L90
  pxor   %xmm0,%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jp     L223
  pxor   %xmm0,%xmm0
  ucomisd -0x40(%rbp),%xmm0
  je     L90
L223:
  pxor   %xmm0,%xmm0
  comisd -0x40(%rbp),%xmm0
  jbe    L288
  mov    -0x38(%rbp),%eax
  neg    %eax
  mov    %eax,-0x24(%rbp)
  jmp    L256
L288:
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x24(%rbp)
L256:
  cmpl   $0x0,-0x24(%rbp)
  jns    L336
  mov    $0x1,%eax
  sub    -0x34(%rbp),%eax
  mov    -0x24(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x2c(%rbp)
  movl   $0x1,-0x20(%rbp)
  jmp    L30
L47:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_nan@plt>
  test   %rax,%rax
  je     L10
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  jmp    L229
L2:
  mov    -0x28(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  add    %eax,-0x28(%rbp)
L229:
  mov    -0x28(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jg     L2
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L304
L10:
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_negative_zero@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  jmp    L186
L36:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x10(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L135
  cmpl   $0x0,-0x14(%rbp)
  je     L208
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L208
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jne    L208
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_negative_zero@plt>
  test   %eax,%eax
  jne    L208
L135:
  mov    -0x28(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  sub    %eax,-0x28(%rbp)
L186:
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L36
L208:
  mov    -0x28(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  add    %eax,-0x2c(%rbp)
L304:
  addl   $0x1,-0x20(%rbp)
L30:
  mov    -0x20(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L47
  jmp    L293
L336:
  movl   $0x0,-0x1c(%rbp)
  mov    -0x34(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x24(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x2c(%rbp)
  movl   $0x1,-0x20(%rbp)
  jmp    L211
L91:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_nan@plt>
  test   %rax,%rax
  je     L207
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  jmp    L310
L193:
  mov    -0x28(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  add    %eax,-0x28(%rbp)
L310:
  mov    -0x28(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L193
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L14
L207:
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_negative_zero@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  jmp    L76
L98:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x10(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L224
  cmpl   $0x0,-0x14(%rbp)
  je     L279
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L279
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jne    L279
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdlib_base_is_negative_zero@plt>
  test   %eax,%eax
  jne    L279
L224:
  mov    -0x28(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  sub    %eax,-0x28(%rbp)
L76:
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jge    L98
L279:
  mov    -0x28(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  add    %eax,-0x2c(%rbp)
L14:
  addl   $0x1,-0x20(%rbp)
L211:
  mov    -0x20(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L91
  jmp    L293
L90:
  nop
L293:
  leave
  ret
```

assistant: ```c
void c_dsortins(const int64_t N, const double order, double *X, const int64_t stride) {
  int64_t ix;
  int64_t jx;
  int64_t fx;
  int64_t lx;
  int64_t sx;
  int64_t i;
  double v;
  double u;
  bool flg;
  if (N <= 0 || order == 0.0) {
    return;
  }
  if (order < 0.0) {
    sx = -stride;
  } else {
    sx = stride;
  }
  if (sx < 0) {
    fx = (1 - N) * sx;
    lx = 0;
    ix = fx + sx;
    for (i = 1; i < N; i++) {
      v = X[ix];
      if (stdlib_base_is_nan(v)) {
        jx = ix;
        while (jx > lx) {
          X[jx] = X[jx + sx];
          jx += sx;
        }
        X[lx] = v;
      } else {
        flg = stdlib_base_is_negative_zero(v);
        jx = ix - sx;
        while (jx <= fx) {
          u = X[jx];
          if (u <= v && !(flg && u == v && !stdlib_base_is_negative_zero(u))) {
            break;
          }
          X[jx + sx] = u;
          jx -= sx;
        }
        X[jx + sx] = v;
        ix += sx;
      }
    }
    return;
  }
  fx = 0;
  lx = (N - 1) * sx;
  ix = fx + sx;
  for (i = 1; i < N; i++) {
    v = X[ix];
    if (stdlib_base_is_nan(v)) {
      jx = ix;
      while (jx < lx) {
        X[jx] = X[jx + sx];
        jx += sx;
      }
      X[lx] = v;
    } else {
      flg = stdlib_base_is_negative_zero(v);
      jx = ix - sx;
      while (jx >= fx) {
        u = X[jx];
        if (u <= v && !(flg && u == v && !stdlib_base_is_negative_zero(u))) {
          break;
        }
        X[jx + sx] = u;
        jx -= sx;
      }
      X[jx + sx] = v;
      ix += sx;
    }
  }
  return;
}
```