user: 这段汇编代码用C语言表示是什么样的？

```asm
<c_dsortsh>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x48,%rsp
  mov    %edi,0x38(%rsp)
  mov    %rsi,0x20(%rsp)
  test   %edi,%edi
  jle    L47
  pxor   %xmm1,%xmm1
  mov    %edx,%edi
  setle  %dl
  ucomisd %xmm1,%xmm0
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L47
  mov    %edi,%eax
  movl   $0x0,0x3c(%rsp)
  neg    %eax
  comisd %xmm0,%xmm1
  cmovbe %edi,%eax
  mov    %eax,0x14(%rsp)
  mov    %eax,%edi
  test   %eax,%eax
  js     L147
L138:
  mov    0x20(%rsp),%rbx
  lea    D0(%rip),%rax
  movslq 0x14(%rsp),%r12
  mov    $0x2bd,%r14d
  mov    %rax,0x28(%rsp)
  movslq 0x3c(%rsp),%rax
  mov    %rax,0x30(%rsp)
  lea    (%rbx,%rax,8),%rax
  mov    %rax,0x18(%rsp)
L49:
  cmp    %r14d,0x38(%rsp)
  jle    L140
  mov    0x14(%rsp),%eax
  mov    %r14d,%r15d
  movl   $0x0,0x10(%rsp)
  xor    %ebx,%ebx
  neg    %r15d
  imul   %eax,%r15d
  mov    %eax,%edi
  imul   %r14d,%edi
  movslq %r15d,%r15
  shl    $0x3,%r15
  movslq %edi,%rbp
  mov    %r15,%rax
  mov    %rbp,%r13
  mov    %r14d,%r15d
  mov    %rax,%rbp
  jmp    L120
  nopl   0x0(%rax)
L46:
  mov    0x14(%rsp),%esi
  add    $0x1,%r15d
  add    %esi,0x10(%rsp)
  add    %r12,%r13
  add    %r12,%rbx
  cmp    %r15d,0x38(%rsp)
  je     L140
L120:
  mov    0x18(%rsp),%rax
  movsd  (%rax,%r13,8),%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <stdlib_base_is_nan@plt>
  movsd  0x8(%rsp),%xmm1
  test   %rax,%rax
  jne    L46
  movapd %xmm1,%xmm0
  call   <stdlib_base_is_negative_zero@plt>
  mov    0x20(%rsp),%rdi
  mov    %r13,%r8
  mov    %r15d,%edx
  mov    %eax,%r11d
  movsd  0x8(%rsp),%xmm1
  movslq 0x10(%rsp),%rax
  sub    %rbx,%r8
  add    0x30(%rsp),%rax
  lea    (%rdi,%rax,8),%rax
  nopl   0x0(%rax,%rax,1)
L137:
  movsd  (%rax),%xmm0
  mov    %edx,%esi
  sub    %r14d,%edx
  mov    %rax,%rdi
  comisd %xmm0,%xmm1
  jb     L68
  test   %r11d,%r11d
  je     L63
  ucomisd %xmm0,%xmm1
  mov    $0x1,%r9d
  setp   %cl
  cmovne %r9d,%ecx
  test   %cl,%cl
  jne    L63
L68:
  movsd  %xmm0,(%rax,%r8,8)
  add    %rbp,%rax
  cmp    %r14d,%edx
  jge    L137
  movsd  %xmm1,(%rdi)
  jmp    L46
  nopl   0x0(%rax,%rax,1)
L140:
  lea    D9(%rip),%rbx
  cmp    %rbx,0x28(%rsp)
  je     L47
  mov    0x28(%rsp),%rax
  mov    (%rax),%r14d
  add    $0x4,%rax
  mov    %rax,0x28(%rsp)
  jmp    L49
  nopl   0x0(%rax)
L63:
  imul   0x14(%rsp),%esi
  mov    0x3c(%rsp),%eax
  mov    0x20(%rsp),%rdi
  add    %esi,%eax
  cltq
  lea    (%rdi,%rax,8),%rdi
  movsd  %xmm1,(%rdi)
  jmp    L46
L47:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L147:
  mov    $0x1,%eax
  sub    %ebx,%eax
  imul   %edi,%eax
  mov    %eax,0x3c(%rsp)
  jmp    L138
```

tool_calls: name: unpack_data
arguments: label: D0
datatype: string

tool: D0: -

assistant: ```c
void c_dsortsh(const int64_t N, const double order, double *X, const int64_t stride) {
  int64_t offset;
  int64_t gap;
  int64_t sx;
  int64_t i;
  int64_t j;
  int64_t k;
  double v;
  double u;
  bool flg;
  const static int64_t GAPS[] = {701, 301, 132, 57, 23, 10, 4, 1};
  const static int64_t NGAPS = 8;
  if (N <= 0 || order == 0.0) {
    return;
  }
  if (order < 0.0) {
    sx = -stride;
  } else {
    sx = stride;
  }
  if (sx < 0) {
    offset = (1 - N) * sx;
  } else {
    offset = 0;
  }
  for (i = 0; i < NGAPS; i++) {
    gap = GAPS[i];
    for (j = gap; j < N; j++) {
      v = X[offset + (j * sx)];
      if (stdlib_base_is_nan(v)) {
        continue;
      }
      flg = stdlib_base_is_negative_zero(v);
      for (k = j; k >= gap; k -= gap) {
        u = X[offset + ((k - gap) * sx)];
        if (u <= v && !(flg && u == v)) {
          break;
        }
        X[offset + (k * sx)] = u;
      }
      X[offset + (k * sx)] = v;
    }
  }
  return;
}
```