user: Translate the below assembly code into C programming language:

```asm
<str_trim>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %rsi,%rsi
  je     L27
  movzbl (%rsi),%edi
  mov    %rsi,%r12
  xor    %ebp,%ebp
  test   %dil,%dil
  jne    L4
  jmp    L187
  nopw   0x0(%rax,%rax,1)
L160:
  add    $0x1,%rbp
  movzbl (%r12,%rbp,1),%edi
  test   %dil,%dil
  je     L187
L4:
  call   <isspace@plt>
  test   %rax,%rax
  jne    L160
L187:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %rax,%rbx
  jmp    L98
  nopl   (%rax)
L154:
  movzbl -0x1(%r12,%rbx,1),%edi
  lea    -0x1(%rbx),%r14
  call   <isspace@plt>
  test   %rax,%rax
  je     L115
  mov    %r14,%rbx
L98:
  test   %rbx,%rbx
  jne    L154
L226:
  mov    %r13,%rax
L89:
  movb   $0x0,(%rax)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L115:
  cmp    %rbp,%rbx
  jbe    L226
  mov    %rbx,%rsi
  lea    0x1(%r12,%rbp,1),%rcx
  mov    %r13,%rdx
  sub    %rbp,%rsi
  sub    %rcx,%rdx
  lea    -0x1(%rsi),%rax
  cmp    $0xe,%rdx
  jbe    L139
  cmp    $0x6,%rax
  jbe    L139
  cmp    $0xe,%rax
  jbe    L199
  mov    %rsi,%rcx
  lea    (%r12,%rbp,1),%rdx
  xor    %eax,%eax
  and    $0xfffffffffffffff0,%rcx
  nopl   (%rax)
L119:
  movdqu (%rdx,%rax,1),%xmm0
  movups %xmm0,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L119
  mov    %rsi,%rcx
  and    $0xfffffffffffffff0,%rcx
  lea    0x0(%r13,%rcx,1),%rax
  add    %rcx,%rbp
  cmp    %rcx,%rsi
  je     L113
  mov    %rsi,%rdi
  sub    %rcx,%rdi
  lea    -0x1(%rdi),%r8
  cmp    $0x6,%r8
  jbe    L213
L225:
  mov    (%rdx,%rcx,1),%rdx
  mov    %rdx,0x0(%r13,%rcx,1)
  mov    %rdi,%rdx
  and    $0xfffffffffffffff8,%rdx
  add    %rdx,%rax
  add    %rdx,%rbp
  cmp    %rdx,%rdi
  je     L113
L213:
  movzbl (%r12,%rbp,1),%edx
  mov    %dl,(%rax)
  lea    0x1(%rbp),%rdx
  cmp    %rdx,%rbx
  jbe    L113
  movzbl 0x1(%r12,%rbp,1),%edx
  mov    %dl,0x1(%rax)
  lea    0x2(%rbp),%rdx
  cmp    %rdx,%rbx
  jbe    L113
  movzbl 0x2(%r12,%rbp,1),%edx
  mov    %dl,0x2(%rax)
  lea    0x3(%rbp),%rdx
  cmp    %rdx,%rbx
  jbe    L113
  movzbl 0x3(%r12,%rbp,1),%edx
  mov    %dl,0x3(%rax)
  lea    0x4(%rbp),%rdx
  cmp    %rdx,%rbx
  jbe    L113
  movzbl 0x4(%r12,%rbp,1),%edx
  mov    %dl,0x4(%rax)
  lea    0x5(%rbp),%rdx
  cmp    %rdx,%rbx
  jbe    L113
  movzbl 0x5(%r12,%rbp,1),%edx
  mov    %dl,0x5(%rax)
  lea    0x6(%rbp),%rdx
  cmp    %rdx,%rbx
  jbe    L113
  movzbl 0x6(%r12,%rbp,1),%edx
  mov    %dl,0x6(%rax)
L113:
  lea    0x0(%r13,%rsi,1),%rax
  jmp    L89
  nopl   0x0(%rax)
L27:
  pop    %rbx
  mov    %rdi,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L139:
  mov    %r13,%rdx
  sub    %rbp,%rdx
  nopw   0x0(%rax,%rax,1)
L148:
  movzbl (%r12,%rbp,1),%eax
  mov    %al,(%rdx,%rbp,1)
  add    $0x1,%rbp
  cmp    %rbp,%rbx
  jne    L148
  jmp    L113
L199:
  mov    %rsi,%rdi
  mov    %r13,%rax
  lea    (%r12,%rbp,1),%rdx
  xor    %ecx,%ecx
  jmp    L225
```

assistant: ```c
char *str_trim(char *dest, const char *src) {
  if (src == NULL)
    return dest;
  size_t i;
  size_t start;
  size_t end;
  start = 0;
  while (src[start] != '\0' && isspace((unsigned char)src[start])) {
    ++start;
  }
  end = strlen(src);
  while (end > 0 && isspace((unsigned char)src[end - 1])) {
    --end;
  }
  for (i = start; i < end; i++) {
    *dest = src[i];
    ++dest;
  }
  *dest = '\0';
  return dest;
}
```