user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<conv_to_utf8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movl   $0x0,-0x4(%rbp)
  cmpl   $0x7f,-0x1c(%rbp)
  ja     L167
  movl   $0x1,-0x4(%rbp)
  jmp    L109
L167:
  cmpl   $0x7ff,-0x1c(%rbp)
  ja     L3
  movl   $0x2,-0x4(%rbp)
  jmp    L109
L3:
  cmpl   $0xffff,-0x1c(%rbp)
  ja     L141
  movl   $0x3,-0x4(%rbp)
  jmp    L109
L141:
  cmpl   $0x1fffff,-0x1c(%rbp)
  ja     L67
  movl   $0x4,-0x4(%rbp)
  jmp    L109
L67:
  cmpl   $0x3ffffff,-0x1c(%rbp)
  ja     L27
  movl   $0x5,-0x4(%rbp)
  jmp    L109
L27:
  movl   $0x6,-0x4(%rbp)
L109:
  mov    -0x4(%rbp),%eax
  cmp    %eax,-0x20(%rbp)
  jae    L107
  movl   $0x0,-0x4(%rbp)
L107:
  cmpq   $0x0,-0x18(%rbp)
  je     L164
  cmpl   $0x6,-0x4(%rbp)
  ja     L164
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D2(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D2(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L164
  mov    -0x1c(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x6,%al
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  movzbl %al,%eax
  shl    $0x2,%eax
  and    $0x1c,%eax
  or     %edx,%eax
  or     $0xffffffc0,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L164
  mov    -0x1c(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x6,%al
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  movzbl %al,%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  shr    $0x4,%al
  or     $0xffffffe0,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L164
  mov    -0x1c(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x6,%al
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  movzbl %al,%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  shr    $0x4,%al
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  shl    $0x4,%eax
  and    $0x30,%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    $0x2,%eax
  and    $0x7,%eax
  or     $0xfffffff0,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L164
  mov    -0x1c(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x6,%al
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  movzbl %al,%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  shr    $0x4,%al
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  shl    $0x4,%eax
  and    $0x30,%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x10,%eax
  shr    $0x2,%al
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x18,%eax
  and    $0x3,%eax
  or     $0xfffffff8,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L164
  mov    -0x1c(%rbp),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x5,%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x6,%al
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  movzbl %al,%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x8,%eax
  shr    $0x4,%al
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  shl    $0x4,%eax
  and    $0x30,%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x10,%eax
  shr    $0x2,%al
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  or     $0xffffff80,%edx
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x18,%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  shr    $0x18,%eax
  movzbl %al,%eax
  sar    $0x6,%eax
  and    $0x1,%eax
  or     $0xfffffffc,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  nop
L164:
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int conv_to_utf8(unsigned char *target, unsigned source, unsigned limit) {
  int rc = 0;
  if (source <= 0x0000007f)
    rc = 1;
  else if (source <= 0x000007ff)
    rc = 2;
  else if (source <= 0x0000ffff)
    rc = 3;
  else if (source <= 0x001fffff)
    rc = 4;
  else if (source <= 0x03ffffff)
    rc = 5;
  else
    rc = 6;
  if ((unsigned)rc > limit) {
    rc = 0;
  }
  if (target != 0) {
    switch (rc) {
    case 1:
      target[0] = ((unsigned char)((source) >> ((0) * 8)));
      break;
    case 2:
      target[1] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) & 0x3f)));
      target[0] = ((unsigned char)(0xc0 | (((unsigned char)((source) >> ((0) * 8))) >> 6) | ((((unsigned char)((source) >> ((1) * 8))) & 0x07) << 2)));
      break;
    case 3:
      target[2] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) & 0x3f)));
      target[1] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) >> 6) | ((((unsigned char)((source) >> ((1) * 8))) & 0x0f) << 2)));
      target[0] = ((unsigned char)(0xe0 | ((int)(((unsigned char)((source) >> ((1) * 8))) & 0xf0) >> 4)));
      break;
    case 4:
      target[3] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) & 0x3f)));
      target[2] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) >> 6) | ((((unsigned char)((source) >> ((1) * 8))) & 0x0f) << 2)));
      target[1] = ((unsigned char)(0x80 | ((int)(((unsigned char)((source) >> ((1) * 8))) & 0xf0) >> 4) | ((int)(((unsigned char)((source) >> ((2) * 8))) & 0x03) << 4)));
      target[0] = ((unsigned char)(0xf0 | ((int)(((unsigned char)((source) >> ((2) * 8))) & 0x1f) >> 2)));
      break;
    case 5:
      target[4] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) & 0x3f)));
      target[3] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) >> 6) | ((((unsigned char)((source) >> ((1) * 8))) & 0x0f) << 2)));
      target[2] = ((unsigned char)(0x80 | ((int)(((unsigned char)((source) >> ((1) * 8))) & 0xf0) >> 4) | ((int)(((unsigned char)((source) >> ((2) * 8))) & 0x03) << 4)));
      target[1] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((2) * 8))) >> 2)));
      target[0] = ((unsigned char)(0xf8 | (((unsigned char)((source) >> ((3) * 8))) & 0x03)));
      break;
    case 6:
      target[5] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) & 0x3f)));
      target[4] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((0) * 8))) >> 6) | ((((unsigned char)((source) >> ((1) * 8))) & 0x0f) << 2)));
      target[3] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((1) * 8))) >> 4) | ((((unsigned char)((source) >> ((2) * 8))) & 0x03) << 4)));
      target[2] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((2) * 8))) >> 2)));
      target[1] = ((unsigned char)(0x80 | (((unsigned char)((source) >> ((3) * 8))) & 0x3f)));
      target[0] = ((unsigned char)(0xfc | ((int)(((unsigned char)((source) >> ((3) * 8))) & 0x40) >> 6)));
      break;
    }
  }
  return rc;
}
```