user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<next_utf8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %ecx,(%rdx)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%ebx
  mov    %ebx,%eax
  and    $0x80,%eax
  test   %eax,%eax
  jne    L80
  mov    %ebx,%eax
  jmp    L121
L80:
  mov    %ebx,%eax
  and    $0xe0,%eax
  cmp    $0xc0,%eax
  jne    L44
  and    $0x3f,%ebx
  shl    $0x6,%ebx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %ecx,(%rdx)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%r12d
  mov    %r12d,%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L136
  mov    %r12d,%eax
  and    $0x3f,%eax
  or     %eax,%ebx
  mov    %ebx,%eax
  jmp    L121
L44:
  mov    %ebx,%eax
  and    $0xf0,%eax
  cmp    $0xe0,%eax
  jne    L125
  and    $0x1f,%ebx
  shl    $0x6,%ebx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %ecx,(%rdx)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%r12d
  mov    %r12d,%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L146
  mov    %r12d,%eax
  and    $0x3f,%eax
  or     %eax,%ebx
  shl    $0x6,%ebx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %ecx,(%rdx)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%r12d
  mov    %r12d,%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L152
  mov    %r12d,%eax
  and    $0x3f,%eax
  or     %eax,%ebx
  mov    %ebx,%eax
  jmp    L121
L125:
  mov    %ebx,%eax
  and    $0xf8,%eax
  cmp    $0xf0,%eax
  jne    L62
  and    $0xf,%ebx
  shl    $0x6,%ebx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %ecx,(%rdx)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%r12d
  mov    %r12d,%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L24
  mov    %r12d,%eax
  and    $0x3f,%eax
  or     %eax,%ebx
  shl    $0x6,%ebx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %ecx,(%rdx)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%r12d
  mov    %r12d,%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L23
  mov    %r12d,%eax
  and    $0x3f,%eax
  or     %eax,%ebx
  shl    $0x6,%ebx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %ecx,(%rdx)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%r12d
  mov    %r12d,%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L77
  mov    %r12d,%eax
  and    $0x3f,%eax
  or     %eax,%ebx
  mov    %ebx,%eax
  jmp    L121
L136:
  nop
  jmp    L70
L146:
  nop
  jmp    L70
L152:
  nop
  jmp    L70
L62:
  nop
  jmp    L70
L24:
  nop
  jmp    L70
L23:
  nop
  jmp    L70
L77:
  nop
L70:
  mov    $0xfffd,%eax
L121:
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
unsigned int next_utf8(const char *text, int *pos) {
  register unsigned int c, d;
  c = text[(*pos)++];
  if ((c & 0x80) == 0)
    return c;
  if ((c & 0xE0) == 0xC0) {
    c &= 0x3F;
    c <<= 6;
    d = text[(*pos)++];
    if ((d & 0x80) == 0)
      goto utf8_error;
    c |= (d & 0x3F);
    return c;
  }
  if ((c & 0xF0) == 0xE0) {
    c &= 0x1F;
    c <<= 6;
    d = text[(*pos)++];
    if ((d & 0x80) == 0)
      goto utf8_error;
    c |= (d & 0x3F);
    c <<= 6;
    d = text[(*pos)++];
    if ((d & 0x80) == 0)
      goto utf8_error;
    c |= (d & 0x3F);
    return c;
  }
  if ((c & 0xF8) == 0xF0) {
    c &= 0x0F;
    c <<= 6;
    d = text[(*pos)++];
    if ((d & 0x80) == 0)
      goto utf8_error;
    c |= (d & 0x3F);
    c <<= 6;
    d = text[(*pos)++];
    if ((d & 0x80) == 0)
      goto utf8_error;
    c |= (d & 0x3F);
    c <<= 6;
    d = text[(*pos)++];
    if ((d & 0x80) == 0)
      goto utf8_error;
    c |= (d & 0x3F);
    return c;
  }
utf8_error:
  return 0xFFFD;
}
```