user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<quicksort>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0xb8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rdi),%eax
  movl   $0xffffffff,0xc(%rsp)
  mov    %eax,0x8(%rsp)
L79:
  cmp    0x8(%rsp),%ebx
  jl     L73
L38:
  mov    0xc(%rsp),%ebx
  cmp    $0xffffffff,%ebx
  je     L92
  movslq %ebx,%rdx
  lea    -0x1(%rbx),%eax
  sub    $0x2,%ebx
  mov    0x20(%rsp,%rdx,4),%edx
  cltq
  mov    %ebx,0xc(%rsp)
  mov    0x20(%rsp,%rax,4),%ebx
  mov    %edx,0x8(%rsp)
  cmp    0x8(%rsp),%ebx
  jge    L38
L73:
  movslq 0x8(%rsp),%rax
  mov    %ebx,%r12d
  movslq %ebx,%rbp
  lea    0x1(%rbx),%r10d
  mov    %rax,%rdx
  mov    %rax,0x10(%rsp)
  lea    (%r15,%rax,8),%rax
  mov    %rax,0x18(%rsp)
  sub    $0x1,%edx
  movsd  (%rax),%xmm1
  movslq %edx,%rcx
  nopl   (%rax)
L25:
  lea    (%r15,%rbp,8),%r11
  lea    (%r15,%rcx,8),%r8
  mov    %rcx,%r9
  mov    %r10d,%r13d
  movsd  (%r11),%xmm2
  movsd  (%r8),%xmm0
  comisd %xmm2,%xmm1
  ja     L103
  comisd %xmm1,%xmm0
  jb     L19
  cmp    %ebx,%edx
  jle    L19
  lea    -0x1(%rdx),%eax
  lea    -0x8(%r15,%rcx,8),%rcx
  cltq
  nopw   0x0(%rax,%rax,1)
L26:
  movsd  (%rcx),%xmm0
  mov    %eax,%edx
  mov    %rcx,%r8
  mov    %rax,%r9
  comisd %xmm1,%xmm0
  setae  %dil
  cmp    %eax,%ebx
  setl   %sil
  sub    $0x1,%rax
  sub    $0x8,%rcx
  test   %sil,%dil
  jne    L26
L19:
  lea    (%r14,%rbp,4),%rax
  mov    (%rax),%ecx
  cmp    %edx,%r12d
  jge    L102
  lea    (%r14,%r9,4),%rsi
  movsd  %xmm0,(%r11)
  mov    (%rsi),%edi
  movsd  %xmm2,(%r8)
  mov    %edi,(%rax)
  mov    %ecx,(%rsi)
  movslq %edx,%rcx
  jmp    L25
  cs nopw 0x0(%rax,%rax,1)
L103:
  mov    %r10d,%r12d
  movslq %r10d,%rbp
  add    $0x1,%r10d
  jmp    L25
  nop
L102:
  mov    0x18(%rsp),%rdx
  mov    0xc(%rsp),%edi
  mov    0x8(%rsp),%r9d
  movsd  (%rdx),%xmm0
  sub    %r12d,%r9d
  movsd  %xmm0,(%r11)
  mov    %r12d,%r11d
  movsd  %xmm2,(%rdx)
  mov    0x10(%rsp),%rdx
  sub    %ebx,%r11d
  lea    (%r14,%rdx,4),%rsi
  lea    0x1(%rdi),%edx
  add    $0x2,%edi
  mov    %edi,0xc(%rsp)
  mov    (%rsi),%r8d
  lea    -0x1(%r12),%edi
  cmp    %r9d,%r11d
  jle    L78
  mov    %ebx,%r13d
  mov    %r10d,%ebx
L121:
  mov    %r8d,(%rax)
  movslq 0xc(%rsp),%rax
  movslq %edx,%rdx
  mov    %ecx,(%rsi)
  mov    %r13d,0x20(%rsp,%rdx,4)
  mov    %edi,0x20(%rsp,%rax,4)
  xor    %edi,%edi
  cmp    $0x1f,%eax
  setle  %dil
  call   <assert@plt>
  jmp    L79
L78:
  mov    0x8(%rsp),%r9d
  mov    %edi,0x8(%rsp)
  mov    %r9d,%edi
  jmp    L121
L92:
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L68
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L68:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void quicksort(int n, double arr[], int idx[]) {
  double v, td;
  int i, j, l, r, ti, tos, stack[32];
  l = 0;
  r = n - 1;
  tos = -1;
  for (;;) {
    while (r > l) {
      v = arr[r];
      i = l;
      j = r - 1;
      for (;;) {
        while (arr[i] < v)
          i++;
        while (arr[j] >= v && j > l)
          j--;
        if (i >= j)
          break;
        td = arr[i];
        arr[i] = arr[j];
        arr[j] = td;
        ti = idx[i];
        idx[i] = idx[j];
        idx[j] = ti;
      }
      td = arr[i];
      arr[i] = arr[r];
      arr[r] = td;
      ti = idx[i];
      idx[i] = idx[r];
      idx[r] = ti;
      if (i - l > r - i) {
        stack[++tos] = l;
        stack[++tos] = i - 1;
        l = i + 1;
      } else {
        stack[++tos] = i + 1;
        stack[++tos] = r;
        r = i - 1;
      }
      assert(tos < 32);
    }
    if (tos == -1)
      break;
    r = stack[tos--];
    l = stack[tos--];
  }
}
```