user: Demonstrate the C code that generates the assembly output below:

```asm
<_hs_text_decode_utf8>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r14
  mov    %rsi,%r13
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    (%rsi),%rax
  lea    (%rdi,%rax,8),%rbx
  movl   $0x0,(%rsp)
  cmp    %rcx,%rdx
  jae    L104
  mov    %rcx,%r15
  lea    -0x10(%rcx),%r12
  jmp    L3
L38:
  cmp    %rbp,%r12
  ja     L20
  jmp    L147
L23:
  mov    %rdi,%rbx
L20:
  mov    0x0(%rbp),%eax
  test   $0x80808080,%eax
  jne    L90
  add    $0x10,%rbp
  movzbl %al,%r8d
  mov    %r8,(%rbx)
  movzbl %ah,%esi
  movslq %esi,%rsi
  mov    %rsi,0x8(%rbx)
  mov    %eax,%ecx
  sar    $0x10,%ecx
  movzbl %cl,%ecx
  mov    %rcx,0x10(%rbx)
  lea    0x20(%rbx),%rdi
  mov    %eax,%edx
  shr    $0x18,%edx
  movslq %edx,%rdx
  mov    %rdx,-0x8(%rdi)
  cmp    %r12,%rbp
  jb     L23
  mov    %eax,0x4(%rsp)
  mov    %r8,(%rbx)
  mov    %rsi,0x8(%rbx)
  mov    %rcx,0x10(%rbx)
  mov    %rdx,0x18(%rbx)
  mov    %rdi,%rbx
  jmp    L147
L90:
  mov    %eax,0x4(%rsp)
  jmp    L147
L62:
  mov    0x4(%rsp),%eax
  cmp    $0xffff,%eax
  jg     L57
  cltq
  mov    %rax,(%rbx)
  lea    0x8(%rbx),%rbx
L94:
  lea    0x4(%rbp),%rax
  cmp    %rax,%r15
  jbe    L25
  mov    %rax,%rbp
L3:
  cmpl   $0x0,(%rsp)
  je     L38
L147:
  lea    0x4(%rsp),%rsi
  mov    %rsp,%rdi
  mov    0x0(%rbp),%edx
  call   <decode@plt>
  test   %rax,%rax
  je     L62
  cmpl   $0xc,(%rsp)
  jne    L94
L175:
  mov    %rbp,%rax
L117:
  sub    %r14,%rbx
  sar    $0x3,%rbx
  mov    %rbx,0x0(%r13)
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L139
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L57:
  mov    %eax,%edx
  sar    $0xa,%edx
  add    $0xd7c0,%edx
  movslq %edx,%rdx
  mov    %rdx,(%rbx)
  and    $0x3ff,%eax
  lea    0xdc00(%rax),%rax
  mov    %rax,0x8(%rbx)
  lea    0x10(%rbx),%rbx
  jmp    L94
L25:
  cmpl   $0x0,(%rsp)
  je     L117
  jmp    L175
L104:
  mov    %rdx,%rax
  jmp    L117
L139:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
uint8_t const *_hs_text_decode_utf8(uint16_t *dest, size_t *destoff, const uint8_t const *src, const uint8_t const *srcend) {
  uint16_t *d = dest + *destoff;
  const uint8_t const *s = src;
  uint32_t state = 0;
  while (s < srcend) {
    uint32_t codepoint;
    if (state == 0) {
      while (s < srcend - 4) {
        codepoint = *((uint32_t *)s);
        if ((codepoint & 0x80808080) != 0)
          break;
        s += 4;
        *d++ = (uint16_t)(codepoint & 0xff);
        *d++ = (uint16_t)((codepoint >> 8) & 0xff);
        *d++ = (uint16_t)((codepoint >> 16) & 0xff);
        *d++ = (uint16_t)((codepoint >> 24) & 0xff);
      }
    }
    if (decode(&state, &codepoint, *s++) != 0) {
      if (state != 12)
        continue;
      break;
    }
    if (codepoint <= 0xffff)
      *d++ = (uint16_t)codepoint;
    else {
      *d++ = (uint16_t)(0xD7C0 + (codepoint >> 10));
      *d++ = (uint16_t)(0xDC00 + (codepoint & 0x3FF));
    }
  }
  if (state != 0)
    s -= 1;
  *destoff = d - dest;
  return s;
}
```