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

```asm
<DVIVqsortDown>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  movslq %edi,%rbx
  sub    $0x18,%rsp
  cmp    $0xa,%ebx
  jle    L48
L35:
  mov    %rbp,%rsi
  mov    %ebx,%edi
  lea    -0x1(%rbx),%r15d
  mov    $0x1,%r13d
  call   <Dcentervalue@plt>
  xor    %r14d,%r14d
  mov    %r15d,%edi
  mov    %r15d,%ecx
  movapd %xmm0,%xmm1
  xor    %esi,%esi
  nopw   0x0(%rax,%rax,1)
L167:
  movsd  0x0(%rbp,%rsi,8),%xmm0
  comisd %xmm1,%xmm0
  jae    L32
  movslq %ecx,%rax
  mov    %esi,0xc(%rsp)
  lea    0x0(%rbp,%rax,8),%rdx
  jmp    L142
  xchg   %ax,%ax
L131:
  ucomisd %xmm1,%xmm0
  jp     L128
  jne    L128
  movslq %edi,%r8
  mov    (%r12,%rax,4),%r10d
  sub    $0x1,%edi
  lea    (%r12,%r8,4),%r9
  lea    0x0(%rbp,%r8,8),%r8
  mov    (%r9),%r11d
  movsd  (%r8),%xmm2
  mov    %r11d,(%r12,%rax,4)
  mov    %r10d,(%r9)
  movsd  %xmm2,(%rdx)
  movsd  %xmm0,(%r8)
L128:
  sub    $0x1,%rax
  sub    $0x1,%ecx
  sub    $0x8,%rdx
  cmp    %esi,%eax
  jl     L82
L142:
  movsd  (%rdx),%xmm0
  mov    %eax,%ecx
  comisd %xmm0,%xmm1
  jae    L131
  lea    (%r12,%rax,4),%rax
  mov    (%r12,%rsi,4),%r8d
  movslq %r13d,%r11
  sub    $0x1,%ecx
  mov    (%rax),%r9d
  movsd  0x0(%rbp,%rsi,8),%xmm2
  mov    %r9d,(%r12,%rsi,4)
  mov    %r8d,(%rax)
  movsd  %xmm0,0x0(%rbp,%rsi,8)
  movsd  %xmm2,(%rdx)
L158:
  add    $0x1,%rsi
  add    $0x1,%r13d
  cmp    %r11d,%ecx
  jge    L167
L100:
  mov    %r11d,%r8d
  mov    %r14d,%edx
  mov    %r11d,%eax
  sub    %r14d,%r8d
  cmp    %r14d,%r8d
  cmovle %r8,%rdx
  sub    %edx,%eax
  test   %edx,%edx
  je     L29
  cltq
  lea    (%r12,%rax,4),%r9
  lea    0x0(%rbp,%rax,8),%rsi
  xor    %eax,%eax
  nopl   0x0(%rax)
L23:
  mov    (%r12,%rax,4),%r10d
  mov    (%r9,%rax,4),%r13d
  movsd  0x0(%rbp,%rax,8),%xmm0
  movsd  (%rsi,%rax,8),%xmm1
  mov    %r13d,(%r12,%rax,4)
  mov    %r10d,(%r9,%rax,4)
  movsd  %xmm1,0x0(%rbp,%rax,8)
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L23
L29:
  mov    %edi,%r13d
  sub    %edi,%r15d
  mov    %ebx,%esi
  sub    %ecx,%r13d
  mov    %r15d,%ecx
  cmp    %r13d,%r15d
  cmovg  %r13d,%ecx
  sub    %ecx,%esi
  test   %ecx,%ecx
  je     L160
  sub    $0x1,%ecx
  movslq %esi,%rsi
  lea    (%r12,%r11,4),%rax
  add    %r11,%rcx
  lea    0x0(%rbp,%rsi,8),%rdx
  lea    0x4(%r12,%rcx,4),%r9
  mov    %rsi,%rcx
  sub    %r11,%rcx
  sub    %rsi,%r11
  nopw   0x0(%rax,%rax,1)
L171:
  mov    (%rax),%esi
  mov    (%rax,%rcx,4),%edi
  movsd  (%rdx,%r11,8),%xmm0
  movsd  (%rdx),%xmm1
  mov    %edi,(%rax)
  mov    %esi,(%rax,%rcx,4)
  add    $0x4,%rax
  movsd  %xmm1,(%rdx,%r11,8)
  add    $0x8,%rdx
  movsd  %xmm0,-0x8(%rdx)
  cmp    %rax,%r9
  jne    L171
L160:
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r8d,%edi
  call   <DVIVqsortDown>
  movslq %r13d,%rax
  sub    %rax,%rbx
  lea    (%r12,%rbx,4),%r12
  lea    0x0(%rbp,%rbx,8),%rbp
  cmp    $0xa,%r13d
  jle    L10
  movslq %r13d,%rbx
  jmp    L35
  nop
L82:
  movslq 0xc(%rsp),%r11
  jmp    L100
  nopw   0x0(%rax,%rax,1)
L32:
  ucomisd %xmm1,%xmm0
  jp     L114
  jne    L114
  movslq %r14d,%rax
  mov    (%r12,%rsi,4),%r9d
  add    $0x1,%r14d
  lea    (%r12,%rax,4),%rdx
  lea    0x0(%rbp,%rax,8),%rax
  mov    (%rdx),%r8d
  movsd  (%rax),%xmm2
  mov    %r9d,(%rdx)
  mov    %r8d,(%r12,%rsi,4)
  movsd  %xmm0,(%rax)
  movsd  %xmm2,0x0(%rbp,%rsi,8)
L114:
  movslq %r13d,%r11
  jmp    L158
L48:
  mov    %ebx,%r13d
L10:
  add    $0x18,%rsp
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r13d,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <DVIVisortDown@plt>
```

