user: Please show me the C implementation that matches the assembly code listed below:

```asm
<c_ssort2sh>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %edi,0x2c(%rsp)
  mov    %rsi,0x50(%rsp)
  mov    %edx,0x24(%rsp)
  mov    %rcx,0x48(%rsp)
  mov    %r8d,0x28(%rsp)
  test   %edi,%edi
  jle    L73
  pxor   %xmm1,%xmm1
  mov    %edx,%ebx
  setle  %dl
  ucomiss %xmm1,%xmm0
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L73
  comiss %xmm0,%xmm1
  ja     L51
  mov    0x24(%rsp),%ebx
  movl   $0x0,0x7c(%rsp)
  test   %ebx,%ebx
  js     L109
L32:
  mov    0x28(%rsp),%ebx
  movl   $0x0,0x78(%rsp)
  test   %ebx,%ebx
  js     L101
L153:
  lea    D13(%rip),%rax
  mov    0x50(%rsp),%rbx
  mov    $0x2bd,%ebp
  mov    %rax,0x68(%rsp)
  movslq 0x7c(%rsp),%rax
  mov    %rax,0x70(%rsp)
  lea    (%rbx,%rax,4),%rax
  mov    %rax,0x38(%rsp)
  movslq 0x24(%rsp),%rax
  mov    %rax,0x40(%rsp)
  nopw   0x0(%rax,%rax,1)
L197:
  cmp    %ebp,0x2c(%rsp)
  jle    L215
  movslq 0x28(%rsp),%rcx
  mov    0x24(%rsp),%eax
  mov    %ebp,%r13d
  mov    %ebp,%r15d
  neg    %r13d
  movl   $0x0,0x20(%rsp)
  mov    %rcx,%rbx
  imul   %eax,%r13d
  mov    %eax,%r14d
  mov    %rcx,0x30(%rsp)
  movq   $0x0,0x18(%rsp)
  imul   %ebp,%ebx
  mov    0x78(%rsp),%ecx
  movq   $0x0,0x8(%rsp)
  imul   %ebp,%r14d
  movslq %r13d,%r13
  movslq %ecx,%rax
  mov    %ebx,%r12d
  movslq %ebx,%rbx
  mov    %rax,0x60(%rsp)
  shl    $0x2,%r13
  mov    %rbx,0x10(%rsp)
  lea    (%rcx,%r12,1),%ebx
  neg    %r12d
  movslq %r14d,%r14
  movslq %r12d,%r12
  mov    %ebx,0x5c(%rsp)
  xor    %ebx,%ebx
  shl    $0x2,%r12
  jmp    L46
  nopl   0x0(%rax,%rax,1)
L72:
  mov    0x40(%rsp),%rdi
  mov    0x24(%rsp),%esi
  add    $0x1,%r15d
  add    %rdi,0x8(%rsp)
  add    0x28(%rsp),%ebx
  add    %rdi,%r14
  add    %esi,0x20(%rsp)
  mov    0x30(%rsp),%rdi
  add    %rdi,0x10(%rsp)
  add    %rdi,0x18(%rsp)
  cmp    %r15d,0x2c(%rsp)
  je     L215
L46:
  mov    0x38(%rsp),%rax
  movss  (%rax,%r14,4),%xmm1
  movaps %xmm1,%xmm0
  movss  %xmm1,0x4(%rsp)
  call   <stdlib_base_is_nanf@plt>
  movss  0x4(%rsp),%xmm1
  test   %rax,%rax
  jne    L72
  mov    0x5c(%rsp),%eax
  mov    0x48(%rsp),%rcx
  movaps %xmm1,%xmm0
  add    %ebx,%eax
  cltq
  movss  (%rcx,%rax,4),%xmm2
  movss  %xmm2,0x58(%rsp)
  call   <stdlib_base_is_negative_zerof@plt>
  mov    0x48(%rsp),%rcx
  movslq %ebx,%rdx
  mov    %r14,%r10
  mov    0x50(%rsp),%rsi
  movss  0x4(%rsp),%xmm1
  mov    %ebx,0x4(%rsp)
  mov    %eax,%r11d
  add    0x60(%rsp),%rdx
  movslq 0x20(%rsp),%rax
  movss  0x58(%rsp),%xmm2
  add    0x70(%rsp),%rax
  lea    (%rcx,%rdx,4),%rdx
  mov    %r15d,%ecx
  mov    0x10(%rsp),%r9
  lea    (%rsi,%rax,4),%rax
  sub    0x8(%rsp),%r10
  sub    0x18(%rsp),%r9
  nopw   0x0(%rax,%rax,1)
L89:
  movss  (%rax),%xmm0
  mov    %ecx,%edi
  sub    %ebp,%ecx
  mov    %rax,%r8
  comiss %xmm0,%xmm1
  jb     L19
  test   %r11d,%r11d
  je     L186
  ucomiss %xmm0,%xmm1
  mov    $0x1,%ebx
  setp   %sil
  cmovne %ebx,%esi
  test   %sil,%sil
  jne    L186
L19:
  movss  %xmm0,(%rax,%r10,4)
  movss  (%rdx),%xmm0
  mov    %rdx,%rsi
  add    %r13,%rax
  movss  %xmm0,(%rdx,%r9,4)
  add    %r12,%rdx
  cmp    %ebp,%ecx
  jge    L89
  mov    0x4(%rsp),%ebx
L213:
  movss  %xmm1,(%r8)
  movss  %xmm2,(%rsi)
  jmp    L72
  nopl   0x0(%rax,%rax,1)
L215:
  lea    D18(%rip),%rbx
  cmp    %rbx,0x68(%rsp)
  je     L73
  mov    0x68(%rsp),%rax
  mov    (%rax),%ebp
  add    $0x4,%rax
  mov    %rax,0x68(%rsp)
  jmp    L197
  nopl   0x0(%rax,%rax,1)
L186:
  mov    0x24(%rsp),%eax
  mov    0x50(%rsp),%rcx
  mov    0x4(%rsp),%ebx
  imul   %edi,%eax
  add    0x7c(%rsp),%eax
  cltq
  imul   0x28(%rsp),%edi
  lea    (%rcx,%rax,4),%r8
  mov    0x78(%rsp),%eax
  mov    0x48(%rsp),%rcx
  add    %edi,%eax
  cltq
  lea    (%rcx,%rax,4),%rsi
  jmp    L213
L73:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L101:
  mov    $0x1,%eax
  sub    0x2c(%rsp),%eax
  imul   %ebx,%eax
  mov    %eax,0x78(%rsp)
  jmp    L153
L109:
  mov    $0x1,%eax
  sub    0x2c(%rsp),%eax
  movl   $0x0,0x78(%rsp)
  imul   %ebx,%eax
  mov    0x28(%rsp),%ebx
  mov    %eax,0x7c(%rsp)
  test   %ebx,%ebx
  jns    L153
  jmp    L101
L51:
  neg    %ebx
  neg    %r8d
  movl   $0x0,0x7c(%rsp)
  mov    %ebx,0x24(%rsp)
  mov    0x24(%rsp),%ebx
  mov    %r8d,0x28(%rsp)
  test   %ebx,%ebx
  jns    L32
  jmp    L109
```

tool_calls: name: unpack_data
arguments: data_label: D13
type_guessed: string

tool: D13: -

assistant: ```c
void c_ssort2sh(const int64_t N, const float order, float *X, const int64_t strideX, float *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;
  float vx;
  float vy;
  float 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.0f) {
    return;
  }
  if (order < 0.0f) {
    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_nanf(vx)) {
        continue;
      }
      vy = Y[offsetY + (j * sy)];
      flg = stdlib_base_is_negative_zerof(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;
}
```