user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<split_string>:
  endbr64
  push   %r14
  mov    %rdi,%rdx
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movzbl (%rdi),%eax
  cmp    $0x20,%al
  jne    L142
  nopl   0x0(%rax)
L1:
  movzbl 0x1(%rdx),%eax
  add    $0x1,%rdx
  cmp    $0x20,%al
  je     L1
L142:
  cmp    $0x9,%al
  je     L1
  xor    %esi,%esi
  xor    %ebx,%ebx
  mov    $0x8,%edi
  test   %al,%al
  je     L294
  nopl   (%rax)
L207:
  test   $0xdf,%al
  jne    L68
  jmp    L301
  cs nopw 0x0(%rax,%rax,1)
L89:
  movzbl 0x1(%rdx),%eax
  add    $0x1,%rdx
  test   $0xdf,%al
  je     L301
L68:
  cmp    $0x9,%al
  jne    L89
L301:
  lea    0x1(%rsi),%ecx
  cmp    $0x20,%al
  jne    L131
  nopw   0x0(%rax,%rax,1)
L244:
  movzbl 0x1(%rdx),%eax
  add    $0x1,%rdx
  cmp    $0x20,%al
  je     L244
L131:
  cmp    $0x9,%al
  je     L244
  test   %al,%al
  je     L115
  mov    %ecx,%esi
  jmp    L207
  nopl   0x0(%rax,%rax,1)
L115:
  movslq %ecx,%rcx
  lea    0x10(,%rsi,8),%edi
  lea    0x0(,%rcx,8),%rbx
L294:
  call   <smalloc@plt>
  movq   $0x0,(%rax,%rbx,1)
  mov    %rax,%r13
  movzbl 0x0(%rbp),%eax
  cmp    $0x20,%al
  jne    L44
  nopw   0x0(%rax,%rax,1)
L268:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  cmp    $0x20,%al
  je     L268
L44:
  cmp    $0x9,%al
  je     L268
  test   %al,%al
  je     L280
  mov    %r13,%r12
  test   $0xdf,%al
  je     L226
  nopl   0x0(%rax,%rax,1)
L54:
  mov    %rbp,%rbx
  cmp    $0x9,%al
  jne    L243
  jmp    L226
  nopl   0x0(%rax)
L28:
  cmp    $0x9,%al
  je     L153
L243:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   $0xdf,%al
  jne    L28
L153:
  test   %r14d,%r14d
  jne    L246
L313:
  mov    %rbp,(%r12)
  cmpb   $0x0,(%rbx)
  jne    L273
L280:
  pop    %rbx
  mov    %r13,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L273:
  movb   $0x0,(%rbx)
L70:
  movzbl 0x1(%rbx),%eax
  lea    0x1(%rbx),%rbp
  cmp    $0x9,%al
  je     L306
  cmp    $0x20,%al
  jne    L91
  nopl   0x0(%rax,%rax,1)
L306:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  cmp    $0x20,%al
  je     L306
  cmp    $0x9,%al
  je     L306
L91:
  add    $0x8,%r12
  test   %al,%al
  je     L280
  test   $0xdf,%al
  jne    L54
L226:
  mov    %rbp,%rbx
  test   %r14d,%r14d
  je     L313
  nopl   0x0(%rax)
L246:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  sub    %ebp,%esi
  call   <string_ndup@plt>
  mov    %rax,(%r12)
  cmpb   $0x0,(%rbx)
  jne    L70
  pop    %rbx
  mov    %r13,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
char **split_string(char *str, int copy) {
  char **bits;
  int nbits;
  char *ch, *start;
  for (ch = str; (*ch == ' ') || (*ch == '\t'); ch++)
    ;
  for (nbits = 0; *ch != '\0';) {
    for (; (*ch != '\0') && (*ch != ' ') && (*ch != '\t'); ch++)
      ;
    nbits++;
    for (; (*ch == ' ') || (*ch == '\t'); ch++)
      ;
  }
  bits = (char **)smalloc((nbits + 1) * sizeof(char *));
  bits[nbits] = NULL;
  for (ch = str; (*ch == ' ') || (*ch == '\t'); ch++)
    ;
  for (nbits = 0; *ch != '\0';) {
    start = ch;
    for (; (*ch != '\0') && (*ch != ' ') && (*ch != '\t'); ch++)
      ;
    if (copy) {
      bits[nbits] = string_ndup(start, (int)(ch - start));
      if (*ch != '\0') {
        ch++;
      }
    } else {
      bits[nbits] = start;
      if (*ch != '\0') {
        *ch = '\0';
        ch++;
      }
    }
    nbits++;
    for (; (*ch == ' ') || (*ch == '\t'); ch++)
      ;
  }
  return bits;
}
```