user: 请将以下的汇编代码转换成C语言代码：

```asm
<y_strsplit>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  movl   $0x0,-0x3c(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x38(%rbp)
  cmpl   $0x0,-0x54(%rbp)
  jg     L20
  movl   $0x0,-0x54(%rbp)
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L20
  mov    -0x50(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x20(%rbp)
  jmp    L39
L5:
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strstr@plt>
  mov    %rax,-0x20(%rbp)
  addl   $0x1,-0x54(%rbp)
L39:
  cmpq   $0x0,-0x20(%rbp)
  jne    L5
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  mov    -0x38(%rbp),%edx
  movslq %edx,%rdx
  sub    %rdx,%rax
  mov    %rax,%rcx
  mov    -0x48(%rbp),%rax
  lea    (%rcx,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L20
  addl   $0x1,-0x54(%rbp)
L20:
  mov    -0x54(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x50(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x30(%rbp)
  jmp    L72
L74:
  mov    -0x30(%rbp),%rax
  sub    -0x28(%rbp),%rax
  mov    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x34(%rbp),%edx
  mov    -0x28(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x50(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x30(%rbp)
  addl   $0x1,-0x3c(%rbp)
L72:
  mov    -0x3c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jge    L16
  cmpq   $0x0,-0x30(%rbp)
  jne    L74
L16:
  mov    -0x3c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jge    L19
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L19
  mov    -0x3c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x3c(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,(%rbx)
L19:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
char **y_strsplit(char *str, char *sep, int nelem) {
  char **vector;
  char *s, *p;
  int i = 0;
  int l = strlen(sep);
  if (nelem <= 0) {
    char *s;
    nelem = 0;
    if (*str) {
      for (s = strstr(str, sep); s; s = strstr(s + l, sep), nelem++)
        ;
      if (strcmp(str + strlen(str) - l, sep))
        nelem++;
    }
  }
  vector = (char **)malloc(sizeof(char *) * (nelem + 1));
  for (p = str, s = strstr(p, sep); i < nelem && s; p = s + l, s = strstr(p, sep), i++) {
    int len = s - p;
    vector[i] = (char *)malloc(sizeof(char) * (len + 1));
    strncpy(vector[i], p, len);
    vector[i][len] = '\0';
  }
  if ((i < nelem) && *str)
    vector[i++] = strdup(p);
  vector[i] = NULL;
  return vector;
}
```