user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<strstr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x23(%rbp)
  cmpb   $0x0,-0x23(%rbp)
  je     L253
  subq   $0x1,-0x20(%rbp)
L39:
  addq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x22(%rbp)
  cmpb   $0x0,-0x22(%rbp)
  je     L134
  movzbl -0x22(%rbp),%eax
  cmp    -0x23(%rbp),%al
  jne    L39
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
  cmpb   $0x0,-0x21(%rbp)
  je     L166
  addq   $0x1,-0x18(%rbp)
  nop
  addq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x25(%rbp)
  movzbl -0x25(%rbp),%eax
  cmp    -0x21(%rbp),%al
  jne    L13
  jmp    L131
L5:
  nop
  addq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x25(%rbp)
  jmp    L13
L167:
  cmpb   $0x0,-0x25(%rbp)
  je     L124
  addq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x25(%rbp)
  movzbl -0x25(%rbp),%eax
  cmp    -0x23(%rbp),%al
  je     L23
  cmpb   $0x0,-0x25(%rbp)
  je     L242
  addq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x25(%rbp)
L13:
  movzbl -0x25(%rbp),%eax
  cmp    -0x23(%rbp),%al
  jne    L167
  jmp    L233
L23:
  nop
L233:
  addq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x25(%rbp)
  movzbl -0x25(%rbp),%eax
  cmp    -0x21(%rbp),%al
  jne    L13
  nop
L131:
  mov    -0x20(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  add    $0x1,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x24(%rbp)
  movsbl -0x24(%rbp),%eax
  cmp    %eax,%edx
  jne    L203
L150:
  cmpb   $0x0,-0x24(%rbp)
  je     L70
  addq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x24(%rbp)
  movsbl -0x24(%rbp),%eax
  cmp    %eax,%edx
  jne    L262
  cmpb   $0x0,-0x24(%rbp)
  je     L192
  addq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x24(%rbp)
  movsbl -0x24(%rbp),%eax
  cmp    %eax,%edx
  je     L150
  jmp    L203
L262:
  nop
L203:
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  cmpb   $0x0,-0x24(%rbp)
  jne    L5
  jmp    L152
L253:
  nop
  jmp    L152
L166:
  nop
  jmp    L152
L70:
  nop
  jmp    L152
L192:
  nop
L152:
  mov    -0x20(%rbp),%rax
  jmp    L169
L134:
  nop
  jmp    L208
L124:
  nop
  jmp    L208
L242:
  nop
L208:
  mov    $0x0,%eax
L169:
  pop    %rbp
  ret
```

assistant: ```c
char *strstr(const char *phaystack, const char *pneedle) {
  const unsigned char *haystack, *needle;
  char b;
  const unsigned char *rneedle;
  haystack = (const unsigned char *)phaystack;
  if ((b = *(needle = (const unsigned char *)pneedle))) {
    char c;
    haystack--;
    {
      char a;
      do
        if (!(a = *++haystack))
          goto ret0;
      while (a != b);
    }
    if (!(c = *++needle))
      goto foundneedle;
    ++needle;
    goto jin;
    for (;;) {
      {
        char a;
        if (0)
        jin : {
          if ((a = *++haystack) == c)
            goto crest;
        }
          else a = *++haystack;
        do {
          for (; a != b; a = *++haystack) {
            if (!a)
              goto ret0;
            if ((a = *++haystack) == b)
              break;
            if (!a)
              goto ret0;
          }
        } while ((a = *++haystack) != c);
      }
    crest : {
      char a;
      {
        const unsigned char *rhaystack;
        if (*(rhaystack = haystack-- + 1) == (a = *(rneedle = needle)))
          do {
            if (!a)
              goto foundneedle;
            if (*++rhaystack != (a = *++needle))
              break;
            if (!a)
              goto foundneedle;
          } while (*++rhaystack == (a = *++needle));
        needle = rneedle;
      }
      if (!a)
        break;
    }
    }
  }
foundneedle:
  return (char *)haystack;
ret0:
  return 0;
}
```