user: Demonstrate the C code that generates the assembly output below:

```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     L315
  mov    %rsi,%rbx
  cmpb   $0x0,(%rdi)
  je     L385
  test   %rsi,%rsi
  je     L385
  cmpb   $0x0,(%rsi)
  je     L310
  call   <strdup@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L128
  mov    %rbx,%rdi
  call   <strdup@plt>
  mov    %rax,0x28(%rsp)
  test   %rax,%rax
  je     L283
  mov    0x28(%rsp),%rdi
  lea    0x34(%rsp),%rax
  mov    %rax,0x18(%rsp)
  jmp    L5
L283:
  mov    %r13,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L310
L102:
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  je     L145
  mov    0x10(%rsp),%rcx
  mov    %rcx,%rax
  sub    %r12,%rax
  mov    %eax,0xc(%rsp)
  movb   $0x0,(%rcx)
  test   %eax,%eax
  jle    L373
  movl   $0x1,0x24(%rsp)
  jmp    L12
L145:
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L310
L362:
  add    $0x1,%r12
  subl   $0x1,0xc(%rsp)
  movl   $0x0,0x8(%rsp)
  mov    0x10(%rsp),%rcx
  cmpb   $0x2a,-0x1(%rcx)
  jne    L277
L396:
  mov    0x10(%rsp),%rcx
  movb   $0x0,-0x1(%rcx)
  subl   $0x1,0xc(%rsp)
  movl   $0x1,0x8(%rsp)
L277:
  cmpl   $0x0,0xc(%rsp)
  jg     L52
L341:
  cmpl   $0x0,0x24(%rsp)
  je     L369
L373:
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L310
L242:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <string_strcasestr@plt>
  mov    %rax,%rbx
  jmp    L65
L344:
  mov    %rbp,%rdi
  call   <string_is_word_char@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  jmp    L327
L27:
  test   %eax,%eax
  je     L25
  test   %r15b,%r15b
  jne    L82
L25:
  test   %r14d,%r14d
  je     L312
  test   %dl,%dl
  jne    L82
L312:
  mov    0x34(%rsp),%eax
  mov    D7(%rip),%rcx
  and    (%rcx),%eax
  jne    L242
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  mov    %rax,%rbx
L65:
  test   %rbx,%rbx
  je     L341
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <utf8_prev_char@plt>
  mov    %rax,%rdi
  lea    -0x1(%rbx),%rax
  test   %rdi,%rdi
  cmove  %rax,%rdi
  movslq 0xc(%rsp),%rbp
  add    %rbx,%rbp
  mov    $0x1,%r14d
  cmp    %r13,%rbx
  je     L319
  call   <string_is_word_char@plt>
  test   %eax,%eax
  sete   %r14b
  movzbl %r14b,%r14d
L319:
  mov    $0x1,%eax
  cmpb   $0x0,0x0(%rbp)
  jne    L344
L327:
  movzbl 0x8(%rsp),%edx
  test   %r15b,%r15b
  je     L160
  test   %dl,%dl
  jne    L82
L160:
  mov    0x20(%rsp),%ecx
  or     0x8(%rsp),%ecx
  jne    L27
  test   %r14d,%r14d
  je     L312
  test   %eax,%eax
  je     L312
L82:
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    $0x1,%eax
  jmp    L310
L369:
  mov    0x10(%rsp),%rdi
  add    $0x1,%rdi
L5:
  movl   $0x0,0x34(%rsp)
  mov    0x18(%rsp),%rdx
  mov    D7(%rip),%rax
  mov    (%rax),%esi
  call   <string_regex_flags@plt>
  mov    %rax,%r12
  mov    $0x2c,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  je     L102
  mov    0x10(%rsp),%rdx
  mov    %rdx,%rax
  sub    %r12,%rax
  mov    %eax,0xc(%rsp)
  movb   $0x0,(%rdx)
  movl   $0x0,0x24(%rsp)
  test   %eax,%eax
  jle    L369
L12:
  movzbl (%r12),%eax
  cmp    $0x2a,%al
  je     L362
  mov    0x10(%rsp),%rdx
  cmpb   $0x2a,-0x1(%rdx)
  je     L396
  movl   $0x0,0x8(%rsp)
L52:
  cmp    $0x2a,%al
  sete   %r15b
  sete   %al
  movzbl %al,%eax
  mov    %eax,0x20(%rsp)
  mov    %r13,%rbp
  jmp    L312
L315:
  mov    $0x0,%eax
  jmp    L310
L385:
  mov    $0x0,%eax
L310:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L137
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L128:
  mov    $0x0,%eax
  jmp    L310
L137:
  call   <__stack_chk_fail@plt>
```

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;
}
```