user: Demonstrate the C code that generates the assembly output below:

```asm
<__memchr>:
  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),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L148
L207:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L253
  mov    -0x30(%rbp),%rax
  jmp    L198
L253:
  subq   $0x1,-0x58(%rbp)
  addq   $0x1,-0x30(%rbp)
L148:
  cmpq   $0x0,-0x58(%rbp)
  je     L161
  mov    -0x30(%rbp),%rax
  and    $0x7,%eax
  test   %rax,%rax
  jne    L207
L161:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    $0xfefefefe,%eax
  mov    %rax,-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)
  mov    D0(%rip),%rax
  mov    (%rax),%eax
  sar    %eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  or     $0x1,%rax
  and    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  jmp    L26
L172:
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  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     L188
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L95
  mov    -0x8(%rbp),%rax
  jmp    L198
L95:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L82
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  jmp    L198
L82:
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L174
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  jmp    L198
L174:
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L85
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  jmp    L198
L85:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L258
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  jmp    L198
L258:
  mov    -0x8(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L51
  mov    -0x8(%rbp),%rax
  add    $0x5,%rax
  jmp    L198
L51:
  mov    -0x8(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L105
  mov    -0x8(%rbp),%rax
  add    $0x6,%rax
  jmp    L198
L105:
  mov    -0x8(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L188
  mov    -0x8(%rbp),%rax
  add    $0x7,%rax
  jmp    L198
L188:
  subq   $0x8,-0x58(%rbp)
L26:
  cmpq   $0x7,-0x58(%rbp)
  ja     L172
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L115
L260:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L164
  mov    -0x30(%rbp),%rax
  jmp    L198
L164:
  addq   $0x1,-0x30(%rbp)
L115:
  mov    -0x58(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  test   %rax,%rax
  jne    L260
  mov    $0x0,%eax
L198:
  pop    %rbp
  ret
```

assistant: ```c
void *__memchr(void const *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;
  int i;
  c = (unsigned char)c_in;
  for (char_ptr = (const unsigned char *)s; n > 0 && (size_t)char_ptr % sizeof longword != 0; --n, ++char_ptr)
    if (*char_ptr == c)
      return (void *)char_ptr;
  longword_ptr = (const unsigned long int *)char_ptr;
  magic_bits = 0xfefefefe;
  charmask = c | (c << 8);
  charmask |= charmask << 16;
  magic_bits = (ULONG_MAX >> 1) & (magic_bits | 1);
  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 - 1);
      if (cp[0] == c)
        return (void *)cp;
      if (cp[1] == c)
        return (void *)&cp[1];
      if (cp[2] == c)
        return (void *)&cp[2];
      if (cp[3] == c)
        return (void *)&cp[3];
      if (4 < sizeof longword && cp[4] == c)
        return (void *)&cp[4];
      if (5 < sizeof longword && cp[5] == c)
        return (void *)&cp[5];
      if (6 < sizeof longword && cp[6] == c)
        return (void *)&cp[6];
      if (7 < sizeof longword && cp[7] == c)
        return (void *)&cp[7];
      if (8 < sizeof longword)
        for (i = 8; i < sizeof longword; i++)
          if (cp[i] == c)
            return (void *)&cp[i];
    }
    n -= sizeof longword;
  }
  char_ptr = (const unsigned char *)longword_ptr;
  while (n-- > 0) {
    if (*char_ptr == c)
      return (void *)char_ptr;
    else
      ++char_ptr;
  }
  return 0;
}
```