user: 请将以下的汇编代码转换成C语言代码:

```asm
<strstr>:
  endbr64
  mov    %rdi,%rax
  movzbl (%rsi),%edi
  test   %dil,%dil
  je     L48
  sub    $0x1,%rax
L46:
  mov    %rax,%rcx
  add    $0x1,%rax
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L156
  cmp    %dl,%dil
  jne    L46
  movzbl 0x1(%rsi),%r8d
  test   %r8b,%r8b
  je     L48
  lea    0x2(%rcx),%rdx
  movzbl 0x1(%rax),%eax
  cmp    %al,%r8b
  jne    L128
L98:
  push   %rbx
L209:
  lea    -0x1(%rdx),%rax
  movzbl 0x2(%rsi),%ecx
  movzbl 0x1(%rdx),%r10d
  movsbl %cl,%r9d
  cmp    %r9d,%r10d
  je     L226
L1:
  test   %cl,%cl
  jne    L260
L148:
  pop    %rbx
  ret
L260:
  movzbl (%rdx),%eax
  jmp    L235
L205:
  lea    0x1(%rdx),%rax
  jmp    L206
L130:
  mov    %rdx,%rax
L206:
  lea    0x1(%rax),%rdx
  movzbl 0x1(%rax),%eax
  cmp    %al,%r8b
  je     L209
L235:
  cmp    %dil,%al
  je     L130
  test   %al,%al
  je     L186
  movzbl 0x1(%rdx),%eax
  cmp    %al,%dil
  je     L205
  test   %al,%al
  je     L30
  movzbl 0x2(%rdx),%eax
  lea    0x2(%rdx),%rdx
  jmp    L235
L226:
  lea    0x2(%rsi),%r10
  lea    0x1(%rdx),%r9
L42:
  test   %cl,%cl
  je     L148
  movzbl 0x1(%r10),%ecx
  movzbl 0x1(%r9),%ebx
  movsbl %cl,%r11d
  cmp    %r11d,%ebx
  jne    L1
  test   %cl,%cl
  je     L148
  add    $0x2,%r9
  add    $0x2,%r10
  movzbl (%r10),%ecx
  movzbl (%r9),%ebx
  movsbl %cl,%r11d
  cmp    %r11d,%ebx
  je     L42
  jmp    L1
L156:
  mov    $0x0,%eax
  ret
L186:
  mov    $0x0,%eax
  jmp    L148
L30:
  mov    $0x0,%eax
  jmp    L148
L51:
  lea    0x1(%rdx),%rax
  jmp    L103
L27:
  mov    %rdx,%rax
L103:
  lea    0x1(%rax),%rdx
  movzbl 0x1(%rax),%eax
  cmp    %al,%r8b
  je     L98
L128:
  cmp    %dil,%al
  je     L27
  test   %al,%al
  je     L44
  movzbl 0x1(%rdx),%eax
  cmp    %al,%dil
  je     L51
  test   %al,%al
  je     L185
  movzbl 0x2(%rdx),%eax
  lea    0x2(%rdx),%rdx
  jmp    L128
L44:
  mov    $0x0,%eax
  ret
L185:
  mov    $0x0,%eax
  ret
L48:
  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;
}
```