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

```asm
<stringmatchlen>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %esi,%ebx
  mov    %r8d,(%rsp)
  lea    0x1(%rdx),%r14
  lea    -0x1(%rcx),%r15d
  jmp    L246
L153:
  cmp    $0x5c,%al
  jne    L258
  cmp    $0x1,%ebx
  jle    L258
  add    $0x1,%r13
  sub    $0x1,%ebx
L258:
  cmpl   $0x0,(%rsp)
  jne    L236
  movzbl -0x1(%r14),%eax
  cmp    %al,0x0(%r13)
  jne    L206
L459:
  mov    %r15d,%r12d
  mov    %r13,%rbp
L416:
  lea    0x1(%rbp),%r13
  sub    $0x1,%ebx
  add    $0x1,%r14
  sub    $0x1,%r15d
  test   %r12d,%r12d
  je     L272
L246:
  lea    -0x1(%r14),%rbp
  lea    0x1(%r15),%r12d
  test   %ebx,%ebx
  je     L41
  movzbl 0x0(%r13),%eax
  cmp    $0x5b,%al
  je     L125
  jg     L153
  cmp    $0x2a,%al
  je     L111
  cmp    $0x3f,%al
  jne    L258
  test   %r12d,%r12d
  je     L476
  mov    %r15d,%r12d
  mov    %r13,%rbp
  jmp    L416
L111:
  cmpb   $0x2a,0x1(%r13)
  jne    L421
  mov    %r13,%r14
  add    %ebx,%r13d
L0:
  add    $0x1,%r14
  mov    %r13d,%ebx
  sub    %r14d,%ebx
  cmpb   $0x2a,0x1(%r14)
  je     L0
L180:
  cmp    $0x1,%ebx
  je     L28
  test   %r12d,%r12d
  je     L476
  sub    $0x1,%ebx
  jmp    L305
L421:
  mov    %r13,%r14
  jmp    L180
L239:
  add    $0x1,%rbp
  sub    $0x1,%r12d
  je     L476
L305:
  lea    0x1(%r14),%rdi
  mov    (%rsp),%r8d
  mov    %r12d,%ecx
  mov    %rbp,%rdx
  mov    %ebx,%esi
  call   <stringmatchlen>
  test   %eax,%eax
  je     L239
  mov    $0x1,%r12d
  jmp    L476
L125:
  movzbl 0x1(%r13),%eax
  mov    %al,0xf(%rsp)
  cmp    $0x5e,%al
  je     L257
  lea    0x1(%r13),%rbp
  sub    $0x1,%ebx
L359:
  mov    $0x0,%r12d
  jmp    L95
L257:
  lea    0x2(%r13),%rbp
  sub    $0x2,%ebx
  jmp    L359
L165:
  sub    $0x1,%ebx
  movzbl 0x1(%rbp),%eax
  lea    0x1(%rbp),%rbp
  cmp    -0x1(%r14),%al
  mov    $0x1,%eax
  cmove  %eax,%r12d
L418:
  add    $0x1,%rbp
  sub    $0x1,%ebx
L95:
  movzbl 0x0(%rbp),%r13d
  cmp    $0x5c,%r13b
  je     L165
  cmp    $0x5d,%r13b
  je     L417
  test   %ebx,%ebx
  je     L92
  cmpb   $0x2d,0x1(%rbp)
  jne    L321
  cmp    $0x2,%ebx
  jg     L375
L321:
  cmpl   $0x0,(%rsp)
  jne    L179
  cmp    -0x1(%r14),%r13b
  mov    $0x1,%eax
  cmove  %eax,%r12d
  jmp    L418
L92:
  sub    $0x1,%rbp
  mov    $0x1,%ebx
L417:
  cmpb   $0x5e,0xf(%rsp)
  je     L327
  test   %r12d,%r12d
  je     L476
L440:
  mov    %r15d,%r12d
  jmp    L416
L375:
  movsbl %r13b,%r13d
  movsbl 0x2(%rbp),%edx
  mov    %edx,0x4(%rsp)
  movsbl -0x1(%r14),%eax
  mov    %eax,0x8(%rsp)
  cmp    %edx,%r13d
  jle    L279
  mov    %r13d,%eax
  mov    %edx,%r13d
  mov    %eax,0x4(%rsp)
L279:
  cmpl   $0x0,(%rsp)
  je     L201
  mov    %r13d,%edi
  call   <tolower@plt>
  mov    %eax,%r13d
  mov    0x4(%rsp),%edi
  call   <tolower@plt>
  mov    %eax,0x4(%rsp)
  mov    0x8(%rsp),%edi
  call   <tolower@plt>
  mov    %eax,0x8(%rsp)
L201:
  add    $0x2,%rbp
  sub    $0x2,%ebx
  mov    0x8(%rsp),%eax
  cmp    %eax,%r13d
  jg     L418
  cmp    %eax,0x4(%rsp)
  mov    $0x1,%eax
  cmovge %eax,%r12d
  jmp    L418
L179:
  movsbl %r13b,%edi
  call   <tolower@plt>
  mov    %eax,%r13d
  movsbl -0x1(%r14),%edi
  call   <tolower@plt>
  cmp    %eax,%r13d
  mov    $0x1,%eax
  cmove  %eax,%r12d
  jmp    L418
L327:
  test   %r12d,%r12d
  je     L440
  mov    $0x0,%r12d
  jmp    L476
L236:
  movsbl 0x0(%r13),%edi
  call   <tolower@plt>
  mov    %eax,%ebp
  movsbl -0x1(%r14),%edi
  call   <tolower@plt>
  cmp    %eax,%ebp
  je     L459
  mov    $0x0,%r12d
  jmp    L476
L272:
  cmpb   $0x2a,0x1(%rbp)
  jne    L41
  mov    %r13,%rax
  add    %ebx,%r13d
L390:
  add    $0x1,%rax
  mov    %r13d,%ebx
  sub    %eax,%ebx
  cmpb   $0x2a,(%rax)
  je     L390
L41:
  or     %ebx,%r12d
  sete   %r12b
  movzbl %r12b,%r12d
  jmp    L476
L28:
  mov    %ebx,%r12d
L476:
  mov    %r12d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L206:
  mov    (%rsp),%r12d
  jmp    L476
```

