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

```asm
<dSort2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  cmpl   $0x1,-0x24(%rbp)
  jle    L93
  subq   $0x8,-0x30(%rbp)
  subq   $0x4,-0x38(%rbp)
  mov    -0x24(%rbp),%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x14(%rbp)
L57:
  cmpl   $0x1,-0x1c(%rbp)
  jle    L82
  subl   $0x1,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L33
L82:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0x14(%rbp)
  cmpl   $0x1,-0x14(%rbp)
  jne    L33
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L118
L33:
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x18(%rbp)
  jmp    L6
L36:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jge    L31
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x18(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd %xmm1,%xmm0
  jbe    L31
  addl   $0x1,-0x18(%rbp)
L31:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L98
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  add    %eax,-0x18(%rbp)
  jmp    L6
L98:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x18(%rbp)
L6:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jle    L36
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L57
L93:
  nop
L118:
  pop    %rbp
  ret
```

assistant: ```c
void dSort2(int n, double *da, int *ib) {
  int l, j, ii, i, iib;
  double dda;
  if (n < 2)
    return;
  da--;
  ib--;
  l = (n >> 1) + 1;
  ii = n;
  for (;;) {
    if (l > 1) {
      dda = da[--l];
      iib = ib[l];
    } else {
      dda = da[ii];
      iib = ib[ii];
      da[ii] = da[1];
      ib[ii] = ib[1];
      if (--ii == 1) {
        da[1] = dda;
        ib[1] = iib;
        return;
      }
    }
    i = l;
    j = l << 1;
    while (j <= ii) {
      if (j < ii && da[j] < da[j + 1])
        ++j;
      if (dda < da[j]) {
        da[i] = da[j];
        ib[i] = ib[j];
        j += (i = j);
      } else {
        j = ii + 1;
      }
    }
    da[i] = dda;
    ib[i] = iib;
  }
}
```