user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<simple_memmem>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %rcx,%rcx
  je     L267
  mov    %rsi,%r14
  mov    %rdx,%r15
  movzbl (%rdx),%esi
  mov    %rcx,%r12
  mov    %r14,%rdx
  cmp    $0x1,%rcx
  jne    L213
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <memchr@plt>
  nopw   0x0(%rax,%rax,1)
L267:
  mov    %rdi,%r8
L205:
  add    $0x18,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L213:
  call   <memchr@plt>
  mov    %rax,%r8
  test   %rax,%rax
  je     L142
  sub    %r13,%rax
  sub    %rax,%r14
  mov    %r14,%rbp
  cmp    %r14,%r12
  ja     L142
  lea    0x1(%r15),%rsi
  lea    (%r15,%r12,1),%rdx
  lea    0x1(%r8),%r13
  cmp    %rdx,%rsi
  je     L71
  lea    -0x2(%r12),%r9
  lea    -0x1(%r12),%rdi
  cmp    $0xe,%r9
  jbe    L32
  mov    %rdi,%rcx
  pxor   %xmm7,%xmm7
  pxor   %xmm6,%xmm6
  mov    $0x1,%eax
  and    $0xfffffffffffffff0,%rcx
  movdqa %xmm7,%xmm8
  movdqa %xmm7,%xmm9
  add    $0x1,%rcx
  movdqa %xmm7,%xmm0
  pxor   %xmm4,%xmm4
  cs nopw 0x0(%rax,%rax,1)
L16:
  movdqu (%r8,%rax,1),%xmm1
  movdqu (%r15,%rax,1),%xmm5
  add    $0x10,%rax
  movdqa %xmm1,%xmm2
  movdqa %xmm5,%xmm3
  punpckhbw %xmm6,%xmm1
  punpcklbw %xmm6,%xmm2
  punpcklbw %xmm6,%xmm3
  punpckhbw %xmm6,%xmm5
  movdqa %xmm2,%xmm10
  punpckhwd %xmm4,%xmm2
  punpcklwd %xmm4,%xmm10
  paddd  %xmm9,%xmm2
  paddd  %xmm10,%xmm0
  movdqa %xmm3,%xmm10
  punpckhwd %xmm4,%xmm3
  psubd  %xmm3,%xmm2
  movdqa %xmm5,%xmm3
  punpcklwd %xmm4,%xmm10
  movdqa %xmm2,%xmm9
  movdqa %xmm1,%xmm2
  punpcklwd %xmm4,%xmm3
  punpcklwd %xmm4,%xmm2
  punpckhwd %xmm4,%xmm1
  psubd  %xmm10,%xmm0
  paddd  %xmm8,%xmm2
  paddd  %xmm7,%xmm1
  psubd  %xmm3,%xmm2
  movdqa %xmm1,%xmm7
  movdqa %xmm2,%xmm8
  movdqa %xmm5,%xmm2
  punpckhwd %xmm4,%xmm2
  psubd  %xmm2,%xmm7
  cmp    %rcx,%rax
  jne    L16
  paddd  %xmm9,%xmm0
  mov    %rdi,%r10
  paddd  %xmm8,%xmm0
  and    $0xfffffffffffffff0,%r10
  paddd  %xmm7,%xmm0
  lea    (%rsi,%r10,1),%rax
  movdqa %xmm0,%xmm1
  lea    0x0(%r13,%r10,1),%rcx
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%ebx
  cmp    %r10,%rdi
  je     L214
