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

```asm
<parse_char_constant>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  cmpb   $0x5c,(%rdi)
  mov    %rdi,%rbx
  je     L6
  lea    D64(%rip),%rdx
  mov    $0x2b4,%esi
  lea    D17(%rip),%rdi
  call   <Fail@plt>
L6:
  movl   $0x2,0x0(%rbp)
  movsbl 0x1(%rbx),%edi
  lea    -0x22(%rdi),%eax
  cmp    $0x56,%al
  ja     L140
  lea    D40(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   (%rax)
L140:
  call   <octal_digit@plt>
  test   %eax,%eax
  js     L79
  mov    $0x1,%r13d
  xor    %r12d,%r12d
L259:
  movsbl (%rbx,%r13,1),%edi
  mov    %r13d,%r14d
  call   <octal_digit@plt>
  test   %eax,%eax
  js     L146
  add    $0x1,%r13
  cmp    $0x5,%r13
  je     L108
  lea    (%rax,%r12,8),%r12d
  jmp    L259
  nopw   0x0(%rax,%rax,1)
  mov    $0x22,%r12d
L164:
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
  mov    $0x27,%r12d
  jmp    L164
  mov    $0x3f,%r12d
  jmp    L164
  nopl   0x0(%rax,%rax,1)
  mov    $0x5c,%r12d
  jmp    L164
  nopl   0x0(%rax,%rax,1)
  mov    $0x7,%r12d
  jmp    L164
  nopl   0x0(%rax,%rax,1)
  mov    $0x8,%r12d
  jmp    L164
  nopl   0x0(%rax,%rax,1)
  mov    $0xc,%r12d
  jmp    L164
  nopl   0x0(%rax,%rax,1)
  mov    $0xd,%r12d
  jmp    L164
  nopl   0x0(%rax,%rax,1)
  mov    $0xb,%r12d
  jmp    L164
  nopl   0x0(%rax,%rax,1)
L108:
  mov    $0x4,%r14d
L146:
  cmp    $0x100,%r12d
  jg     L55
  mov    %r14d,0x0(%rbp)
  jmp    L164
  nopl   0x0(%rax)
  mov    $0xa,%r12d
  jmp    L164
  nopl   0x0(%rax,%rax,1)
  mov    $0x2,%r14d
  xor    %r12d,%r12d
  jmp    L238
  nopl   0x0(%rax,%rax,1)
L239:
  shl    $0x4,%r12d
  add    %eax,%r12d
L238:
  movsbl (%rbx,%r14,1),%edi
  mov    %r14d,%r13d
  add    $0x1,%r14
  call   <hex_digit@plt>
  test   %eax,%eax
  jns    L239
  mov    %r13d,0x0(%rbp)
  cmp    $0x2,%r13d
  je     L48
  cmp    $0x100,%r12d
  jle    L164
  lea    D11(%rip),%rdi
  xor    %eax,%eax
  or     $0xffffffff,%r12d
  call   <SyntaxError@plt>
  jmp    L164
  nopw   0x0(%rax,%rax,1)
  mov    $0x9,%r12d
  jmp    L164
L55:
  lea    D52(%rip),%rdi
  xor    %eax,%eax
  or     $0xffffffff,%r12d
  call   <SyntaxError@plt>
  jmp    L164
L79:
  movsbl 0x1(%rbx),%esi
  lea    D22(%rip),%rdi
  xor    %eax,%eax
  or     $0xffffffff,%r12d
  call   <SyntaxError@plt>
  jmp    L164
L48:
  lea    D36(%rip),%rdi
  xor    %eax,%eax
  or     $0xffffffff,%r12d
  call   <SyntaxError@plt>
  jmp    L164
```

tool_calls: name: unpack_data
arguments: data_tag: D64
type_guessed: string
name: unpack_data
arguments: data_tag: D17
type_guessed: string
name: unpack_data
arguments: data_tag: D11
type_guessed: string
name: unpack_data
arguments: data_tag: D52
type_guessed: string
name: unpack_data
arguments: data_tag: D22
type_guessed: string
name: unpack_data
arguments: data_tag: D36
type_guessed: string

tool: D64: s[0] == '\\'

tool: D17: c4.l

tool: D11: explicit hex character (\x) out of range

tool: D52: explicit octal character out of range

tool: D22: unknown special character "\%c"

tool: D36: expecting hex digits after \x

assistant: ```c
int parse_char_constant(const char *s, int *actual_read) {
  ((s[0] == '\\') ? (void)0 : (void)Fail("c4.l", 692, "s[0] == '\\\\'"));
  *actual_read = 2;
  switch (s[1]) {
  case 'n':
    return '\n';
  case 't':
    return '\t';
  case 'v':
    return '\v';
  case 'b':
    return '\b';
  case 'r':
    return '\r';
  case 'f':
    return '\f';
  case 'a':
    return '\a';
  case '\\':
    return '\\';
  case '?':
    return '\?';
  case '\'':
    return '\'';
  case '\"':
    return '\"';
  case 'x': {
    int val = 0, tmp, i;
    for (i = 2; (tmp = hex_digit(s[i])) >= 0; i++) {
      val = 16 * val + tmp;
    }
    *actual_read = i;
    if (i == 2) {
      SyntaxError("expecting hex digits after \\x");
      return (-1);
    }
    if (val > 256) {
      SyntaxError("explicit hex character (\\x) out of range");
      return (-1);
    }
    return (val);
  }
  default:
    if (octal_digit(s[1]) >= 0) {
      int val = 0, tmp, i;
      for (i = 1; (tmp = octal_digit(s[i])) >= 0 && i < 4; i++) {
        val = 8 * val + tmp;
      }
      if (val > 256) {
        SyntaxError("explicit octal character out of range");
        return (-1);
      }
      *actual_read = i;
      return (val);
    } else {
      SyntaxError("unknown special character \"\\%c\"", s[1]);
      return (-1);
    }
  }
}
```