user: What is the c source code of the assembly code below:

```asm
<Q_UTF8Encode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    D29(%rip),%eax
  lea    0x1(%rax),%edx
  mov    %edx,D20(%rip)
  and    $0x1,%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    D20(%rip),%rdx
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x7f,-0x18(%rbp)
  ja     L45
  mov    -0x18(%rbp),%rax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x0,(%rax)
  jmp    L49
L45:
  cmpq   $0x7f,-0x18(%rbp)
  jbe    L64
  cmpq   $0x7ff,-0x18(%rbp)
  ja     L64
  mov    -0x18(%rbp),%rax
  shr    $0x6,%rax
  and    $0x1f,%eax
  or     $0xffffffc0,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L49
L64:
  cmpq   $0x7ff,-0x18(%rbp)
  jbe    L17
  cmpq   $0xffff,-0x18(%rbp)
  ja     L17
  mov    -0x18(%rbp),%rax
  shr    $0xc,%rax
  and    $0xf,%eax
  or     $0xffffffe0,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  movb   $0x0,(%rax)
  jmp    L49
L17:
  cmpq   $0xffff,-0x18(%rbp)
  jbe    L95
  cmpq   $0x10ffff,-0x18(%rbp)
  ja     L95
  mov    -0x18(%rbp),%rax
  and    $0x7,%eax
  or     $0xfffffff0,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  and    $0x3,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  shr    $0xc,%rax
  and    $0xf,%eax
  or     %edx,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  shr    $0x6,%rax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movb   $0x0,(%rax)
  jmp    L49
L95:
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
L49:
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
char *Q_UTF8Encode(unsigned long codepoint) {
  static char sbuf[2][5];
  static int index = 0;
  char *buf = sbuf[index++ & 1];
  if (codepoint <= 0x007F) {
    buf[0] = codepoint;
    buf[1] = 0;
  } else if (0x0080 <= codepoint && codepoint <= 0x07FF) {
    buf[0] = 0xC0 | ((codepoint & 0x0700) >> 6) | ((codepoint & 0x00C0) >> 6);
    buf[1] = 0x80 | (codepoint & 0x003F);
    buf[2] = 0;
  } else if (0x0800 <= codepoint && codepoint <= 0xFFFF) {
    buf[0] = 0xE0 | ((codepoint & 0xF000) >> 12);
    buf[1] = 0x80 | ((codepoint & 0x0F00) >> 6) | ((codepoint & 0x00C0) >> 6);
    buf[2] = 0x80 | (codepoint & 0x003F);
    buf[3] = 0;
  } else if (0x010000 <= codepoint && codepoint <= 0x10FFFF) {
    buf[0] = 0xF0 | ((codepoint & 0x1C0000 >> 18));
    buf[1] = 0x80 | ((codepoint & 0x030000 >> 16)) | ((codepoint & 0x00F000) >> 12);
    buf[2] = 0x80 | ((codepoint & 0x000F00) >> 6) | ((codepoint & 0x0000C0) >> 6);
    buf[3] = 0x80 | (codepoint & 0x00003F);
    buf[4] = 0;
  } else {
    buf[0] = 0;
  }
  return buf;
}
```