user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<IsUTF8Text>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L146
L26:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  js     L392
  movl   $0x1,-0x4(%rbp)
  jmp    L18
L392:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xe0,%eax
  cmp    $0xc0,%eax
  jne    L297
  movl   $0x2,-0x4(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L82
  mov    $0x0,%eax
  jmp    L367
L82:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x1e,%eax
  test   %eax,%eax
  jne    L18
  mov    $0x0,%eax
  jmp    L367
L297:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xf0,%eax
  cmp    $0xe0,%eax
  jne    L199
  movl   $0x3,-0x4(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L76
  mov    $0x0,%eax
  jmp    L367
L76:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xed,%al
  jne    L190
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xa0,%eax
  cmp    $0xa0,%eax
  jne    L190
  mov    $0x0,%eax
  jmp    L367
L190:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xf,%eax
  test   %eax,%eax
  jne    L18
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x20,%eax
  test   %eax,%eax
  jne    L18
  mov    $0x0,%eax
  jmp    L367
L199:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xf8,%eax
  cmp    $0xf0,%eax
  jne    L108
  movl   $0x4,-0x4(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L201
  mov    $0x0,%eax
  jmp    L367
L201:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x7,%eax
  test   %eax,%eax
  jne    L18
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x30,%eax
  test   %eax,%eax
  jne    L18
  mov    $0x0,%eax
  jmp    L367
L108:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xfc,%eax
  cmp    $0xf8,%eax
  jne    L325
  movl   $0x5,-0x4(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L144
  mov    $0x0,%eax
  jmp    L367
L144:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L18
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x38,%eax
  test   %eax,%eax
  jne    L18
  mov    $0x0,%eax
  jmp    L367
L325:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xfe,%eax
  cmp    $0xfc,%eax
  jne    L129
  movl   $0x6,-0x4(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L78
  mov    $0x0,%eax
  jmp    L367
L78:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L18
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3e,%eax
  test   %eax,%eax
  jne    L18
  mov    $0x0,%eax
  jmp    L367
L129:
  mov    $0x0,%eax
  jmp    L367
L18:
  movl   $0x1,-0x8(%rbp)
  jmp    L183
L1:
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xc0,%eax
  cmp    $0x80,%eax
  je     L84
  mov    $0x0,%eax
  jmp    L367
L84:
  addl   $0x1,-0x8(%rbp)
L183:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L1
  mov    -0x4(%rbp),%eax
  add    %eax,-0xc(%rbp)
L146:
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L26
  mov    $0x1,%eax
L367:
  pop    %rbp
  ret
```

assistant: ```c
int IsUTF8Text(const unsigned char *utf8, int len) {
  int i;
  int j;
  int clen;
  for (i = 0; i < len; i += clen) {
    if ((0 == ((utf8[i]) & 0x80))) {
      clen = 1;
    } else if ((0xC0 == ((utf8[i]) & 0xE0))) {
      clen = 2;
      if ((i + clen) > len)
        return 0;
      if (0 == (utf8[i] & 0x1E))
        return 0;
    } else if ((0xE0 == ((utf8[i]) & 0xF0))) {
      clen = 3;
      if ((i + clen) > len)
        return 0;
      if ((0xED == utf8[i]) && (0xA0 == (utf8[i + 1] & 0xA0)))
        return 0;
      if ((0 == (utf8[i] & 0x0F)) && (0 == (utf8[i + 1] & 0x20)))
        return 0;
    } else if ((0xF0 == ((utf8[i]) & 0xF8))) {
      clen = 4;
      if ((i + clen) > len)
        return 0;
      if ((0 == (utf8[i] & 0x07)) && (0 == (utf8[i + 1] & 0x30)))
        return 0;
    } else if ((0xF8 == ((utf8[i]) & 0xFC))) {
      clen = 5;
      if ((i + clen) > len)
        return 0;
      if ((0 == (utf8[i] & 0x03)) && (0 == (utf8[i + 1] & 0x38)))
        return 0;
    } else if ((0xFC == ((utf8[i]) & 0xFE))) {
      clen = 6;
      if ((i + clen) > len)
        return 0;
      if ((0 == (utf8[i] & 0x01)) && (0 == (utf8[i + 1] & 0x3E)))
        return 0;
    } else {
      return 0;
    }
    for (j = 1; j < clen; j++) {
      if (!(0x80 == ((utf8[i + j]) & 0xC0)))
        return 0;
    }
  }
  return 1;
}
```