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

```asm
<string_match>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edx,0xc(%rsp)
  test   %rdi,%rdi
  je     L21
  mov    %rdi,%r15
  mov    %rsi,%rbx
  test   %rsi,%rsi
  je     L21
  movzbl (%rsi),%eax
  mov    $0x0,%r14d
  test   %al,%al
  je     L61
  mov    %rdi,%r13
  jmp    L67
L141:
  lea    0x1(%rbx),%rbp
  movzbl 0x1(%rbx),%eax
  cmp    $0x2a,%al
  jne    L19
L14:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%eax
  cmp    $0x2a,%al
  je     L14
L19:
  test   %al,%al
  je     L190
  mov    $0x1,%r14d
  jmp    L201
L245:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%r12d
  movslq %eax,%rbx
  add    %rbp,%rbx
  jmp    L273
L170:
  mov    %rax,%rsi
  mov    %r13,%rdi
  call   <string_strcasestr@plt>
  jmp    L100
L234:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0x0,%r14d
  jmp    L61
L276:
  cmpl   $0x0,0xc(%rsp)
  jne    L24
  mov    %rax,%rdi
  call   <utf8_strlen@plt>
  mov    %eax,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <string_strncasecmp@plt>
  test   %rax,%rax
  je     L267
L208:
  mov    %rbp,%rdi
  call   <free@plt>
  jmp    L61
L24:
  mov    %r12d,%edx
  mov    %rax,%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L208
L267:
  movslq %r12d,%r12
  add    %r12,%r13
L183:
  mov    %rbp,%rdi
  call   <free@plt>
  movzbl (%rbx),%eax
  test   %al,%al
  je     L103
L67:
  mov    %rbx,%rbp
  mov    $0x0,%r14d
  cmp    $0x2a,%al
  je     L141
L201:
  cmpb   $0x0,(%r15)
  je     L156
  mov    $0x2a,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L245
  mov    %eax,%r12d
  sub    %ebp,%r12d
L273:
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <string_strndup@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L79
  test   %r14d,%r14d
  je     L276
  cmpl   $0x0,0xc(%rsp)
  je     L170
  mov    %rax,%rsi
  mov    %r13,%rdi
  call   <strstr@plt>
L100:
  test   %rax,%rax
  je     L234
  movslq %r12d,%r12
  lea    (%rax,%r12,1),%r13
  jmp    L183
L103:
  cmpb   $0x0,0x0(%r13)
  sete   %r14b
  movzbl %r14b,%r14d
  jmp    L61
L21:
  mov    $0x0,%r14d
L61:
  mov    %r14d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L190:
  mov    $0x1,%r14d
  jmp    L61
L156:
  mov    $0x0,%r14d
  jmp    L61
L79:
  mov    $0x0,%r14d
  jmp    L61
```

assistant: ```c
int string_match(const char *string, const char *mask, int case_sensitive) {
  const char *ptr_string, *ptr_mask, *pos_word, *pos_end;
  char *word;
  int wildcard, length_word;
  if (!string || !mask || !mask[0])
    return 0;
  ptr_string = string;
  ptr_mask = mask;
  while (ptr_mask[0]) {
    wildcard = 0;
    if (ptr_mask[0] == '*') {
      wildcard = 1;
      ptr_mask++;
      while (ptr_mask[0] == '*') {
        ptr_mask++;
      }
      if (!ptr_mask[0])
        return 1;
    }
    if (!string[0])
      return 0;
    pos_end = strchr(ptr_mask, '*');
    if (pos_end) {
      length_word = pos_end - ptr_mask;
    } else {
      length_word = strlen(ptr_mask);
      pos_end = ptr_mask + length_word;
    }
    word = string_strndup(ptr_mask, length_word);
    if (!word)
      return 0;
    if (wildcard) {
      pos_word = (case_sensitive) ? strstr(ptr_string, word) : string_strcasestr(ptr_string, word);
      if (!pos_word) {
        free(word);
        return 0;
      }
      ptr_string = pos_word + length_word;
    } else {
      if ((case_sensitive && (strncmp(ptr_string, word, length_word) != 0)) || (!case_sensitive && (string_strncasecmp(ptr_string, word, utf8_strlen(word)) != 0))) {
        free(word);
        return 0;
      }
      ptr_string += length_word;
    }
    free(word);
    ptr_mask = pos_end;
  }
  if (!ptr_string[0] && !ptr_mask[0])
    return 1;
  return 0;
}
```