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

```asm
<quick_select_uint8>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r11
  lea    -0x1(%rsi),%ebp
  mov    %ebp,%r13d
  shr    $0x1f,%r13d
  add    %ebp,%r13d
  sar    %r13d
  test   %ebp,%ebp
  jle    L82
  cmp    $0x1,%ebp
  je     L120
  mov    $0x0,%r12d
  mov    $0x1,%eax
  jmp    L144
L82:
  movslq %r13d,%r13
  movzbl (%r11,%r13,1),%eax
L125:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L120:
  mov    $0x0,%r12d
L71:
  movslq %r12d,%rdx
  add    %r11,%rdx
  movzbl (%rdx),%ecx
  movslq %ebp,%rax
  add    %r11,%rax
  movzbl (%rax),%esi
  cmp    %sil,%cl
  jbe    L155
  mov    %sil,(%rdx)
  mov    %cl,(%rax)
L155:
  movslq %r13d,%r13
  movzbl (%r11,%r13,1),%eax
  jmp    L125
L154:
  add    $0x1,%r8
L39:
  mov    %r8d,%r14d
  movzbl (%rbx),%esi
  movzbl (%r11,%r8,1),%r10d
  cmp    %r10b,%sil
  ja     L154
  movslq %edx,%rax
  lea    -0x1(%r11,%rax,1),%rax
L69:
  mov    %edx,%r9d
  sub    $0x1,%edx
  mov    %rax,%rdi
  sub    $0x1,%rax
  movzbl 0x1(%rax),%ecx
  cmp    %cl,%sil
  jb     L69
  cmp    %r8d,%edx
  jl     L16
  mov    %cl,(%r11,%r8,1)
  mov    %r10b,(%rdi)
  jmp    L154
L16:
  mov    %cl,(%rbx)
  mov    %sil,(%rdi)
  cmp    %edx,%r13d
  jl     L102
  je     L48
  mov    %r14d,%r12d
L160:
  cmp    %r12d,%ebp
  jle    L82
  lea    0x1(%r12),%eax
  cmp    %ebp,%eax
  je     L71
L144:
  lea    (%r12,%rbp,1),%ecx
  mov    %ecx,%edx
  shr    $0x1f,%edx
  add    %ecx,%edx
  sar    %edx
  movslq %edx,%rdx
  add    %r11,%rdx
  movzbl (%rdx),%esi
  movslq %ebp,%rcx
  add    %r11,%rcx
  movzbl (%rcx),%edi
  cmp    %dil,%sil
  jbe    L12
  mov    %dil,(%rdx)
  mov    %sil,(%rcx)
L12:
  movslq %r12d,%rsi
  lea    (%r11,%rsi,1),%rbx
  movzbl (%rbx),%edi
  movzbl (%rcx),%r8d
  cmp    %r8b,%dil
  jbe    L91
  mov    %r8b,(%rbx)
  mov    %dil,(%rcx)
L91:
  movzbl (%rdx),%ecx
  movzbl (%rbx),%edi
  cmp    %dil,%cl
  jbe    L140
  mov    %dil,(%rdx)
  mov    %cl,(%rbx)
L140:
  movzbl (%rdx),%edi
  lea    0x1(%r11,%rsi,1),%rcx
  movzbl (%rcx),%esi
  mov    %sil,(%rdx)
  mov    %dil,(%rcx)
  add    $0x1,%eax
  movslq %eax,%r8
  mov    %ebp,%edx
  jmp    L39
L48:
  mov    %r14d,%r12d
L102:
  lea    -0x2(%r9),%ebp
  jmp    L160
```

assistant: ```c
unsigned char quick_select_uint8(unsigned char 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]) {
        unsigned char temp = (arr[low]);
        (arr[low]) = (arr[high]);
        (arr[high]) = temp;
      };
      return arr[median];
    }
    middle = (low + high) / 2;
    if (arr[middle] > arr[high]) {
      unsigned char temp = (arr[middle]);
      (arr[middle]) = (arr[high]);
      (arr[high]) = temp;
    };
    if (arr[low] > arr[high]) {
      unsigned char temp = (arr[low]);
      (arr[low]) = (arr[high]);
      (arr[high]) = temp;
    };
    if (arr[middle] > arr[low]) {
      unsigned char temp = (arr[middle]);
      (arr[middle]) = (arr[low]);
      (arr[low]) = temp;
    };
    {
      unsigned char temp = (arr[middle]);
      (arr[middle]) = (arr[low + 1]);
      (arr[low + 1]) = temp;
    };
    ll = low + 1;
    hh = high;
    for (;;) {
      do
        ll++;
      while (arr[low] > arr[ll]);
      do
        hh--;
      while (arr[hh] > arr[low]);
      if (hh < ll)
        break;
      {
        unsigned char temp = (arr[ll]);
        (arr[ll]) = (arr[hh]);
        (arr[hh]) = temp;
      };
    }
    {
      unsigned char temp = (arr[low]);
      (arr[low]) = (arr[hh]);
      (arr[hh]) = temp;
    };
    if (hh <= median)
      low = ll;
    if (hh >= median)
      high = hh - 1;
  }
}
```