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

```asm
<verify_utf8_sequence>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  movzbl (%rdi),%edi
  call   <num_bytes_in_utf8_sequence@plt>
  mov    %eax,(%rbx)
  cmp    $0x1,%eax
  je     L124
  cmp    $0x2,%eax
  je     L180
  cmp    $0x3,%eax
  je     L153
  cmp    $0x4,%eax
  jne    L43
  movzbl 0x1(%rbp),%ecx
  xor    %r8d,%r8d
  mov    %ecx,%edx
  and    $0xffffffc0,%edx
  cmp    $0x80,%dl
  jne    L134
  movzbl 0x2(%rbp),%esi
  mov    %esi,%edx
  and    $0xffffffc0,%edx
  cmp    $0x80,%dl
  jne    L134
  movzbl 0x3(%rbp),%edx
  mov    %edx,%edi
  and    $0xffffffc0,%edi
  cmp    $0x80,%dil
  jne    L134
  movzbl 0x0(%rbp),%edi
  and    $0x3f,%ecx
  and    $0x3f,%esi
  and    $0x3f,%edx
  and    $0x7,%edi
  shl    $0x6,%edi
  or     %edi,%ecx
  shl    $0x6,%ecx
  or     %ecx,%esi
  shl    $0x6,%esi
  or     %esi,%edx
L191:
  xor    %r8d,%r8d
  cmp    $0x7f,%edx
  jbe    L134
  cmp    $0x7ff,%edx
  jbe    L117
  cmp    $0xffff,%edx
  jbe    L45
  cmp    $0x10ffff,%edx
  jbe    L121
L134:
  add    $0x8,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L180:
  movzbl 0x1(%rbp),%edx
  xor    %r8d,%r8d
  mov    %edx,%eax
  and    $0xffffffc0,%eax
  cmp    $0x80,%al
  jne    L134
  movzbl 0x0(%rbp),%eax
  and    $0x3f,%edx
  and    $0x1f,%eax
  shl    $0x6,%eax
  or     %eax,%edx
  cmp    $0x7f,%edx
  jbe    L134
L121:
  sub    $0xd800,%edx
  xor    %r8d,%r8d
  cmp    $0x7ff,%edx
  seta   %r8b
  add    $0x8,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L124:
  movzbl 0x0(%rbp),%edx
  cmp    $0x7f,%edx
  jbe    L121
L45:
  cmp    $0x4,%eax
  jne    L121
L43:
  xor    %r8d,%r8d
  jmp    L134
  nopl   0x0(%rax,%rax,1)
L153:
  movzbl 0x1(%rbp),%ecx
  xor    %r8d,%r8d
  mov    %ecx,%edx
  and    $0xffffffc0,%edx
  cmp    $0x80,%dl
  jne    L134
  movzbl 0x2(%rbp),%edx
  mov    %edx,%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L134
  movzbl 0x0(%rbp),%esi
  and    $0x3f,%ecx
  and    $0x3f,%edx
  and    $0xf,%esi
  shl    $0x6,%esi
  or     %esi,%ecx
  shl    $0x6,%ecx
  or     %ecx,%edx
  jmp    L191
L117:
  cmp    $0x2,%eax
  jg     L134
  jmp    L45
```

assistant: ```c
int verify_utf8_sequence(const unsigned char *string, int *len) {
  unsigned int cp = 0;
  *len = num_bytes_in_utf8_sequence(string[0]);
  if (*len == 1) {
    cp = string[0];
  } else if (*len == 2 && (((unsigned char)(string[1]) & 0xC0) == 0x80)) {
    cp = string[0] & 0x1F;
    cp = (cp << 6) | (string[1] & 0x3F);
  } else if (*len == 3 && (((unsigned char)(string[1]) & 0xC0) == 0x80) && (((unsigned char)(string[2]) & 0xC0) == 0x80)) {
    cp = ((unsigned char)string[0]) & 0xF;
    cp = (cp << 6) | (string[1] & 0x3F);
    cp = (cp << 6) | (string[2] & 0x3F);
  } else if (*len == 4 && (((unsigned char)(string[1]) & 0xC0) == 0x80) && (((unsigned char)(string[2]) & 0xC0) == 0x80) && (((unsigned char)(string[3]) & 0xC0) == 0x80)) {
    cp = string[0] & 0x7;
    cp = (cp << 6) | (string[1] & 0x3F);
    cp = (cp << 6) | (string[2] & 0x3F);
    cp = (cp << 6) | (string[3] & 0x3F);
  } else {
    return 0;
  }
  if ((cp < 0x80 && *len > 1) || (cp < 0x800 && *len > 2) || (cp < 0x10000 && *len > 3)) {
    return 0;
  }
  if (cp > 0x10FFFF) {
    return 0;
  }
  if (cp >= 0xD800 && cp <= 0xDFFF) {
    return 0;
  }
  return 1;
}
```