user: Translate the below assembly code into C programming language:

```asm
<parse_char_constant>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%r12
  cmpb   $0x5c,(%rdi)
  jne    L107
L228:
  movl   $0x2,(%r12)
  movzbl 0x1(%rbx),%edi
  lea    -0x22(%rdi),%eax
  cmp    $0x56,%al
  ja     L141
  movzbl %al,%eax
  lea    D45(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L107:
  lea    D13(%rip),%rdx
  mov    $0x2b4,%esi
  lea    D54(%rip),%rdi
  call   <Fail@plt>
  jmp    L228
  mov    $0x9,%ebp
  jmp    L238
  mov    $0xb,%ebp
L238:
  mov    %ebp,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  mov    $0x8,%ebp
  jmp    L238
  mov    $0xd,%ebp
  jmp    L238
  mov    $0xc,%ebp
  jmp    L238
  mov    $0x7,%ebp
  jmp    L238
  mov    $0x5c,%ebp
  jmp    L238
  mov    $0x3f,%ebp
  jmp    L238
  mov    $0x27,%ebp
  jmp    L238
  mov    $0x22,%ebp
  jmp    L238
L46:
  shl    $0x4,%ebp
  add    %eax,%ebp
L198:
  mov    %r13d,%r14d
  movsbl (%rbx,%r13,1),%edi
  call   <hex_digit@plt>
  add    $0x1,%r13
  test   %eax,%eax
  jns    L46
  mov    %r14d,(%r12)
  cmp    $0x2,%r14d
  je     L236
  cmp    $0x100,%ebp
  jle    L238
  lea    D66(%rip),%rdi
  mov    $0x0,%eax
  call   <SyntaxError@plt>
  mov    $0xffffffff,%ebp
  jmp    L238
  mov    $0x2,%r13d
  mov    $0x0,%ebp
  jmp    L198
L236:
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <SyntaxError@plt>
  mov    $0xffffffff,%ebp
  jmp    L238
L141:
  movsbl %dil,%edi
  call   <octal_digit@plt>
  test   %eax,%eax
  js     L67
  mov    $0x1,%r13d
  mov    $0x0,%ebp
L151:
  mov    %r13d,%r14d
  movsbl (%rbx,%r13,1),%edi
  call   <octal_digit@plt>
  cmp    $0x3,%r13d
  setle  %cl
  mov    %eax,%edx
  not    %edx
  shr    $0x1f,%edx
  add    $0x1,%r13
  test   %dl,%cl
  je     L250
  lea    (%rax,%rbp,8),%ebp
  jmp    L151
L250:
  cmp    $0x100,%ebp
  jg     L125
  mov    %r14d,(%r12)
  jmp    L238
L125:
  lea    D44(%rip),%rdi
  mov    $0x0,%eax
  call   <SyntaxError@plt>
  mov    $0xffffffff,%ebp
  jmp    L238
L67:
  movsbl 0x1(%rbx),%esi
  lea    D34(%rip),%rdi
  mov    $0x0,%eax
  call   <SyntaxError@plt>
  mov    $0xffffffff,%ebp
  jmp    L238
  mov    $0xa,%ebp
  jmp    L238
```

tool_calls: name: disassemble_data
arguments: data_tag: D13
datatype: string
name: disassemble_data
arguments: data_tag: D54
datatype: string
name: disassemble_data
arguments: data_tag: D66
datatype: string
name: disassemble_data
arguments: data_tag: D43
datatype: string
name: disassemble_data
arguments: data_tag: D44
datatype: string
name: disassemble_data
arguments: data_tag: D34
datatype: string

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

tool: D54: c4.l

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

tool: D43: expecting hex digits after \x

tool: D44: explicit octal character out of range

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

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);
    }
  }
}
```