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

```asm
<popen_noshell_split_command_to_argv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%r14
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x30(%rsp)
  movl   $0x0,0x28(%rsp)
  movabs $0x3b267c0a60245c21,%rax
  mov    %rax,0x3b(%rsp)
  movl   $0x3e3c2928,0x43(%rsp)
  movb   $0x0,0x47(%rsp)
  movl   $0x0,0x2c(%rsp)
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  mov    $0x1,%esi
  call   <calloc@plt>
  mov    %rax,(%rbx)
  test   %rax,%rax
  je     L273
  mov    %rax,%r15
  mov    %r14,%rdi
  call   <strlen@plt>
  cltq
  movl   $0x0,0x2c(%rsp)
  test   %rax,%rax
  je     L287
  mov    %r14,%r12
  add    %rax,%r14
  movl   $0x0,0xc(%rsp)
  movl   $0x0,0x18(%rsp)
  mov    $0x0,%r13d
  lea    0x3b(%rsp),%rax
  mov    %rax,0x10(%rsp)
  jmp    L167
L273:
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%ebp
  jmp    L139
L189:
  movslq 0x2c(%rsp),%r13
  add    %r15,%r13
  jmp    L88
L22:
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D5(%rip),%rax
  mov    %edx,(%rax)
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%ebp
  jmp    L139
L71:
  mov    0x18(%rsp),%eax
  or     0xc(%rsp),%eax
  mov    %eax,0x1c(%rsp)
  je     L245
  mov    0x2c(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x2c(%rsp)
  cltq
  mov    %bl,(%r15,%rax,1)
L212:
  add    $0x1,%r12
  cmp    %r14,%r12
  je     L249
L167:
  test   %r13,%r13
  je     L189
L88:
  movzbl (%r12),%ebx
  movsbl %bl,%esi
  mov    0x10(%rsp),%rdi
  call   <index@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L22
  cmp    $0x20,%bl
  je     L71
  cmp    $0x9,%bl
  je     L71
  cmpl   $0x0,0xc(%rsp)
  sete   %al
  cmp    $0x27,%bl
  jne    L135
  test   %al,%al
  jne    L168
L135:
  cmp    $0x22,%bl
  jne    L306
  cmpl   $0x0,0x18(%rsp)
  je     L137
L306:
  mov    0x2c(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x2c(%rsp)
  cltq
  mov    %bl,(%r15,%rax,1)
  jmp    L212
L245:
  lea    0x28(%rsp),%rsi
  lea    0x30(%rsp),%rdi
  lea    0x2c(%rsp),%r8
  mov    %r15,%rcx
  mov    %r13,%rdx
  call   <_popen_noshell_add_token@plt>
  test   %rax,%rax
  jne    L132
  mov    0x1c(%rsp),%eax
  mov    %eax,0xc(%rsp)
  mov    %eax,0x18(%rsp)
  mov    %rbp,%r13
  jmp    L212
L132:
  mov    0x30(%rsp),%rdi
  call   <free@plt>
L139:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L178
  mov    %rbp,%rax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L168:
  cmpl   $0x0,0x18(%rsp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,0x18(%rsp)
  movl   $0x0,0xc(%rsp)
  jmp    L212
L137:
  movzbl %al,%eax
  mov    %eax,0xc(%rsp)
  movl   $0x0,0x18(%rsp)
  jmp    L212
L249:
  mov    0x18(%rsp),%eax
  or     0xc(%rsp),%eax
  jne    L68
L298:
  lea    0x28(%rsp),%rsi
  lea    0x30(%rsp),%rdi
  lea    0x2c(%rsp),%r8
  mov    %r15,%rcx
  mov    %r13,%rdx
  call   <_popen_noshell_add_token@plt>
  test   %rax,%rax
  jne    L238
  cmpl   $0x0,0x28(%rsp)
  je     L250
  lea    0x28(%rsp),%rsi
  lea    0x30(%rsp),%rdi
  mov    $0x0,%edx
  call   <popen_noshell_add_ptr_to_argv@plt>
  mov    0x30(%rsp),%rbp
  test   %rax,%rax
  je     L139
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0x0,%ebp
  jmp    L139
L68:
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D5(%rip),%rax
  mov    %edx,(%rax)
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  jmp    L139
L287:
  mov    $0x0,%r13d
  jmp    L298
L238:
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%ebp
  jmp    L139
L250:
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D5(%rip),%rax
  mov    %edx,(%rax)
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%ebp
  jmp    L139
L178:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char **popen_noshell_split_command_to_argv(const char *command_original, char **free_this_buf) {
  char *command;
  size_t i, len;
  char *start = NULL;
  char c;
  char **argv = NULL;
  int count = 0;
  const char _popen_bash_meta_characters[] = "!\\$`\n|&;()<>";
  int in_sq = 0;
  int in_dq = 0;
  int j = 0;
  command = (char *)calloc(strlen(command_original) + 1, sizeof(char));
  *free_this_buf = command;
  if (!command) {
    free(argv);
    return NULL;
  };
  len = strlen(command_original);
  j = 0;
  for (i = 0; i < len; ++i) {
    if (!start)
      start = command + j;
    c = command_original[i];
    if (index(_popen_bash_meta_characters, c) != NULL) {
      errno = EINVAL;
      {
        free(argv);
        return NULL;
      };
    }
    if (c == ' ' || c == '\t') {
      if (in_sq || in_dq) {
        command[j++] = c;
        continue;
      }
      if (_popen_noshell_add_token(&argv, &count, start, command, &j) != 0) {
        {
          free(argv);
          return NULL;
        };
      }
      start = NULL;
      continue;
    }
    if (c == '\'' && !in_dq) {
      in_sq = !in_sq;
      continue;
    }
    if (c == '"' && !in_sq) {
      in_dq = !in_dq;
      continue;
    }
    command[j++] = c;
  }
  if (in_sq || in_dq) {
    errno = EINVAL;
    {
      free(argv);
      return NULL;
    };
  }
  if (_popen_noshell_add_token(&argv, &count, start, command, &j) != 0) {
    {
      free(argv);
      return NULL;
    };
  }
  if (count == 0) {
    errno = EINVAL;
    {
      free(argv);
      return NULL;
    };
  }
  if (popen_noshell_add_ptr_to_argv(&argv, &count, NULL) != 0) {
    {
      free(argv);
      return NULL;
    };
  }
  return argv;
}
```