user: 请从给定的汇编指令推导出C源代码：

```asm
<strstr>:
  endbr64
  mov    %rdi,%rax
  mov    %rsi,%rdi
  movzbl (%rsi),%esi
  test   %sil,%sil
  je     L142
  sub    $0x1,%rax
  jmp    L270
  nopl   0x0(%rax,%rax,1)
L155:
  cmp    %dl,%sil
  je     L252
L270:
  mov    %rax,%rcx
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  test   %dl,%dl
  jne    L155
L128:
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L252:
  movzbl 0x1(%rdi),%r8d
  test   %r8b,%r8b
  jne    L269
L142:
  ret
  nopl   0x0(%rax,%rax,1)
L269:
  lea    0x2(%rcx),%rdx
  movzbl 0x1(%rax),%ecx
  cmp    %cl,%r8b
  je     L83
  nopl   (%rax)
L58:
  cmp    %sil,%cl
  je     L52
L119:
  test   %cl,%cl
  je     L128
  movzbl 0x1(%rdx),%eax
  cmp    %al,%sil
  je     L147
  test   %al,%al
  je     L128
  movzbl 0x2(%rdx),%ecx
  add    $0x2,%rdx
  cmp    %sil,%cl
  jne    L119
L52:
  mov    %rdx,%rax
L106:
  movzbl 0x1(%rax),%ecx
  lea    0x1(%rax),%rdx
  cmp    %cl,%r8b
  jne    L58
L83:
  push   %rbx
L208:
  movsbl 0x2(%rdi),%r9d
  movzbl 0x1(%rdx),%r10d
  mov    %r9d,%ecx
  cmp    %r9d,%r10d
  je     L184
L120:
  test   %cl,%cl
  je     L257
  movzbl (%rdx),%ecx
  nopl   (%rax)
L149:
  cmp    %sil,%cl
  je     L183
L131:
  test   %cl,%cl
  je     L192
  movzbl 0x1(%rdx),%eax
  cmp    %al,%sil
  je     L146
  test   %al,%al
  je     L192
  movzbl 0x2(%rdx),%ecx
  add    $0x2,%rdx
  cmp    %sil,%cl
  jne    L131
L183:
  mov    %rdx,%rax
L203:
  movzbl 0x1(%rax),%ecx
  lea    0x1(%rax),%rdx
  cmp    %cl,%r8b
  jne    L149
  jmp    L208
  nopl   0x0(%rax)
L147:
  lea    0x1(%rdx),%rax
  jmp    L106
L184:
  lea    0x2(%rdi),%r10
  lea    0x1(%rdx),%r9
  jmp    L278
  nopl   0x0(%rax,%rax,1)
L57:
  movsbl 0x1(%r10),%r11d
  movzbl 0x1(%r9),%ebx
  mov    %r11d,%ecx
  cmp    %r11d,%ebx
  jne    L120
  test   %r11b,%r11b
  je     L257
  movsbl 0x2(%r10),%r11d
  movzbl 0x2(%r9),%ebx
  add    $0x2,%r9
  add    $0x2,%r10
  mov    %r11d,%ecx
  cmp    %r11d,%ebx
  jne    L120
L278:
  test   %cl,%cl
  jne    L57
L257:
  pop    %rbx
  ret
L146:
  lea    0x1(%rdx),%rax
  jmp    L203
L192:
  xor    %eax,%eax
  pop    %rbx
  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;
}
```