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

```asm
<utf8Comp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  jmp    L120
L61:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L157
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L90
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  shl    $0xc,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  and    $0xfc0,%ax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  and    $0x3f,%eax
  add    %edx,%eax
  mov    %ax,-0x1c(%rbp)
  jmp    L132
L90:
  mov    -0x18(%rbp),%eax
  shl    $0x6,%eax
  and    $0x7c0,%ax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  and    $0x3f,%eax
  or     %edx,%eax
  mov    %ax,-0x1c(%rbp)
  jmp    L132
L157:
  mov    -0x18(%rbp),%eax
  mov    %ax,-0x1c(%rbp)
L132:
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L74
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L41
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  shl    $0xc,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0x6,%eax
  and    $0xfc0,%ax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  and    $0x3f,%eax
  add    %edx,%eax
  mov    %ax,-0x1a(%rbp)
  jmp    L76
L41:
  mov    -0xc(%rbp),%eax
  shl    $0x6,%eax
  and    $0x7c0,%ax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  and    $0x3f,%eax
  or     %edx,%eax
  mov    %ax,-0x1a(%rbp)
  jmp    L76
L74:
  mov    -0xc(%rbp),%eax
  mov    %ax,-0x1a(%rbp)
L76:
  movzwl -0x1c(%rbp),%eax
  cmp    -0x1a(%rbp),%ax
  je     L120
  mov    $0x0,%eax
  jmp    L21
L120:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L75
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L61
L75:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L87
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L135
L87:
  mov    $0x0,%eax
  jmp    L21
L135:
  mov    $0x1,%eax
L21:
  pop    %rbp
  ret
```

assistant: ```c
int utf8Comp(unsigned char *ptr, unsigned char *ptr2) {
  while (*ptr && *ptr2) {
    short c, c2;
    {
      int x = *ptr++;
      if (x & 0x80) {
        int y = *ptr++;
        if (x & 0x20) {
          int z = *ptr++;
          c = ((x & 0xf) << 12) + ((y & 0x3f) << 6) + (z & 0x3f);
        } else
          c = ((x & 0x1f) << 6) + (y & 0x3f);
      } else
        c = x;
    };
    {
      int x = *ptr2++;
      if (x & 0x80) {
        int y = *ptr2++;
        if (x & 0x20) {
          int z = *ptr2++;
          c2 = ((x & 0xf) << 12) + ((y & 0x3f) << 6) + (z & 0x3f);
        } else
          c2 = ((x & 0x1f) << 6) + (y & 0x3f);
      } else
        c2 = x;
    };
    if (c != c2)
      return 0;
  }
  if (*ptr || *ptr2)
    return 0;
  return 1;
}
```