user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<_quick_rec_median>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L60
  mov    -0x14(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L80
  mov    -0x14(%rbp),%eax
  jmp    L0
L80:
  mov    -0x10(%rbp),%eax
  jmp    L0
L60:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L30
  mov    -0xc(%rbp),%eax
  jmp    L0
L30:
  mov    -0x14(%rbp),%eax
L0:
  mov    %eax,-0x8(%rbp)
  jmp    L132
L53:
  addl   $0x1,-0x1c(%rbp)
L71:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jg     L53
  jmp    L77
L64:
  subl   $0x1,-0x18(%rbp)
L77:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jl     L64
  mov    -0x1c(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jg     L132
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x1c(%rbp)
  subl   $0x1,-0x18(%rbp)
L132:
  mov    -0x1c(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jle    L71
  mov    -0x2c(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jge    L45
  mov    -0x18(%rbp),%edx
  mov    -0x2c(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <_quick_rec_median>
L45:
  mov    -0x1c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jge    L16
  mov    -0x30(%rbp),%edx
  mov    -0x1c(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <_quick_rec_median>
L16:
  nop
  leave
  ret
```

assistant: ```c
void _quick_rec_median(int *vet, int begin, int end) {
  int i = begin, j = end;
  int tmp;
  int a = vet[begin], b = vet[begin + (end - begin) / 2], c = vet[end];
  int pivot = a < b ? (a > c ? a : b) : (b > c ? c : a);
  while (i <= j) {
    while (vet[i] < pivot)
      i++;
    while (vet[j] > pivot)
      j--;
    if (i <= j) {
      tmp = vet[i];
      vet[i] = vet[j];
      vet[j] = tmp;
      i++;
      j--;
    }
  }
  if (begin < j) {
    _quick_rec_median(vet, begin, j);
  }
  if (i < end) {
    _quick_rec_median(vet, i, end);
  }
}
```