user: 请从给定的汇编指令推导出C源代码:

```asm
<vui_utf8_encode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  cmpl   $0x7f,-0x4(%rbp)
  ja     L93
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L32
L93:
  cmpl   $0x7ff,-0x4(%rbp)
  ja     L75
  mov    -0x4(%rbp),%eax
  shr    $0x6,%eax
  and    $0x1f,%eax
  or     $0xffffffc0,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L32
L75:
  cmpl   $0xffff,-0x4(%rbp)
  ja     L47
  mov    -0x4(%rbp),%eax
  shr    $0xc,%eax
  and    $0xf,%eax
  or     $0xffffffe0,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x6,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L32
L47:
  cmpl   $0x1fffff,-0x4(%rbp)
  ja     L21
  mov    -0x4(%rbp),%eax
  shr    $0x12,%eax
  and    $0x7,%eax
  or     $0xfffffff0,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0xc,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x6,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L32
L21:
  cmpl   $0x3ffffff,-0x4(%rbp)
  ja     L14
  mov    -0x4(%rbp),%eax
  shr    $0x18,%eax
  and    $0x3,%eax
  or     $0xfffffff8,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x12,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0xc,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x6,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L32
L14:
  mov    -0x4(%rbp),%eax
  test   %eax,%eax
  js     L32
  mov    -0x4(%rbp),%eax
  shr    $0x1e,%eax
  and    $0x1,%eax
  or     $0xfffffffc,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x18,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x12,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0xc,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x6,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L32:
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
char *vui_utf8_encode(unsigned int c, char *s) {
  if (c < 0x80) {
    *s++ = c;
  } else if (c < 0x800) {
    *s++ = 192 | ((c >> 6) & 0x1F);
    *s++ = 128 | ((c >> 0) & 0x3F);
  } else if (c < 0x10000) {
    *s++ = 224 | ((c >> 12) & 0x0F);
    *s++ = 128 | ((c >> 6) & 0x3F);
    *s++ = 128 | ((c >> 0) & 0x3F);
  } else if (c < 0x200000) {
    *s++ = 240 | ((c >> 18) & 0x07);
    *s++ = 128 | ((c >> 12) & 0x3F);
    *s++ = 128 | ((c >> 6) & 0x3F);
    *s++ = 128 | ((c >> 0) & 0x3F);
  } else if (c < 0x4000000) {
    *s++ = 248 | ((c >> 24) & 0x03);
    *s++ = 128 | ((c >> 18) & 0x3F);
    *s++ = 128 | ((c >> 12) & 0x3F);
    *s++ = 128 | ((c >> 6) & 0x3F);
    *s++ = 128 | ((c >> 0) & 0x3F);
  } else if (c < 0x80000000) {
    *s++ = 252 | ((c >> 30) & 0x01);
    *s++ = 128 | ((c >> 24) & 0x3F);
    *s++ = 128 | ((c >> 18) & 0x3F);
    *s++ = 128 | ((c >> 12) & 0x3F);
    *s++ = 128 | ((c >> 6) & 0x3F);
    *s++ = 128 | ((c >> 0) & 0x3F);
  }
  *s = 0;
  return s;
}
```