user: 这段汇编代码用C语言表示是什么样的:

```asm
<toml_ucs_to_utf8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  cmpl   $0xd7ff,-0x4(%rbp)
  jle    L89
  cmpl   $0xdfff,-0x4(%rbp)
  jg     L89
  mov    $0xffffffff,%eax
  jmp    L4
L89:
  cmpl   $0xfffd,-0x4(%rbp)
  jle    L137
  cmpl   $0xffff,-0x4(%rbp)
  jg     L137
  mov    $0xffffffff,%eax
  jmp    L4
L137:
  cmpl   $0x0,-0x4(%rbp)
  jns    L122
  mov    $0xffffffff,%eax
  jmp    L4
L122:
  cmpl   $0x7f,-0x4(%rbp)
  jg     L72
  mov    -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  mov    $0x1,%eax
  jmp    L4
L72:
  cmpl   $0x7ff,-0x4(%rbp)
  jg     L10
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  or     $0xffffffc0,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    $0x2,%eax
  jmp    L4
L10:
  cmpl   $0xffff,-0x4(%rbp)
  jg     L70
  mov    -0x4(%rbp),%eax
  sar    $0xc,%eax
  or     $0xffffffe0,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x2,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    $0x3,%eax
  jmp    L4
L70:
  cmpl   $0x1fffff,-0x4(%rbp)
  jg     L142
  mov    -0x4(%rbp),%eax
  sar    $0x12,%eax
  or     $0xfffffff0,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0xc,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x2,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x3,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    $0x4,%eax
  jmp    L4
L142:
  cmpl   $0x3ffffff,-0x4(%rbp)
  jg     L28
  mov    -0x4(%rbp),%eax
  sar    $0x18,%eax
  or     $0xfffffff8,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x12,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0xc,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x2,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x3,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x4,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    $0x5,%eax
  jmp    L4
L28:
  mov    -0x4(%rbp),%eax
  sar    $0x1e,%eax
  or     $0xfffffffc,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x18,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x12,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x2,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0xc,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x3,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x4,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x5,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    $0x6,%eax
L4:
  pop    %rbp
  ret
```

assistant: ```c
int toml_ucs_to_utf8(int64_t code, char buf[6]) {
  if (0xd800 <= code && code <= 0xdfff)
    return -1;
  if (0xfffe <= code && code <= 0xffff)
    return -1;
  if (code < 0)
    return -1;
  if (code <= 0x7F) {
    buf[0] = (unsigned char)code;
    return 1;
  }
  if (code <= 0x000007FF) {
    buf[0] = 0xc0 | (code >> 6);
    buf[1] = 0x80 | (code & 0x3f);
    return 2;
  }
  if (code <= 0x0000FFFF) {
    buf[0] = 0xe0 | (code >> 12);
    buf[1] = 0x80 | ((code >> 6) & 0x3f);
    buf[2] = 0x80 | (code & 0x3f);
    return 3;
  }
  if (code <= 0x001FFFFF) {
    buf[0] = 0xf0 | (code >> 18);
    buf[1] = 0x80 | ((code >> 12) & 0x3f);
    buf[2] = 0x80 | ((code >> 6) & 0x3f);
    buf[3] = 0x80 | (code & 0x3f);
    return 4;
  }
  if (code <= 0x03FFFFFF) {
    buf[0] = 0xf8 | (code >> 24);
    buf[1] = 0x80 | ((code >> 18) & 0x3f);
    buf[2] = 0x80 | ((code >> 12) & 0x3f);
    buf[3] = 0x80 | ((code >> 6) & 0x3f);
    buf[4] = 0x80 | (code & 0x3f);
    return 5;
  }
  if (code <= 0x7FFFFFFF) {
    buf[0] = 0xfc | (code >> 30);
    buf[1] = 0x80 | ((code >> 24) & 0x3f);
    buf[2] = 0x80 | ((code >> 18) & 0x3f);
    buf[3] = 0x80 | ((code >> 12) & 0x3f);
    buf[4] = 0x80 | ((code >> 6) & 0x3f);
    buf[5] = 0x80 | (code & 0x3f);
    return 6;
  }
  return -1;
}
```