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

```asm
<threeSumClosestQSort>:
  endbr64
  push   %r15
  mov    %edx,%eax
  push   %r14
  sub    $0x1,%eax
  mov    %esi,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %edx,0x58(%rsp)
  mov    %eax,0x54(%rsp)
L63:
  mov    0x58(%rsp),%edx
  mov    %r14d,%esi
  mov    %r12,%rdi
  lea    0x1(%r14),%r13d
  call   <threeSumClosestPartition@plt>
  mov    %eax,0x48(%rsp)
  cmp    %eax,%r13d
  jl     L230
L19:
  mov    0x48(%rsp),%eax
  cmp    %eax,0x54(%rsp)
  jle    L37
  add    $0x1,%eax
  mov    %eax,%r14d
  jmp    L63
  nopw   0x0(%rax,%rax,1)
L230:
  lea    -0x1(%rax),%ecx
  sub    $0x2,%eax
  mov    %ecx,0x4c(%rsp)
  mov    %eax,0x50(%rsp)
  mov    %r13d,%eax
  mov    %r14d,%r13d
  mov    %eax,%r14d
L266:
  mov    0x4c(%rsp),%edx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <threeSumClosestPartition@plt>
  mov    %eax,0x3c(%rsp)
  cmp    %r14d,%eax
  jg     L164
L253:
  mov    0x3c(%rsp),%eax
  mov    0x50(%rsp),%ecx
  cmp    %ecx,%eax
  jge    L19
  lea    0x1(%rax),%r13d
  lea    0x2(%rax),%r14d
  jmp    L266
  nopl   (%rax)
L164:
  lea    -0x1(%rax),%ecx
  sub    $0x2,%eax
  mov    %ecx,0x40(%rsp)
  mov    %eax,0x44(%rsp)
  mov    %r14d,%eax
  mov    %r13d,%r14d
  mov    %eax,%r13d
L84:
  mov    0x40(%rsp),%edx
  mov    %r14d,%esi
  mov    %r12,%rdi
  call   <threeSumClosestPartition@plt>
  mov    %eax,0x30(%rsp)
  cmp    %r13d,%eax
  jg     L143
L170:
  mov    0x30(%rsp),%eax
  mov    0x44(%rsp),%ecx
  cmp    %ecx,%eax
  jge    L253
  lea    0x1(%rax),%r14d
  lea    0x2(%rax),%r13d
  jmp    L84
  nopl   (%rax)
L143:
  lea    -0x1(%rax),%ecx
  sub    $0x2,%eax
  mov    %ecx,0x34(%rsp)
  mov    %eax,0x38(%rsp)
  mov    %r13d,%eax
  mov    %r14d,%r13d
  mov    %eax,%r14d
L165:
  mov    0x34(%rsp),%edx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <threeSumClosestPartition@plt>
  mov    %eax,0x20(%rsp)
  cmp    %r14d,%eax
  jg     L116
L104:
  mov    0x20(%rsp),%eax
  mov    0x38(%rsp),%ecx
  cmp    %ecx,%eax
  jge    L170
  lea    0x1(%rax),%r13d
  lea    0x2(%rax),%r14d
  jmp    L165
  nopl   (%rax)
L116:
  lea    -0x1(%rax),%ecx
  sub    $0x2,%eax
  mov    %r14d,%r15d
  mov    %ecx,0x28(%rsp)
  mov    %eax,0x2c(%rsp)
  mov    %r13d,%eax
  mov    %r12,%r13
  mov    %eax,%r12d
L167:
  mov    0x28(%rsp),%edx
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <threeSumClosestPartition@plt>
  mov    %eax,0x14(%rsp)
  cmp    %r15d,%eax
  jg     L90
  mov    0x14(%rsp),%eax
  mov    0x2c(%rsp),%ecx
  cmp    %ecx,%eax
  jge    L256
L307:
  lea    0x1(%rax),%r12d
  lea    0x2(%rax),%r15d
  jmp    L167
  nopl   0x0(%rax)
L90:
  lea    -0x1(%rax),%ecx
  sub    $0x2,%eax
  mov    %r13,%r14
  mov    %r12d,%ebp
  mov    %ecx,0x18(%rsp)
  mov    %eax,0x1c(%rsp)
L207:
  mov    0x18(%rsp),%edx
  mov    %ebp,%esi
  mov    %r14,%rdi
  call   <threeSumClosestPartition@plt>
  mov    %eax,0x8(%rsp)
  cmp    %r15d,%eax
  jg     L115
L178:
  mov    0x8(%rsp),%eax
  mov    0x1c(%rsp),%ecx
  cmp    %ecx,%eax
  jge    L30
  lea    0x1(%rax),%ebp
  lea    0x2(%rax),%r15d
  jmp    L207
  nopl   0x0(%rax)
L115:
  lea    -0x1(%rax),%ecx
  sub    $0x2,%eax
  mov    %ebp,%r12d
  mov    %ecx,0xc(%rsp)
  mov    %eax,0x10(%rsp)
L173:
  mov    0xc(%rsp),%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <threeSumClosestPartition@plt>
  mov    %eax,%ebx
  cmp    %r15d,%eax
  jg     L3
L8:
  cmp    0x10(%rsp),%ebx
  jge    L178
  lea    0x1(%rbx),%r12d
  lea    0x2(%rbx),%r15d
  jmp    L173
  nopw   0x0(%rax,%rax,1)
L3:
  lea    -0x1(%rax),%eax
  mov    %ebx,0x24(%rsp)
  mov    %eax,(%rsp)
  lea    -0x2(%rbx),%eax
  mov    %eax,0x4(%rsp)
L81:
  mov    (%rsp),%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <threeSumClosestPartition@plt>
  mov    %eax,%ebx
  cmp    %r15d,%eax
  jg     L71
L58:
  cmp    0x4(%rsp),%ebx
  jge    L59
  lea    0x1(%rbx),%r12d
  lea    0x2(%rbx),%r15d
  jmp    L81
  cs nopw 0x0(%rax,%rax,1)
L71:
  lea    -0x1(%rax),%r13d
  lea    -0x2(%rax),%ebp
L106:
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <threeSumClosestPartition@plt>
  cmp    %r15d,%eax
  jg     L154
L251:
  cmp    %ebp,%eax
  jge    L58
  lea    0x1(%rax),%r12d
  lea    0x2(%rax),%r15d
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L59:
  mov    0x24(%rsp),%ebx
  jmp    L8
  nopl   0x0(%rax)
L30:
  mov    0x14(%rsp),%eax
  mov    0x2c(%rsp),%ecx
  mov    %r14,%r13
  cmp    %ecx,%eax
  jl     L307
L256:
  mov    %r13,%r12
  jmp    L104
L37:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L154:
  lea    -0x1(%rax),%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  mov    %eax,0x5c(%rsp)
  call   <threeSumClosestQSort>
  mov    0x5c(%rsp),%eax
  jmp    L251
```

assistant: ```c
void threeSumClosestQSort(int *nums, int start, int end) {
  int p = threeSumClosestPartition(nums, start, end);
  if (p > start + 1) {
    threeSumClosestQSort(nums, start, p - 1);
  }
  if (p < end - 1) {
    threeSumClosestQSort(nums, p + 1, end);
  }
}
```