user: 这段汇编代码用C语言表示是什么样的:

```asm
<memrchr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %al,-0x31(%rbp)
  mov    -0x48(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x30(%rbp)
  jmp    L61
L161:
  subq   $0x1,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L30
  mov    -0x30(%rbp),%rax
  jmp    L103
L30:
  subq   $0x1,-0x58(%rbp)
L61:
  cmpq   $0x0,-0x58(%rbp)
  je     L129
  mov    -0x30(%rbp),%rax
  and    $0x7,%eax
  test   %rax,%rax
  jne    L161
L129:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  movq   $0x7efefeff,-0x20(%rbp)
  movzbl -0x31(%rbp),%edx
  movzbl -0x31(%rbp),%eax
  shl    $0x8,%eax
  or     %edx,%eax
  cltq
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  shl    $0x10,%rax
  or     %rax,-0x18(%rbp)
  jmp    L108
L46:
  subq   $0x8,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  xor    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  xor    -0x10(%rbp),%rax
  or     -0x20(%rbp),%rax
  cmp    $0xffffffffffffffff,%rax
  je     L169
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L135
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  jmp    L103
L135:
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L40
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  jmp    L103
L40:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L24
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  jmp    L103
L24:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L169
  mov    -0x8(%rbp),%rax
  jmp    L103
L169:
  subq   $0x8,-0x58(%rbp)
L108:
  cmpq   $0x7,-0x58(%rbp)
  ja     L46
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L28
L53:
  subq   $0x1,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L28
  mov    -0x30(%rbp),%rax
  jmp    L103
L28:
  mov    -0x58(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  test   %rax,%rax
  jne    L53
  mov    $0x0,%eax
L103:
  pop    %rbp
  ret
```

assistant: ```c
void *memrchr(const void *s, int c_in, size_t n) {
  const unsigned char *char_ptr;
  const unsigned long int *longword_ptr;
  unsigned long int longword, magic_bits, charmask;
  unsigned char c;
  c = (unsigned char)c_in;
  for (char_ptr = (const unsigned char *)s + n; n > 0 && ((size_t)char_ptr & (sizeof(longword) - 1)) != 0; --n)
    if (*--char_ptr == c)
      return (void *)char_ptr;
  longword_ptr = (const unsigned long int *)char_ptr;
  if (sizeof(longword) != 4 && sizeof(longword) != 8)
    abort();
  magic_bits = 0x7efefeff;
  charmask = c | (c << 8);
  charmask |= charmask << 16;
  while (n >= sizeof(longword)) {
    longword = *--longword_ptr ^ charmask;
    if ((((longword + magic_bits) ^ ~longword) & ~magic_bits) != 0) {
      const unsigned char *cp = (const unsigned char *)longword_ptr;
      if (cp[3] == c)
        return (void *)&cp[3];
      if (cp[2] == c)
        return (void *)&cp[2];
      if (cp[1] == c)
        return (void *)&cp[1];
      if (cp[0] == c)
        return (void *)cp;
    }
    n -= sizeof(longword);
  }
  char_ptr = (const unsigned char *)longword_ptr;
  while (n-- > 0) {
    if (*--char_ptr == c)
      return (void *)char_ptr;
  }
  return 0;
}
```