user: 请将以下的汇编代码转换成C语言代码：

```asm
<_hs_text_decode_utf8_int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x60(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  jmp    L115
L105:
  mov    -0x28(%rbp),%eax
  test   %eax,%eax
  jne    L15
  jmp    L129
L107:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  and    $0x80808080,%eax
  test   %eax,%eax
  jne    L130
  addq   $0x10,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  movzbl %al,%ecx
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x24(%rbp),%eax
  sar    $0x8,%eax
  cltq
  movzbl %al,%ecx
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x24(%rbp),%eax
  sar    $0x10,%eax
  cltq
  movzbl %al,%ecx
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x24(%rbp),%eax
  sar    $0x18,%eax
  cltq
  movzbl %al,%ecx
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
L129:
  mov    -0x50(%rbp),%rax
  sub    $0x10,%rax
  cmp    %rax,-0x18(%rbp)
  jb     L107
  jmp    L101
L130:
  nop
L101:
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
L15:
  mov    -0x18(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    (%rax),%edx
  lea    -0x24(%rbp),%rcx
  lea    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode@plt>
  test   %rax,%rax
  je     L14
  mov    -0x28(%rbp),%eax
  cmp    $0xc,%eax
  je     L86
  jmp    L115
L14:
  mov    -0x24(%rbp),%eax
  cmp    $0xffff,%eax
  jg     L114
  mov    -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  jmp    L35
L114:
  mov    -0x24(%rbp),%eax
  sar    $0xa,%eax
  add    $0xd7c0,%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x24(%rbp),%eax
  and    $0x3ff,%eax
  add    $0xdc00,%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,%rdx
  mov    %rdx,(%rax)
L35:
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
L115:
  mov    -0x18(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jb     L105
  jmp    L39
L86:
  nop
L39:
  mov    -0x20(%rbp),%rax
  sub    -0x38(%rbp),%rax
  sar    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x24(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x48(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

assistant: ```c
uint8_t const *_hs_text_decode_utf8_int(uint16_t *const dest, size_t *destoff, const uint8_t **src, const uint8_t *srcend, uint32_t *codepoint0, uint32_t *state0) {
  uint16_t *d = dest + *destoff;
  const uint8_t *s = *src, *last = *src;
  uint32_t state = *state0;
  uint32_t codepoint = *codepoint0;
  while (s < srcend) {
    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);
      }
      last = s;
    }
    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));
    }
    last = s;
  }
  *destoff = d - dest;
  *codepoint0 = codepoint;
  *state0 = state;
  *src = last;
  return s;
}
```