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

```asm
<quickSortRec>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L59
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L58
L40:
  nop
L0:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L45
  addl   $0x1,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L0
L45:
  nop
L77:
  subl   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L30
  cmpl   $0x0,-0x10(%rbp)
  jg     L77
L30:
  mov    -0xc(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L58
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
L58:
  mov    -0xc(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L40
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <quickSortRec>
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <quickSortRec>
L59:
  nop
  leave
  ret
```

assistant: ```c
void quickSortRec(int *tab, int min, int max) {
  int pivotIndex;
  int tmp_max;
  int tmp_min;
  int tmp;
  pivotIndex = 0;
  tmp_max = 0;
  tmp_min = 0;
  if (min < max) {
    pivotIndex = min;
    tmp_max = max;
    tmp_min = min;
    while (tmp_min < tmp_max) {
      while ((tab[tmp_min] <= tab[pivotIndex]) && ++tmp_min < max)
        ;
      while (tab[--tmp_max] > tab[pivotIndex] && tmp_max > 0)
        ;
      if (tmp_min < tmp_max) {
        tmp = tab[tmp_min];
        tab[tmp_min] = tab[tmp_max];
        tab[tmp_max] = tmp;
      }
    }
    tmp = tab[pivotIndex];
    tab[pivotIndex] = tab[tmp_max];
    tab[tmp_max] = tmp;
    quickSortRec(tab, min, tmp_max - 1);
    quickSortRec(tab, tmp_max + 1, max);
  }
}
```