user: Please show me the C implementation that matches the assembly code listed below:

```asm
<my_split>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x850,%rsp
  mov    %rdi,-0x1848(%rbp)
  mov    %rsi,-0x1850(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x1850(%rbp)
  jne    L5
  mov    $0x10,%edi
  call   <malloc@plt>
  mov    %rax,-0x1818(%rbp)
  mov    -0x1848(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x1818(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x1818(%rbp),%rax
  add    $0x8,%rax
  movq   $0x0,(%rax)
  mov    -0x1818(%rbp),%rax
  jmp    L60
L5:
  movl   $0x0,-0x1830(%rbp)
  mov    -0x1848(%rbp),%rax
  mov    %rax,-0x1828(%rbp)
  mov    -0x1850(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x182c(%rbp)
  mov    -0x1850(%rbp),%rdx
  mov    -0x1828(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x1820(%rbp)
  jmp    L43
L52:
  mov    -0x1820(%rbp),%rax
  sub    -0x1828(%rbp),%rax
  mov    %eax,-0x1834(%rbp)
  mov    -0x1834(%rbp),%edx
  mov    -0x1828(%rbp),%rcx
  lea    -0x1010(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x1834(%rbp),%eax
  cltq
  movb   $0x0,-0x1010(%rbp,%rax,1)
  lea    -0x1010(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x1830(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x1830(%rbp)
  cltq
  mov    %rdx,-0x1810(%rbp,%rax,8)
  mov    -0x182c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x1820(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x1828(%rbp)
  mov    -0x1850(%rbp),%rdx
  mov    -0x1828(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x1820(%rbp)
L43:
  cmpq   $0x0,-0x1820(%rbp)
  jne    L52
  mov    -0x1828(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x1820(%rbp)
  mov    -0x1820(%rbp),%rax
  sub    -0x1828(%rbp),%rax
  mov    %eax,-0x1834(%rbp)
  mov    -0x1834(%rbp),%edx
  mov    -0x1828(%rbp),%rcx
  lea    -0x1010(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x1834(%rbp),%eax
  cltq
  movb   $0x0,-0x1010(%rbp,%rax,1)
  lea    -0x1010(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x1830(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x1830(%rbp)
  cltq
  mov    %rdx,-0x1810(%rbp,%rax,8)
  mov    -0x1830(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x1818(%rbp)
  movl   $0x0,-0x1834(%rbp)
  jmp    L9
L19:
  mov    -0x1834(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x1818(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1834(%rbp),%eax
  cltq
  mov    -0x1810(%rbp,%rax,8),%rax
  mov    %rax,(%rdx)
  addl   $0x1,-0x1834(%rbp)
L9:
  mov    -0x1834(%rbp),%eax
  cmp    -0x1830(%rbp),%eax
  jl     L19
  mov    -0x1830(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x1818(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  mov    -0x1818(%rbp),%rax
L60:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L66
  call   <__stack_chk_fail@plt>
L66:
  leave
  ret
```

assistant: ```c
char **my_split(char *str, char *spl) {
  char **ret, *buffer[256], buf[4096];
  int i;
  if (!spl) {
    ret = (char **)malloc(2 * sizeof(char *));
    ret[0] = (char *)strdup(str);
    ret[1] = NULL;
    return (ret);
  }
  int count = 0;
  char *fptr = str;
  const int spl_len = strlen(spl);
  char *sptr = strstr(fptr, spl);
  while (sptr) {
    i = sptr - fptr;
    memcpy(buf, fptr, i);
    buf[i] = '\0';
    buffer[count++] = (char *)strdup(buf);
    fptr = sptr + spl_len;
    sptr = strstr(fptr, spl);
  }
  sptr = strchr(fptr, '\0');
  i = sptr - fptr;
  memcpy(buf, fptr, i);
  buf[i] = '\0';
  buffer[count++] = (char *)strdup(buf);
  ret = (char **)malloc((count + 1) * sizeof(char *));
  for (i = 0; i < count; i++) {
    ret[i] = buffer[i];
  }
  ret[count] = NULL;
  return (ret);
}
```