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

```asm
<ms_inner>:
  endbr64
  push   %r15
  mov    %rcx,%rax
  push   %r14
  sub    %rdx,%rax
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x58,%rsp
  mov    %rcx,0x10(%rsp)
  mov    0x90(%rsp),%rdi
  mov    %r8,0x28(%rsp)
  mov    %rax,0x8(%rsp)
  cmp    $0x1,%rax
  ja     L1
L67:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L1:
  mov    %rax,%r15
  sub    $0x8,%rsp
  mov    %rcx,%rbp
  mov    %rsi,%r14
  shr    %r15
  mov    %r9,%r13
  mov    %r15,%r12
  mov    %r8,%r15
  add    %rdx,%r12
  mov    %r12,0x28(%rsp)
  mov    %r12,%rcx
  mov    %rdi,0x40(%rsp)
  push   %rdi
  mov    %rbx,%rdi
  mov    %rdx,0x58(%rsp)
  call   <ms_inner>
  pop    %rax
  push   0x40(%rsp)
  mov    %rbp,%rcx
  mov    %r13,%r9
  mov    %r15,%r8
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <ms_inner>
  mov    %r12,%rsi
  lea    -0x1(%r12),%rdi
  mov    %r13,%rdx
  imul   %r14,%rsi
  imul   %r14,%rdi
  add    %rbx,%rsi
  add    %rbx,%rdi
  call   *%r15
  pop    %rdx
  pop    %rcx
  test   %eax,%eax
  jle    L67
  mov    0x48(%rsp),%rax
  mov    0x38(%rsp),%r15
  mov    %r13,0x40(%rsp)
  xor    %ebp,%ebp
  mov    %rax,%r13
  jmp    L58
  nop
L9:
  mov    0x30(%rsp),%rsi
  mov    %r15,%rdi
  add    $0x1,%r12
  call   <memcpy@plt>
L18:
  add    $0x1,%rbp
  add    %r14,%r15
  cmp    %rbp,0x8(%rsp)
  je     L39
L58:
  cmp    %r13,0x20(%rsp)
  je     L62
  mov    %r14,%r8
  imul   %r13,%r8
  add    %rbx,%r8
  cmp    %r12,0x10(%rsp)
  je     L68
  mov    %r14,%rsi
  mov    %r8,0x18(%rsp)
  mov    0x40(%rsp),%rdx
  mov    %r8,%rdi
  imul   %r12,%rsi
  mov    0x28(%rsp),%rax
  add    %rbx,%rsi
  mov    %rsi,0x30(%rsp)
  call   *%rax
  mov    0x18(%rsp),%r8
  mov    %r14,%rdx
  test   %eax,%eax
  jg     L9
  mov    %r15,%rdi
  mov    %r8,%rsi
  add    $0x1,%r13
  add    $0x1,%rbp
  call   <memcpy@plt>
  add    %r14,%r15
  cmp    %rbp,0x8(%rsp)
  jne    L58
L39:
  mov    0x48(%rsp),%rax
  mov    0x8(%rsp),%rdx
  mov    0x38(%rsp),%rsi
  add    $0x58,%rsp
  imul   %r14,%rax
  imul   %r14,%rdx
  lea    (%rbx,%rax,1),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <memcpy@plt>
  nopl   0x0(%rax)
L62:
  mov    %r14,%rsi
  mov    %r14,%rdx
  mov    %r15,%rdi
  imul   %r12,%rsi
  add    $0x1,%r12
  add    %rbx,%rsi
  call   <memcpy@plt>
  jmp    L18
  xchg   %ax,%ax
L68:
  mov    %r14,%rdx
  mov    %r8,%rsi
  mov    %r15,%rdi
  add    $0x1,%r13
  call   <memcpy@plt>
  jmp    L18
```

assistant: ```c
void ms_inner(void *base, const size_t size, const size_t start, const size_t end, int (*compar)(const void *v1, const void *v2, const void *private), const void *private, char *workarray) {
  size_t middle;
  if ((end - start) > 1) {
    char *cbase = (char *)base;
    middle = start + (end - start) / 2;
    ms_inner(base, size, start, middle, compar, private, workarray);
    ms_inner(base, size, middle, end, compar, private, workarray);
    if (compar(cbase + (middle - 1) * size, cbase + middle * size, private) > 0) {
      size_t i, n = end - start;
      size_t ileft = start;
      size_t iright = middle;
      for (i = 0; i < n; i++) {
        if (ileft == middle) {
          memcpy(workarray + i * size, cbase + iright * size, size);
          iright++;
        } else if (iright == end) {
          memcpy(workarray + i * size, cbase + ileft * size, size);
          ileft++;
        } else {
          if (compar(cbase + ileft * size, cbase + iright * size, private) > 0) {
            memcpy(workarray + i * size, cbase + iright * size, size);
            iright++;
          } else {
            memcpy(workarray + i * size, cbase + ileft * size, size);
            ileft++;
          }
        }
      }
      memcpy(cbase + start * size, workarray, (end - start) * size);
    }
  }
}
```