user: 这段汇编代码用C语言表示是什么样的:

```asm
<twoway_strstr>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  mov    %rdi,%r13
  mov    $0x1,%edi
  push   %r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x858,%rsp
  movzbl (%rsi),%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x848(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movzbl %sil,%ecx
  test   %sil,%sil
  jne    L197
  jmp    L56
  nopl   0x0(%rax)
L274:
  mov    %ecx,%eax
  add    $0x1,%rbx
  mov    %rdi,%rdx
  shl    %cl,%rdx
  mov    %rbx,0x40(%rsp,%rcx,8)
  shr    $0x6,%al
  movzbl (%r15,%rbx,1),%ecx
  movzbl %al,%eax
  or     %rdx,0x20(%rsp,%rax,8)
  test   %cl,%cl
  je     L368
L197:
  cmpb   $0x0,0x0(%r13,%rbx,1)
  jne    L274
L305:
  xor    %r12d,%r12d
L341:
  mov    0x848(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L293
  add    $0x858,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L368:
  cmp    $0x1,%rbx
  je     L56
  mov    %esi,%edi
  mov    $0x1,%r14d
  mov    $0x1,%edx
  xor    %ecx,%ecx
  movq   $0xffffffffffffffff,0x18(%rsp)
  mov    $0x1,%eax
  jmp    L212
  nopl   (%rax)
L324:
  jae    L335
  mov    %rax,%r14
  mov    %rax,%rcx
  sub    0x18(%rsp),%r14
  mov    $0x1,%edx
L106:
  lea    (%rcx,%rdx,1),%rax
  cmp    %rax,%rbx
  jbe    L338
L416:
  mov    0x18(%rsp),%rdi
  add    %r15,%rdi
  movzbl (%rdi,%rdx,1),%edi
L212:
  cmp    %dil,(%r15,%rax,1)
  jne    L324
  cmp    %rdx,%r14
  je     L125
  add    $0x1,%rdx
  lea    (%rcx,%rdx,1),%rax
  cmp    %rax,%rbx
  ja     L416
L338:
  mov    $0x1,%r8d
  mov    $0x1,%edx
  xor    %ecx,%ecx
  mov    $0xffffffffffffffff,%rdi
  mov    $0x1,%eax
  jmp    L195
  nopw   0x0(%rax,%rax,1)
L355:
  jbe    L332
  mov    %rax,%r8
  mov    %rax,%rcx
  mov    $0x1,%edx
  sub    %rdi,%r8
L89:
  lea    (%rdx,%rcx,1),%rax
  cmp    %rax,%rbx
  jbe    L167
L391:
  lea    (%r15,%rdx,1),%rsi
  movzbl (%rsi,%rdi,1),%esi
L195:
  cmp    %sil,(%r15,%rax,1)
  jne    L355
  cmp    %r8,%rdx
  je     L275
  add    $0x1,%rdx
  lea    (%rdx,%rcx,1),%rax
  cmp    %rax,%rbx
  ja     L391
L167:
  mov    0x18(%rsp),%rsi
  lea    0x1(%rdi),%rax
  lea    0x1(%rsi),%rbp
  cmp    %rbp,%rax
  jbe    L287
  mov    %rdi,0x18(%rsp)
  mov    %rax,%rbp
  mov    %r8,%r14
L287:
  lea    (%r15,%r14,1),%rsi
  mov    %rbp,%rdx
  mov    %r15,%rdi
  call   <memcmp@plt>
  mov    %rbx,%rsi
  sub    %r14,%rsi
  mov    %rsi,0x10(%rsp)
  test   %rax,%rax
  je     L30
  mov    0x18(%rsp),%rsi
  lea    -0x1(%rbx),%rax
  movq   $0x0,0x10(%rsp)
  sub    %rsi,%rax
  cmp    %rsi,%rax
  cmovb  %rsi,%rax
  lea    0x1(%rax),%r14
L30:
  mov    %rbx,%rdx
  mov    %r13,%r12
  xor    %r8d,%r8d
  or     $0x3f,%rdx
  nopw   0x0(%rax,%rax,1)
L285:
  mov    %r13,%rax
  sub    %r12,%rax
  cmp    %rbx,%rax
  jb     L298
L102:
  movzbl -0x1(%r12,%rbx,1),%ecx
  mov    %ecx,%eax
  shr    $0x6,%al
  movzbl %al,%eax
  mov    0x20(%rsp,%rax,8),%rax
  shr    %cl,%rax
  test   $0x1,%al
  je     L240
  mov    %rbx,%rax
  sub    0x40(%rsp,%rcx,8),%rax
  je     L114
  cmpq   $0x0,0x10(%rsp)
  setne  %sil
  test   %r8,%r8
  setne  %cl
  test   %cl,%sil
  je     L42
  cmp    %rax,%r14
  mov    %rbx,%rcx
  seta   %sil
  sub    %r14,%rcx
  test   %sil,%sil
  cmovne %rcx,%rax
L42:
  add    %rax,%r12
  mov    %r13,%rax
  xor    %r8d,%r8d
  sub    %r12,%rax
  cmp    %rbx,%rax
  jae    L102
L298:
  xor    %esi,%esi
  mov    %r13,%rdi
  mov    %r8,0x8(%rsp)
  mov    %rdx,(%rsp)
  call   <memchr@plt>
  mov    (%rsp),%rdx
  mov    0x8(%rsp),%r8
  test   %rax,%rax
  je     L316
  mov    %rax,%rcx
  sub    %r12,%rcx
  cmp    %rbx,%rcx
  jb     L305
  mov    %rax,%r13
  jmp    L102
  nopl   (%rax)
L335:
  mov    %rcx,0x18(%rsp)
  mov    $0x1,%r14d
  add    $0x1,%rcx
  mov    $0x1,%edx
  jmp    L106
  nopl   0x0(%rax)
L332:
  mov    %rcx,%rdi
  mov    $0x1,%r8d
  add    $0x1,%rcx
  mov    $0x1,%edx
  jmp    L89
L125:
  add    %r14,%rcx
  mov    $0x1,%edx
  jmp    L106
L275:
  add    %rdx,%rcx
  mov    $0x1,%edx
  jmp    L89
  nopl   0x0(%rax)
L240:
  add    %rbx,%r12
  xor    %r8d,%r8d
  jmp    L285
  nopl   0x0(%rax,%rax,1)
L114:
  cmp    %rbp,%r8
  mov    %rbp,%rax
  cmovae %r8,%rax
  movzbl (%r15,%rax,1),%ecx
  test   %cl,%cl
  jne    L55
  jmp    L110
  nopl   (%rax)
L176:
  add    $0x1,%rax
  movzbl (%r15,%rax,1),%ecx
  test   %cl,%cl
  je     L110
L55:
  cmp    (%r12,%rax,1),%cl
  je     L176
  sub    0x18(%rsp),%rax
  jmp    L42
  nopl   (%rax)
L110:
  mov    %rbp,%rax
  nopl   0x0(%rax,%rax,1)
L85:
  cmp    %r8,%rax
  jbe    L341
  sub    $0x1,%rax
  movzbl (%r12,%rax,1),%edi
  cmp    %dil,(%r15,%rax,1)
  je     L85
  mov    0x10(%rsp),%r8
  add    %r14,%r12
  jmp    L285
  nopl   (%rax)
L316:
  add    %rdx,%r13
  jmp    L102
L56:
  movq   $0xffffffffffffffff,0x18(%rsp)
  xor    %ebp,%ebp
  mov    $0x1,%r14d
  jmp    L287
L293:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *twoway_strstr(const unsigned char *h, const unsigned char *n) {
  const unsigned char *z;
  size_t l, ip, jp, k, p, ms, p0, mem, mem0;
  size_t byteset[32 / sizeof(size_t)] = {0};
  size_t shift[256];
  for (l = 0; n[l] && h[l]; l++)
    ((byteset)[(size_t)(n[l]) / (8 * sizeof *(byteset))] |= (size_t)1 << ((size_t)(n[l]) % (8 * sizeof *(byteset)))), shift[n[l]] = l + 1;
  if (n[l])
    return 0;
  ip = -1;
  jp = 0;
  k = p = 1;
  while (jp + k < l) {
    if (n[ip + k] == n[jp + k]) {
      if (k == p) {
        jp += p;
        k = 1;
      } else
        k++;
    } else if (n[ip + k] > n[jp + k]) {
      jp += k;
      k = 1;
      p = jp - ip;
    } else {
      ip = jp++;
      k = p = 1;
    }
  }
  ms = ip;
  p0 = p;
  ip = -1;
  jp = 0;
  k = p = 1;
  while (jp + k < l) {
    if (n[ip + k] == n[jp + k]) {
      if (k == p) {
        jp += p;
        k = 1;
      } else
        k++;
    } else if (n[ip + k] < n[jp + k]) {
      jp += k;
      k = 1;
      p = jp - ip;
    } else {
      ip = jp++;
      k = p = 1;
    }
  }
  if (ip + 1 > ms + 1)
    ms = ip;
  else
    p = p0;
  if (memcmp(n, n + p, ms + 1)) {
    mem0 = 0;
    p = ((ms) > (l - ms - 1) ? (ms) : (l - ms - 1)) + 1;
  } else
    mem0 = l - p;
  mem = 0;
  z = h;
  for (;;) {
    if (z - h < l) {
      size_t grow = l | 63;
      const unsigned char *z2 = memchr(z, 0, grow);
      if (z2) {
        z = z2;
        if (z - h < l)
          return 0;
      } else
        z += grow;
    }
    if (((byteset)[(size_t)(h[l - 1]) / (8 * sizeof *(byteset))] & (size_t)1 << ((size_t)(h[l - 1]) % (8 * sizeof *(byteset))))) {
      k = l - shift[h[l - 1]];
      if (k) {
        if (mem0 && mem && k < p)
          k = l - p;
        h += k;
        mem = 0;
        continue;
      }
    } else {
      h += l;
      mem = 0;
      continue;
    }
    for (k = ((ms + 1) > (mem) ? (ms + 1) : (mem)); n[k] && n[k] == h[k]; k++)
      ;
    if (n[k]) {
      h += k - ms;
      mem = 0;
      continue;
    }
    for (k = ms + 1; k > mem && n[k - 1] == h[k - 1]; k--)
      ;
    if (k <= mem)
      return (char *)h;
    h += p;
    mem = mem0;
  }
}
```