user: Translate the below assembly code into C programming language:

```asm
<IV2ZVqsortDown>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,0x8(%rsp)
  test   %edi,%edi
  jle    L143
L135:
  mov    0x8(%rsp),%ebx
  mov    %rbp,%rsi
  xor    %r14d,%r14d
  mov    $0x1,%r13d
  mov    %ebx,%edi
  call   <Icentervalue@plt>
  movl   $0x0,0x4(%rsp)
  xor    %esi,%esi
  mov    %eax,%r8d
  lea    -0x1(%rbx),%eax
  mov    %eax,0xc(%rsp)
  mov    %eax,%edx
  mov    %eax,%r10d
  nopw   0x0(%rax,%rax,1)
L28:
  mov    %esi,%r9d
  cmp    %r8d,0x0(%rbp,%rsi,4)
  jge    L117
  movslq %edx,%rax
  shl    $0x2,%rax
  jmp    L108
  nopw   0x0(%rax,%rax,1)
L66:
  jne    L26
  movslq %r10d,%rcx
  shl    $0x2,%rcx
  lea    0x0(%rbp,%rcx,1),%rdi
  add    %r15,%rcx
  mov    (%rdi),%r11d
  mov    %r11d,0x0(%rbp,%rax,1)
  mov    %r8d,(%rdi)
  mov    (%rcx),%r11d
  mov    (%r15,%rax,1),%edi
  mov    %r11d,(%r15,%rax,1)
  mov    %edi,(%rcx)
  lea    (%rdx,%rdx,1),%ecx
  lea    (%r10,%r10,1),%edi
  sub    $0x1,%r10d
  movslq %ecx,%rcx
  movslq %edi,%rdi
  shl    $0x3,%rcx
  lea    (%r12,%rdi,8),%r11
  lea    (%r12,%rcx,1),%rbx
  movsd  (%r11),%xmm1
  movsd  (%rbx),%xmm0
  movsd  %xmm1,(%rbx)
  movsd  %xmm0,(%r11)
  lea    0x8(%r12,%rcx,1),%r11
  lea    0x8(%r12,%rdi,8),%rcx
  movsd  (%r11),%xmm0
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%r11)
  movsd  %xmm0,(%rcx)
L26:
  sub    $0x1,%edx
  sub    $0x4,%rax
  cmp    %esi,%edx
  jl     L51
L108:
  mov    0x0(%rbp,%rax,1),%ecx
  lea    0x0(%rbp,%rax,1),%rdi
  cmp    %r8d,%ecx
  jle    L66
  mov    0x0(%rbp,%rsi,4),%r9d
  add    %r15,%rax
  mov    %ecx,0x0(%rbp,%rsi,4)
  mov    %r9d,(%rdi)
  mov    (%rax),%edi
  mov    (%r15,%rsi,4),%ecx
  mov    %edi,(%r15,%rsi,4)
  mov    %ecx,(%rax)
  lea    (%rdx,%rdx,1),%eax
  movslq %r14d,%rcx
  sub    $0x1,%edx
  shl    $0x3,%rcx
  cltq
  lea    (%r12,%rcx,1),%r9
  lea    (%r12,%rax,8),%rdi
  movsd  (%r9),%xmm0
  movsd  (%rdi),%xmm1
  lea    0x8(%r12,%rcx,1),%rcx
  lea    0x8(%r12,%rax,8),%rax
  movsd  %xmm1,(%r9)
  mov    %r13d,%r9d
  movsd  %xmm0,(%rdi)
  movsd  (%rcx),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx)
  movsd  %xmm0,(%rax)
L83:
  add    $0x1,%rsi
  add    $0x1,%r13d
  add    $0x2,%r14d
  cmp    %r9d,%edx
  jge    L28
L51:
  mov    0x4(%rsp),%eax
  mov    %r9d,%edi
  mov    %r9d,%ecx
  sub    %eax,%edi
  cmp    %eax,%edi
  cmovle %rdi,%rax
  sub    %eax,%ecx
  test   %eax,%eax
  je     L31
  movslq %ecx,%rcx
  lea    0x0(,%rax,4),%rsi
  xor    %eax,%eax
  shl    $0x2,%rcx
  nopl   0x0(%rax)
L144:
  mov    0x0(%rbp,%rax,1),%r8d
  mov    0x0(%rbp,%rcx,1),%r11d
  movsd  (%r12,%rcx,4),%xmm1
  movsd  (%r12,%rax,4),%xmm0
  mov    %r11d,0x0(%rbp,%rax,1)
  mov    %r8d,0x0(%rbp,%rcx,1)
  mov    (%r15,%rax,1),%r8d
  mov    (%r15,%rcx,1),%r11d
  mov    %r11d,(%r15,%rax,1)
  mov    %r8d,(%r15,%rcx,1)
  movsd  %xmm1,(%r12,%rax,4)
  movsd  0x8(%r12,%rcx,4),%xmm1
  movsd  %xmm0,(%r12,%rcx,4)
  movsd  0x8(%r12,%rax,4),%xmm0
  movsd  %xmm1,0x8(%r12,%rax,4)
  add    $0x4,%rax
  movsd  %xmm0,0x8(%r12,%rcx,4)
  add    $0x4,%rcx
  cmp    %rax,%rsi
  jne    L144
L31:
  mov    0xc(%rsp),%ecx
  mov    %r10d,%r13d
  mov    0x8(%rsp),%esi
  sub    %edx,%r13d
  sub    %r10d,%ecx
  cmp    %r13d,%ecx
  cmovg  %r13d,%ecx
  sub    %ecx,%esi
  test   %ecx,%ecx
  je     L22
  movslq %esi,%rsi
  sub    $0x1,%ecx
  movslq %r9d,%rdx
  lea    0x1(%rsi,%rcx,1),%r8
  shl    $0x2,%rdx
  lea    0x0(,%rsi,4),%rax
  shl    $0x2,%r8
  nopl   (%rax)
L127:
  mov    0x0(%rbp,%rdx,1),%ecx
  mov    0x0(%rbp,%rax,1),%esi
  movsd  (%r12,%rdx,4),%xmm0
  movsd  (%r12,%rax,4),%xmm1
  mov    %esi,0x0(%rbp,%rdx,1)
  mov    %ecx,0x0(%rbp,%rax,1)
  mov    (%r15,%rdx,1),%ecx
  mov    (%r15,%rax,1),%esi
  mov    %esi,(%r15,%rdx,1)
  mov    %ecx,(%r15,%rax,1)
  movsd  %xmm1,(%r12,%rdx,4)
  movsd  0x8(%r12,%rax,4),%xmm1
  movsd  %xmm0,(%r12,%rax,4)
  movsd  0x8(%r12,%rdx,4),%xmm0
  movsd  %xmm1,0x8(%r12,%rdx,4)
  add    $0x4,%rdx
  movsd  %xmm0,0x8(%r12,%rax,4)
  add    $0x4,%rax
  cmp    %rax,%r8
  jne    L127
L22:
  mov    %r15,%rdx
  mov    %r12,%rcx
  mov    %rbp,%rsi
  call   <IV2ZVqsortDown>
  mov    0x8(%rsp),%ebx
  movslq %r13d,%rdx
  mov    %ebx,%eax
  sub    %r13d,%eax
  add    %eax,%eax
  cltq
  lea    (%r12,%rax,8),%r12
  movslq %ebx,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  add    %rax,%r15
  add    %rax,%rbp
  test   %r13d,%r13d
  jle    L109
  mov    %r13d,0x8(%rsp)
  jmp    L135
  cs nopw 0x0(%rax,%rax,1)
L117:
  jne    L147
  movslq 0x4(%rsp),%rax
  mov    %rax,%rbx
  shl    $0x2,%rax
  lea    0x0(%rbp,%rax,1),%rcx
  add    %r15,%rax
  mov    (%rcx),%edi
  mov    %r8d,(%rcx)
  mov    %edi,0x0(%rbp,%rsi,4)
  mov    (%rax),%ecx
  mov    (%r15,%rsi,4),%edi
  mov    %edi,(%rax)
  movslq %r14d,%rax
  mov    %ecx,(%r15,%rsi,4)
  lea    (%rbx,%rbx,1),%ecx
  shl    $0x3,%rax
  add    $0x1,%ebx
  movslq %ecx,%rcx
  lea    (%r12,%rax,1),%rdi
  lea    0x8(%r12,%rax,1),%rax
  mov    %ebx,0x4(%rsp)
  lea    (%r12,%rcx,8),%r9
  movsd  (%rdi),%xmm1
  lea    0x8(%r12,%rcx,8),%rcx
  movsd  (%r9),%xmm0
  movsd  %xmm1,(%r9)
  movsd  %xmm0,(%rdi)
  movsd  (%rcx),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx)
  movsd  %xmm0,(%rax)
L147:
  mov    %r13d,%r9d
  jmp    L83
L143:
  mov    %edi,%r13d
L109:
  add    $0x18,%rsp
  mov    %r12,%rcx
  mov    %r15,%rdx
  mov    %rbp,%rsi
  pop    %rbx
  mov    %r13d,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <IV2ZVisortDown@plt>
```

