user: What is the c source code of the assembly code below?

```asm
<twoway_memmem>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x8a0,%rsp
  mov    %rdi,-0x888(%rbp)
  mov    %rsi,-0x890(%rbp)
  mov    %rdx,-0x898(%rbp)
  mov    %rcx,-0x8a0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x830(%rbp)
  movq   $0x0,-0x828(%rbp)
  movq   $0x0,-0x820(%rbp)
  movq   $0x0,-0x818(%rbp)
  movq   $0x0,-0x878(%rbp)
  jmp    L214
L96:
  mov    -0x898(%rbp),%rdx
  mov    -0x878(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  shr    $0x6,%al
  movzbl %al,%eax
  mov    -0x830(%rbp,%rax,8),%rdx
  mov    -0x898(%rbp),%rcx
  mov    -0x878(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3f,%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%rsi
  mov    -0x898(%rbp),%rcx
  mov    -0x878(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  shr    $0x6,%al
  movzbl %al,%eax
  or     %rsi,%rdx
  mov    %rdx,-0x830(%rbp,%rax,8)
  mov    -0x898(%rbp),%rdx
  mov    -0x878(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x878(%rbp),%rdx
  add    $0x1,%rdx
  cltq
  mov    %rdx,-0x810(%rbp,%rax,8)
  addq   $0x1,-0x878(%rbp)
L214:
  mov    -0x878(%rbp),%rax
  cmp    -0x8a0(%rbp),%rax
  jb     L96
  movq   $0xffffffffffffffff,-0x870(%rbp)
  movq   $0x0,-0x868(%rbp)
  movq   $0x1,-0x858(%rbp)
  mov    -0x858(%rbp),%rax
  mov    %rax,-0x860(%rbp)
  jmp    L145
L303:
  mov    -0x870(%rbp),%rdx
  mov    -0x860(%rbp),%rax
  add    %rax,%rdx
  mov    -0x898(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x868(%rbp),%rcx
  mov    -0x860(%rbp),%rax
  add    %rax,%rcx
  mov    -0x898(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L188
  mov    -0x860(%rbp),%rax
  cmp    -0x858(%rbp),%rax
  jne    L366
  mov    -0x858(%rbp),%rax
  add    %rax,-0x868(%rbp)
  movq   $0x1,-0x860(%rbp)
  jmp    L145
L366:
  addq   $0x1,-0x860(%rbp)
  jmp    L145
L188:
  mov    -0x870(%rbp),%rdx
  mov    -0x860(%rbp),%rax
  add    %rax,%rdx
  mov    -0x898(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x868(%rbp),%rcx
  mov    -0x860(%rbp),%rax
  add    %rax,%rcx
  mov    -0x898(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jbe    L127
  mov    -0x860(%rbp),%rax
  add    %rax,-0x868(%rbp)
  movq   $0x1,-0x860(%rbp)
  mov    -0x868(%rbp),%rax
  sub    -0x870(%rbp),%rax
  mov    %rax,-0x858(%rbp)
  jmp    L145
L127:
  mov    -0x868(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x868(%rbp)
  mov    %rax,-0x870(%rbp)
  movq   $0x1,-0x858(%rbp)
  mov    -0x858(%rbp),%rax
  mov    %rax,-0x860(%rbp)
L145:
  mov    -0x868(%rbp),%rdx
  mov    -0x860(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x8a0(%rbp)
  ja     L303
  mov    -0x870(%rbp),%rax
  mov    %rax,-0x850(%rbp)
  mov    -0x858(%rbp),%rax
  mov    %rax,-0x838(%rbp)
  movq   $0xffffffffffffffff,-0x870(%rbp)
  movq   $0x0,-0x868(%rbp)
  movq   $0x1,-0x858(%rbp)
  mov    -0x858(%rbp),%rax
  mov    %rax,-0x860(%rbp)
  jmp    L300
L391:
  mov    -0x870(%rbp),%rdx
  mov    -0x860(%rbp),%rax
  add    %rax,%rdx
  mov    -0x898(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x868(%rbp),%rcx
  mov    -0x860(%rbp),%rax
  add    %rax,%rcx
  mov    -0x898(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L151
  mov    -0x860(%rbp),%rax
  cmp    -0x858(%rbp),%rax
  jne    L175
  mov    -0x858(%rbp),%rax
  add    %rax,-0x868(%rbp)
  movq   $0x1,-0x860(%rbp)
  jmp    L300
L175:
  addq   $0x1,-0x860(%rbp)
  jmp    L300
L151:
  mov    -0x870(%rbp),%rdx
  mov    -0x860(%rbp),%rax
  add    %rax,%rdx
  mov    -0x898(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x868(%rbp),%rcx
  mov    -0x860(%rbp),%rax
  add    %rax,%rcx
  mov    -0x898(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jae    L317
  mov    -0x860(%rbp),%rax
  add    %rax,-0x868(%rbp)
  movq   $0x1,-0x860(%rbp)
  mov    -0x868(%rbp),%rax
  sub    -0x870(%rbp),%rax
  mov    %rax,-0x858(%rbp)
  jmp    L300
L317:
  mov    -0x868(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x868(%rbp)
  mov    %rax,-0x870(%rbp)
  movq   $0x1,-0x858(%rbp)
  mov    -0x858(%rbp),%rax
  mov    %rax,-0x860(%rbp)
L300:
  mov    -0x868(%rbp),%rdx
  mov    -0x860(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x8a0(%rbp)
  ja     L391
  mov    -0x870(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x850(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,%rdx
  jbe    L52
  mov    -0x870(%rbp),%rax
  mov    %rax,-0x850(%rbp)
  jmp    L406
L52:
  mov    -0x838(%rbp),%rax
  mov    %rax,-0x858(%rbp)
L406:
  mov    -0x850(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x898(%rbp),%rcx
  mov    -0x858(%rbp),%rax
  add    %rax,%rcx
  mov    -0x898(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  je     L307
  movq   $0x0,-0x840(%rbp)
  mov    -0x8a0(%rbp),%rax
  sub    -0x850(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x850(%rbp),%rax
  cmp    %rax,%rdx
  cmovae %rdx,%rax
  add    $0x1,%rax
  mov    %rax,-0x858(%rbp)
  jmp    L326
L307:
  mov    -0x8a0(%rbp),%rax
  sub    -0x858(%rbp),%rax
  mov    %rax,-0x840(%rbp)
L326:
  movq   $0x0,-0x848(%rbp)
L152:
  mov    -0x890(%rbp),%rax
  sub    -0x888(%rbp),%rax
  cmp    %rax,-0x8a0(%rbp)
  jbe    L144
  mov    $0x0,%eax
  jmp    L70
L144:
  mov    -0x8a0(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x888(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  shr    $0x6,%al
  movzbl %al,%eax
  mov    -0x830(%rbp,%rax,8),%rdx
  mov    -0x8a0(%rbp),%rax
  lea    -0x1(%rax),%rcx
  mov    -0x888(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3f,%eax
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    $0x1,%eax
  test   %rax,%rax
  je     L199
  mov    -0x8a0(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x888(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  cltq
  mov    -0x810(%rbp,%rax,8),%rdx
  mov    -0x8a0(%rbp),%rax
  sub    %rdx,%rax
  mov    %rax,-0x860(%rbp)
  cmpq   $0x0,-0x860(%rbp)
  je     L367
  cmpq   $0x0,-0x840(%rbp)
  je     L348
  cmpq   $0x0,-0x848(%rbp)
  je     L348
  mov    -0x860(%rbp),%rax
  cmp    -0x858(%rbp),%rax
  jae    L348
  mov    -0x8a0(%rbp),%rax
  sub    -0x858(%rbp),%rax
  mov    %rax,-0x860(%rbp)
L348:
  mov    -0x860(%rbp),%rax
  add    %rax,-0x888(%rbp)
  movq   $0x0,-0x848(%rbp)
  jmp    L207
L199:
  mov    -0x8a0(%rbp),%rax
  add    %rax,-0x888(%rbp)
  movq   $0x0,-0x848(%rbp)
  jmp    L207
L367:
  mov    -0x850(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x848(%rbp),%rax
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  mov    %rax,-0x860(%rbp)
  jmp    L153
L150:
  addq   $0x1,-0x860(%rbp)
L153:
  mov    -0x860(%rbp),%rax
  cmp    -0x8a0(%rbp),%rax
  jae    L362
  mov    -0x898(%rbp),%rdx
  mov    -0x860(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x888(%rbp),%rcx
  mov    -0x860(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L150
L362:
  mov    -0x860(%rbp),%rax
  cmp    -0x8a0(%rbp),%rax
  jae    L53
  mov    -0x860(%rbp),%rax
  sub    -0x850(%rbp),%rax
  add    %rax,-0x888(%rbp)
  movq   $0x0,-0x848(%rbp)
  jmp    L207
L53:
  mov    -0x850(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x860(%rbp)
  jmp    L5
L187:
  subq   $0x1,-0x860(%rbp)
L5:
  mov    -0x860(%rbp),%rax
  cmp    -0x848(%rbp),%rax
  jbe    L247
  mov    -0x860(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x898(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x860(%rbp),%rax
  lea    -0x1(%rax),%rcx
  mov    -0x888(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L187
L247:
  mov    -0x860(%rbp),%rax
  cmp    -0x848(%rbp),%rax
  ja     L67
  mov    -0x888(%rbp),%rax
  jmp    L70
L67:
  mov    -0x858(%rbp),%rax
  add    %rax,-0x888(%rbp)
  mov    -0x840(%rbp),%rax
  mov    %rax,-0x848(%rbp)
L207:
  jmp    L152
L70:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L206
  call   <__stack_chk_fail@plt>
L206:
  leave
  ret
```

assistant: ```c
char *twoway_memmem(const unsigned char *h, const unsigned char *z, const unsigned char *n, size_t l) {
  size_t i, ip, jp, k, p, ms, p0, mem, mem0;
  size_t byteset[32 / sizeof(size_t)] = {0};
  size_t shift[256];
  for (i = 0; i < l; i++)
    ((byteset)[(size_t)(n[i]) / (8 * sizeof *(byteset))] |= (size_t)1 << ((size_t)(n[i]) % (8 * sizeof *(byteset)))), shift[n[i]] = i + 1;
  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;
  for (;;) {
    if (z - h < l)
      return 0;
    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)); k < l && n[k] == h[k]; k++)
      ;
    if (k < l) {
      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;
  }
}
```