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

```asm
<pututf8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  cmpq   $0x7f,-0x8(%rbp)
  ja     L78
  mov    -0x8(%rbp),%rax
  and    $0x7f,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  jmp    L77
L78:
  cmpq   $0x7ff,-0x8(%rbp)
  ja     L68
  mov    -0x8(%rbp),%rax
  shr    $0x6,%rax
  and    $0x1f,%eax
  add    $0xc0,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  jmp    L77
L68:
  cmpq   $0xffff,-0x8(%rbp)
  ja     L33
  mov    -0x8(%rbp),%rax
  shr    $0xc,%rax
  and    $0xf,%eax
  add    $0xe0,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  jmp    L77
L33:
  cmpq   $0x1fffff,-0x8(%rbp)
  ja     L43
  mov    -0x8(%rbp),%rax
  shr    $0x12,%rax
  and    $0x7,%eax
  add    $0xf0,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0xc,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  jmp    L77
L43:
  cmpq   $0x3ffffff,-0x8(%rbp)
  ja     L99
  mov    -0x8(%rbp),%rax
  shr    $0x18,%rax
  and    $0x3,%eax
  add    $0xf8,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0x12,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0xc,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  jmp    L77
L99:
  mov    $0x80000000,%eax
  cmp    %rax,-0x8(%rbp)
  jae    L77
  mov    -0x8(%rbp),%rax
  shr    $0x1e,%rax
  and    $0x1,%eax
  add    $0xfc,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0x18,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0x12,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0xc,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  mov    -0x8(%rbp),%rax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,%edi
  call   <putchar@plt>
L77:
  nop
  leave
  ret
```

assistant: ```c
void pututf8(unsigned long unichar) {
  if (unichar <= 0x7f)
    putchar(unichar % 0x80);
  else if (unichar <= 0x7ff) {
    putchar(0xC0 + (unichar >> 6) % 0x20);
    putchar(0x80 + unichar % 0x40);
  } else if (unichar <= 0xffff) {
    putchar(0xE0 + (unichar >> 12) % 0x10);
    putchar(0x80 + (unichar >> 6) % 0x40);
    putchar(0x80 + unichar % 0x40);
  } else if (unichar <= 0x1fffff) {
    putchar(0xF0 + (unichar >> 18) % 0x08);
    putchar(0x80 + (unichar >> 12) % 0x40);
    putchar(0x80 + (unichar >> 6) % 0x40);
    putchar(0x80 + unichar % 0x40);
  } else if (unichar <= 0x3ffffff) {
    putchar(0xF8 + (unichar >> 24) % 0x04);
    putchar(0x80 + (unichar >> 18) % 0x40);
    putchar(0x80 + (unichar >> 12) % 0x40);
    putchar(0x80 + (unichar >> 6) % 0x40);
    putchar(0x80 + unichar % 0x40);
  } else if (unichar <= 0x7fffffff) {
    putchar(0xFC + (unichar >> 30) % 0x02);
    putchar(0x80 + (unichar >> 24) % 0x40);
    putchar(0x80 + (unichar >> 18) % 0x40);
    putchar(0x80 + (unichar >> 12) % 0x40);
    putchar(0x80 + (unichar >> 6) % 0x40);
    putchar(0x80 + unichar % 0x40);
  }
}
```