user: Translate the below assembly code into C programming language:

```asm
<string_has_highlight>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L292
  cmpb   $0x0,(%rdi)
  mov    %rdi,%r15
  je     L292
  mov    %rsi,%rbp
  test   %rsi,%rsi
  je     L292
  cmpb   $0x0,(%rsi)
  je     L292
  call   <strdup@plt>
  mov    %rax,0x38(%rsp)
  test   %rax,%rax
  je     L292
  mov    %rax,%rdi
  call   <string_tolower@plt>
  mov    %rbp,%rdi
  call   <strdup@plt>
  mov    %rax,0x30(%rsp)
  test   %rax,%rax
  je     L103
  mov    0x30(%rsp),%rbx
  mov    %rbx,%rdi
  call   <string_tolower@plt>
  lea    0x44(%rsp),%rax
  mov    %r15,0x28(%rsp)
  mov    %rbx,%rdi
  mov    %rax,0x20(%rsp)
L98:
  mov    D18(%rip),%rax
  mov    0x20(%rsp),%rdx
  movl   $0x0,0x44(%rsp)
  mov    (%rax),%esi
  call   <string_regex_flags@plt>
  mov    $0x2c,%esi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strchr@plt>
  movl   $0x0,0x1c(%rsp)
  mov    %rax,%rbx
  test   %rax,%rax
  je     L85
L59:
  mov    D18(%rip),%rsi
  mov    0x44(%rsp),%eax
  mov    0x28(%rsp),%r12
  and    (%rsi),%eax
  jne    L93
L142:
  mov    %rbx,%rax
  movb   $0x0,(%rbx)
  sub    %rbp,%rax
  mov    %eax,%r13d
  test   %eax,%eax
  jle    L241
  movzbl 0x0(%rbp),%edx
  movzbl -0x1(%rbx),%ecx
  cmp    $0x2a,%dl
  je     L137
  cmp    $0x2a,%cl
  je     L1
L119:
  cmp    $0x2a,%dl
  mov    %r12,%r15
  sete   %r14b
  cmp    $0x2a,%cl
  sete   %al
  sete   0x13(%rsp)
  movzbl %al,%eax
  mov    %eax,0x18(%rsp)
  movslq %r13d,%rax
  mov    %rax,0x8(%rsp)
  nopl   (%rax)
L3:
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <strstr@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L241
  mov    %r12,%rdi
  mov    %r13,%rsi
  call   <utf8_prev_char@plt>
  mov    $0x1,%edx
  mov    %rax,%rdi
  lea    -0x1(%r13),%rax
  test   %rdi,%rdi
  cmove  %rax,%rdi
  mov    0x8(%rsp),%rax
  lea    0x0(%r13,%rax,1),%r15
  cmp    %r13,%r12
  je     L290
  call   <string_is_word_char@plt>
  xor    %edx,%edx
  test   %eax,%eax
  sete   %dl
L290:
  cmpb   $0x0,(%r15)
  mov    $0x1,%eax
  jne    L199
L184:
  test   %r14b,%r14b
  je     L223
  cmpb   $0x0,0x13(%rsp)
  jne    L154
L317:
  test   %eax,%eax
  je     L4
  test   %r14b,%r14b
  jne    L154
L4:
  test   %edx,0x18(%rsp)
  je     L3
L154:
  mov    0x38(%rsp),%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    $0x1,%eax
  jmp    L42
  nopl   (%rax)
L52:
  mov    0x38(%rsp),%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
L292:
  xor    %eax,%eax
L42:
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L53
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L223:
  cmpb   $0x0,0x13(%rsp)
  jne    L317
  test   %eax,%edx
  je     L3
  jmp    L154
  nopl   0x0(%rax)
L199:
  mov    %r15,%rdi
  mov    %edx,0x14(%rsp)
  call   <string_is_word_char@plt>
  mov    0x14(%rsp),%edx
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  jmp    L184
  nopl   (%rax)
L137:
  add    $0x1,%rbp
  lea    -0x1(%rax),%r13d
  cmp    $0x2a,%cl
  jne    L173
L1:
  movb   $0x0,-0x1(%rbx)
  sub    $0x1,%r13d
L173:
  test   %r13d,%r13d
  jg     L119
L241:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jne    L52
  lea    0x1(%rbx),%rdi
  jmp    L98
  nopl   0x0(%rax,%rax,1)
L93:
  cmp    %rbx,%rbp
  jae    L330
  mov    %rbp,%rax
  nopl   0x0(%rax,%rax,1)
L132:
  movzbl (%rax),%edx
  lea    -0x41(%rdx),%ecx
  cmp    $0x19,%cl
  ja     L207
  add    $0x20,%edx
  mov    %dl,(%rax)
L207:
  add    $0x1,%rax
  cmp    %rbx,%rax
  jne    L132
L330:
  mov    0x38(%rsp),%r12
  jmp    L142
  nopl   0x0(%rax,%rax,1)
L85:
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L52
  movl   $0x1,0x1c(%rsp)
  jmp    L59
L53:
  call   <__stack_chk_fail@plt>
L103:
  mov    0x38(%rsp),%rdi
  call   <free@plt>
  xor    %eax,%eax
  jmp    L42
```

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, *ptr_str, *ptr_string_ref;
  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;
  string_tolower(msg);
  highlight = strdup(highlight_words);
  if (!highlight) {
    free(msg);
    return 0;
  }
  string_tolower(highlight);
  pos = highlight;
  end = 0;
  while (!end) {
    ptr_string_ref = (char *)string;
    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;
    }
    if (flags & REG_ICASE) {
      for (ptr_str = pos; ptr_str < pos_end; ptr_str++) {
        if ((ptr_str[0] >= 'A') && (ptr_str[0] <= 'Z'))
          ptr_str[0] += ('a' - 'A');
      }
      ptr_string_ref = msg;
    }
    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 = ptr_string_ref;
      while ((match = strstr(msg_pos, pos)) != NULL) {
        match_pre = utf8_prev_char(ptr_string_ref, match);
        if (!match_pre)
          match_pre = match - 1;
        match_post = match + length;
        startswith = ((match == ptr_string_ref) || (!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;
}
```