user: What would the C source look like for the assembly code provided here?

```asm
<quicksort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r15
  mov    %esi,%r14d
  mov    %esi,0x8(%rsp)
  mov    %edx,%ebx
  mov    %edx,0xc(%rsp)
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %ebx,%ecx
  sub    %r14d,%ecx
  cltd
  idiv   %ecx
  lea    (%rdx,%r14,1),%eax
  cltq
  mov    (%r15,%rax,4),%r13d
  mov    0x8(%r15),%ecx
  mov    0x4(%r15),%edx
  mov    0x10(%r15),%r9d
  mov    0xc(%r15),%r8d
  mov    (%r15),%esi
  lea    D66(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movslq %ebx,%rax
  mov    (%r15,%rax,4),%ecx
  movslq %r14d,%rax
  mov    (%r15,%rax,4),%edx
  mov    %r13d,%esi
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebx,%eax
  mov    %ebx,%ebp
  mov    %r14d,%ebx
  cmp    %r14d,%eax
  jg     L129
  mov    0x8(%r15),%ecx
  mov    0x4(%r15),%edx
  mov    0x10(%r15),%r9d
  mov    0xc(%r15),%r8d
  mov    (%r15),%esi
  lea    D48(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L46
L31:
  cmp    %ebp,%ebx
  jge    L5
  movslq %ebp,%rax
  lea    (%r15,%rax,4),%r12
L126:
  mov    (%r12),%ecx
  cmp    %r13d,%ecx
  jle    L127
  mov    %r13d,%r8d
  mov    %ebp,%edx
  mov    %ebx,%esi
  lea    D23(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x1,%ebp
  sub    $0x4,%r12
  cmp    %ebx,%ebp
  jne    L126
  mov    %ebx,%ebp
L5:
  mov    %ebp,%edx
  mov    %ebx,%esi
  lea    D10(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L52:
  mov    0x8(%r15),%ecx
  mov    0x4(%r15),%edx
  mov    0x10(%r15),%r9d
  mov    0xc(%r15),%r8d
  mov    (%r15),%esi
  lea    D48(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%eax
  cmp    %ebx,%eax
  jge    L119
  test   %eax,%eax
  jle    L119
  lea    -0x1(%rbx),%edx
  mov    0x8(%rsp),%esi
  mov    %r15,%rdi
  call   <quicksort>
L119:
  mov    0xc(%rsp),%edx
  cmp    %ebx,%edx
  jle    L46
  test   %ebx,%ebx
  js     L46
  lea    0x1(%rbx),%esi
  mov    %r15,%rdi
  call   <quicksort>
L46:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L127:
  mov    %ebp,%edx
  mov    %ebx,%esi
  lea    D10(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    %ebp,%ebx
  jge    L52
  movslq %ebp,%rax
  lea    (%r15,%rax,4),%rsi
  mov    %r14,%rdi
  call   <swap@plt>
L129:
  movslq %ebx,%rax
  lea    (%r15,%rax,4),%r14
  cmp    %r13d,(%r14)
  jge    L31
  add    $0x1,%ebx
  cmp    %ebp,%ebx
  jl     L129
  jmp    L5
```

tool_calls: name: read_data
arguments: data_tag: D66
data_type: string
name: read_data
arguments: data_tag: D43
data_type: string
name: read_data
arguments: data_tag: D48
data_type: string
name: read_data
arguments: data_tag: D23
data_type: string
name: read_data
arguments: data_tag: D10
data_type: string

tool: D66: 
roy:1 %d %d %d %d %d

tool: D43: 
roy:2 pivot %d, min = %d, max = %d


tool: D48: 
roy:3 %d %d %d %d %d

tool: D23: 
 left %d right %d A[right] %d, pivot %d

tool: D10: 
 left %d right %d


assistant: ```c
void quicksort(int A[], int min, int max) {
  int pivot_loc = (int)((rand() % (max - min)) + min);
  int pivot = A[pivot_loc];
  int left = min;
  int right = max;
  printf("\nroy:1 %d %d %d %d %d", A[0], A[1], A[2], A[3], A[4]);
  printf("\nroy:2 pivot %d, min = %d, max = %d\n", pivot, A[min], A[max]);
  while (left < right) {
    while (left < right && A[left] < pivot) {
      left++;
    }
    while (left < right && A[right] > pivot) {
      printf("\n left %d right %d A[right] %d, pivot %d", left, right, A[right], pivot);
      right--;
    }
    printf("\n left %d right %d\n", left, right);
    if (left < right) {
      swap(&A[left], &A[right]);
    }
  }
  printf("\nroy:3 %d %d %d %d %d", A[0], A[1], A[2], A[3], A[4]);
  if (left > min && min > 0) {
    quicksort(A, min, left - 1);
  }
  if (left < max && left >= 0) {
    quicksort(A, left + 1, max);
  }
}
```