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

```asm
<vui_utf8_encode>:
  endbr64
  mov    %edi,%eax
  cmp    $0x7f,%edi
  ja     L89
  mov    %dil,(%rsi)
  lea    0x1(%rsi),%r8
L75:
  movb   $0x0,(%r8)
  mov    %r8,%rax
  ret
  nopw   0x0(%rax,%rax,1)
L89:
  cmp    $0x7ff,%edi
  ja     L76
  mov    %edi,%edx
  and    $0x3f,%eax
  lea    0x2(%rsi),%r8
  shr    $0x6,%edx
  or     $0xffffff80,%eax
  or     $0xffffffc0,%edx
  mov    %al,0x1(%rsi)
  mov    %r8,%rax
  mov    %dl,(%rsi)
  movb   $0x0,(%r8)
  ret
  nopw   0x0(%rax,%rax,1)
L76:
  cmp    $0xffff,%edi
  jbe    L83
  cmp    $0x1fffff,%edi
  ja     L9
  mov    %edi,%edx
  and    $0x3f,%eax
  lea    0x4(%rsi),%r8
  shr    $0x12,%edx
  or     $0xffffff80,%eax
  or     $0xfffffff0,%edx
  mov    %al,0x3(%rsi)
  mov    %dl,(%rsi)
  mov    %edi,%edx
  shr    $0xc,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x1(%rsi)
  mov    %edi,%edx
  shr    $0x6,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x2(%rsi)
  jmp    L75
  nopl   0x0(%rax,%rax,1)
L83:
  mov    %edi,%edx
  and    $0x3f,%eax
  lea    0x3(%rsi),%r8
  shr    $0xc,%edx
  or     $0xffffff80,%eax
  or     $0xffffffe0,%edx
  mov    %al,0x2(%rsi)
  mov    %r8,%rax
  mov    %dl,(%rsi)
  mov    %edi,%edx
  shr    $0x6,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x1(%rsi)
  movb   $0x0,(%r8)
  ret
  nopl   (%rax)
L9:
  cmp    $0x3ffffff,%edi
  jbe    L37
  mov    %rsi,%r8
  test   %edi,%edi
  js     L75
  mov    %edi,%edx
  and    $0x3f,%eax
  add    $0x6,%r8
  shr    $0x1e,%edx
  or     $0xffffff80,%eax
  or     $0xfffffffc,%edx
  mov    %al,0x5(%rsi)
  mov    %dl,(%rsi)
  mov    %edi,%edx
  shr    $0x18,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x1(%rsi)
  mov    %edi,%edx
  shr    $0x12,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x2(%rsi)
  mov    %edi,%edx
  shr    $0xc,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x3(%rsi)
  mov    %edi,%edx
  shr    $0x6,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x4(%rsi)
  jmp    L75
  nopw   0x0(%rax,%rax,1)
L37:
  mov    %edi,%edx
  and    $0x3f,%eax
  lea    0x5(%rsi),%r8
  shr    $0x18,%edx
  or     $0xffffff80,%eax
  or     $0xfffffff8,%edx
  mov    %al,0x4(%rsi)
  mov    %dl,(%rsi)
  mov    %edi,%edx
  shr    $0x12,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x1(%rsi)
  mov    %edi,%edx
  shr    $0xc,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x2(%rsi)
  mov    %edi,%edx
  shr    $0x6,%edx
  and    $0x3f,%edx
  or     $0xffffff80,%edx
  mov    %dl,0x3(%rsi)
  jmp    L75
```

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