user: 请将以下的汇编代码转换成C语言代码:

```asm
<pthread_qsort_split>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x50(%rbp)
  mov    %rsi,-0x48(%rbp)
  mov    %rdx,%r12
  mov    %rcx,%rbx
  mov    %r8,-0x60(%rbp)
  mov    %r9,%r14
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0x17(%rsi),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L64:
  cmp    %rdx,%rsp
  je     L56
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L64
L56:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L114
  orq    $0x0,-0x8(%rsp,%rax,1)
L114:
  lea    0xf(%rsp),%r15
  and    $0xfffffffffffffff0,%r15
  lea    (%r12,%rbx,1),%rax
  shr    %rax
  mov    %rax,%rcx
  mov    %rax,-0x68(%rbp)
  mov    -0x48(%rbp),%rdx
  mov    %rdx,%rax
  imul   %r12,%rax
  mov    -0x50(%rbp),%rdi
  add    %rdi,%rax
  mov    %rax,%rsi
  mov    %rax,-0x70(%rbp)
  mov    %rdx,%rax
  imul   %rcx,%rax
  add    %rdi,%rax
  mov    %rax,-0x58(%rbp)
  mov    %rax,%rdi
  call   *%r14
  test   %eax,%eax
  jns    L120
  mov    %r12,%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x50(%rbp),%rdi
  call   <pthread_qsort_swap@plt>
L120:
  mov    -0x48(%rbp),%rax
  imul   %rbx,%rax
  mov    -0x50(%rbp),%rcx
  lea    (%rcx,%rax,1),%r13
  mov    -0x70(%rbp),%rsi
  mov    %r13,%rdi
  call   *%r14
  test   %eax,%eax
  js     L75
L55:
  mov    -0x58(%rbp),%rsi
  mov    %r13,%rdi
  call   *%r14
  test   %eax,%eax
  js     L138
L42:
  mov    -0x48(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    %r15,%rdi
  call   <memcpy@plt>
  lea    -0x1(%rbx),%rax
  mov    %rax,%r13
  mov    %rax,-0x58(%rbp)
  mov    %rax,%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x50(%rbp),%rdi
  call   <pthread_qsort_swap@plt>
  jmp    L71
L75:
  mov    %r12,%rcx
  mov    %rbx,%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x50(%rbp),%rdi
  call   <pthread_qsort_swap@plt>
  jmp    L55
L138:
  mov    -0x68(%rbp),%rcx
  mov    %rbx,%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x50(%rbp),%rdi
  call   <pthread_qsort_swap@plt>
  jmp    L42
L38:
  add    $0x1,%r12
L106:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   *%r14
  add    -0x48(%rbp),%rbx
  test   %eax,%eax
  js     L38
  sub    $0x1,%r13
  mov    -0x48(%rbp),%rbx
  imul   %r13,%rbx
  add    -0x50(%rbp),%rbx
  jmp    L43
L118:
  sub    $0x1,%r13
L43:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   *%r14
  sub    -0x48(%rbp),%rbx
  test   %eax,%eax
  jg     L118
  cmp    %r13,%r12
  jb     L16
  mov    -0x58(%rbp),%rcx
  mov    %r12,%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x50(%rbp),%rdi
  call   <pthread_qsort_swap@plt>
  mov    -0x60(%rbp),%rax
  mov    %r12,(%rax)
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L19
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L16:
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x50(%rbp),%rdi
  call   <pthread_qsort_swap@plt>
L71:
  add    $0x1,%r12
  mov    -0x48(%rbp),%rbx
  imul   %r12,%rbx
  add    -0x50(%rbp),%rbx
  jmp    L106
L19:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void pthread_qsort_split(void *base, const size_t width, const size_t first, const size_t last, size_t *middle, int (*compare)(const void *, const void *)) {
  short done;
  size_t ii, jj, temp_middle;
  void *test_temp;
  test_temp = alloca(width);
  temp_middle = (first + last) / 2;
  if (compare((void *)((size_t)base + (temp_middle * width)), (void *)((size_t)base + (first * width))) < 0) {
    pthread_qsort_swap(base, width, temp_middle, first);
  }
  if (compare((void *)((size_t)base + (last * width)), (void *)((size_t)base + (first * width))) < 0) {
    pthread_qsort_swap(base, width, last, first);
  }
  if (compare((void *)((size_t)base + (last * width)), (void *)((size_t)base + (temp_middle * width))) < 0) {
    pthread_qsort_swap(base, width, last, temp_middle);
  }
  (void)memcpy(test_temp, (void *)((size_t)base + (temp_middle * width)), width);
  pthread_qsort_swap(base, width, temp_middle, (last - 1));
  ii = first;
  jj = last - 1;
  done = 0;
  while (done == 0) {
    ii++;
    while (compare((void *)((size_t)base + (ii * width)), test_temp) < 0) {
      ii++;
    }
    jj--;
    while (compare((void *)((size_t)base + (jj * width)), test_temp) > 0) {
      jj--;
    }
    if (ii < jj) {
      pthread_qsort_swap(base, width, ii, jj);
    } else {
      done = 1;
    }
  }
  pthread_qsort_swap(base, width, ii, (last - 1));
  (*middle) = ii;
  return;
}
```