user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<utf8char>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  cmpq   $0xd,-0x10(%rbp)
  je     L20
  cmpq   $0xfffe,-0x10(%rbp)
  je     L20
  cmpq   $0xffff,-0x10(%rbp)
  je     L20
  cmpq   $0x7f,-0x10(%rbp)
  ja     L28
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x10(%rbp),%rdx
  mov    %dl,(%rax)
  jmp    L20
L28:
  cmpq   $0x7ff,-0x10(%rbp)
  ja     L27
  mov    -0x10(%rbp),%rax
  shr    $0x6,%rax
  and    $0x1f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x40(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  jmp    L20
L27:
  cmpq   $0xffff,-0x10(%rbp)
  ja     L124
  mov    -0x10(%rbp),%rax
  shr    $0xc,%rax
  and    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x20(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  jmp    L20
L124:
  cmpq   $0x1fffff,-0x10(%rbp)
  ja     L89
  mov    -0x10(%rbp),%rax
  shr    $0x12,%rax
  and    $0x7,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x10(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0xc,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  jmp    L20
L89:
  cmpq   $0x3ffffff,-0x10(%rbp)
  ja     L123
  mov    -0x10(%rbp),%rax
  shr    $0x18,%rax
  and    $0x3,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x8(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0x12,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0xc,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  jmp    L20
L123:
  mov    $0x80000000,%eax
  cmp    %rax,-0x10(%rbp)
  jae    L20
  mov    -0x10(%rbp),%rax
  shr    $0x1e,%rax
  and    $0x1,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x4(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0x18,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0x12,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0xc,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    -0x80(%rcx),%edx
  mov    %dl,(%rax)
L20:
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
unsigned char *utf8char(unsigned char *dst, unsigned long value) {
  if (value == '\r' || value == 0xFFFE || value == 0xFFFF) {
    ;
  } else if (value < 0x80) {
    *dst++ = value;
  } else if (value < 0x800) {
    *dst++ = 0xC0 + ((value >> 6) & 0x1F);
    *dst++ = 0x80 + ((value >> 0) & 0x3F);
  } else if (value < 0x10000) {
    *dst++ = 0xE0 + ((value >> 12) & 0x0F);
    *dst++ = 0x80 + ((value >> 6) & 0x3F);
    *dst++ = 0x80 + ((value >> 0) & 0x3F);
  } else if (value < 0x200000) {
    *dst++ = 0xF0 + ((value >> 18) & 0x07);
    *dst++ = 0x80 + ((value >> 12) & 0x3F);
    *dst++ = 0x80 + ((value >> 6) & 0x3F);
    *dst++ = 0x80 + ((value >> 0) & 0x3F);
  } else if (value < 0x4000000) {
    *dst++ = 0xF8 + ((value >> 24) & 0x03);
    *dst++ = 0x80 + ((value >> 18) & 0x3F);
    *dst++ = 0x80 + ((value >> 12) & 0x3F);
    *dst++ = 0x80 + ((value >> 6) & 0x3F);
    *dst++ = 0x80 + ((value >> 0) & 0x3F);
  } else if (value < 0x80000000) {
    *dst++ = 0xFC + ((value >> 30) & 0x01);
    *dst++ = 0x80 + ((value >> 24) & 0x3F);
    *dst++ = 0x80 + ((value >> 18) & 0x3F);
    *dst++ = 0x80 + ((value >> 12) & 0x3F);
    *dst++ = 0x80 + ((value >> 6) & 0x3F);
    *dst++ = 0x80 + ((value >> 0) & 0x3F);
  }
  return dst;
}
```