user: 请从给定的汇编指令推导出C源代码:

```asm
<split>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  mov    %rsi,%rdi
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rsi,0x10(%rsp)
  call   <strlen@plt>
  test   %r13,%r13
  mov    %eax,%ebx
  sete   %al
  test   %r15,%r15
  sete   %dl
  or     %dl,%al
  jne    L123
  test   %r14,%r14
  je     L123
  mov    $0x50,%edi
  call   <malloc@plt>
  mov    %rax,0x0(%r13)
  test   %rax,%rax
  je     L97
  movslq %ebx,%rax
  movl   $0xa,0xc(%rsp)
  xor    %r12d,%r12d
  mov    %rax,0x18(%rsp)
  jmp    L21
  nopl   0x0(%rax,%rax,1)
L66:
  add    $0x1,%r12
L21:
  mov    0x10(%rsp),%rsi
  mov    %r15,%rdi
  mov    %r12d,%r14d
  call   <strstr@plt>
  mov    %rax,%rbx
  lea    0x0(,%r12,8),%rax
  mov    %rax,(%rsp)
  test   %rbx,%rbx
  je     L45
  mov    %rbx,%rbp
  sub    %r15,%rbp
  lea    0x1(%rbp),%edi
  mov    %ebp,0x8(%rsp)
  call   <malloc@plt>
  mov    0x8(%rsp),%edx
  mov    %rax,%rdi
  mov    0x0(%r13),%rax
  test   %rdi,%rdi
  mov    %rdi,(%rax,%r12,8)
  je     L83
  mov    %r15,%rsi
  movslq %ebp,%rbp
  call   <strncpy@plt>
  mov    0x0(%r13),%rax
  mov    (%rsp),%rcx
  mov    (%rax,%rcx,1),%rax
  movb   $0x0,(%rax,%rbp,1)
  mov    0x18(%rsp),%rax
  lea    (%rbx,%rax,1),%r15
  lea    0x1(%r14),%eax
  cmp    %eax,0xc(%rsp)
  jne    L66
  lea    0xb(%r14),%eax
  mov    0x0(%r13),%rdi
  lea    0x0(,%rax,8),%esi
  mov    %eax,0xc(%rsp)
  call   <realloc@plt>
  mov    %rax,0x0(%r13)
  jmp    L66
  nopl   0x0(%rax)
L45:
  lea    0x1(%r12),%r12d
  cmp    0xc(%rsp),%r12d
  je     L24
L14:
  mov    %r15,%rdi
  call   <strlen@plt>
  movslq %eax,%rbx
  lea    0x1(%rbx),%edi
  call   <malloc@plt>
  mov    (%rsp),%r14
  mov    %ebx,%edx
  mov    %r15,%rsi
  mov    %rax,%rdi
  mov    0x0(%r13),%rax
  mov    %rdi,(%rax,%r14,1)
  call   <strncpy@plt>
  mov    0x0(%r13),%rax
  mov    (%rax,%r14,1),%rax
  movb   $0x0,(%rax,%rbx,1)
  mov    0x0(%r13),%rdx
  movslq %r12d,%rax
  movq   $0x0,(%rdx,%rax,8)
L72:
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L83:
  lea    D6(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <perror@plt>
  jmp    L72
  nopl   0x0(%rax)
L24:
  mov    0x0(%r13),%rdi
  lea    0x18(,%r14,8),%esi
  call   <realloc@plt>
  mov    %rax,0x0(%r13)
  jmp    L14
L123:
  mov    $0xffffffff,%r12d
  jmp    L72
L97:
  lea    D1(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <perror@plt>
  jmp    L72
```

tool_calls: name: unpack_data
arguments: label: D6
type_infered: string
name: unpack_data
arguments: label: D1
type_infered: string

tool: D6: split: malloc list element

tool: D1: malloc List

assistant: ```c
int split(const char *Input, char *Delim, char ***List) {
  int Found;
  int MaxFound;
  int Length;
  int DelimLen;
  const char *Remain;
  char *Position;
  DelimLen = strlen(Delim);
  Found = 0;
  Remain = Input;
  MaxFound = 10;
  if ((List == NULL) || (Input == NULL) || (Delim == NULL)) {
    return -1;
  }
  if ((*List = (char **)malloc(MaxFound * sizeof(char *))) == NULL) {
    perror("malloc List");
    return -1;
  }
  while ((Position = strstr(Remain, Delim)) != NULL) {
    Length = Position - Remain;
    if ((((*List)[Found]) = (char *)malloc(sizeof(char) * (Length + 1))) == NULL) {
      perror("split: malloc list element");
      return -1;
    }
    strncpy(((*List)[Found]), Remain, Length);
    ((*List)[Found])[Length] = 0;
    Found++;
    Remain = Position + DelimLen;
    if (Found == MaxFound) {
      MaxFound += 10;
      *List = (char **)realloc(*List, MaxFound * sizeof(char *));
    }
  }
  if (Found + 1 == MaxFound) {
    MaxFound += 2;
    *List = (char **)realloc(*List, MaxFound * sizeof(char *));
  }
  Length = strlen(Remain);
  ((*List)[Found]) = (char *)malloc(sizeof(char) * (Length + 1));
  strncpy(((*List)[Found]), Remain, Length);
  ((*List)[Found])[Length] = 0;
  Found++;
  ((*List)[Found]) = NULL;
  return Found;
}
```