assistant: ```c
void IV2ZVqsortDown(int n, int ivec1[], int ivec2[], double zvec[]) {
  double dtemp;
  int a, b, c, d, itemp, l, h, s, v;
  if (n <= 0) {
    IV2ZVisortDown(n, ivec1, ivec2, zvec);
  } else {
    v = Icentervalue(n, ivec1);
    a = b = 0;
    c = d = n - 1;
    for (;;) {
      while (b <= c && ivec1[b] >= v) {
        if (ivec1[b] == v) {
          {
            itemp = ivec1[(a)];
            ivec1[(a)] = ivec1[(b)];
            ivec1[(b)] = itemp;
            itemp = ivec2[(a)];
            ivec2[(a)] = ivec2[(b)];
            ivec2[(b)] = itemp;
            dtemp = zvec[2 * (a)];
            zvec[2 * (a)] = zvec[2 * (b)];
            zvec[2 * (b)] = dtemp;
            dtemp = zvec[2 * (a) + 1];
            zvec[2 * (a) + 1] = zvec[2 * (b) + 1];
            zvec[2 * (b) + 1] = dtemp;
          }
          a++;
        }
        b++;
      }
      while (c >= b && ivec1[c] <= v) {
        if (ivec1[c] == v) {
          {
            itemp = ivec1[(c)];
            ivec1[(c)] = ivec1[(d)];
            ivec1[(d)] = itemp;
            itemp = ivec2[(c)];
            ivec2[(c)] = ivec2[(d)];
            ivec2[(d)] = itemp;
            dtemp = zvec[2 * (c)];
            zvec[2 * (c)] = zvec[2 * (d)];
            zvec[2 * (d)] = dtemp;
            dtemp = zvec[2 * (c) + 1];
            zvec[2 * (c) + 1] = zvec[2 * (d) + 1];
            zvec[2 * (d) + 1] = dtemp;
          }
          d--;
        }
        c--;
      }
      if (b > c) {
        break;
      }
      {
        itemp = ivec1[(b)];
        ivec1[(b)] = ivec1[(c)];
        ivec1[(c)] = itemp;
        itemp = ivec2[(b)];
        ivec2[(b)] = ivec2[(c)];
        ivec2[(c)] = itemp;
        dtemp = zvec[2 * (b)];
        zvec[2 * (b)] = zvec[2 * (c)];
        zvec[2 * (c)] = dtemp;
        dtemp = zvec[2 * (b) + 1];
        zvec[2 * (b) + 1] = zvec[2 * (c) + 1];
        zvec[2 * (c) + 1] = dtemp;
      }
      b++;
      c--;
    }
    s = (a <= b - a) ? a : b - a;
    for (l = 0, h = b - s; s != 0; s--) {
      {
        itemp = ivec1[(l)];
        ivec1[(l)] = ivec1[(h)];
        ivec1[(h)] = itemp;
        itemp = ivec2[(l)];
        ivec2[(l)] = ivec2[(h)];
        ivec2[(h)] = itemp;
        dtemp = zvec[2 * (l)];
        zvec[2 * (l)] = zvec[2 * (h)];
        zvec[2 * (h)] = dtemp;
        dtemp = zvec[2 * (l) + 1];
        zvec[2 * (l) + 1] = zvec[2 * (h) + 1];
        zvec[2 * (h) + 1] = dtemp;
      }
      l++;
      h++;
    }
    s = ((d - c) <= (n - 1 - d)) ? (d - c) : (n - 1 - d);
    for (l = b, h = n - s; s != 0; s--) {
      {
        itemp = ivec1[(l)];
        ivec1[(l)] = ivec1[(h)];
        ivec1[(h)] = itemp;
        itemp = ivec2[(l)];
        ivec2[(l)] = ivec2[(h)];
        ivec2[(h)] = itemp;
        dtemp = zvec[2 * (l)];
        zvec[2 * (l)] = zvec[2 * (h)];
        zvec[2 * (h)] = dtemp;
        dtemp = zvec[2 * (l) + 1];
        zvec[2 * (l) + 1] = zvec[2 * (h) + 1];
        zvec[2 * (h) + 1] = dtemp;
      }
      l++;
      h++;
    }
    IV2ZVqsortDown(b - a, ivec1, ivec2, zvec);
    IV2ZVqsortDown(d - c, ivec1 + n - (d - c), ivec2 + n - (d - c), zvec + 2 * (n - (d - c)));
  }
  return;
}
```