user: What is the c source code of the assembly code below?

```asm
<merge>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  imul   -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L11
  mov    $0x0,%eax
  call   <abort@plt>
L11:
  movq   $0x0,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L0
L15:
  mov    -0x8(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rdx,%rdi
  call   *%rax
  test   %eax,%eax
  jns    L26
  mov    -0x10(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdx
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x58(%rbp),%rax
  add    %rax,-0x30(%rbp)
  jmp    L19
L26:
  mov    -0x8(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdx
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x58(%rbp),%rax
  add    %rax,-0x28(%rbp)
L19:
  mov    -0x58(%rbp),%rax
  add    %rax,-0x20(%rbp)
L0:
  mov    -0x40(%rbp),%rax
  imul   -0x58(%rbp),%rax
  cmp    %rax,-0x30(%rbp)
  jae    L12
  mov    -0x50(%rbp),%rax
  imul   -0x58(%rbp),%rax
  cmp    %rax,-0x28(%rbp)
  jb     L15
  jmp    L12
L78:
  mov    -0x10(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdx
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x58(%rbp),%rax
  add    %rax,-0x30(%rbp)
  mov    -0x58(%rbp),%rax
  add    %rax,-0x20(%rbp)
L12:
  mov    -0x40(%rbp),%rax
  imul   -0x58(%rbp),%rax
  cmp    %rax,-0x30(%rbp)
  jb     L78
  jmp    L63
L36:
  mov    -0x8(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdx
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x58(%rbp),%rax
  add    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%rax
  add    %rax,-0x20(%rbp)
L63:
  mov    -0x50(%rbp),%rax
  imul   -0x58(%rbp),%rax
  cmp    %rax,-0x28(%rbp)
  jb     L36
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  imul   -0x58(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  cmpq   $0x0,-0x18(%rbp)
  je     L108
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x18(%rbp)
L108:
  mov    $0x1,%eax
  leave
  ret
```

assistant: ```c
int merge(void *const part1, const size_t p1Len, const void *const part2, const size_t p2Len, const size_t size, int (*const cmp)(const void *const, const void *const)) {
  char *tmp = NULL;
  char *p1 = NULL, *p2 = NULL;
  size_t index = 0, index2 = 0, index3 = 0;
  p1 = (char *)part1;
  p2 = (char *)part2;
  if (!(tmp = (char *)malloc((p1Len + p2Len) * size))) {
    abort();
  }
  index = index2 = index3 = 0;
  while ((index < p1Len * size) && (index2 < p2Len * size)) {
    if (cmp(&p1[index], &p2[index2]) < 0) {
      memcpy(&tmp[index3], &p1[index], size);
      index += size;
    } else {
      memcpy(&tmp[index3], &p2[index2], size);
      index2 += size;
    }
    index3 += size;
  }
  while (index < p1Len * size) {
    memcpy(&tmp[index3], &p1[index], size);
    index += size;
    index3 += size;
  }
  while (index2 < p2Len * size) {
    memcpy(&tmp[index3], &p2[index2], size);
    index2 += size;
    index3 += size;
  }
  memcpy(p1, tmp, (p1Len + p2Len) * size);
  if (tmp) {
    free(tmp);
    tmp = NULL;
  }
  return 1;
}
```