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

```asm
<mc64rd_>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  mov    (%rdi),%eax
  test   %eax,%eax
  jle    L90
  sub    $0x1,%eax
  lea    -0x4(%rcx),%r14
  lea    -0x8(%r8),%r15
  mov    %rcx,%r10
  lea    (%rdx,%rax,4),%rax
  mov    %rdx,%rbx
  mov    %rax,0x10(%rsp)
  lea    -0x18(%r8),%rax
  mov    %rax,0x8(%rsp)
  lea    0x30(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    %r14,%rax
  mov    %r15,%r14
  mov    %rax,%r15
  cs nopw 0x0(%rax,%rax,1)
L278:
  movq   (%rbx),%xmm0
  pshufd $0xe5,%xmm0,%xmm3
  movd   %xmm0,%r11d
  movd   %xmm3,%eax
  movd   %xmm3,%r9d
  sub    %r11d,%eax
  cmp    $0x1,%eax
  jle    L87
  cmp    $0xe,%eax
  jg     L9
L274:
  lea    0x1(%r11),%ecx
  cmp    %r9d,%ecx
  jge    L87
  movslq %r11d,%rax
  mov    $0xfffffffe,%r13d
  movslq %ecx,%rcx
  sub    $0x1,%r9d
  lea    (%r14,%rax,8),%rsi
  lea    (%r15,%rax,4),%rax
  sub    %r11d,%r13d
  mov    %rsi,0x18(%rsp)
  mov    %r11d,%esi
  mov    %rax,0x20(%rsp)
  jmp    L184
  nopl   0x0(%rax,%rax,1)
L186:
  add    $0x1,%esi
  add    $0x1,%rcx
  cmp    %esi,%r9d
  je     L87
L184:
  movsd  -0x10(%r8,%rcx,8),%xmm0
  movsd  -0x8(%r8,%rcx,8),%xmm1
  comisd %xmm0,%xmm1
  jbe    L186
  mov    -0x8(%r10,%rcx,4),%eax
  mov    -0x4(%r10,%rcx,4),%r12d
  movsd  %xmm0,-0x8(%r8,%rcx,8)
  mov    %eax,-0x4(%r10,%rcx,4)
  cmp    %r11d,%esi
  jle    L214
  mov    0x8(%rsp),%rdi
  movslq %esi,%rdx
  lea    -0x8(%r8,%rdx,8),%rax
  lea    -0x4(%r10,%rdx,4),%rdx
  lea    (%rdi,%rcx,8),%rbp
  lea    0x0(%r13,%rcx,1),%edi
  shl    $0x3,%rdi
  sub    %rdi,%rbp
  jmp    L269
  nop
L225:
  mov    -0x4(%rdx),%edi
  movsd  %xmm0,(%rax)
  sub    $0x8,%rax
  sub    $0x4,%rdx
  mov    %edi,0x4(%rdx)
  cmp    %rax,%rbp
  je     L214
L269:
  movsd  -0x8(%rax),%xmm0
  comisd %xmm0,%xmm1
  ja     L225
  add    $0x1,%esi
  movsd  %xmm1,(%rax)
  add    $0x1,%rcx
  mov    %r12d,(%rdx)
  cmp    %esi,%r9d
  jne    L184
  nopl   0x0(%rax)
L87:
  lea    0x4(%rbx),%rax
  cmp    0x10(%rsp),%rbx
  je     L90
  mov    %rax,%rbx
  jmp    L278
  nopw   0x0(%rax,%rax,1)
L214:
  mov    0x18(%rsp),%rax
  movsd  %xmm1,(%rax)
  mov    0x20(%rsp),%rax
  mov    %r12d,(%rax)
  jmp    L186
  cs nopw 0x0(%rax,%rax,1)
L9:
  movq   %xmm0,0x30(%rsp)
  movd   %xmm3,%ecx
  movd   %xmm0,%esi
  mov    $0x2,%r12d
L211:
  lea    (%rsi,%rcx,1),%edi
  lea    -0x2(%r12),%eax
  mov    %edi,%edx
  shr    $0x1f,%edx
  add    %edi,%edx
  sar    %edx
  movslq %edx,%rdx
  movsd  (%r14,%rdx,8),%xmm1
  cmp    %ecx,%esi
  jge    L72
  lea    -0x1(%rcx),%ebp
  movslq %esi,%rdx
  sub    %esi,%ebp
  lea    -0x8(%r8,%rdx,8),%rdi
  add    %rdx,%rbp
  lea    (%r8,%rbp,8),%rbp
  jmp    L182
  nopl   0x0(%rax)
L67:
  add    $0x8,%rdi
  cmp    %rdi,%rbp
  je     L72
L182:
  movsd  (%rdi),%xmm0
  ucomisd %xmm0,%xmm1
  jp     L8
  je     L67
L8:
  minsd  %xmm0,%xmm1
  mov    %eax,0x18(%rsp)
  mov    %esi,%edi
  nopl   0x0(%rax,%rax,1)
L159:
  movsd  -0x8(%r8,%rdx,8),%xmm0
  comisd %xmm0,%xmm1
  jae    L108
  movslq %edi,%rbp
  mov    -0x4(%r10,%rdx,4),%eax
  add    $0x1,%edi
  lea    (%r14,%rbp,8),%r13
  lea    (%r15,%rbp,4),%rbp
  movsd  0x0(%r13),%xmm2
  movsd  %xmm0,0x0(%r13)
  mov    0x0(%rbp),%r13d
  movsd  %xmm2,-0x8(%r8,%rdx,8)
  mov    %eax,0x0(%rbp)
  mov    %r13d,-0x4(%r10,%rdx,4)
L108:
  add    $0x1,%rdx
  cmp    %edx,%ecx
  jg     L159
  mov    %edi,%r13d
  movd   %edi,%xmm4
  movd   %esi,%xmm1
  movslq 0x18(%rsp),%rax
  movd   %edi,%xmm0
  movd   %ecx,%xmm6
  punpckldq %xmm4,%xmm1
  sub    %esi,%r13d
  punpckldq %xmm6,%xmm0
  pshufd $0xe0,%xmm4,%xmm2
  lea    -0x1(%r12),%edx
  mov    %ecx,%esi
  sub    %edi,%esi
  punpcklqdq %xmm1,%xmm0
  lea    0x1(%r12),%ebp
  cmp    %esi,%r13d
  jl     L27
  mov    0x28(%rsp),%rax
  movslq %ebp,%rbp
  movslq %edx,%rdx
  mov    %ecx,0x30(%rsp,%rbp,4)
  movq   %xmm2,(%rax,%rdx,4)
L44:
  lea    0x2(%r12),%eax
L72:
  mov    0x28(%rsp),%rsi
  movslq %eax,%rdx
  lea    (%rsi,%rdx,4),%rdx
  jmp    L265
  nopl   (%rax)
L126:
  mov    %ebp,%eax
L265:
  test   %eax,%eax
  je     L274
  mov    -0x4(%rdx),%ecx
  mov    -0x8(%rdx),%esi
  lea    -0x2(%rax),%ebp
  sub    $0x8,%rdx
  mov    %ecx,%edi
  sub    %esi,%edi
  cmp    $0xe,%edi
  jle    L126
  mov    %eax,%r12d
  jmp    L211
L90:
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L142
  add    $0x108,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L27:
  mov    0x28(%rsp),%rsi
  movups %xmm0,(%rsi,%rax,4)
  jmp    L44
L142:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int mc64rd_(int *n, int *ne, int *ip, int *irn, double *a) {
  int i__1, i__2, i__3;
  int j, k, r__, s;
  double ha;
  int hi, td, mid, len, ipj;
  double key;
  int last, todo[50], first;
  --ip;
  --a;
  --irn;
  i__1 = *n;
  for (j = 1; j <= i__1; ++j) {
    len = ip[j + 1] - ip[j];
    if (len <= 1) {
      goto L100;
    }
    ipj = ip[j];
    if (len < 15) {
      goto L400;
    }
    todo[0] = ipj;
    todo[1] = ipj + len;
    td = 2;
  L500:
    first = todo[td - 2];
    last = todo[td - 1];
    key = a[(first + last) / 2];
    i__2 = last - 1;
    for (k = first; k <= i__2; ++k) {
      ha = a[k];
      if (ha == key) {
        goto L475;
      }
      if (ha > key) {
        goto L470;
      }
      key = ha;
      goto L470;
    L475:;
    }
    td += -2;
    goto L425;
  L470:
    mid = first;
    i__2 = last - 1;
    for (k = first; k <= i__2; ++k) {
      if (a[k] <= key) {
        goto L450;
      }
      ha = a[mid];
      a[mid] = a[k];
      a[k] = ha;
      hi = irn[mid];
      irn[mid] = irn[k];
      irn[k] = hi;
      ++mid;
    L450:;
    }
    if (mid - first >= last - mid) {
      todo[td + 1] = last;
      todo[td] = mid;
      todo[td - 1] = mid;
    } else {
      todo[td + 1] = mid;
      todo[td] = first;
      todo[td - 1] = last;
      todo[td - 2] = mid;
    }
    td += 2;
  L425:
    if (td == 0) {
      goto L400;
    }
    if (todo[td - 1] - todo[td - 2] >= 15) {
      goto L500;
    }
    td += -2;
    goto L425;
  L400:
    i__2 = ipj + len - 1;
    for (r__ = ipj + 1; r__ <= i__2; ++r__) {
      if (a[r__ - 1] < a[r__]) {
        ha = a[r__];
        hi = irn[r__];
        a[r__] = a[r__ - 1];
        irn[r__] = irn[r__ - 1];
        i__3 = ipj + 1;
        for (s = r__ - 1; s >= i__3; --s) {
          if (a[s - 1] < ha) {
            a[s] = a[s - 1];
            irn[s] = irn[s - 1];
          } else {
            a[s] = ha;
            irn[s] = hi;
            goto L200;
          }
        }
        a[ipj] = ha;
        irn[ipj] = hi;
      }
    L200:;
    }
  L100:;
  }
  return 0;
}
```