user: 请将以下的汇编代码转换成C语言代码：

```asm
<to8bit>:
  endbr64
  push   %r12
  push   %rbp
  sub    $0x8,%rsp
L228:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0x80,%eax
  je     L127
L133:
  movzbl %al,%edi
  cmp    $0x5c,%al
  je     L221
L35:
  call   <putchar@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0x80,%eax
  jne    L133
L127:
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L221:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %eax,%ebp
  cmp    $0x78,%eax
  je     L157
  jg     L0
  cmp    $0x37,%eax
  jg     L122
  cmp    $0x2f,%eax
  jle    L240
  xor    %eax,%eax
  sub    $0x30,%ebp
  call   <getchar@plt>
  lea    -0x30(%rax),%edi
  mov    %eax,%r12d
  cmp    $0x7,%edi
  ja     L93
  shl    $0x3,%ebp
  xor    %eax,%eax
  or     %edi,%ebp
  call   <getchar@plt>
  lea    -0x30(%rax),%edi
  mov    %eax,%r12d
  cmp    $0x7,%edi
  ja     L93
  shl    $0x3,%ebp
  or     %ebp,%edi
  call   <putchar@plt>
  jmp    L228
  nopl   0x0(%rax)
L0:
  cmp    $0x80,%eax
  jne    L240
  add    $0x8,%rsp
  mov    $0x5c,%edi
  pop    %rbp
  pop    %r12
  jmp    1060 <putchar@plt>
L122:
  cmp    $0x58,%eax
  jne    L240
L157:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %eax,%r12d
  lea    -0x30(%rax),%eax
  cmp    $0x9,%eax
  ja     L211
  mov    %eax,%r12d
L138:
  xor    %eax,%eax
  call   <getchar@plt>
  lea    -0x30(%rax),%edi
  mov    %eax,%ebp
  cmp    $0x9,%edi
  ja     L248
  mov    %r12d,%eax
  shl    $0x4,%eax
  or     %eax,%edi
  jmp    L35
  nopl   0x0(%rax,%rax,1)
L240:
  mov    $0x5c,%edi
  call   <putchar@plt>
  mov    %ebp,%edi
  jmp    L35
  nopl   0x0(%rax)
L93:
  mov    %ebp,%edi
  call   <putchar@plt>
  mov    %r12d,%edi
  call   <putchar@plt>
  jmp    L228
  nopl   0x0(%rax)
L211:
  lea    -0x61(%r12),%eax
  cmp    $0x5,%eax
  jbe    L214
  lea    -0x41(%r12),%eax
  cmp    $0x5,%eax
  ja     L5
  sub    $0x37,%r12d
  jmp    L138
  nopw   0x0(%rax,%rax,1)
L248:
  lea    -0x61(%rax),%eax
  cmp    $0x5,%eax
  jbe    L28
  lea    -0x41(%rbp),%eax
  cmp    $0x5,%eax
  ja     L146
  shl    $0x4,%ebp
  lea    -0x37(%rbp),%edi
  jmp    L35
  nopl   0x0(%rax,%rax,1)
L214:
  sub    $0x57,%r12d
  jmp    L138
  nopl   0x0(%rax)
L28:
  shl    $0x4,%ebp
  lea    -0x57(%rbp),%edi
  jmp    L35
L5:
  mov    $0x5c,%edi
  call   <putchar@plt>
  mov    %ebp,%edi
  call   <putchar@plt>
  mov    %r12d,%edi
  call   <putchar@plt>
  jmp    L228
L146:
  mov    %r12d,%edi
  call   <putchar@plt>
  mov    %ebp,%edi
  call   <putchar@plt>
  jmp    L228
```

assistant: ```c
void to8bit() {
  int backch;
  int ch;
  while ((ch = getchar()) != EOF) {
    ch &= 0xFF;
    if (ch != '\\')
      (void)putchar(ch);
    else {
      ch = getchar();
      switch (ch) {
      case EOF:
        (void)putchar('\\');
        return;
      case 'x':
      case 'X':
        backch = ch;
        ch = getchar();
        if (ch >= '0' && ch <= '9')
          backch = ch - '0';
        else if (ch >= 'a' && ch <= 'f')
          backch = ch - 'a' + 0xA;
        else if (ch >= 'A' && ch <= 'F')
          backch = ch - 'A' + 0xA;
        else {
          (void)putchar('\\');
          (void)putchar(backch);
          (void)putchar(ch);
          break;
        }
        ch = getchar();
        if (ch >= '0' && ch <= '9')
          backch = (backch << 4) | (ch - '0');
        else if (ch >= 'a' && ch <= 'f')
          backch = (ch << 4) - 'a' + 0xA;
        else if (ch >= 'A' && ch <= 'F')
          backch = (ch << 4) - 'A' + 0xA;
        else {
          (void)putchar(backch);
          (void)putchar(ch);
          break;
        }
        (void)putchar(backch);
        break;
      case '0':
      case '1':
      case '2':
      case '3':
      case '4':
      case '5':
      case '6':
      case '7':
        backch = ch - '0';
        ch = getchar();
        if (ch >= '0' && ch <= '7')
          backch = (backch << 3) | (ch - '0');
        else {
          (void)putchar(backch);
          (void)putchar(ch);
          break;
        }
        ch = getchar();
        if (ch >= '0' && ch <= '7')
          backch = (backch << 3) | (ch - '0');
        else {
          (void)putchar(backch);
          (void)putchar(ch);
          break;
        }
        (void)putchar(backch);
        break;
        break;
      default:
        (void)putchar('\\');
        (void)putchar(ch);
        break;
      }
    }
  }
}
```