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

```asm
<is_utf_8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
L393:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  je     L265
  cmpl   $0x7e,-0x4(%rbp)
  jg     L360
  cmpl   $0x1f,-0x4(%rbp)
  jle    L30
  jmp    L393
L30:
  cmpl   $0x8,-0x4(%rbp)
  jle    L309
  cmpl   $0xd,-0x4(%rbp)
  jg     L309
  jmp    L393
L360:
  mov    -0x4(%rbp),%eax
  sar    $0x5,%eax
  cmp    $0x6,%eax
  je     L15
  mov    -0x4(%rbp),%eax
  sar    $0x4,%eax
  cmp    $0xe,%eax
  je     L278
  mov    -0x4(%rbp),%eax
  sar    $0x3,%eax
  cmp    $0x1e,%eax
  jne    L216
  cmpl   $0xf3,-0x4(%rbp)
  jle    L238
  cmpl   $0xf4,-0x4(%rbp)
  jne    L216
  jmp    L21
L15:
  nop
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  je     L39
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  cmp    $0x2,%eax
  jne    L324
  jmp    L393
L278:
  nop
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  je     L199
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  cmp    $0x2,%eax
  jne    L286
  nop
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  je     L423
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  cmp    $0x2,%eax
  jne    L11
  jmp    L393
L238:
  nop
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  je     L425
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  cmp    $0x2,%eax
  jne    L211
  jmp    L308
L21:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  je     L401
  cmpl   $0x8f,-0x4(%rbp)
  jg     L76
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  cmp    $0x2,%eax
  jne    L280
  nop
L308:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  je     L160
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  cmp    $0x2,%eax
  jne    L371
  nop
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  je     L43
  mov    -0x4(%rbp),%eax
  sar    $0x6,%eax
  cmp    $0x2,%eax
  jne    L242
  jmp    L393
L309:
  nop
  jmp    L166
L216:
  nop
  jmp    L166
L39:
  nop
  jmp    L166
L324:
  nop
  jmp    L166
L199:
  nop
  jmp    L166
L286:
  nop
  jmp    L166
L423:
  nop
  jmp    L166
L11:
  nop
  jmp    L166
L425:
  nop
  jmp    L166
L211:
  nop
  jmp    L166
L401:
  nop
  jmp    L166
L76:
  nop
  jmp    L166
L280:
  nop
  jmp    L166
L160:
  nop
  jmp    L166
L371:
  nop
  jmp    L166
L43:
  nop
  jmp    L166
L242:
  nop
L166:
  mov    $0x0,%eax
  jmp    L343
L265:
  nop
  mov    $0x1,%eax
L343:
  leave
  ret
```

assistant: ```c
int is_utf_8(FILE *fp) {
  int byte;
utf8_null:
  byte = fgetc(fp);
  if (byte == EOF)
    goto utf8_finished;
  if (byte < 0x7F) {
    if (byte >= 0x20)
      goto utf8_null;
    if (byte >= 0x09 && byte <= 0x0D)
      goto utf8_null;
    goto utf8_error;
  }
  if (byte >> 5 == 0x06)
    goto utf8_2b_1;
  if (byte >> 4 == 0x0E)
    goto utf8_3b_1;
  if (byte >> 3 == 0x1E) {
    if (byte < 0xF4)
      goto utf8_4b_1;
    if (byte == 0xF4)
      goto utf8_4b_1_max;
  }
  goto utf8_error;
utf8_2b_1:
  byte = fgetc(fp);
  if (byte == EOF)
    goto utf8_error;
  if (byte >> 6 == 0x02)
    goto utf8_null;
  goto utf8_error;
utf8_3b_1:
  byte = fgetc(fp);
  if (byte == EOF)
    goto utf8_error;
  if (byte >> 6 == 0x02)
    goto utf8_3b_2;
  goto utf8_error;
utf8_3b_2:
  byte = fgetc(fp);
  if (byte == EOF)
    goto utf8_error;
  if (byte >> 6 == 0x02)
    goto utf8_null;
  goto utf8_error;
utf8_4b_1:
  byte = fgetc(fp);
  if (byte == EOF)
    goto utf8_error;
  if (byte >> 6 == 0x02)
    goto utf8_4b_2;
  goto utf8_error;
utf8_4b_1_max:
  byte = fgetc(fp);
  if (byte == EOF)
    goto utf8_error;
  if (byte >= 0x90)
    goto utf8_error;
  if (byte >> 6 == 0x02)
    goto utf8_4b_2;
  goto utf8_error;
utf8_4b_2:
  byte = fgetc(fp);
  if (byte == EOF)
    goto utf8_error;
  if (byte >> 6 == 0x02)
    goto utf8_4b_3;
  goto utf8_error;
utf8_4b_3:
  byte = fgetc(fp);
  if (byte == EOF)
    goto utf8_error;
  if (byte >> 6 == 0x02)
    goto utf8_null;
  goto utf8_error;
utf8_error:
  return 0;
utf8_finished:
  return 1;
}
```