user: 下面的汇编指令对应的C源代码是什么:

```asm
<heap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  cmpl   $0x3,-0x2c(%rbp)
  je     L129
  cmpl   $0x3,-0x2c(%rbp)
  jg     L63
  cmpl   $0x1,-0x2c(%rbp)
  jg     L50
  cmpl   $0x0,-0x2c(%rbp)
  jns    L71
  jmp    L63
L50:
  cmpl   $0x2,-0x2c(%rbp)
  jne    L63
  mov    -0x28(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sort2@plt>
  jmp    L82
L129:
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  lea    0x4(%rax),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sort3@plt>
  jmp    L82
L63:
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x0,-0x14(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x1,-0x1c(%rbp)
  jmp    L21
L3:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L139
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
  jmp    L114
L139:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0x18(%rbp)
L114:
  addl   $0x1,-0x1c(%rbp)
L21:
  mov    -0x1c(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L3
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  cmpl   $0x1,-0x14(%rbp)
  jle    L123
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <heap>
L123:
  mov    -0x2c(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x18(%rbp)
  jge    L82
  mov    -0x2c(%rbp),%eax
  sub    -0x14(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <heap>
  jmp    L82
L71:
  nop
L82:
  leave
  ret
```

assistant: ```c
void heap(int *values, int n) {
  int i;
  int high_i;
  int low_i;
  int part;
  int value;
  int *dup;
  switch (n) {
  case 0:
  case 1:
    return;
  case 2:
    sort2(&values[0], &values[1]);
    return;
  case 3:
    sort3(&values[0], &values[1], &values[2]);
    return;
  }
  dup = malloc(n * sizeof(int));
  memcpy(dup, values, n * sizeof(int));
  low_i = 0;
  high_i = n - 1;
  part = values[0];
  for (i = 1; i < n; i++) {
    value = values[i];
    if (value < part) {
      dup[low_i] = value;
      low_i++;
    } else {
      dup[high_i] = value;
      high_i--;
    }
  }
  dup[low_i] = part;
  memcpy(values, dup, n * sizeof(int));
  free(dup);
  if (low_i > 1)
    heap(values, low_i);
  if (high_i < (n - 2))
    heap(values + low_i + 1, n - low_i - 1);
}
```