user: Please show me the C implementation that matches the assembly code listed below:

```asm
<pututf8>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  cmp    $0x7f,%rdi
  jbe    L27
  cmp    $0x7ff,%rdi
  jbe    L47
  cmp    $0xffff,%rdi
  jbe    L60
  cmp    $0x1fffff,%rdi
  jbe    L25
  cmp    $0x3ffffff,%rdi
  jbe    L18
  cmp    $0x7fffffff,%rdi
  ja     L74
  shr    $0x1e,%rdi
  add    $0xfc,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0x18,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0x12,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0xc,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0x6,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  and    $0x3f,%ebx
  lea    0x80(%rbx),%edi
  call   <putchar@plt>
  jmp    L74
L27:
  call   <putchar@plt>
L74:
  pop    %rbx
  ret
L47:
  shr    $0x6,%rdi
  add    $0xc0,%edi
  call   <putchar@plt>
  and    $0x3f,%ebx
  lea    0x80(%rbx),%edi
  call   <putchar@plt>
  jmp    L74
L60:
  shr    $0xc,%rdi
  add    $0xe0,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0x6,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  and    $0x3f,%ebx
  lea    0x80(%rbx),%edi
  call   <putchar@plt>
  jmp    L74
L25:
  shr    $0x12,%rdi
  add    $0xf0,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0xc,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0x6,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  and    $0x3f,%ebx
  lea    0x80(%rbx),%edi
  call   <putchar@plt>
  jmp    L74
L18:
  shr    $0x18,%rdi
  add    $0xf8,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0x12,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0xc,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  mov    %rbx,%rdi
  shr    $0x6,%rdi
  and    $0x3f,%edi
  sub    $0xffffff80,%edi
  call   <putchar@plt>
  and    $0x3f,%ebx
  lea    0x80(%rbx),%edi
  call   <putchar@plt>
  jmp    L74
```

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