user: What is the c source code of the assembly code below?

```asm
<c_dsort2sh>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %edi,0x68(%rsp)
  mov    %rsi,0x60(%rsp)
  mov    %edx,0x30(%rsp)
  mov    %rcx,0x50(%rsp)
  mov    %r8d,0x34(%rsp)
  test   %edi,%edi
  jle    L54
  pxor   %xmm1,%xmm1
  mov    %edx,%ebx
  setle  %dl
  ucomisd %xmm1,%xmm0
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L54
  comisd %xmm0,%xmm1
  ja     L145
L136:
  movl   $0x0,0x8c(%rsp)
  mov    0x30(%rsp),%ebx
  test   %ebx,%ebx
  js     L154
L172:
  movl   $0x0,0x88(%rsp)
  mov    0x34(%rsp),%ebx
  test   %ebx,%ebx
  js     L90
L69:
  lea    D14(%rip),%rax
  mov    0x60(%rsp),%rbx
  mov    $0x2bd,%ebp
  mov    %rax,0x78(%rsp)
  movslq 0x8c(%rsp),%rax
  mov    %rax,0x80(%rsp)
  lea    (%rbx,%rax,8),%rax
  mov    %rax,0x40(%rsp)
  movslq 0x30(%rsp),%rax
  mov    %rax,0x48(%rsp)
L150:
  cmp    %ebp,0x68(%rsp)
  jle    L24
  movslq 0x34(%rsp),%rcx
  mov    0x30(%rsp),%eax
  mov    %ebp,%r13d
  mov    %ebp,%r15d
  neg    %r13d
  movl   $0x0,0x2c(%rsp)
  mov    %rcx,%rbx
  imul   %eax,%r13d
  mov    %eax,%r14d
  mov    %rcx,0x38(%rsp)
  imul   %ebp,%ebx
  mov    0x88(%rsp),%ecx
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x10(%rsp)
  imul   %ebp,%r14d
  movslq %r13d,%r13
  movslq %ecx,%rax
  mov    %ebx,%r12d
  movslq %ebx,%rbx
  mov    %rax,0x70(%rsp)
  shl    $0x3,%r13
  mov    %rbx,0x18(%rsp)
  lea    (%rcx,%r12,1),%ebx
  neg    %r12d
  movslq %r14d,%r14
  movslq %r12d,%r12
  mov    %ebx,0x6c(%rsp)
  xor    %ebx,%ebx
  shl    $0x3,%r12
  jmp    L105
  cs nopw 0x0(%rax,%rax,1)
L161:
  mov    0x48(%rsp),%rdi
  mov    0x30(%rsp),%esi
  add    $0x1,%r15d
  add    %rdi,0x10(%rsp)
  add    0x34(%rsp),%ebx
  add    %rdi,%r14
  add    %esi,0x2c(%rsp)
  mov    0x38(%rsp),%rdi
  add    %rdi,0x18(%rsp)
  add    %rdi,0x20(%rsp)
  cmp    %r15d,0x68(%rsp)
  je     L24
L105:
  mov    0x40(%rsp),%rax
  movsd  (%rax,%r14,8),%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <stdlib_base_is_nan@plt>
  movsd  0x8(%rsp),%xmm1
  test   %rax,%rax
  jne    L161
  mov    0x6c(%rsp),%eax
  mov    0x50(%rsp),%rcx
  movapd %xmm1,%xmm0
  add    %ebx,%eax
  cltq
  movsd  (%rcx,%rax,8),%xmm2
  movsd  %xmm2,0x58(%rsp)
  call   <stdlib_base_is_negative_zero@plt>
  mov    0x50(%rsp),%rcx
  movslq %ebx,%rdx
  mov    %r14,%r10
  mov    0x60(%rsp),%rsi
  movsd  0x8(%rsp),%xmm1
  mov    %ebx,0x8(%rsp)
  mov    %eax,%r11d
  add    0x70(%rsp),%rdx
  movslq 0x2c(%rsp),%rax
  movsd  0x58(%rsp),%xmm2
  add    0x80(%rsp),%rax
  lea    (%rcx,%rdx,8),%rdx
  mov    %r15d,%ecx
  mov    0x18(%rsp),%r9
  lea    (%rsi,%rax,8),%rax
  sub    0x10(%rsp),%r10
  sub    0x20(%rsp),%r9
  nopl   0x0(%rax)
L49:
  movsd  (%rax),%xmm0
  mov    %ecx,%edi
  sub    %ebp,%ecx
  mov    %rax,%r8
  comisd %xmm0,%xmm1
  jb     L144
  test   %r11d,%r11d
  je     L197
  ucomisd %xmm0,%xmm1
  mov    $0x1,%ebx
  setp   %sil
  cmovne %ebx,%esi
  test   %sil,%sil
  jne    L197
L144:
  movsd  %xmm0,(%rax,%r10,8)
  movsd  (%rdx),%xmm0
  mov    %rdx,%rsi
  add    %r13,%rax
  movsd  %xmm0,(%rdx,%r9,8)
  add    %r12,%rdx
  cmp    %ebp,%ecx
  jge    L49
  mov    0x8(%rsp),%ebx
L99:
  movsd  %xmm1,(%r8)
  movsd  %xmm2,(%rsi)
  jmp    L161
  nopw   0x0(%rax,%rax,1)
L24:
  lea    D5(%rip),%rbx
  cmp    %rbx,0x78(%rsp)
  je     L54
  mov    0x78(%rsp),%rax
  mov    (%rax),%ebp
  add    $0x4,%rax
  mov    %rax,0x78(%rsp)
  jmp    L150
  nopl   0x0(%rax,%rax,1)
L197:
  mov    0x30(%rsp),%eax
  mov    0x60(%rsp),%rcx
  mov    0x8(%rsp),%ebx
  imul   %edi,%eax
  add    0x8c(%rsp),%eax
  cltq
  imul   0x34(%rsp),%edi
  lea    (%rcx,%rax,8),%r8
  mov    0x88(%rsp),%eax
  mov    0x50(%rsp),%rcx
  add    %edi,%eax
  cltq
  lea    (%rcx,%rax,8),%rsi
  jmp    L99
L54:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L90:
  mov    $0x1,%eax
  sub    0x68(%rsp),%eax
  imul   %ebx,%eax
  mov    %eax,0x88(%rsp)
  jmp    L69
L154:
  mov    $0x1,%eax
  sub    0x68(%rsp),%eax
  imul   %ebx,%eax
  mov    %eax,0x8c(%rsp)
  jmp    L172
L145:
  neg    %ebx
  neg    %r8d
  mov    %ebx,0x30(%rsp)
  mov    %r8d,0x34(%rsp)
  jmp    L136
```

