user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<string_has_highlight>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L292
  cmpb   $0x0,(%rdi)
  je     L292
  mov    %rsi,%rbp
  test   %rsi,%rsi
  je     L292
  cmpb   $0x0,(%rsi)
  je     L292
  call   <strdup@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L292
  mov    %rbp,%rdi
  call   <strdup@plt>
  mov    %rax,0x20(%rsp)
  test   %rax,%rax
  je     L103
  lea    0x34(%rsp),%rax
  mov    0x20(%rsp),%rdi
  mov    %rax,0x18(%rsp)
L141:
  mov    D5(%rip),%rax
  mov    0x18(%rsp),%rdx
  movl   $0x0,0x34(%rsp)
  mov    (%rax),%esi
  call   <string_regex_flags@plt>
  mov    $0x2c,%esi
  mov    %rax,%rdi
  mov    %rax,%rbx
  call   <strchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L189
  mov    %rax,%rdx
  movb   $0x0,0x0(%rbp)
  sub    %rbx,%rdx
  movl   $0x0,0x2c(%rsp)
  mov    %edx,%eax
  test   %edx,%edx
  jle    L275
L298:
  movzbl (%rbx),%edx
  movzbl -0x1(%rbp),%ecx
  cmp    $0x2a,%dl
  je     L9
  cmp    $0x2a,%cl
  je     L62
L93:
  cmp    $0x2a,%dl
  cltq
  mov    %r12,%r13
  sete   %r14b
  cmp    $0x2a,%cl
  mov    %rax,0x8(%rsp)
  sete   %cl
  sete   0x13(%rsp)
  movzbl %cl,%ecx
  mov    %ecx,0x28(%rsp)
  xchg   %ax,%ax
L55:
  mov    D5(%rip),%rdx
  mov    0x34(%rsp),%eax
  mov    %rbx,%rsi
  mov    %r13,%rdi
  and    (%rdx),%eax
  jne    L154
  call   <strstr@plt>
  mov    %rax,%r15
L241:
  test   %r15,%r15
  je     L61
  mov    %r12,%rdi
  mov    %r15,%rsi
  call   <utf8_prev_char@plt>
  mov    $0x1,%ecx
  mov    %rax,%rdi
  lea    -0x1(%r15),%rax
  test   %rdi,%rdi
  cmove  %rax,%rdi
  mov    0x8(%rsp),%rax
  lea    (%r15,%rax,1),%r13
  cmp    %r12,%r15
  je     L236
  call   <string_is_word_char@plt>
  xor    %ecx,%ecx
  test   %eax,%eax
  sete   %cl
L236:
  cmpb   $0x0,0x0(%r13)
  mov    $0x1,%eax
  jne    L274
L180:
  test   %r14b,%r14b
  je     L128
  cmpb   $0x0,0x13(%rsp)
  jne    L209
L79:
  test   %eax,%eax
  je     L127
  test   %r14b,%r14b
  jne    L209
L127:
  test   %ecx,0x28(%rsp)
  je     L55
L209:
  mov    %r12,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  call   <free@plt>
  mov    $0x1,%eax
  jmp    L261
  xchg   %ax,%ax
L9:
  add    $0x1,%rbx
  sub    $0x1,%eax
  cmp    $0x2a,%cl
  jne    L317
L62:
  movb   $0x0,-0x1(%rbp)
  sub    $0x1,%eax
L317:
  test   %eax,%eax
  jg     L93
L61:
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  je     L275
L41:
  mov    %r12,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  call   <free@plt>
L292:
  xor    %eax,%eax
L261:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L242
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L128:
  cmpb   $0x0,0x13(%rsp)
  jne    L79
  test   %eax,%ecx
  je     L55
  jmp    L209
  nopl   0x0(%rax,%rax,1)
L154:
  call   <string_strcasestr@plt>
  mov    %rax,%r15
  jmp    L241
  nopl   (%rax)
L274:
  mov    %r13,%rdi
  mov    %ecx,0x14(%rsp)
  call   <string_is_word_char@plt>
  mov    0x14(%rsp),%ecx
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  jmp    L180
  nopl   (%rax)
L275:
  lea    0x1(%rbp),%rdi
  jmp    L141
  nopl   0x0(%rax)
L189:
  xor    %esi,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L41
  mov    %rax,%rdx
  movb   $0x0,0x0(%rbp)
  sub    %rbx,%rdx
  mov    %edx,%eax
  test   %edx,%edx
  jle    L41
  movl   $0x1,0x2c(%rsp)
  jmp    L298
L242:
  call   <__stack_chk_fail@plt>
L103:
  mov    %r12,%rdi
  call   <free@plt>
  xor    %eax,%eax
  jmp    L261
```

assistant: ```c
int string_has_highlight(const char *string, const char *highlight_words) {
  char *msg, *highlight, *match, *match_pre, *match_post, *msg_pos;
  char *pos, *pos_end;
  int end, length, startswith, endswith, wildcard_start, wildcard_end, flags;
  if (!string || !string[0] || !highlight_words || !highlight_words[0])
    return 0;
  msg = strdup(string);
  if (!msg)
    return 0;
  highlight = strdup(highlight_words);
  if (!highlight) {
    free(msg);
    return 0;
  }
  pos = highlight;
  end = 0;
  while (!end) {
    flags = 0;
    pos = (char *)string_regex_flags(pos, REG_ICASE, &flags);
    pos_end = strchr(pos, ',');
    if (!pos_end) {
      pos_end = strchr(pos, '\0');
      end = 1;
    }
    if (!pos_end) {
      free(msg);
      free(highlight);
      return 0;
    }
    length = pos_end - pos;
    pos_end[0] = '\0';
    if (length > 0) {
      if ((wildcard_start = (pos[0] == '*'))) {
        pos++;
        length--;
      }
      if ((wildcard_end = (*(pos_end - 1) == '*'))) {
        *(pos_end - 1) = '\0';
        length--;
      }
    }
    if (length > 0) {
      msg_pos = msg;
      while (1) {
        match = (flags & REG_ICASE) ? string_strcasestr(msg_pos, pos) : strstr(msg_pos, pos);
        if (!match)
          break;
        match_pre = utf8_prev_char(msg, match);
        if (!match_pre)
          match_pre = match - 1;
        match_post = match + length;
        startswith = ((match == msg) || (!string_is_word_char(match_pre)));
        endswith = ((!match_post[0]) || (!string_is_word_char(match_post)));
        if ((wildcard_start && wildcard_end) || (!wildcard_start && !wildcard_end && startswith && endswith) || (wildcard_start && endswith) || (wildcard_end && startswith)) {
          free(msg);
          free(highlight);
          return 1;
        }
        msg_pos = match_post;
      }
    }
    if (!end)
      pos = pos_end + 1;
  }
  free(msg);
  free(highlight);
  return 0;
}
```