user: 请从给定的汇编指令推导出C源代码:

```asm
<quicksortDoublesAscending>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x300,%rsp
  mov    %rdi,-0x12f8(%rbp)
  mov    %rsi,-0x1300(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x12f0(%rbp)
  movq   $0x0,-0x12d0(%rbp)
  mov    -0x1300(%rbp),%rax
  mov    %rax,-0x970(%rbp)
  jmp    L39
L129:
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    -0x12d0(%rbp,%rax,8),%rax
  mov    %rax,-0x12e8(%rbp)
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    -0x970(%rbp,%rax,8),%rax
  sub    $0x1,%rax
  mov    %rax,-0x12e0(%rbp)
  mov    -0x12e8(%rbp),%rax
  cmp    -0x12e0(%rbp),%rax
  jae    L119
  mov    -0x12e8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x12f8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x12d8(%rbp)
  jmp    L80
L11:
  subq   $0x1,-0x12e0(%rbp)
  mov    -0x12e8(%rbp),%rax
  cmp    -0x12e0(%rbp),%rax
  jae    L134
  mov    -0x12e0(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x12f8(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x12e8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x12e8(%rbp)
  lea    0x0(,%rax,8),%rdx
  mov    -0x12f8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
L134:
  mov    -0x12e0(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x12f8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x12d8(%rbp),%xmm0
  jb     L137
  mov    -0x12e8(%rbp),%rax
  cmp    -0x12e0(%rbp),%rax
  jb     L11
L137:
  jmp    L61
L152:
  addq   $0x1,-0x12e8(%rbp)
  mov    -0x12e8(%rbp),%rax
  cmp    -0x12e0(%rbp),%rax
  jae    L61
  mov    -0x12e8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x12f8(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x12e0(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x12e0(%rbp)
  lea    0x0(,%rax,8),%rdx
  mov    -0x12f8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
L61:
  mov    -0x12e8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x12f8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x12d8(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jae    L81
  jmp    L80
L81:
  mov    -0x12e8(%rbp),%rax
  cmp    -0x12e0(%rbp),%rax
  jb     L152
L80:
  mov    -0x12e8(%rbp),%rax
  cmp    -0x12e0(%rbp),%rax
  jb     L134
  mov    -0x12e8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x12f8(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x12d8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x12f0(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x12e8(%rbp),%rax
  lea    0x1(%rax),%rdx
  movslq %ecx,%rax
  mov    %rdx,-0x12d0(%rbp,%rax,8)
  mov    -0x12f0(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    -0x970(%rbp,%rax,8),%rdx
  movslq %ecx,%rax
  mov    %rdx,-0x970(%rbp,%rax,8)
  mov    -0x12f0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x12f0(%rbp)
  cltq
  mov    -0x12e8(%rbp),%rdx
  mov    %rdx,-0x970(%rbp,%rax,8)
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    -0x970(%rbp,%rax,8),%rdx
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    -0x12d0(%rbp,%rax,8),%rax
  mov    %rdx,%rcx
  sub    %rax,%rcx
  mov    -0x12f0(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x970(%rbp,%rax,8),%rdx
  mov    -0x12f0(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x12d0(%rbp,%rax,8),%rsi
  mov    %rdx,%rax
  sub    %rsi,%rax
  cmp    %rax,%rcx
  jbe    L39
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    -0x12d0(%rbp,%rax,8),%rax
  mov    %eax,-0x12ec(%rbp)
  mov    -0x12f0(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x12d0(%rbp,%rax,8),%rdx
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    %rdx,-0x12d0(%rbp,%rax,8)
  mov    -0x12f0(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x12ec(%rbp),%eax
  movslq %eax,%rdx
  movslq %ecx,%rax
  mov    %rdx,-0x12d0(%rbp,%rax,8)
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    -0x970(%rbp,%rax,8),%rax
  mov    %eax,-0x12ec(%rbp)
  mov    -0x12f0(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x970(%rbp,%rax,8),%rdx
  mov    -0x12f0(%rbp),%eax
  cltq
  mov    %rdx,-0x970(%rbp,%rax,8)
  mov    -0x12f0(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x12ec(%rbp),%eax
  movslq %eax,%rdx
  movslq %ecx,%rax
  mov    %rdx,-0x970(%rbp,%rax,8)
  jmp    L39
L119:
  subl   $0x1,-0x12f0(%rbp)
L39:
  cmpl   $0x0,-0x12f0(%rbp)
  jns    L129
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L27
  call   <__stack_chk_fail@plt>
L27:
  leave
  ret
```

assistant: ```c
void quicksortDoublesAscending(double *arr, size_t len) {
  double piv;
  size_t beg[300];
  size_t end[300];
  size_t L, R;
  int i = 0;
  int swap;
  beg[0] = 0;
  end[0] = len;
  while (i >= 0) {
    L = beg[i];
    R = end[i] - 1;
    if (L < R) {
      piv = arr[L];
      while (L < R) {
        while (arr[R] >= piv && L < R) {
          --R;
          if (L < R) {
            arr[L++] = arr[R];
          }
        }
        while (arr[L] <= piv && L < R) {
          ++L;
          if (L < R) {
            arr[R--] = arr[L];
          }
        }
      }
      arr[L] = piv;
      beg[i + 1] = L + 1;
      end[i + 1] = end[i];
      end[i++] = L;
      if (end[i] - beg[i] > end[i - 1] - beg[i - 1]) {
        swap = beg[i];
        beg[i] = beg[i - 1];
        beg[i - 1] = swap;
        swap = end[i];
        end[i] = end[i - 1];
        end[i - 1] = swap;
      }
    } else {
      i--;
    }
  }
}
```