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

```asm
<quick>:
  endbr64
  push   %r15
  mov    %esi,%r8d
  mov    %rdi,%r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    $0xfffffffe,%r13d
  push   %r12
  lea    0x4(%rdi),%r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  sub    $0x8,%rsp
L236:
  lea    (%r8,%r14,1),%edx
  mov    %r14d,%esi
  mov    %r8d,%ebx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%edi
  cmp    %r14d,%r8d
  jg     L285
  nopw   0x0(%rax,%rax,1)
L176:
  mov    0x0(%rbp),%r9d
  mov    %ebx,%ecx
  lea    0x1(%r9),%eax
  mov    %eax,0x0(%rbp)
  test   %eax,%eax
  je     L148
  mov    %r13d,%eax
  movslq %ebx,%rcx
  sub    %r9d,%eax
  add    $0x2,%r9d
  lea    (%r15,%rcx,4),%rdx
  add    %rcx,%rax
  sub    %ebx,%r9d
  mov    %ebx,%ecx
  lea    (%r12,%rax,4),%r10
  jmp    L249
  nopl   0x0(%rax)
L8:
  add    $0x4,%rdx
  mov    %eax,0x0(%rbp)
  add    $0x1,%ecx
  cmp    %rdx,%r10
  je     L148
L249:
  lea    (%r9,%rcx,1),%eax
  cmp    %edi,(%rdx)
  jl     L8
  mov    %eax,0x0(%rbp)
  test   %eax,%eax
  je     L160
L46:
  movslq %esi,%rdx
  lea    (%r15,%rdx,4),%rdx
  jmp    L3
  nopl   0x0(%rax,%rax,1)
L18:
  mov    0x0(%rbp),%eax
  sub    $0x1,%esi
  sub    $0x4,%rdx
  add    $0x1,%eax
  mov    %eax,0x0(%rbp)
  test   %eax,%eax
  je     L160
L3:
  cmp    %edi,(%rdx)
  jg     L18
  cmp    %esi,%ecx
  jge    L143
  add    $0x1,%eax
  jne    L184
  movslq %ecx,%rax
  movl   $0x1,0x0(%rbp)
  mov    (%rdx),%ebx
  cmp    %ebx,(%r15,%rax,4)
  je     L73
  mov    %ecx,%ebx
  jmp    L176
  xchg   %ax,%ax
L160:
  cmp    %ecx,%esi
  jle    L143
  movl   $0x1,0x0(%rbp)
L34:
  movslq %ecx,%rax
  lea    (%r15,%rax,4),%r9
  movslq %esi,%rax
  lea    (%r15,%rax,4),%rax
  mov    (%r9),%edx
  mov    (%rax),%r10d
  cmp    %r10d,%edx
  je     L267
  sub    $0x1,%esi
  lea    0x1(%rcx),%ebx
  mov    %r10d,(%r9)
  mov    %edx,(%rax)
  mov    %esi,%eax
  addl   $0x1,0x4(%rbp)
  cmp    %esi,%ebx
  jne    L149
  nopl   0x0(%rax)
L77:
  lea    0x1(%rsi),%ebx
  lea    -0x1(%rax),%esi
L58:
  cmp    %ebx,%esi
  jge    L176
L285:
  lea    -0x1(%rbx),%edx
  cmp    %r8d,%edx
  jg     L10
L106:
  cmp    %ebx,%r14d
  jle    L161
  mov    %ebx,%r8d
  jmp    L236
  nopl   0x0(%rax,%rax,1)
L148:
  add    $0x1,%eax
  mov    %eax,0x0(%rbp)
  jmp    L46
  nopl   0x0(%rax,%rax,1)
L143:
  mov    %ecx,%ebx
  mov    %esi,%eax
  cmp    %esi,%ebx
  je     L77
L149:
  addl   $0x1,0x0(%rbp)
  je     L58
L222:
  movslq %esi,%rdx
  movslq %ebx,%rax
  mov    (%r15,%rdx,4),%ecx
  cmp    %ecx,(%r15,%rax,4)
  jne    L58
  mov    %esi,%eax
  mov    %ebx,%esi
  jmp    L77
L73:
  mov    %esi,%eax
  mov    %ecx,%esi
  jmp    L77
L267:
  addl   $0x1,0x0(%rbp)
  mov    %ecx,%ebx
  je     L58
  jmp    L222
L161:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L10:
  mov    %rbp,%rcx
  mov    %r8d,%esi
  mov    %r15,%rdi
  call   <quick>
  jmp    L106
L184:
  mov    %eax,0x0(%rbp)
  jmp    L34
```

assistant: ```c
void quick(int n[], int start, int end, int time[]) {
  int temp;
  int pivo;
  int i;
  int j;
  i = start;
  j = end;
  pivo = n[(start + end) / 2];
  while (i <= j) {
    while (++time[0] && n[i] < pivo)
      i++;
    while (++time[0] && pivo < n[j])
      j--;
    if (i < j && ++time[0] && n[i] != n[j]) {
      temp = n[i];
      n[i] = n[j];
      n[j] = temp;
      time[1]++;
      i++;
      j--;
    }
    if (i == j || (++time[0] && n[i] == n[j])) {
      i++;
      j--;
    }
  }
  if (start < i - 1)
    quick(n, start, i - 1, time);
  if (i < end)
    quick(n, i, end, time);
}
```