user: What would the C source look like for the assembly code provided here?

```asm
<stringmatchlen>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x40(%rbp)
  mov    %r8d,-0x4c(%rbp)
  jmp    L152
L136:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x5c,%eax
  je     L98
  cmp    $0x5c,%eax
  jg     L279
  cmp    $0x5b,%eax
  je     L15
  cmp    $0x5b,%eax
  jg     L279
  cmp    $0x2a,%eax
  je     L404
  cmp    $0x3f,%eax
  je     L422
  jmp    L279
L86:
  addq   $0x1,-0x38(%rbp)
  subl   $0x1,-0x3c(%rbp)
L404:
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  je     L86
  cmpl   $0x1,-0x3c(%rbp)
  jne    L120
  mov    $0x1,%eax
  jmp    L421
L327:
  mov    -0x3c(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdi
  mov    -0x4c(%rbp),%ecx
  mov    -0x40(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %ecx,%r8d
  mov    %edx,%ecx
  mov    %rax,%rdx
  call   <stringmatchlen>
  test   %eax,%eax
  je     L434
  mov    $0x1,%eax
  jmp    L421
L434:
  addq   $0x1,-0x48(%rbp)
  subl   $0x1,-0x40(%rbp)
L120:
  cmpl   $0x0,-0x40(%rbp)
  jne    L327
  mov    $0x0,%eax
  jmp    L421
L422:
  cmpl   $0x0,-0x40(%rbp)
  jne    L285
  mov    $0x0,%eax
  jmp    L421
L285:
  addq   $0x1,-0x48(%rbp)
  subl   $0x1,-0x40(%rbp)
  jmp    L176
L15:
  addq   $0x1,-0x38(%rbp)
  subl   $0x1,-0x3c(%rbp)
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5e,%al
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  je     L472
  addq   $0x1,-0x38(%rbp)
  subl   $0x1,-0x3c(%rbp)
L472:
  movl   $0x0,-0x28(%rbp)
L89:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L117
  addq   $0x1,-0x38(%rbp)
  subl   $0x1,-0x3c(%rbp)
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L473
  movl   $0x1,-0x28(%rbp)
  jmp    L473
L117:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  je     L496
  cmpl   $0x0,-0x3c(%rbp)
  jne    L192
  subq   $0x1,-0x38(%rbp)
  addl   $0x1,-0x3c(%rbp)
  jmp    L376
L192:
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L462
  cmpl   $0x2,-0x3c(%rbp)
  jle    L462
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x24(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L471
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x20(%rbp)
L471:
  cmpl   $0x0,-0x4c(%rbp)
  je     L454
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x1c(%rbp)
L454:
  addq   $0x2,-0x38(%rbp)
  subl   $0x2,-0x3c(%rbp)
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L413
  mov    -0x1c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jg     L413
  movl   $0x1,-0x28(%rbp)
  jmp    L413
L462:
  cmpl   $0x0,-0x4c(%rbp)
  jne    L368
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L473
  movl   $0x1,-0x28(%rbp)
  jmp    L473
L368:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  jne    L473
  movl   $0x1,-0x28(%rbp)
  jmp    L473
L413:
  nop
L473:
  addq   $0x1,-0x38(%rbp)
  subl   $0x1,-0x3c(%rbp)
  jmp    L89
L496:
  nop
L376:
  cmpl   $0x0,-0x18(%rbp)
  je     L272
  cmpl   $0x0,-0x28(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x28(%rbp)
L272:
  cmpl   $0x0,-0x28(%rbp)
  jne    L131
  mov    $0x0,%eax
  jmp    L421
L131:
  addq   $0x1,-0x48(%rbp)
  subl   $0x1,-0x40(%rbp)
  jmp    L176
L98:
  cmpl   $0x1,-0x3c(%rbp)
  jle    L279
  addq   $0x1,-0x38(%rbp)
  subl   $0x1,-0x3c(%rbp)
L279:
  cmpl   $0x0,-0x4c(%rbp)
  jne    L241
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L204
  mov    $0x0,%eax
  jmp    L421
L241:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  je     L204
  mov    $0x0,%eax
  jmp    L421
L204:
  addq   $0x1,-0x48(%rbp)
  subl   $0x1,-0x40(%rbp)
  nop
L176:
  addq   $0x1,-0x38(%rbp)
  subl   $0x1,-0x3c(%rbp)
  cmpl   $0x0,-0x40(%rbp)
  jne    L152
  jmp    L82
L546:
  addq   $0x1,-0x38(%rbp)
  subl   $0x1,-0x3c(%rbp)
L82:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  je     L546
  jmp    L460
L152:
  cmpl   $0x0,-0x3c(%rbp)
  jne    L136
L460:
  cmpl   $0x0,-0x3c(%rbp)
  jne    L501
  cmpl   $0x0,-0x40(%rbp)
  jne    L501
  mov    $0x1,%eax
  jmp    L421
L501:
  mov    $0x0,%eax
L421:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

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