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

```asm
<_hs_text_decode_utf8_int>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rsi,0x10(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    (%rdx),%rdx
  mov    %rdi,0x8(%rsp)
  mov    %r8,0x20(%rsp)
  mov    %r9,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  mov    (%rsi),%rax
  mov    (%r8),%esi
  mov    %esi,0x34(%rsp)
  lea    (%rdi,%rax,8),%rbp
  mov    (%r9),%eax
  mov    %eax,0x30(%rsp)
  cmp    %rcx,%rdx
  jae    L35
  mov    %rdx,(%rsp)
  mov    %rcx,%rbx
  lea    0x34(%rsp),%r15
  lea    -0x10(%rcx),%r13
  lea    0x30(%rsp),%r14
  test   %eax,%eax
  je     L45
L115:
  lea    0x4(%rdx),%r12
  mov    (%rdx),%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <decode@plt>
  test   %rax,%rax
  je     L26
  mov    0x30(%rsp),%eax
  cmp    $0xc,%eax
  jne    L17
L71:
  mov    0x34(%rsp),%esi
L138:
  mov    0x10(%rsp),%rbx
  mov    %rbp,%rcx
  sub    0x8(%rsp),%rcx
  sar    $0x3,%rcx
  mov    %rcx,(%rbx)
  mov    0x20(%rsp),%rbx
  mov    (%rsp),%rcx
  mov    %esi,(%rbx)
  mov    0x28(%rsp),%rbx
  mov    %eax,(%rbx)
  mov    0x18(%rsp),%rax
  mov    %rcx,(%rax)
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  add    $0x48,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L26:
  movslq 0x34(%rsp),%rdx
  mov    0x30(%rsp),%eax
  cmp    $0xffff,%edx
  jg     L61
  mov    %r12,(%rsp)
  add    $0x8,%rbp
  mov    %rdx,-0x8(%rbp)
L17:
  cmp    %r12,%rbx
  jbe    L71
  mov    %r12,%rdx
  test   %eax,%eax
  jne    L115
L45:
  cmp    %rdx,%r13
  ja     L93
  jmp    L54
  nopl   0x0(%rax)
L104:
  movzbl %ah,%esi
  movzbl %al,%edi
  add    $0x20,%rbp
  add    $0x10,%rdx
  movslq %esi,%rsi
  movq   %rdi,%xmm0
  movq   %rsi,%xmm1
  mov    %eax,%esi
  shr    $0x18,%eax
  sar    $0x10,%esi
  punpcklqdq %xmm1,%xmm0
  movzbl %sil,%esi
  movups %xmm0,-0x20(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rax,-0x8(%rbp)
  cmp    %r13,%rdx
  jae    L54
L93:
  mov    (%rdx),%eax
  mov    %eax,0x34(%rsp)
  test   $0x80808080,%eax
  je     L104
L54:
  mov    %rdx,(%rsp)
  jmp    L115
  nopw   0x0(%rax,%rax,1)
L61:
  mov    %edx,%esi
  and    $0x3ff,%edx
  mov    %r12,(%rsp)
  add    $0x10,%rbp
  sar    $0xa,%esi
  add    $0xdc00,%rdx
  add    $0xd7c0,%esi
  movq   %rdx,%xmm2
  movslq %esi,%rcx
  movq   %rcx,%xmm0
  punpcklqdq %xmm2,%xmm0
  movups %xmm0,-0x10(%rbp)
  jmp    L17
L35:
  mov    %rdx,(%rsp)
  mov    %rdx,%r12
  jmp    L138
L22:
  call   <__stack_chk_fail@plt>
```

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