user: What is the c source code of the assembly code below?

```asm
<cut_word>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  movzbl (%rdi),%eax
  cmp    %sil,%al
  je     L124
  test   %al,%al
  je     L124
  mov    %rdi,%rbx
  mov    %esi,%ecx
  xor    %eax,%eax
  jmp    L15
  nopl   (%rax)
L78:
  test   %dl,%dl
  je     L165
L15:
  movzbl 0x1(%rbx,%rax,1),%edx
  mov    %eax,%r12d
  mov    %eax,%ebp
  add    $0x1,%rax
  cmp    %cl,%dl
  jne    L78
L165:
  lea    0x2(%r12),%edi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    %rax,%r8
  test   %rax,%rax
  je     L116
  lea    0x1(%rbx),%rcx
  sub    %rcx,%rax
  cmp    $0xe,%rax
  jbe    L177
  cmp    $0x6,%r12d
  jbe    L177
  lea    0x1(%r12),%esi
  cmp    $0xe,%r12d
  jbe    L228
  mov    %esi,%ecx
  mov    %rbx,%rdi
  mov    %rdx,%rax
  shr    $0x4,%ecx
  sub    %rdx,%rdi
  shl    $0x4,%rcx
  add    %rdx,%rcx
  cs nopw 0x0(%rax,%rax,1)
L218:
  movdqu (%rax,%rdi,1),%xmm0
  add    $0x10,%rax
  movups %xmm0,-0x10(%rax)
  cmp    %rcx,%rax
  jne    L218
  mov    %esi,%ecx
  and    $0xfffffff0,%ecx
  mov    %ecx,%eax
  cmp    %ecx,%esi
  je     L24
  sub    %ecx,%r12d
  lea    0x1(%r12),%esi
  cmp    $0x6,%r12d
  jbe    L29
L111:
  mov    (%rbx,%rcx,1),%rdi
  mov    %rdi,(%rdx,%rcx,1)
  mov    %esi,%ecx
  and    $0xfffffff8,%ecx
  add    %ecx,%eax
  cmp    %ecx,%esi
  je     L24
L29:
  movslq %eax,%rcx
  movzbl (%rbx,%rcx,1),%esi
  mov    %sil,(%rdx,%rcx,1)
  lea    0x1(%rax),%ecx
  cmp    %eax,%ebp
  jle    L24
  movslq %ecx,%rsi
  movzbl (%rbx,%rsi,1),%edi
  mov    %dil,(%rdx,%rsi,1)
  lea    0x2(%rax),%esi
  cmp    %ebp,%ecx
  jge    L24
  movslq %esi,%rcx
  movzbl (%rbx,%rcx,1),%edi
  mov    %dil,(%rdx,%rcx,1)
  lea    0x3(%rax),%ecx
  cmp    %esi,%ebp
  jle    L24
  movslq %ecx,%rsi
  movzbl (%rbx,%rsi,1),%edi
  mov    %dil,(%rdx,%rsi,1)
  lea    0x4(%rax),%esi
  cmp    %ecx,%ebp
  jle    L24
  movslq %esi,%rcx
  movzbl (%rbx,%rcx,1),%edi
  mov    %dil,(%rdx,%rcx,1)
  lea    0x5(%rax),%ecx
  cmp    %esi,%ebp
  jle    L24
  movslq %ecx,%rsi
  add    $0x6,%eax
  movzbl (%rbx,%rsi,1),%edi
  mov    %dil,(%rdx,%rsi,1)
  cmp    %ecx,%ebp
  jle    L24
  cltq
  movzbl (%rbx,%rax,1),%ecx
  mov    %cl,(%rdx,%rax,1)
L24:
  add    $0x1,%ebp
  movslq %ebp,%rbp
  add    %rdx,%rbp
L154:
  movb   $0x0,0x0(%rbp)
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L124:
  mov    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,%r8
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L154
L116:
  xor    %r8d,%r8d
  pop    %rbx
  pop    %rbp
  mov    %r8,%rax
  pop    %r12
  ret
L177:
  lea    0x1(%r12),%esi
  mov    %rdx,%rax
  sub    %rdx,%rbx
  add    %rdx,%rsi
  xchg   %ax,%ax
L196:
  movzbl (%rbx,%rax,1),%ecx
  add    $0x1,%rax
  mov    %cl,-0x1(%rax)
  cmp    %rsi,%rax
  jne    L196
  jmp    L24
L228:
  xor    %ecx,%ecx
  xor    %eax,%eax
  jmp    L111
```

assistant: ```c
char *cut_word(char *str, char c) {
  int i;
  int j;
  char *str_return;
  i = 0;
  while (str[i] && str[i] != c)
    i++;
  j = i;
  i = 0;
  if ((str_return = (char *)malloc(sizeof(char) * j + 1)) == NULL)
    return (NULL);
  while (i < j) {
    str_return[i] = str[i];
    i++;
  }
  str_return[i] = '\0';
  return (str_return);
}
```