assistant: ```c
int stringmatchlen(const char *pattern, int patternLen, const char *string, int stringLen, int nocase) {
  while (patternLen) {
    switch (pattern[0]) {
    case '*':
      while (pattern[1] == '*') {
        pattern++;
        patternLen--;
      }
      if (patternLen == 1) {
        return 1;
      }
      while (stringLen) {
        if (stringmatchlen(pattern + 1, patternLen - 1, string, stringLen, nocase))
          return 1;
        string++;
        stringLen--;
      }
      return 0;
      break;
    case '?':
      if (stringLen == 0)
        return 0;
      string++;
      stringLen--;
      break;
    case '[': {
      int not, match;
      pattern++;
      patternLen--;
      not = pattern[0] == '^';
      if (not ) {
        pattern++;
        patternLen--;
      }
      match = 0;
      while (1) {
        if (pattern[0] == '\\') {
          pattern++;
          patternLen--;
          if (pattern[0] == string[0])
            match = 1;
        } else if (pattern[0] == ']') {
          break;
        } else if (patternLen == 0) {
          pattern--;
          patternLen++;
          break;
        } else if (pattern[1] == '-' && patternLen >= 3) {
          int start = pattern[0];
          int end = pattern[2];
          int c = string[0];
          if (start > end) {
            int t = start;
            start = end;
            end = t;
          }
          if (nocase) {
            start = tolower(start);
            end = tolower(end);
            c = tolower(c);
          }
          pattern += 2;
          patternLen -= 2;
          if (c >= start && c <= end)
            match = 1;
        } else {
          if (!nocase) {
            if (pattern[0] == string[0])
              match = 1;
          } else {
            if (tolower((int)pattern[0]) == tolower((int)string[0]))
              match = 1;
          }
        }
        pattern++;
        patternLen--;
      }
      if (not )
        match = !match;
      if (!match)
        return 0;
      string++;
      stringLen--;
      break;
    }
    case '\\':
      if (patternLen >= 2) {
        pattern++;
        patternLen--;
      }
    default:
      if (!nocase) {
        if (pattern[0] != string[0])
          return 0;
      } else {
        if (tolower((int)pattern[0]) != tolower((int)string[0]))
          return 0;
      }
      string++;
      stringLen--;
      break;
    }
    pattern++;
    patternLen--;
    if (stringLen == 0) {
      while (*pattern == '*') {
        pattern++;
        patternLen--;
      }
      break;
    }
  }
  if (patternLen == 0 && stringLen == 0) {
    return 1;
  }
  return 0;
}
```