user: Please show me the C implementation that matches the assembly code listed below:

```asm
<myesc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  sub    $0x30,%eax
  cmp    $0x48,%eax
  ja     L56
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D11(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D11(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x8,%eax
  jmp    L23
  mov    $0xc,%eax
  jmp    L23
  mov    $0xa,%eax
  jmp    L23
  mov    $0xd,%eax
  jmp    L23
  mov    $0x9,%eax
  jmp    L23
  mov    $0x7,%eax
  jmp    L23
  mov    $0xb,%eax
  jmp    L23
  movl   $0x1,-0x8(%rbp)
  jmp    L61
L40:
  addl   $0x1,-0x8(%rbp)
L61:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  jne    L40
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <otoi@plt>
  mov    %al,-0x9(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
  movzbl -0x9(%rbp),%eax
  jmp    L23
  movl   $0x2,-0x4(%rbp)
  jmp    L73
L52:
  addl   $0x1,-0x4(%rbp)
L73:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isxdigit@plt>
  test   %eax,%eax
  jne    L52
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  mov    %rax,%rdi
  call   <htoi@plt>
  mov    %al,-0x9(%rbp)
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
  movzbl -0x9(%rbp),%eax
  jmp    L23
L56:
  mov    -0x18(%rbp),%rax
  movzbl 0x1(%rax),%eax
L23:
  leave
  ret
```

assistant: ```c
unsigned char myesc(unsigned char *array) {
  unsigned char c, esc_char;
  switch (array[1]) {
  case 'b':
    return '\b';
  case 'f':
    return '\f';
  case 'n':
    return '\n';
  case 'r':
    return '\r';
  case 't':
    return '\t';
  case 'a':
    return '\a';
  case 'v':
    return '\v';
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7': {
    int sptr = 1;
    while (isdigit((unsigned char)array[sptr])) {
      ++sptr;
    }
    c = array[sptr];
    array[sptr] = '\0';
    esc_char = (unsigned char)otoi(array + 1);
    array[sptr] = c;
    return esc_char;
  }
  case 'x': {
    int sptr = 2;
    while (isxdigit((unsigned char)array[sptr])) {
      ++sptr;
    }
    c = array[sptr];
    array[sptr] = '\0';
    esc_char = (unsigned char)htoi(array + 2);
    array[sptr] = c;
    return esc_char;
  }
  default:
    return array[1];
  }
}
```