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

```asm
<DVqsortUp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  cmpl   $0xa,-0x34(%rbp)
  jg     L163
  mov    -0x40(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <DVisortUp@plt>
  jmp    L149
L163:
  mov    -0x40(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <Dcentervalue@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  jmp    L168
L111:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L103
  ucomisd -0x10(%rbp),%xmm0
  jne    L103
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x2c(%rbp)
L103:
  addl   $0x1,-0x28(%rbp)
L168:
  mov    -0x28(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jg     L11
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jae    L111
  jmp    L11
L37:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L73
  ucomisd -0x10(%rbp),%xmm0
  jne    L73
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  subl   $0x1,-0x20(%rbp)
L73:
  subl   $0x1,-0x24(%rbp)
L11:
  mov    -0x24(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L33
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x10(%rbp),%xmm0
  jae    L37
L33:
  mov    -0x28(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jg     L13
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x28(%rbp)
  subl   $0x1,-0x24(%rbp)
  jmp    L168
L13:
  nop
  mov    -0x28(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  mov    -0x2c(%rbp),%edx
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x1c(%rbp)
  mov    -0x28(%rbp),%eax
  sub    -0x14(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L173
L53:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
  addl   $0x1,-0x18(%rbp)
  subl   $0x1,-0x14(%rbp)
L173:
  cmpl   $0x0,-0x14(%rbp)
  jne    L53
  mov    -0x20(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x20(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x34(%rbp),%eax
  sub    -0x14(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L60
L172:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
  addl   $0x1,-0x18(%rbp)
  subl   $0x1,-0x14(%rbp)
L60:
  cmpl   $0x0,-0x14(%rbp)
  jne    L172
  mov    -0x28(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  mov    -0x40(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <DVqsortUp>
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%eax
  sub    -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <DVqsortUp>
  nop
L149:
  leave
  ret
```

assistant: ```c
void DVqsortUp(int n, double dvec[]) {
  double dtemp, v;
  int a, b, c, d, l, h, s;
  if (n <= 10) {
    DVisortUp(n, dvec);
  } else {
    v = Dcentervalue(n, dvec);
    a = b = 0;
    c = d = n - 1;
    for (;;) {
      while (b <= c && dvec[b] <= v) {
        if (dvec[b] == v) {
          {
            dtemp = dvec[(a)];
            dvec[(a)] = dvec[(b)];
            dvec[(b)] = dtemp;
          }
          a++;
        }
        b++;
      }
      while (c >= b && dvec[c] >= v) {
        if (dvec[c] == v) {
          {
            dtemp = dvec[(c)];
            dvec[(c)] = dvec[(d)];
            dvec[(d)] = dtemp;
          }
          d--;
        }
        c--;
      }
      if (b > c) {
        break;
      }
      {
        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--) {
      {
        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--) {
      {
        dtemp = dvec[(l)];
        dvec[(l)] = dvec[(h)];
        dvec[(h)] = dtemp;
      }
      l++;
      h++;
    }
    DVqsortUp(b - a, dvec);
    DVqsortUp(d - c, dvec + n - (d - c));
  }
  return;
}
```