L150:
  movzbl (%rcx),%edi
  movzbl (%rax),%r10d
  add    %ebx,%edi
  sub    %r10d,%edi
  mov    %edi,%ebx
  lea    0x1(%rax),%rdi
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x1(%rcx),%edi
  movzbl 0x1(%rax),%r10d
  add    %ebx,%edi
  sub    %r10d,%edi
  mov    %edi,%ebx
  lea    0x2(%rax),%rdi
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x2(%rcx),%edi
  movzbl 0x2(%rax),%r10d
  add    %ebx,%edi
  mov    %edi,%ebx
  lea    0x3(%rax),%rdi
  sub    %r10d,%ebx
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x3(%rcx),%edi
  movzbl 0x3(%rax),%r10d
  add    %ebx,%edi
  mov    %edi,%ebx
  lea    0x4(%rax),%rdi
  sub    %r10d,%ebx
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x4(%rcx),%edi
  movzbl 0x4(%rax),%r10d
  add    %ebx,%edi
  sub    %r10d,%edi
  mov    %edi,%ebx
  lea    0x5(%rax),%rdi
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x5(%rcx),%edi
  movzbl 0x5(%rax),%r10d
  add    %ebx,%edi
  sub    %r10d,%edi
  mov    %edi,%ebx
  lea    0x6(%rax),%rdi
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x6(%rcx),%edi
  movzbl 0x6(%rax),%r10d
  add    %ebx,%edi
  mov    %edi,%ebx
  lea    0x7(%rax),%rdi
  sub    %r10d,%ebx
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x7(%rcx),%edi
  movzbl 0x7(%rax),%r10d
  add    %ebx,%edi
  mov    %edi,%ebx
  lea    0x8(%rax),%rdi
  sub    %r10d,%ebx
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x8(%rcx),%edi
  movzbl 0x8(%rax),%r10d
  add    %ebx,%edi
  sub    %r10d,%edi
  mov    %edi,%ebx
  lea    0x9(%rax),%rdi
  cmp    %rdi,%rdx
  je     L214
  movzbl 0x9(%rcx),%edi
  movzbl 0x9(%rax),%r10d
  add    %ebx,%edi
  sub    %r10d,%edi
  mov    %edi,%ebx
  lea    0xa(%rax),%rdi
  cmp    %rdi,%rdx
  je     L214
  movzbl 0xa(%rcx),%edi
  movzbl 0xa(%rax),%r10d
  add    %ebx,%edi
  mov    %edi,%ebx
  lea    0xb(%rax),%rdi
  sub    %r10d,%ebx
  cmp    %rdi,%rdx
  je     L214
  movzbl 0xb(%rcx),%edi
  movzbl 0xb(%rax),%r10d
  add    %ebx,%edi
  sub    %r10d,%edi
  mov    %edi,%ebx
  lea    0xc(%rax),%rdi
  cmp    %rdi,%rdx
  je     L214
  movzbl 0xc(%rcx),%edi
  movzbl 0xc(%rax),%r10d
  add    %ebx,%edi
  mov    %edi,%ebx
  lea    0xd(%rax),%rdi
  sub    %r10d,%ebx
  cmp    %rdi,%rdx
  je     L214
  movzbl 0xd(%rcx),%edi
  movzbl 0xd(%rax),%r10d
  add    %ebx,%edi
  mov    %edi,%ebx
  lea    0xe(%rax),%rdi
  sub    %r10d,%ebx
  cmp    %rdi,%rdx
  je     L214
  movzbl 0xe(%rcx),%edx
  movzbl 0xe(%rax),%eax
  add    %ebx,%edx
  sub    %eax,%edx
  mov    %edx,%ebx
  xchg   %ax,%ax
L214:
  lea    (%r8,%r12,1),%r14
  test   %ebx,%ebx
  je     L61
L224:
  add    %r8,%rbp
  cmp    %r14,%rbp
  je     L142
  sub    $0x1,%r12
  jmp    L252
  cs nopw 0x0(%rax,%rax,1)
L141:
  cmp    %r14,%rbp
  je     L142
L197:
  add    $0x1,%r13
L252:
  movzbl -0x1(%r13),%eax
  add    $0x1,%r14
  sub    %eax,%ebx
  movzbl -0x1(%r14),%eax
  add    %eax,%ebx
  jne    L141
  mov    %r12,%rdx
  mov    %r15,%rsi
  mov    %r13,%rdi
  mov    %r13,0x8(%rsp)
  call   <memcmp@plt>
  mov    0x8(%rsp),%r8
  test   %rax,%rax
  je     L205
  cmp    %r14,%rbp
  jne    L197
L142:
  xor    %r8d,%r8d
  jmp    L205
L71:
  mov    %r13,%r14
  lea    -0x2(%r12),%r9
L61:
  mov    %r9,%rdx
  mov    %r13,%rdi
  mov    %r8,0x8(%rsp)
  call   <memcmp@plt>
  mov    0x8(%rsp),%r8
  test   %rax,%rax
  je     L205
  xor    %ebx,%ebx
  jmp    L224
L32:
  mov    %r13,%rcx
  mov    %rsi,%rax
  xor    %ebx,%ebx
  jmp    L150
```

assistant: ```c
char *simple_memmem(const char *haystack, size_t haystacklen, const char *needle, size_t needlelen) {
  const char *needle_ptr;
  const char *haystack_ptr;
  int sums_diff;
  switch (needlelen) {
  case (0):
    return (char *)haystack;
    break;
  case (1):
    return memchr(haystack, *((unsigned char *)needle), haystacklen);
    break;
  }
  haystack_ptr = memchr(haystack, *((unsigned char *)needle), haystacklen);
  if (!haystack_ptr) {
    return NULL;
  }
  haystacklen -= (haystack_ptr - haystack);
  if (haystacklen < needlelen) {
    return NULL;
  }
  haystack = haystack_ptr;
  sums_diff = 0;
  needle_ptr = needle + 1;
  haystack_ptr++;
  needle += needlelen;
  while (needle_ptr != needle) {
    sums_diff += *((unsigned char *)haystack_ptr++);
    sums_diff -= *((unsigned char *)needle_ptr++);
  }
  needle -= needlelen;
  if (sums_diff == 0 && memcmp(haystack + 1, needle + 1, needlelen - 2) == 0) {
    return (char *)haystack;
  }
  needle_ptr = haystack + haystacklen;
  while (haystack_ptr != needle_ptr) {
    sums_diff -= *((unsigned char *)haystack++);
    sums_diff += *((unsigned char *)haystack_ptr++);
    if (sums_diff == 0 && memcmp(haystack, needle, needlelen - 1) == 0) {
      return (char *)haystack;
    }
  }
  return NULL;
}
```