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

```asm
<BASM_Parse_EmitChar>:
  endbr64
  mov    %rdi,%rcx
  mov    %esi,%eax
  mov    (%rdi),%rdx
  cmp    $0x3ffffff,%esi
  jle    L25
  sar    $0x1e,%esi
  sub    $0x4,%esi
  mov    %sil,(%rdx)
  mov    %eax,%esi
  sar    $0x18,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x1(%rdx)
  mov    %eax,%esi
  sar    $0x12,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x2(%rdx)
  mov    %eax,%esi
  sar    $0xc,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x3(%rdx)
  mov    %eax,%esi
  sar    $0x6,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x4(%rdx)
  lea    0x6(%rdx),%rsi
  and    $0x3f,%eax
  add    $0xffffff80,%eax
  mov    %al,0x5(%rdx)
L89:
  mov    %rsi,(%rcx)
  mov    $0x0,%eax
  ret
L25:
  cmp    $0x1fffff,%esi
  jle    L12
  sar    $0x18,%esi
  sub    $0x8,%esi
  mov    %sil,(%rdx)
  mov    %eax,%esi
  sar    $0x12,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x1(%rdx)
  mov    %eax,%esi
  sar    $0xc,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x2(%rdx)
  mov    %eax,%esi
  sar    $0x6,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x3(%rdx)
  lea    0x5(%rdx),%rsi
  and    $0x3f,%eax
  add    $0xffffff80,%eax
  mov    %al,0x4(%rdx)
  jmp    L89
L12:
  cmp    $0xffff,%esi
  jle    L92
  sar    $0x12,%esi
  sub    $0x10,%esi
  mov    %sil,(%rdx)
  mov    %eax,%esi
  sar    $0xc,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x1(%rdx)
  mov    %eax,%esi
  sar    $0x6,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x2(%rdx)
  lea    0x4(%rdx),%rsi
  and    $0x3f,%eax
  add    $0xffffff80,%eax
  mov    %al,0x3(%rdx)
  jmp    L89
L92:
  cmp    $0x7ff,%esi
  jle    L32
  sar    $0xc,%esi
  sub    $0x20,%esi
  mov    %sil,(%rdx)
  mov    %eax,%esi
  sar    $0x6,%esi
  and    $0x3f,%esi
  add    $0xffffff80,%esi
  mov    %sil,0x1(%rdx)
  lea    0x3(%rdx),%rsi
  and    $0x3f,%eax
  add    $0xffffff80,%eax
  mov    %al,0x2(%rdx)
  jmp    L89
L32:
  cmp    $0x7f,%esi
  jg     L14
  test   %esi,%esi
  je     L14
  lea    0x1(%rdx),%rsi
  mov    %al,(%rdx)
  jmp    L89
L14:
  mov    %eax,%esi
  sar    $0x6,%esi
  sub    $0x40,%esi
  mov    %sil,(%rdx)
  lea    0x2(%rdx),%rsi
  and    $0x3f,%eax
  add    $0xffffff80,%eax
  mov    %al,0x1(%rdx)
  jmp    L89
```

assistant: ```c
int BASM_Parse_EmitChar(char **str, int j) {
  unsigned char *t;
  int i;
  t = (unsigned char *)(*str);
  if (j > 0x3FFFFFF) {
    *t++ = 0xFC + (j >> 30);
    *t++ = 0x80 + ((j >> 24) & 0x3F);
    *t++ = 0x80 + ((j >> 18) & 0x3F);
    *t++ = 0x80 + ((j >> 12) & 0x3F);
    *t++ = 0x80 + ((j >> 6) & 0x3F);
    *t++ = 0x80 + (j & 0x3F);
  } else if (j > 0x1FFFFF) {
    *t++ = 0xF8 + (j >> 24);
    *t++ = 0x80 + ((j >> 18) & 0x3F);
    *t++ = 0x80 + ((j >> 12) & 0x3F);
    *t++ = 0x80 + ((j >> 6) & 0x3F);
    *t++ = 0x80 + (j & 0x3F);
  } else if (j > 0xFFFF) {
    *t++ = 0xF0 + (j >> 18);
    *t++ = 0x80 + ((j >> 12) & 0x3F);
    *t++ = 0x80 + ((j >> 6) & 0x3F);
    *t++ = 0x80 + (j & 0x3F);
  } else if (j > 0x7FF) {
    *t++ = 0xE0 + (j >> 12);
    *t++ = 0x80 + ((j >> 6) & 0x3F);
    *t++ = 0x80 + (j & 0x3F);
  } else if ((j > 0x7F) || !j) {
    *t++ = 0xC0 + (j >> 6);
    *t++ = 0x80 + (j & 0x3F);
  } else {
    if (!j) {
      *t++ = 0xC0;
      *t++ = 0x80;
    } else
      *t++ = j;
  }
  *str = (char *)t;
  return (0);
}
```