user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<partition_sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x230,%rsp
  mov    %rdi,-0x218(%rbp)
  mov    %rsi,-0x220(%rbp)
  mov    %rdx,-0x228(%rbp)
  mov    %rcx,-0x230(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x204(%rbp)
  mov    -0x218(%rbp),%rax
  mov    %rax,-0x110(%rbp)
  mov    -0x220(%rbp),%rax
  mov    %eax,-0x190(%rbp)
  jmp    L425
L260:
  subl   $0x1,-0x204(%rbp)
  mov    -0x204(%rbp),%eax
  cltq
  mov    -0x110(%rbp,%rax,8),%rax
  mov    %rax,-0x1c0(%rbp)
  mov    -0x204(%rbp),%eax
  cltq
  mov    -0x190(%rbp,%rax,4),%eax
  mov    %eax,-0x200(%rbp)
L415:
  mov    -0x200(%rbp),%eax
  sar    %eax
  cltq
  mov    %eax,%edx
  mov    -0x228(%rbp),%rax
  imul   %edx,%eax
  mov    %eax,-0x1fc(%rbp)
  mov    -0x1fc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x1c0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x1b8(%rbp)
  mov    -0x200(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L263
  mov    -0x1fc(%rbp),%eax
  mov    -0x228(%rbp),%rdx
  sub    %edx,%eax
  mov    %eax,-0x1fc(%rbp)
L263:
  mov    -0x1fc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x1b8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x1b0(%rbp)
  mov    -0x1b8(%rbp),%rdx
  mov    -0x1c0(%rbp),%rax
  mov    -0x230(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jle    L174
  mov    -0x228(%rbp),%rax
  mov    %eax,-0x1f8(%rbp)
  mov    -0x1c0(%rbp),%rax
  or     -0x1f8(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L125
L152:
  mov    -0x1c0(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1e0(%rbp)
  mov    -0x1b8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1c0(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x1b8(%rbp),%rax
  mov    -0x1e0(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x1c0(%rbp)
  addq   $0x4,-0x1b8(%rbp)
  subl   $0x4,-0x1f8(%rbp)
  cmpl   $0x0,-0x1f8(%rbp)
  jne    L152
  jmp    L273
L125:
  mov    -0x1c0(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x20a(%rbp)
  mov    -0x1c0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1c0(%rbp)
  mov    -0x1b8(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x1b8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1b8(%rbp)
  movzbl -0x20a(%rbp),%edx
  mov    %dl,(%rax)
  subl   $0x1,-0x1f8(%rbp)
  cmpl   $0x0,-0x1f8(%rbp)
  jne    L125
L273:
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1c0(%rbp)
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1b8(%rbp)
L174:
  mov    -0x1b0(%rbp),%rdx
  mov    -0x1b8(%rbp),%rax
  mov    -0x230(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jle    L274
  mov    -0x1b0(%rbp),%rdx
  mov    -0x1c0(%rbp),%rax
  mov    -0x230(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jle    L188
  mov    -0x228(%rbp),%rax
  mov    %eax,-0x1f4(%rbp)
  mov    -0x1c0(%rbp),%rax
  or     -0x1f4(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L420
L229:
  mov    -0x1c0(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1dc(%rbp)
  mov    -0x1b0(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1c0(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x1b0(%rbp),%rax
  mov    -0x1dc(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x1c0(%rbp)
  addq   $0x4,-0x1b0(%rbp)
  subl   $0x4,-0x1f4(%rbp)
  cmpl   $0x0,-0x1f4(%rbp)
  jne    L229
  jmp    L208
L420:
  mov    -0x1c0(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x209(%rbp)
  mov    -0x1c0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1c0(%rbp)
  mov    -0x1b0(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x1b0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1b0(%rbp)
  movzbl -0x209(%rbp),%edx
  mov    %dl,(%rax)
  subl   $0x1,-0x1f4(%rbp)
  cmpl   $0x0,-0x1f4(%rbp)
  jne    L420
L208:
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1c0(%rbp)
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1b0(%rbp)
L188:
  mov    -0x228(%rbp),%rax
  mov    %eax,-0x1f0(%rbp)
  mov    -0x1b8(%rbp),%rax
  or     -0x1f0(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L77
L300:
  mov    -0x1b8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1d8(%rbp)
  mov    -0x1b0(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1b8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x1b0(%rbp),%rax
  mov    -0x1d8(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x1b8(%rbp)
  addq   $0x4,-0x1b0(%rbp)
  subl   $0x4,-0x1f0(%rbp)
  cmpl   $0x0,-0x1f0(%rbp)
  jne    L300
  jmp    L93
L77:
  mov    -0x1b8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x208(%rbp)
  mov    -0x1b8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1b8(%rbp)
  mov    -0x1b0(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x1b0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1b0(%rbp)
  movzbl -0x208(%rbp),%edx
  mov    %dl,(%rax)
  subl   $0x1,-0x1f0(%rbp)
  cmpl   $0x0,-0x1f0(%rbp)
  jne    L77
L93:
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1b8(%rbp)
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1b0(%rbp)
L274:
  mov    -0x228(%rbp),%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x1b0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x1a0(%rbp)
  mov    -0x228(%rbp),%rax
  mov    %eax,-0x1ec(%rbp)
  mov    -0x1b8(%rbp),%rax
  or     -0x1ec(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L318
L382:
  mov    -0x1b8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1d4(%rbp)
  mov    -0x1a0(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1b8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x1a0(%rbp),%rax
  mov    -0x1d4(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x1b8(%rbp)
  addq   $0x4,-0x1a0(%rbp)
  subl   $0x4,-0x1ec(%rbp)
  cmpl   $0x0,-0x1ec(%rbp)
  jne    L382
  jmp    L123
L318:
  mov    -0x1b8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x207(%rbp)
  mov    -0x1b8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1b8(%rbp)
  mov    -0x1a0(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x1a0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1a0(%rbp)
  movzbl -0x207(%rbp),%edx
  mov    %dl,(%rax)
  subl   $0x1,-0x1ec(%rbp)
  cmpl   $0x0,-0x1ec(%rbp)
  jne    L318
L123:
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1b8(%rbp)
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1a0(%rbp)
  mov    -0x1c0(%rbp),%rax
  mov    %rax,-0x1a8(%rbp)
  mov    -0x1a0(%rbp),%rax
  mov    %rax,-0x198(%rbp)
L266:
  mov    -0x228(%rbp),%rax
  add    %rax,-0x1a8(%rbp)
  mov    -0x198(%rbp),%rdx
  mov    -0x1a8(%rbp),%rax
  mov    -0x230(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  js     L266
L401:
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1a0(%rbp)
  mov    -0x198(%rbp),%rdx
  mov    -0x1a0(%rbp),%rax
  mov    -0x230(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jg     L401
  mov    -0x1a0(%rbp),%rax
  cmp    -0x1a8(%rbp),%rax
  jbe    L41
  mov    -0x228(%rbp),%rax
  mov    %eax,-0x1e8(%rbp)
  mov    -0x1a8(%rbp),%rax
  or     -0x1e8(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L354
L64:
  mov    -0x1a8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1d0(%rbp)
  mov    -0x1a0(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1a8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x1a0(%rbp),%rax
  mov    -0x1d0(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x1a8(%rbp)
  addq   $0x4,-0x1a0(%rbp)
  subl   $0x4,-0x1e8(%rbp)
  cmpl   $0x0,-0x1e8(%rbp)
  jne    L64
  jmp    L332
L354:
  mov    -0x1a8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x206(%rbp)
  mov    -0x1a8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1a8(%rbp)
  mov    -0x1a0(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x1a0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1a0(%rbp)
  movzbl -0x206(%rbp),%edx
  mov    %dl,(%rax)
  subl   $0x1,-0x1e8(%rbp)
  cmpl   $0x0,-0x1e8(%rbp)
  jne    L354
L332:
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1a8(%rbp)
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1a0(%rbp)
  jmp    L266
L41:
  nop
  mov    -0x228(%rbp),%rax
  mov    %eax,-0x1e4(%rbp)
  mov    -0x1a8(%rbp),%rax
  or     -0x1e4(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L34
L385:
  mov    -0x1a8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1cc(%rbp)
  mov    -0x198(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1a8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x198(%rbp),%rax
  mov    -0x1cc(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x1a8(%rbp)
  addq   $0x4,-0x198(%rbp)
  subl   $0x4,-0x1e4(%rbp)
  cmpl   $0x0,-0x1e4(%rbp)
  jne    L385
  jmp    L327
L34:
  mov    -0x1a8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x205(%rbp)
  mov    -0x1a8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1a8(%rbp)
  mov    -0x198(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x198(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x198(%rbp)
  movzbl -0x205(%rbp),%edx
  mov    %dl,(%rax)
  subl   $0x1,-0x1e4(%rbp)
  cmpl   $0x0,-0x1e4(%rbp)
  jne    L34
L327:
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x1a8(%rbp)
  mov    -0x228(%rbp),%rax
  neg    %rax
  add    %rax,-0x198(%rbp)
  mov    -0x1a8(%rbp),%rax
  sub    -0x1c0(%rbp),%rax
  mov    $0x0,%edx
  divq   -0x228(%rbp)
  sub    $0x1,%eax
  mov    %eax,-0x1c8(%rbp)
  mov    -0x200(%rbp),%eax
  sub    -0x1c8(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1c4(%rbp)
  mov    -0x1c8(%rbp),%eax
  cmp    -0x1c4(%rbp),%eax
  jle    L249
  cmpl   $0xa,-0x1c4(%rbp)
  jle    L73
  mov    -0x204(%rbp),%eax
  cltq
  mov    -0x1c0(%rbp),%rdx
  mov    %rdx,-0x110(%rbp,%rax,8)
  mov    -0x204(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x204(%rbp)
  cltq
  mov    -0x1c8(%rbp),%edx
  mov    %edx,-0x190(%rbp,%rax,4)
  mov    -0x1a8(%rbp),%rax
  mov    %rax,-0x1c0(%rbp)
  mov    -0x1c4(%rbp),%eax
  mov    %eax,-0x200(%rbp)
  jmp    L415
L73:
  cmpl   $0xa,-0x1c8(%rbp)
  jle    L425
  mov    -0x1c8(%rbp),%eax
  mov    %eax,-0x200(%rbp)
  jmp    L415
L249:
  cmpl   $0xa,-0x1c8(%rbp)
  jle    L150
  mov    -0x204(%rbp),%eax
  cltq
  mov    -0x1a8(%rbp),%rdx
  mov    %rdx,-0x110(%rbp,%rax,8)
  mov    -0x204(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x204(%rbp)
  cltq
  mov    -0x1c4(%rbp),%edx
  mov    %edx,-0x190(%rbp,%rax,4)
  mov    -0x1c8(%rbp),%eax
  mov    %eax,-0x200(%rbp)
  jmp    L415
L150:
  cmpl   $0xa,-0x1c4(%rbp)
  jle    L425
  mov    -0x1a8(%rbp),%rax
  mov    %rax,-0x1c0(%rbp)
  mov    -0x1c4(%rbp),%eax
  mov    %eax,-0x200(%rbp)
  jmp    L415
L425:
  cmpl   $0x0,-0x204(%rbp)
  jne    L260
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L308
  call   <__stack_chk_fail@plt>
L308:
  leave
  ret
```

assistant: ```c
void partition_sort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
  int stackpointer = 1;
  void *basestack[32];
  int sizestack[32];
  basestack[0] = base;
  sizestack[0] = nmemb;
  while (stackpointer != 0) {
    char *b = (char *)basestack[--stackpointer];
    int n = sizestack[stackpointer];
    for (;;) {
      int halfn = (n >> 1) * size;
      char *bmid = b + halfn;
      char *btop;
      if ((n & 1) == 0)
        halfn -= size;
      btop = bmid + halfn;
      if ((*compar)(b, bmid) > 0) {
        int xsize = size;
        if (((xsize | (int)b) & 0x3) == 0) {
          do {
            int temp = *(int *)b;
            *(int *)b = *(int *)bmid;
            *(int *)bmid = temp;
            b += 4;
            bmid += 4;
            xsize -= 4;
            ;
          } while (xsize != 0);
        } else {
          do {
            char temp = *b;
            *b++ = *bmid;
            *bmid++ = temp;
            xsize--;
          } while (xsize != 0);
        }
        b -= size;
        bmid -= size;
      };
      if ((*compar)(bmid, btop) > 0) {
        if ((*compar)(b, btop) > 0) {
          int xsize = size;
          if (((xsize | (int)b) & 0x3) == 0) {
            do {
              int temp = *(int *)b;
              *(int *)b = *(int *)btop;
              *(int *)btop = temp;
              b += 4;
              btop += 4;
              xsize -= 4;
              ;
            } while (xsize != 0);
          } else {
            do {
              char temp = *b;
              *b++ = *btop;
              *btop++ = temp;
              xsize--;
            } while (xsize != 0);
          }
          b -= size;
          btop -= size;
        };
        {
          int xsize = size;
          if (((xsize | (int)bmid) & 0x3) == 0) {
            do {
              int temp = *(int *)bmid;
              *(int *)bmid = *(int *)btop;
              *(int *)btop = temp;
              bmid += 4;
              btop += 4;
              xsize -= 4;
              ;
            } while (xsize != 0);
          } else {
            do {
              char temp = *bmid;
              *bmid++ = *btop;
              *btop++ = temp;
              xsize--;
            } while (xsize != 0);
          }
          bmid -= size;
          btop -= size;
        };
      }
      {
        char *l;
        char *r = btop - size;
        char *pivot;
        int s1, s2;
        {
          int xsize = size;
          if (((xsize | (int)bmid) & 0x3) == 0) {
            do {
              int temp = *(int *)bmid;
              *(int *)bmid = *(int *)r;
              *(int *)r = temp;
              bmid += 4;
              r += 4;
              xsize -= 4;
              ;
            } while (xsize != 0);
          } else {
            do {
              char temp = *bmid;
              *bmid++ = *r;
              *r++ = temp;
              xsize--;
            } while (xsize != 0);
          }
          bmid -= size;
          r -= size;
        };
        l = b;
        pivot = r;
        for (;;) {
          do
            l += size;
          while ((*compar)(l, pivot) < 0);
          do
            r -= size;
          while ((*compar)(r, pivot) > 0);
          if (r <= l)
            break;
          {
            int xsize = size;
            if (((xsize | (int)l) & 0x3) == 0) {
              do {
                int temp = *(int *)l;
                *(int *)l = *(int *)r;
                *(int *)r = temp;
                l += 4;
                r += 4;
                xsize -= 4;
                ;
              } while (xsize != 0);
            } else {
              do {
                char temp = *l;
                *l++ = *r;
                *r++ = temp;
                xsize--;
              } while (xsize != 0);
            }
            l -= size;
            r -= size;
          };
        }
        {
          int xsize = size;
          if (((xsize | (int)l) & 0x3) == 0) {
            do {
              int temp = *(int *)l;
              *(int *)l = *(int *)pivot;
              *(int *)pivot = temp;
              l += 4;
              pivot += 4;
              xsize -= 4;
              ;
            } while (xsize != 0);
          } else {
            do {
              char temp = *l;
              *l++ = *pivot;
              *pivot++ = temp;
              xsize--;
            } while (xsize != 0);
          }
          l -= size;
          pivot -= size;
        };
        s1 = ((l - b) / size) - 1;
        s2 = n - s1 - 1;
        if (s1 > s2) {
          if (s2 > 10) {
            (basestack[stackpointer] = (void *)(b), sizestack[stackpointer++] = (s1));
            b = l;
            n = s2;
          } else if (s1 > 10)
            n = s1;
          else
            break;
        } else {
          if (s1 > 10) {
            (basestack[stackpointer] = (void *)(l), sizestack[stackpointer++] = (s2));
            n = s1;
          } else if (s2 > 10) {
            b = l;
            n = s2;
          } else
            break;
        }
      }
    }
  }
}
```