user: Please show me the C implementation that matches the assembly code listed below:

```asm
<quick_sort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %rdi,0x58(%rsp)
  mov    %rsi,0x60(%rsp)
  test   %rsi,%rsi
  je     L3
L67:
  mov    0x58(%rsp),%rbx
  mov    0x60(%rsp),%rsi
  mov    %rbx,%rdi
  call   <partition@plt>
  mov    %rax,0x70(%rsp)
  test   %rax,%rax
  je     L130
  mov    %rbx,0x30(%rsp)
  mov    %rax,0x28(%rsp)
L157:
  mov    0x30(%rsp),%rbx
  mov    0x28(%rsp),%rsi
  mov    %rbx,%rdi
  call   <partition@plt>
  mov    %rax,0x78(%rsp)
  test   %rax,%rax
  je     L34
  mov    %rbx,0x40(%rsp)
  mov    %rax,0x38(%rsp)
L21:
  mov    0x40(%rsp),%rbx
  mov    0x38(%rsp),%rsi
  mov    %rbx,%rdi
  call   <partition@plt>
  mov    %rax,0x80(%rsp)
  test   %rax,%rax
  je     L23
  mov    %rbx,0x50(%rsp)
  mov    %rax,0x48(%rsp)
L62:
  mov    0x50(%rsp),%r14
  mov    0x48(%rsp),%rsi
  mov    %r14,%rdi
  call   <partition@plt>
  mov    %rax,0x88(%rsp)
  mov    %rax,%r15
  test   %rax,%rax
  je     L95
L35:
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <partition@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L117
  mov    %rax,0x8(%rsp)
  mov    %r14,%rbp
  mov    %rax,0x10(%rsp)
  mov    %r15,0x18(%rsp)
  mov    %r14,0x20(%rsp)
L28:
  mov    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <partition@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L146
  mov    %rbp,%r13
  mov    %rax,%r12
L107:
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <partition@plt>
  mov    %rax,0x90(%rsp)
  mov    %rax,%r14
  test   %rax,%rax
  je     L4
  mov    %rbx,0x68(%rsp)
  mov    %r13,%rbx
L116:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <partition@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L75
  mov    %r14,%rcx
  mov    %rax,%rdx
  mov    %r13,%r14
  mov    %rbx,%r8
  mov    %r12,%r13
  mov    %rbp,%r12
  mov    %rbx,%rbp
L123:
  mov    %rdx,%rsi
  mov    %rbp,%rdi
  mov    %r8,0xa8(%rsp)
  mov    %rcx,0xa0(%rsp)
  mov    %rdx,0x98(%rsp)
  call   <partition@plt>
  mov    %rbp,%rdi
  mov    %rax,%rsi
  mov    %rax,%rbx
  call   <quick_sort>
  mov    0x98(%rsp),%rdx
  mov    0xa0(%rsp),%rcx
  lea    0x4(%rbp,%rbx,4),%rbp
  mov    0xa8(%rsp),%r8
  sub    %rbx,%rdx
  sub    $0x1,%rdx
  jne    L123
  mov    %r12,%rbp
  mov    %r8,%rbx
  mov    %r13,%r12
  mov    %r14,%r13
  mov    %rcx,%r14
L75:
  sub    %r15,%r14
  lea    0x4(%rbx,%r15,4),%rbx
  sub    $0x1,%r14
  jne    L116
  mov    0x68(%rsp),%rbx
L4:
  mov    0x90(%rsp),%rax
  sub    %rax,%r12
  lea    0x4(%r13,%rax,4),%r13
  sub    $0x1,%r12
  jne    L107
L146:
  mov    0x8(%rsp),%rax
  lea    0x4(%rbp,%rbx,4),%rbp
  sub    %rbx,%rax
  sub    $0x1,%rax
  mov    %rax,0x8(%rsp)
  jne    L28
  mov    0x10(%rsp),%r13
  mov    0x18(%rsp),%r15
  mov    0x20(%rsp),%r14
L117:
  sub    %r13,%r15
  lea    0x4(%r14,%r13,4),%r14
  sub    $0x1,%r15
  jne    L35
L95:
  mov    0x48(%rsp),%rax
  mov    0x88(%rsp),%rcx
  mov    0x50(%rsp),%rdx
  sub    %rcx,%rax
  lea    0x4(%rdx,%rcx,4),%rdx
  sub    $0x1,%rax
  mov    %rdx,0x50(%rsp)
  mov    %rax,0x48(%rsp)
  jne    L62
L23:
  mov    0x38(%rsp),%rax
  mov    0x80(%rsp),%rcx
  mov    0x40(%rsp),%rsi
  sub    %rcx,%rax
  sub    $0x1,%rax
  lea    0x4(%rsi,%rcx,4),%rcx
  mov    %rcx,0x40(%rsp)
  mov    %rax,0x38(%rsp)
  jne    L21
L34:
  mov    0x28(%rsp),%rax
  mov    0x78(%rsp),%rdx
  mov    0x30(%rsp),%rsi
  sub    %rdx,%rax
  sub    $0x1,%rax
  lea    0x4(%rsi,%rdx,4),%rdx
  mov    %rdx,0x30(%rsp)
  mov    %rax,0x28(%rsp)
  jne    L157
L130:
  mov    0x60(%rsp),%rax
  mov    0x70(%rsp),%rcx
  mov    0x58(%rsp),%rdx
  sub    %rcx,%rax
  sub    $0x1,%rax
  lea    0x4(%rdx,%rcx,4),%rcx
  mov    %rcx,0x58(%rsp)
  mov    %rax,0x60(%rsp)
  jne    L67
L3:
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void quick_sort(int A[], size_t n) {
  if (n > 0) {
    size_t p = partition(A, n);
    quick_sort(A, p);
    quick_sort(A + p + 1, n - p - 1);
  }
}
```