user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<strstr_ex>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L106
  mov    -0x10(%rbp),%rax
  jmp    L133
L106:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jbe    L129
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L129
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L129
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L129
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L129
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L129
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L129
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  je     L129
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L129
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L129
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L129
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L129
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L129
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L129
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L129
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  je     L129
  mov    $0x0,%eax
  jmp    L133
L129:
  mov    -0x8(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jbe    L246
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L246
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L246
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L246
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L246
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L246
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L246
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  je     L246
  mov    $0x0,%eax
  jmp    L133
L246:
  mov    -0x8(%rbp),%rax
L133:
  leave
  ret
```

assistant: ```c
char *strstr_ex(char *data, char *search_data) {
  char *p, *pp;
  p = strstr(data, search_data);
  if (!p)
    return p;
  pp = p;
  p += strlen(search_data);
  if (p > search_data) {
    if (!((*(p - 1) == ' ' || *(p - 1) == '\t' || *(p - 1) == ';' || *(p - 1) == ':' || *(p - 1) == 0 || *(p - 1) == '\n' || *(p - 1) == '*') || *(p - 1) == '=')) {
      if (!(*p == ' ' || *p == '\t' || *p == ';' || *p == ':' || *p == 0 || *p == '\n' || *p == '*'))
        return NULL;
    }
  }
  if (pp > data) {
    p = pp - 1;
    if (!(*p == ' ' || *p == '\t' || *p == ';' || *p == ':' || *p == 0 || *p == '\n' || *p == '*'))
      return NULL;
  }
  return pp;
}
```