user: What is the c source code of the assembly code below?

```asm
<quicksort2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf70,%rsp
  mov    %rdi,-0x1f68(%rbp)
  mov    %esi,-0x1f6c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1f60(%rbp)
  movl   $0x0,-0x1f50(%rbp)
  mov    -0x1f6c(%rbp),%eax
  mov    %eax,-0xfb0(%rbp)
  jmp    L13
L81:
  mov    -0x1f60(%rbp),%eax
  cltq
  mov    -0x1f50(%rbp,%rax,4),%eax
  mov    %eax,-0x1f5c(%rbp)
  mov    -0x1f60(%rbp),%eax
  cltq
  mov    -0xfb0(%rbp,%rax,4),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1f58(%rbp)
  mov    -0x1f5c(%rbp),%eax
  cmp    -0x1f58(%rbp),%eax
  jge    L158
  mov    -0x1f5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1f68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1f54(%rbp)
  cmpl   $0x3e7,-0x1f60(%rbp)
  je     L150
  jmp    L49
L75:
  subl   $0x1,-0x1f58(%rbp)
L10:
  mov    -0x1f58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1f68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1f54(%rbp)
  jg     L126
  mov    -0x1f5c(%rbp),%eax
  cmp    -0x1f58(%rbp),%eax
  jl     L75
L126:
  mov    -0x1f5c(%rbp),%eax
  cmp    -0x1f58(%rbp),%eax
  jge    L33
  mov    -0x1f58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1f68(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x1f5c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1f5c(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1f68(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  jmp    L33
L151:
  addl   $0x1,-0x1f5c(%rbp)
L33:
  mov    -0x1f5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1f68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1f54(%rbp)
  jl     L62
  mov    -0x1f5c(%rbp),%eax
  cmp    -0x1f58(%rbp),%eax
  jl     L151
L62:
  mov    -0x1f5c(%rbp),%eax
  cmp    -0x1f58(%rbp),%eax
  jge    L49
  mov    -0x1f5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1f68(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x1f58(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x1f58(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1f68(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
L49:
  mov    -0x1f5c(%rbp),%eax
  cmp    -0x1f58(%rbp),%eax
  jl     L10
  mov    -0x1f5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1f68(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1f54(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x1f60(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x1f5c(%rbp),%eax
  lea    0x1(%rax),%edx
  movslq %ecx,%rax
  mov    %edx,-0x1f50(%rbp,%rax,4)
  mov    -0x1f60(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x1f60(%rbp),%eax
  cltq
  mov    -0xfb0(%rbp,%rax,4),%edx
  movslq %ecx,%rax
  mov    %edx,-0xfb0(%rbp,%rax,4)
  mov    -0x1f60(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1f60(%rbp)
  cltq
  mov    -0x1f5c(%rbp),%edx
  mov    %edx,-0xfb0(%rbp,%rax,4)
  jmp    L13
L158:
  subl   $0x1,-0x1f60(%rbp)
L13:
  cmpl   $0x0,-0x1f60(%rbp)
  jns    L81
  jmp    L110
L150:
  nop
L110:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L86
  call   <__stack_chk_fail@plt>
L86:
  leave
  ret
```

assistant: ```c
void quicksort2(int *arr, int elements) {
  int piv;
  int beg[1000];
  int end[1000];
  int i = 0;
  int L;
  int R;
  beg[0] = 0;
  end[0] = elements;
  while (i >= 0) {
    L = beg[i];
    R = end[i] - 1;
    if (L < R) {
      piv = arr[L];
      if (i == 1000 - 1)
        return;
      while (L < R) {
        while (arr[R] >= piv && L < R)
          R--;
        if (L < R)
          arr[L++] = arr[R];
        while (arr[L] <= piv && L < R)
          L++;
        if (L < R)
          arr[R--] = arr[L];
      }
      arr[L] = piv;
      beg[i + 1] = L + 1;
      end[i + 1] = end[i];
      end[i++] = L;
    } else {
      i--;
    }
  }
  return;
}
```