user: What would the C source look like for the assembly code provided here?

```asm
<_hs_text_decode_utf8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L126
L67:
  mov    -0x20(%rbp),%eax
  test   %eax,%eax
  jne    L4
  jmp    L37
L9:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  and    $0x80808080,%eax
  test   %eax,%eax
  jne    L55
  addq   $0x10,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  movzbl %al,%ecx
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x1c(%rbp),%eax
  sar    $0x8,%eax
  cltq
  movzbl %al,%ecx
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x1c(%rbp),%eax
  sar    $0x10,%eax
  cltq
  movzbl %al,%ecx
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x1c(%rbp),%eax
  sar    $0x18,%eax
  cltq
  movzbl %al,%ecx
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
L37:
  mov    -0x40(%rbp),%rax
  sub    $0x10,%rax
  cmp    %rax,-0x10(%rbp)
  jb     L9
  jmp    L4
L55:
  nop
L4:
  mov    -0x10(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    (%rax),%edx
  lea    -0x1c(%rbp),%rcx
  lea    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode@plt>
  test   %rax,%rax
  je     L39
  mov    -0x20(%rbp),%eax
  cmp    $0xc,%eax
  je     L127
  jmp    L126
L39:
  mov    -0x1c(%rbp),%eax
  cmp    $0xffff,%eax
  jg     L69
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  jmp    L126
L69:
  mov    -0x1c(%rbp),%eax
  sar    $0xa,%eax
  add    $0xd7c0,%eax
  movslq %eax,%rcx
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x1c(%rbp),%eax
  and    $0x3ff,%eax
  add    $0xdc00,%eax
  movslq %eax,%rcx
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
L126:
  mov    -0x10(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jb     L67
  jmp    L36
L127:
  nop
L36:
  mov    -0x20(%rbp),%eax
  test   %eax,%eax
  je     L14
  subq   $0x4,-0x10(%rbp)
L14:
  mov    -0x18(%rbp),%rax
  sub    -0x28(%rbp),%rax
  sar    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L45
  call   <__stack_chk_fail@plt>
L45:
  leave
  ret
```

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;
}
```