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

```asm
<ft_strtrim>:
  endbr64
  test   %rdi,%rdi
  je     L111
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  call   <ft_strlen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L193
  nopl   0x0(%rax)
L139:
  movzbl (%r12,%rbx,1),%eax
  lea    -0x9(%rax),%edx
  cmp    $0x1,%dl
  jbe    L187
  cmp    $0x20,%al
  jne    L10
L187:
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  jne    L139
L193:
  add    $0x8,%rsp
  xor    %edi,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1060 <ft_strnew@plt>
  nopl   0x0(%rax,%rax,1)
L98:
  mov    %rcx,%rbp
L10:
  cmp    %rbx,%rbp
  je     L193
  movzbl -0x1(%r12,%rbp,1),%eax
  lea    -0x1(%rbp),%rcx
  lea    -0x9(%rax),%edx
  cmp    $0x1,%dl
  jbe    L98
  cmp    $0x20,%al
  je     L98
  mov    %rbp,%r13
  sub    %rbx,%r13
  mov    %r13,%rdi
  call   <ft_strnew@plt>
  mov    %rax,%r8
  cmp    %rbx,%rbp
  jbe    L89
  lea    0x1(%r12,%rbx,1),%rcx
  mov    %r8,%rdx
  lea    -0x1(%r13),%rax
  sub    %rcx,%rdx
  cmp    $0xe,%rdx
  jbe    L113
  cmp    $0x6,%rax
  jbe    L113
  cmp    $0xe,%rax
  jbe    L103
  mov    %r13,%rdx
  lea    (%r12,%rbx,1),%rcx
  xor    %eax,%eax
  and    $0xfffffffffffffff0,%rdx
  nopw   0x0(%rax,%rax,1)
L47:
  movdqu (%rcx,%rax,1),%xmm0
  movups %xmm0,(%r8,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L47
  mov    %r13,%rax
  and    $0xfffffffffffffff0,%rax
  lea    (%rbx,%rax,1),%rdx
  cmp    %rax,%r13
  je     L89
  sub    %rax,%r13
  lea    -0x1(%r13),%rcx
  cmp    $0x6,%rcx
  jbe    L53
L178:
  lea    (%r12,%rax,1),%rcx
  mov    (%rcx,%rbx,1),%rcx
  mov    %rcx,(%r8,%rax,1)
  mov    %r13,%rcx
  and    $0xfffffffffffffff8,%rcx
  add    %rcx,%rdx
  add    %rcx,%rax
  cmp    %rcx,%r13
  je     L89
L53:
  movzbl (%r12,%rdx,1),%esi
  lea    0x1(%rdx),%rcx
  mov    %sil,(%r8,%rax,1)
  cmp    %rbp,%rcx
  je     L89
  movzbl 0x1(%r12,%rdx,1),%esi
  lea    0x2(%rdx),%rcx
  mov    %sil,0x1(%r8,%rax,1)
  cmp    %rcx,%rbp
  je     L89
  movzbl 0x2(%r12,%rdx,1),%esi
  lea    0x3(%rdx),%rcx
  mov    %sil,0x2(%r8,%rax,1)
  cmp    %rcx,%rbp
  je     L89
  movzbl 0x3(%r12,%rdx,1),%esi
  lea    0x4(%rdx),%rcx
  mov    %sil,0x3(%r8,%rax,1)
  cmp    %rcx,%rbp
  je     L89
  movzbl 0x4(%r12,%rdx,1),%esi
  lea    0x5(%rdx),%rcx
  mov    %sil,0x4(%r8,%rax,1)
  cmp    %rcx,%rbp
  je     L89
  movzbl 0x5(%r12,%rdx,1),%esi
  lea    0x6(%rdx),%rcx
  mov    %sil,0x5(%r8,%rax,1)
  cmp    %rcx,%rbp
  je     L89
  movzbl 0x6(%r12,%rdx,1),%edx
  mov    %dl,0x6(%r8,%rax,1)
L89:
  add    $0x8,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L111:
  xor    %eax,%eax
  ret
L113:
  mov    %r8,%rdx
  sub    %rbx,%rdx
  nopl   0x0(%rax)
L163:
  add    $0x1,%rbx
  movzbl -0x1(%r12,%rbx,1),%eax
  mov    %al,-0x1(%rdx,%rbx,1)
  cmp    %rbx,%rbp
  jne    L163
  jmp    L89
L103:
  mov    %rbx,%rdx
  xor    %eax,%eax
  jmp    L178
```

assistant: ```c
char *ft_strtrim(char const *s) {
  char *dest;
  size_t l;
  size_t j;
  size_t i;
  if (s == NULL)
    return (NULL);
  i = 0;
  j = 0;
  l = ft_strlen(s);
  while ((j != l) && (s[j] == ' ' || s[j] == '\n' || s[j] == '\t'))
    j++;
  while ((l != j) && (s[l - 1] == ' ' || s[l - 1] == '\n' || s[l - 1] == '\t'))
    l--;
  dest = ft_strnew(l - j);
  if (l > j) {
    while (j != l)
      dest[i++] = s[j++];
  }
  return (dest);
}
```