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

```asm
<_PL__utf8_put_char>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  cmpl   $0x7f,-0xc(%rbp)
  jg     L14
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L106
L14:
  cmpl   $0x7ff,-0xc(%rbp)
  jg     L7
  mov    -0xc(%rbp),%eax
  sar    $0x6,%eax
  and    $0x1f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffffc0,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L106
L7:
  cmpl   $0xffff,-0xc(%rbp)
  jg     L25
  mov    -0xc(%rbp),%eax
  sar    $0xc,%eax
  and    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffffe0,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L106
L25:
  cmpl   $0x1fffff,-0xc(%rbp)
  jg     L104
  mov    -0xc(%rbp),%eax
  sar    $0x12,%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xfffffff0,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0xc,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L106
L104:
  cmpl   $0x3ffffff,-0xc(%rbp)
  jg     L26
  mov    -0xc(%rbp),%eax
  sar    $0x18,%eax
  and    $0x3,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xfffffff8,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x12,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0xc,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L106
L26:
  cmpl   $0x0,-0xc(%rbp)
  js     L106
  mov    -0xc(%rbp),%eax
  sar    $0x1e,%eax
  and    $0x1,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xfffffffc,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x18,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x12,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0xc,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
L106:
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
char *_PL__utf8_put_char(char *out, int chr) {
  if (chr < 0x80) {
    *out++ = chr;
  } else if (chr < 0x800) {
    *out++ = 0xc0 | ((chr >> 6) & 0x1f);
    *out++ = 0x80 | (chr & 0x3f);
  } else if (chr < 0x10000) {
    *out++ = 0xe0 | ((chr >> 12) & 0x0f);
    *out++ = 0x80 | ((chr >> 6) & 0x3f);
    *out++ = 0x80 | (chr & 0x3f);
  } else if (chr < 0x200000) {
    *out++ = 0xf0 | ((chr >> 18) & 0x07);
    *out++ = 0x80 | ((chr >> 12) & 0x3f);
    *out++ = 0x80 | ((chr >> 6) & 0x3f);
    *out++ = 0x80 | (chr & 0x3f);
  } else if (chr < 0x4000000) {
    *out++ = 0xf8 | ((chr >> 24) & 0x03);
    *out++ = 0x80 | ((chr >> 18) & 0x3f);
    *out++ = 0x80 | ((chr >> 12) & 0x3f);
    *out++ = 0x80 | ((chr >> 6) & 0x3f);
    *out++ = 0x80 | (chr & 0x3f);
  } else if ((unsigned)chr < 0x80000000) {
    *out++ = 0xfc | ((chr >> 30) & 0x01);
    *out++ = 0x80 | ((chr >> 24) & 0x3f);
    *out++ = 0x80 | ((chr >> 18) & 0x3f);
    *out++ = 0x80 | ((chr >> 12) & 0x3f);
    *out++ = 0x80 | ((chr >> 6) & 0x3f);
    *out++ = 0x80 | (chr & 0x3f);
  }
  return out;
}
```