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

```asm
<json_str_read_char>:
  endbr64
  mov    (%rdi),%rdx
  movzbl (%rdx),%eax
  test   %al,%al
  je     L85
  cmp    $0x5c,%al
  jne    L142
  lea    0x2(%rdx),%rax
  mov    %rax,(%rdi)
  movsbl 0x1(%rdx),%eax
  test   %al,%al
  je     L85
  lea    -0x62(%rax),%ecx
  cmp    $0x13,%cl
  ja     L54
  lea    D7(%rip),%rsi
  movzbl %cl,%ecx
  movslq (%rsi,%rcx,4),%rcx
  add    %rsi,%rcx
  notrack jmp *%rcx
L1:
  mov    $0xfffffffe,%eax
L54:
  ret
  nopl   0x0(%rax,%rax,1)
L142:
  jmp    1050 <utf8_get@plt>
  nopl   (%rax)
  movzbl 0x2(%rdx),%ecx
  lea    -0x30(%rcx),%eax
  cmp    $0x9,%al
  jbe    L94
  lea    -0x61(%rcx),%eax
  cmp    $0x5,%al
  jbe    L141
  lea    -0x41(%rcx),%eax
  cmp    $0x5,%al
  ja     L1
  sub    $0x3c,%ecx
  movsbl %cl,%eax
L17:
  movzbl 0x3(%rdx),%ecx
  shl    $0x4,%eax
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L177
  lea    -0x61(%rcx),%esi
  cmp    $0x5,%sil
  jbe    L3
  lea    -0x41(%rcx),%esi
  cmp    $0x5,%sil
  ja     L1
  sub    $0x3c,%ecx
  movsbl %cl,%ecx
  or     %ecx,%eax
L63:
  movzbl 0x4(%rdx),%ecx
  shl    $0x4,%eax
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L209
  lea    -0x61(%rcx),%esi
  cmp    $0x5,%sil
  jbe    L149
  lea    -0x41(%rcx),%esi
  cmp    $0x5,%sil
  ja     L1
  sub    $0x3c,%ecx
  movsbl %cl,%ecx
  or     %ecx,%eax
L156:
  movzbl 0x5(%rdx),%ecx
  shl    $0x4,%eax
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  ja     L160
  movsbl %sil,%esi
  or     %esi,%eax
L154:
  add    $0x6,%rdx
  mov    %rdx,(%rdi)
  ret
  nopl   0x0(%rax)
  mov    $0xa,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0xd,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x9,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0xc,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L85:
  mov    $0xffffffff,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x8,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L94:
  movsbl %al,%eax
  jmp    L17
  nopl   0x0(%rax,%rax,1)
L177:
  movsbl %sil,%esi
  or     %esi,%eax
  jmp    L63
  nopl   0x0(%rax,%rax,1)
L209:
  movsbl %sil,%esi
  or     %esi,%eax
  jmp    L156
  nopl   0x0(%rax,%rax,1)
L160:
  lea    -0x61(%rcx),%esi
  cmp    $0x5,%sil
  ja     L171
  sub    $0x57,%ecx
  movsbl %cl,%ecx
  or     %ecx,%eax
  jmp    L154
  cs nopw 0x0(%rax,%rax,1)
L141:
  sub    $0x57,%ecx
  movsbl %cl,%eax
  jmp    L17
  nopl   0x0(%rax,%rax,1)
L3:
  sub    $0x57,%ecx
  movsbl %cl,%ecx
  or     %ecx,%eax
  jmp    L63
  nopl   (%rax)
L149:
  sub    $0x57,%ecx
  movsbl %cl,%ecx
  or     %ecx,%eax
  jmp    L156
  nopl   (%rax)
L171:
  lea    -0x41(%rcx),%esi
  cmp    $0x5,%sil
  ja     L1
  sub    $0x3c,%ecx
  movsbl %cl,%ecx
  or     %ecx,%eax
  jmp    L154
```

assistant: ```c
int json_str_read_char(const char **ptr) {
  const char *s = *ptr;
  if (*s == 0)
    return -1;
  if (*s != '\\')
    return utf8_get(ptr);
  s++;
  *ptr = s + 1;
  int v = 0, i;
  switch (*s) {
  default:
    return *s;
  case 0:
    return -1;
  case 'b':
    return '\b';
  case 'f':
    return '\f';
  case 'n':
    return '\n';
  case 'r':
    return '\r';
  case 't':
    return '\t';
  case 'u':
    s++;
    for (i = 0; i < 4; i++) {
      v = v << 4;
      if (*s >= '0' && *s <= '9')
        v |= *s - '0';
      else if (*s >= 'a' && *s <= 'f')
        v |= *s - 'a' + 10;
      else if (*s >= 'A' && *s <= 'F')
        v |= *s - 'F' + 10;
      else
        return -2;
      s++;
    }
    *ptr = s;
    return v;
  }
}
```