assistant: ```c
void DVIVqsortDown(int n, double dvec[], int ivec[]) {
  double dtemp, v;
  int a, b, c, d, itemp, l, h, s;
  if (n <= 10) {
    DVIVisortDown(n, dvec, ivec);
  } else {
    v = Dcentervalue(n, dvec);
    a = b = 0;
    c = d = n - 1;
    for (;;) {
      while (b <= c && dvec[b] >= v) {
        if (dvec[b] == v) {
          {
            itemp = ivec[(a)];
            ivec[(a)] = ivec[(b)];
            ivec[(b)] = itemp;
            dtemp = dvec[(a)];
            dvec[(a)] = dvec[(b)];
            dvec[(b)] = dtemp;
          }
          a++;
        }
        b++;
      }
      while (c >= b && dvec[c] <= v) {
        if (dvec[c] == v) {
          {
            itemp = ivec[(c)];
            ivec[(c)] = ivec[(d)];
            ivec[(d)] = itemp;
            dtemp = dvec[(c)];
            dvec[(c)] = dvec[(d)];
            dvec[(d)] = dtemp;
          }
          d--;
        }
        c--;
      }
      if (b > c) {
        break;
      }
      {
        itemp = ivec[(b)];
        ivec[(b)] = ivec[(c)];
        ivec[(c)] = itemp;
        dtemp = dvec[(b)];
        dvec[(b)] = dvec[(c)];
        dvec[(c)] = dtemp;
      }
      b++;
      c--;
    }
    s = (a <= b - a) ? a : b - a;
    for (l = 0, h = b - s; s != 0; s--) {
      {
        itemp = ivec[(l)];
        ivec[(l)] = ivec[(h)];
        ivec[(h)] = itemp;
        dtemp = dvec[(l)];
        dvec[(l)] = dvec[(h)];
        dvec[(h)] = dtemp;
      }
      l++;
      h++;
    }
    s = ((d - c) <= (n - 1 - d)) ? (d - c) : (n - 1 - d);
    for (l = b, h = n - s; s != 0; s--) {
      {
        itemp = ivec[(l)];
        ivec[(l)] = ivec[(h)];
        ivec[(h)] = itemp;
        dtemp = dvec[(l)];
        dvec[(l)] = dvec[(h)];
        dvec[(h)] = dtemp;
      }
      l++;
      h++;
    }
    DVIVqsortDown(b - a, dvec, ivec);
    DVIVqsortDown(d - c, dvec + n - (d - c), ivec + n - (d - c));
  }
  return;
}
```