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

```asm
<split>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%r13
  mov    %rcx,%r12
  movl   $0x0,(%rcx)
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%r14
  test   %rax,%rax
  jne    L24
L28:
  movzbl (%r14),%eax
  test   %al,%al
  je     L38
  mov    $0x0,%ebx
  movl   $0x0,0x4(%rsp)
L73:
  mov    %ebx,%ebp
  lea    0x1(%rbx),%r15d
  mov    0x8(%rsp),%rsi
  cmp    %al,(%rsi)
  je     L113
L118:
  add    $0x2,%ebp
  add    $0x1,%rbx
  movzbl (%r14,%rbx,1),%eax
  test   %al,%al
  jne    L73
  mov    %ebp,%edi
  mov    0x4(%rsp),%ebx
  sub    %ebx,%edi
  add    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,%rdx
  movslq (%r12),%rax
  mov    %rdx,0x0(%r13,%rax,8)
  cmp    %ebp,%ebx
  jge    L71
  mov    $0x0,%eax
  mov    %ebx,%edi
  movslq %ebx,%rsi
  add    %r14,%rsi
L12:
  movzbl (%rsi,%rax,1),%ecx
  movslq (%r12),%rdx
  mov    0x0(%r13,%rdx,8),%rdx
  mov    %cl,(%rdx,%rax,1)
  add    $0x1,%rax
  mov    0x4(%rsp),%ecx
  lea    (%rcx,%rax,1),%edx
  cmp    %ebp,%edx
  jl     L12
L2:
  mov    %ebp,%eax
  sub    %edi,%eax
  cmp    0x4(%rsp),%ebp
  mov    $0x1,%edx
  cmovle %edx,%eax
L4:
  movslq (%r12),%rdx
  cltq
  mov    0x0(%r13,%rdx,8),%rdx
  movb   $0x0,(%rdx,%rax,1)
  addl   $0x1,(%r12)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L24:
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L28
L113:
  mov    %r15d,%edi
  sub    0x4(%rsp),%edi
  call   <malloc@plt>
  mov    %rax,%rdx
  movslq (%r12),%rax
  mov    %rdx,0x0(%r13,%rax,8)
  mov    0x4(%rsp),%esi
  cmp    %ebx,%esi
  jge    L75
  mov    %ebx,%r8d
  sub    %esi,%r8d
  lea    -0x1(%r8),%edi
  mov    $0x0,%eax
  movslq %esi,%rsi
  add    %r14,%rsi
L98:
  movzbl (%rsi,%rax,1),%ecx
  movslq (%r12),%rdx
  mov    0x0(%r13,%rdx,8),%rdx
  mov    %cl,(%rdx,%rax,1)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rdi,%rdx
  jne    L98
L100:
  movslq (%r12),%rax
  movslq %r8d,%r8
  mov    0x0(%r13,%rax,8),%rax
  movb   $0x0,(%rax,%r8,1)
  addl   $0x1,(%r12)
  mov    %r15d,0x4(%rsp)
  jmp    L118
L75:
  mov    $0x0,%r8d
  jmp    L100
L71:
  mov    $0x0,%eax
  jmp    L4
L38:
  mov    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,%rdx
  movslq (%r12),%rax
  mov    %rdx,0x0(%r13,%rax,8)
  movslq (%r12),%rax
  mov    0x0(%r13,%rax,8),%rax
  movzbl (%r14),%edx
  mov    %dl,(%rax)
  mov    $0x0,%edi
  movl   $0x0,0x4(%rsp)
  mov    $0x1,%ebp
  jmp    L2
```

assistant: ```c
void split(char *line, char *splitC, char *splitArray[], int *arrayLen) {
  char *line2, c;
  int i, j, start, end;
  start = end = 0;
  *arrayLen = 0;
  line2 = (char *)malloc(strlen(line) + 1);
  if (line2 != NULL)
    line2 = strcpy(line2, line);
  i = 0;
  while ((c = line2[end++]) != '\0') {
    if (c == *splitC) {
      splitArray[*arrayLen] = (char *)malloc((end - start) * sizeof(char));
      i = 0;
      for (j = start; j < end - 1; j++) {
        splitArray[*arrayLen][i++] = line2[j];
      }
      splitArray[*arrayLen][i] = '\0';
      start = end;
      (*arrayLen)++;
    }
  }
  i = 0;
  splitArray[*arrayLen] = (char *)malloc((end - start + 1) * sizeof(char));
  for (j = start; j < end; j++) {
    splitArray[*arrayLen][i++] = line2[j];
  }
  splitArray[*arrayLen][i] = '\0';
  (*arrayLen)++;
}
```