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

```asm
<splitstr>:
  endbr64
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rdx,%rbx
  movl   $0x0,(%rdx)
  call   <strtok@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L51
  mov    (%rbx),%eax
  lea    0x8(,%rax,8),%edi
  call   <malloc@plt>
  movslq (%rbx),%rdx
  mov    %rax,%rbp
  mov    %rdx,%rax
  mov    %r12,0x0(%rbp,%rdx,8)
  add    $0x1,%eax
  mov    %eax,(%rbx)
  lea    0x0(,%rax,8),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  nopl   0x0(%rax,%rax,1)
L95:
  mov    %r14,%rsi
  xor    %edi,%edi
  call   <strtok@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L51
  mov    %r12,%rdi
  call   <free@plt>
  mov    (%rbx),%eax
  lea    0x0(,%rax,8),%edi
  call   <malloc@plt>
  mov    (%rbx),%ecx
  mov    %rax,%r12
  test   %ecx,%ecx
  jle    L103
  lea    -0x1(%rcx),%eax
  cmp    $0x2,%eax
  jbe    L87
  lea    0x8(%rbp),%rax
  cmp    %rax,%r12
  je     L87
  mov    %ecx,%edx
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  nopl   0x0(%rax,%rax,1)
L59:
  movdqu 0x0(%rbp,%rax,1),%xmm0
  movups %xmm0,(%r12,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L59
  mov    %ecx,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%ecx
  je     L103
  mov    0x0(%rbp,%rax,8),%rdx
  mov    %rdx,(%r12,%rax,8)
L103:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    (%rbx),%eax
  lea    0x8(,%rax,8),%edi
  call   <malloc@plt>
  mov    (%rbx),%edx
  mov    %rax,%rbp
  test   %edx,%edx
  jle    L37
  lea    0x8(%r12),%rax
  cmp    %rax,%rbp
  je     L156
  lea    -0x1(%rdx),%eax
  cmp    $0x2,%eax
  jbe    L156
  mov    %edx,%ecx
  xor    %eax,%eax
  shr    %ecx
  shl    $0x4,%rcx
  nopw   0x0(%rax,%rax,1)
L168:
  movdqu (%r12,%rax,1),%xmm1
  movups %xmm1,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L168
  mov    %edx,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%dl
  je     L37
  mov    (%r12,%rax,8),%rcx
  mov    %rcx,0x0(%rbp,%rax,8)
L37:
  movslq %edx,%rax
  add    $0x1,%edx
  mov    %r13,0x0(%rbp,%rax,8)
  mov    %edx,(%rbx)
  jmp    L95
  nopl   0x0(%rax)
L156:
  mov    %edx,%esi
  xor    %eax,%eax
  nopl   0x0(%rax)
L127:
  mov    (%r12,%rax,8),%rcx
  mov    %rcx,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L127
  jmp    L37
  nopl   0x0(%rax)
L87:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L130:
  mov    0x0(%rbp,%rax,8),%rdx
  mov    %rdx,(%r12,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L130
  jmp    L103
  nopw   0x0(%rax,%rax,1)
L51:
  mov    %r12,%rdi
  call   <free@plt>
  pop    %rbx
  mov    %rbp,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
char **splitstr(char *in_str, const char *delims, int *count) {
  char *result = NULL;
  char **store = NULL;
  char **tmp = NULL;
  int i;
  *count = 0;
  result = strtok(in_str, delims);
  if (result != NULL) {
    store = malloc(((*count) + 1) * sizeof(char *));
    store[*count] = result;
    (*count)++;
    tmp = malloc((*count) * sizeof(char *));
    result = strtok(NULL, delims);
  }
  while (result != NULL) {
    free(tmp);
    tmp = malloc((*count) * sizeof(char *));
    for (i = 0; i < (*count); i++) {
      tmp[i] = store[i];
    }
    free(store);
    store = malloc(((*count) + 1) * sizeof(char *));
    for (i = 0; i < (*count); i++) {
      store[i] = tmp[i];
    }
    store[*count] = result;
    (*count)++;
    result = strtok(NULL, delims);
  }
  free(tmp);
  return store;
}
```