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

```asm
<split_cmdline>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    $0x80,%edi
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  mov    %rsi,0x18(%rsp)
  call   <malloc@plt>
  mov    %rax,(%rbx)
  mov    %r12,(%rax)
  movzbl (%r12),%ebx
  test   %bl,%bl
  je     L13
  movl   $0x10,0x14(%rsp)
  xor    %r13d,%r13d
  xor    %ecx,%ecx
  xor    %r14d,%r14d
  movl   $0x1,0x10(%rsp)
  jmp    L51
  nopl   0x0(%rax)
L175:
  cmp    %bl,%r13b
  jne    L199
  mov    %ebp,%r14d
  xor    %r13d,%r13d
L77:
  movzbl (%r15),%ebx
  test   %bl,%bl
  je     L42
L51:
  lea    0x1(%r14),%ebp
  movslq %ebp,%rdx
  lea    (%r12,%rdx,1),%r15
  test   %r13b,%r13b
  jne    L175
  movsbl %bl,%edi
  mov    %ecx,0xc(%rsp)
  call   <isspace@plt>
  mov    0xc(%rsp),%ecx
  test   %rax,%rax
  jne    L98
  cmp    $0x27,%bl
  je     L210
  cmp    $0x22,%bl
  je     L210
L199:
  cmp    $0x5c,%bl
  jne    L112
  cmp    $0x27,%r13b
  je     L112
  movzbl (%r15),%ebx
  test   %bl,%bl
  je     L80
  add    $0x1,%ebp
L112:
  movslq %ebp,%rdx
  movslq %ecx,%rax
  add    $0x1,%ecx
  lea    (%r12,%rdx,1),%r15
  mov    %bl,(%r12,%rax,1)
  mov    %rdx,%r14
  movzbl (%r15),%ebx
  test   %bl,%bl
  jne    L51
L42:
  movslq %ecx,%rsi
  movb   $0x0,(%r12,%rsi,1)
  test   %r13b,%r13b
  jne    L148
L173:
  mov    0x10(%rsp),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L210:
  mov    %ebx,%r13d
  mov    %ebp,%r14d
  jmp    L77
  nopl   0x0(%rax,%rax,1)
L98:
  lea    0x1(%rcx),%eax
  movslq %ecx,%rsi
  movslq %r14d,%rcx
  lea    0x1(%r12,%rcx,1),%rbx
  mov    %eax,0xc(%rsp)
  movb   $0x0,(%r12,%rsi,1)
  sub    %ebx,%ebp
  jmp    L182
  nopl   0x0(%rax,%rax,1)
L55:
  call   <isspace@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  je     L144
L182:
  movsbl (%rbx),%edi
  lea    0x0(%rbp,%rbx,1),%r14d
  mov    %rbx,%r15
  test   %dil,%dil
  jne    L55
L144:
  mov    0x18(%rsp),%rax
  mov    0x10(%rsp),%esi
  mov    (%rax),%rdi
  cmp    %esi,0x14(%rsp)
  jle    L160
L191:
  movslq 0xc(%rsp),%rcx
  movslq 0x10(%rsp),%rax
  mov    %rcx,%rdx
  add    %r12,%rcx
  mov    %rcx,(%rdi,%rax,8)
  lea    0x1(%rax),%eax
  mov    %edx,%ecx
  mov    %eax,0x10(%rsp)
  jmp    L77
  nopw   0x0(%rax,%rax,1)
L160:
  addl   $0x10,0x14(%rsp)
  mov    0x14(%rsp),%eax
  lea    0x0(,%rax,8),%esi
  call   <realloc@plt>
  mov    %rax,%rdi
  mov    0x18(%rsp),%rax
  mov    %rdi,(%rax)
  jmp    L191
  nopw   0x0(%rax,%rax,1)
L80:
  mov    0x18(%rsp),%rdi
  call   <zfree@plt>
  lea    D18(%rip),%rdi
L193:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <error@plt>
  nopl   0x0(%rax)
L148:
  mov    0x18(%rsp),%rdi
  call   <zfree@plt>
  lea    D10(%rip),%rdi
  jmp    L193
L13:
  movl   $0x1,0x10(%rsp)
  jmp    L173
```

tool_calls: name: unpack_data
arguments: data_label: D18
type_infered: string
name: unpack_data
arguments: data_label: D10
type_infered: string

tool: D18: cmdline ends with \

tool: D10: unclosed quote

assistant: ```c
int split_cmdline(char *cmdline, const char ***argv) {
  int src, dst, count = 0, size = 16;
  char quoted = 0;
  *argv = malloc(sizeof(char *) * size);
  (*argv)[count++] = cmdline;
  for (src = dst = 0; cmdline[src];) {
    char c = cmdline[src];
    if (!quoted && isspace(c)) {
      cmdline[dst++] = 0;
      while (cmdline[++src] && isspace(cmdline[src]))
        ;
      if (count >= size) {
        size += 16;
        *argv = realloc(*argv, sizeof(char *) * size);
      }
      (*argv)[count++] = cmdline + dst;
    } else if (!quoted && (c == '\'' || c == '"')) {
      quoted = c;
      src++;
    } else if (c == quoted) {
      quoted = 0;
      src++;
    } else {
      if (c == '\\' && quoted != '\'') {
        src++;
        c = cmdline[src];
        if (!c) {
          zfree(argv);
          return error("cmdline ends with \\");
        }
      }
      cmdline[dst++] = c;
      src++;
    }
  }
  cmdline[dst] = 0;
  if (quoted) {
    zfree(argv);
    return error("unclosed quote");
  }
  return count;
}
```