tool_calls: name: disassemble_data
arguments: tag: D14
type: string

tool: D14: -

assistant: ```c
void c_dsort2sh(const int64_t N, const double order, double *X, const int64_t strideX, double *Y, const int64_t strideY) {
  int64_t offsetX;
  int64_t offsetY;
  int64_t gap;
  int64_t sx;
  int64_t sy;
  int64_t i;
  int64_t j;
  int64_t k;
  double vx;
  double vy;
  double ux;
  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 = -strideX;
    sy = -strideY;
  } else {
    sx = strideX;
    sy = strideY;
  }
  if (sx < 0) {
    offsetX = (1 - N) * sx;
  } else {
    offsetX = 0;
  }
  if (sy < 0) {
    offsetY = (1 - N) * sy;
  } else {
    offsetY = 0;
  }
  for (i = 0; i < NGAPS; i++) {
    gap = GAPS[i];
    for (j = gap; j < N; j++) {
      vx = X[offsetX + (j * sx)];
      if (stdlib_base_is_nan(vx)) {
        continue;
      }
      vy = Y[offsetY + (j * sy)];
      flg = stdlib_base_is_negative_zero(vx);
      for (k = j; k >= gap; k -= gap) {
        ux = X[offsetX + ((k - gap) * sx)];
        if (ux <= vx && !(flg && ux == vx)) {
          break;
        }
        X[offsetX + (k * sx)] = ux;
        Y[offsetY + (k * sy)] = Y[offsetY + ((k - gap) * sy)];
      }
      X[offsetX + (k * sx)] = vx;
      Y[offsetY + (k * sy)] = vy;
    }
  }
  return;
}
```