user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<qselect_median_lng>:
  endbr64
  push   %r14
  mov    %rdi,%r11
  push   %r13
  push   %r12
  push   %rbp
  lea    -0x1(%rsi),%ebp
  mov    %ebp,%r13d
  push   %rbx
  shr    $0x1f,%r13d
  add    %ebp,%r13d
  sar    %r13d
  test   %ebp,%ebp
  jle    L88
  cmp    $0x1,%ebp
  je     L22
  xor    %r12d,%r12d
  mov    $0x1,%eax
  nopl   0x0(%rax,%rax,1)
L159:
  lea    (%r12,%rbp,1),%ecx
  movslq %ebp,%rsi
  mov    %ecx,%edx
  lea    (%r11,%rsi,8),%r8
  shr    $0x1f,%edx
  mov    (%r8),%rdi
  add    %ecx,%edx
  sar    %edx
  movslq %edx,%rdx
  lea    (%r11,%rdx,8),%rdx
  mov    (%rdx),%rcx
  cmp    %rdi,%rcx
  jle    L25
  mov    %rdi,(%rdx)
  mov    %rcx,%rdi
  mov    %rcx,(%r8)
L25:
  movslq %r12d,%rcx
  shl    $0x3,%rcx
  lea    (%r11,%rcx,1),%rbx
  mov    (%rbx),%rsi
  cmp    %rdi,%rsi
  jle    L115
  mov    %rdi,(%rbx)
  mov    %rsi,(%r8)
  mov    (%rbx),%rsi
L115:
  mov    (%rdx),%rdi
  cmp    %rsi,%rdi
  jle    L94
  mov    %rsi,(%rdx)
  mov    %rdi,(%rbx)
  mov    (%rdx),%rdi
L94:
  lea    0x8(%r11,%rcx,1),%rcx
  add    $0x1,%eax
  mov    (%rcx),%rsi
  movslq %eax,%r8
  mov    %rsi,(%rdx)
  mov    %ebp,%edx
  mov    %rdi,(%rcx)
  mov    (%rbx),%rsi
  nopl   (%rax)
L124:
  mov    (%r11,%r8,8),%r10
  mov    %r8d,%r14d
  cmp    %rsi,%r10
  jl     L0
  movslq %edx,%rax
  lea    -0x8(%r11,%rax,8),%rax
  nopl   0x0(%rax)
L89:
  mov    %rax,%rdi
  mov    (%rax),%rcx
  mov    %edx,%r9d
  sub    $0x8,%rax
  sub    $0x1,%edx
  cmp    %rsi,%rcx
  jg     L89
  cmp    %r8d,%edx
  jl     L52
  mov    %rcx,(%r11,%r8,8)
  mov    %r10,(%rdi)
  mov    (%rbx),%rsi
L0:
  add    $0x1,%r8
  jmp    L124
  nopw   0x0(%rax,%rax,1)
L52:
  mov    %rcx,(%rbx)
  mov    %rsi,(%rdi)
  cmp    %edx,%r13d
  jl     L44
  movslq %r14d,%r12
  je     L44
L4:
  cmp    %r12d,%ebp
  jle    L88
  lea    0x1(%r12),%eax
  cmp    %ebp,%eax
  jne    L159
  movslq %ebp,%rax
  lea    (%r11,%r12,8),%rdx
  shl    $0x3,%rax
L9:
  add    %r11,%rax
  mov    (%rdx),%rcx
  mov    (%rax),%rsi
  cmp    %rsi,%rcx
  jle    L88
  mov    %rsi,(%rdx)
  mov    %rcx,(%rax)
L88:
  movslq %r13d,%r13
  pop    %rbx
  pop    %rbp
  mov    (%r11,%r13,8),%rax
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L44:
  lea    -0x2(%r9),%ebp
  jmp    L4
L22:
  mov    %rdi,%rdx
  mov    $0x8,%eax
  jmp    L9
```

assistant: ```c
long qselect_median_lng(long arr[], int n) {
  int low, high;
  int median;
  int middle, ll, hh;
  low = 0;
  high = n - 1;
  median = (low + high) / 2;
  for (;;) {
    if (high <= low) {
      return arr[median];
    }
    if (high == low + 1) {
      if (arr[low] > arr[high]) {
        register long t = (arr[low]);
        (arr[low]) = (arr[high]);
        (arr[high]) = t;
      };
      return arr[median];
    }
    middle = (low + high) / 2;
    if (arr[middle] > arr[high]) {
      register long t = (arr[middle]);
      (arr[middle]) = (arr[high]);
      (arr[high]) = t;
    };
    if (arr[low] > arr[high]) {
      register long t = (arr[low]);
      (arr[low]) = (arr[high]);
      (arr[high]) = t;
    };
    if (arr[middle] > arr[low]) {
      register long t = (arr[middle]);
      (arr[middle]) = (arr[low]);
      (arr[low]) = t;
    };
    {
      register long t = (arr[middle]);
      (arr[middle]) = (arr[low + 1]);
      (arr[low + 1]) = t;
    };
    ll = low + 1;
    hh = high;
    for (;;) {
      do
        ll++;
      while (arr[low] > arr[ll]);
      do
        hh--;
      while (arr[hh] > arr[low]);
      if (hh < ll)
        break;
      {
        register long t = (arr[ll]);
        (arr[ll]) = (arr[hh]);
        (arr[hh]) = t;
      };
    }
    {
      register long t = (arr[low]);
      (arr[low]) = (arr[hh]);
      (arr[hh]) = t;
    };
    if (hh <= median)
      low = ll;
    if (hh >= median)
      high = hh - 1;
  }
}
```