user: Please show me the C implementation that matches the assembly code listed below:

```asm
<quotaStrglob>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  movsbl (%rdi),%edx
  test   %edx,%edx
  je     L195
  mov    %rdi,%rax
  lea    0x1(%rdi),%rbx
  mov    %edx,%ecx
  jmp    L115
  nopw   0x0(%rax,%rax,1)
L301:
  cmp    $0x5b,%edx
  je     L404
  cmp    %sil,%cl
  jne    L378
L34:
  mov    %rbx,%rax
  movsbl (%rax),%edx
  lea    0x1(%rax),%rbx
  mov    %edx,%ecx
  test   %edx,%edx
  je     L195
L115:
  cmp    $0x2a,%edx
  je     L180
  movzbl 0x0(%rbp),%esi
  add    $0x1,%rbp
  cmp    $0x3f,%edx
  jne    L301
  test   %sil,%sil
  jne    L34
  nopl   0x0(%rax)
L378:
  xor    %r8d,%r8d
L382:
  add    $0x8,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L381:
  cmpb   $0x0,0x0(%rbp)
  lea    0x1(%rbp),%rax
  je     L378
  mov    %rax,%rbp
L154:
  mov    %r13,%rbx
L180:
  movsbl (%rbx),%r12d
  lea    0x1(%rbx),%r13
  cmp    $0x2a,%r12d
  je     L154
  cmp    $0x3f,%r12d
  je     L381
  mov    $0x1,%r8d
  test   %r12d,%r12d
  je     L382
  cmp    $0x5b,%r12d
  je     L112
L165:
  movsbl 0x0(%rbp),%r8d
  lea    0x1(%rbp),%rbx
  test   %r8d,%r8d
  jne    L49
  jmp    L382
  nopl   0x0(%rax)
L332:
  movsbl (%rbx),%r8d
  add    $0x1,%rbx
  test   %r8d,%r8d
  je     L382
L49:
  cmp    %r12d,%r8d
  jne    L332
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <quotaStrglob>
  test   %eax,%eax
  jne    L153
  mov    %rbx,%rbp
  jmp    L165
  nopw   0x0(%rax,%rax,1)
L404:
  movsbl %sil,%r8d
  test   %r8d,%r8d
  je     L382
  movsbl 0x1(%rax),%edx
  cmp    $0x5e,%edx
  je     L51
  add    $0x2,%rax
  xor    %ebx,%ebx
L366:
  xor    %r11d,%r11d
  cmp    $0x5d,%edx
  jne    L44
  xor    %r11d,%r11d
  cmp    $0x5d,%r8d
  movsbl (%rax),%edx
  sete   %r11b
  add    $0x1,%rax
L44:
  test   %edx,%edx
  je     L378
  xor    %edi,%edi
  jmp    L331
  xchg   %ax,%ax
L278:
  mov    %edx,%edi
  cmp    %edx,%r8d
  jne    L105
  mov    %r8d,%edi
  mov    $0x1,%r11d
L105:
  movsbl %cl,%edx
  mov    %rsi,%rax
  test   %edx,%edx
  je     L378
L331:
  cmp    $0x5d,%edx
  je     L65
  movsbl (%rax),%ecx
  lea    0x1(%rax),%rsi
  cmp    $0x2d,%edx
  jne    L278
  cmp    $0x5d,%cl
  setne  %r10b
  test   %cl,%cl
  setne  %r9b
  test   %r9b,%r10b
  je     L278
  test   %edi,%edi
  jle    L278
  cmp    %edi,%r8d
  setge  %sil
  cmp    %ecx,%r8d
  movzbl 0x1(%rax),%ecx
  setle  %dl
  xor    %edi,%edi
  test   %dl,%sil
  je     L33
  mov    $0x1,%r11d
L33:
  lea    0x2(%rax),%rsi
  jmp    L105
  nopl   0x0(%rax)
L65:
  test   %edx,%edx
  je     L378
  cmp    %r11d,%ebx
  je     L378
  movsbl (%rax),%edx
  lea    0x1(%rax),%rbx
  mov    %edx,%ecx
  test   %edx,%edx
  jne    L115
L195:
  xor    %r8d,%r8d
  cmpb   $0x0,0x0(%rbp)
  sete   %r8b
  add    $0x8,%rsp
  pop    %rbx
  mov    %r8d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L51:
  movsbl 0x2(%rax),%edx
  mov    $0x1,%ebx
  add    $0x3,%rax
  jmp    L366
L112:
  cmpb   $0x0,0x0(%rbp)
  je     L378
L186:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <quotaStrglob>
  mov    %eax,%r8d
  test   %eax,%eax
  jne    L153
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  jne    L186
  jmp    L382
L153:
  mov    $0x1,%r8d
  jmp    L382
```

assistant: ```c
int quotaStrglob(const char *zGlob, const char *z) {
  int c, c2;
  int invert;
  int seen;
  while ((c = (*(zGlob++))) != 0) {
    if (c == '*') {
      while ((c = (*(zGlob++))) == '*' || c == '?') {
        if (c == '?' && (*(z++)) == 0)
          return 0;
      }
      if (c == 0) {
        return 1;
      } else if (c == '[') {
        while (*z && quotaStrglob(zGlob - 1, z) == 0) {
          z++;
        }
        return (*z) != 0;
      }
      while ((c2 = (*(z++))) != 0) {
        while (c2 != c) {
          c2 = *(z++);
          if (c2 == 0)
            return 0;
        }
        if (quotaStrglob(zGlob, z))
          return 1;
      }
      return 0;
    } else if (c == '?') {
      if ((*(z++)) == 0)
        return 0;
    } else if (c == '[') {
      int prior_c = 0;
      seen = 0;
      invert = 0;
      c = *(z++);
      if (c == 0)
        return 0;
      c2 = *(zGlob++);
      if (c2 == '^') {
        invert = 1;
        c2 = *(zGlob++);
      }
      if (c2 == ']') {
        if (c == ']')
          seen = 1;
        c2 = *(zGlob++);
      }
      while (c2 && c2 != ']') {
        if (c2 == '-' && zGlob[0] != ']' && zGlob[0] != 0 && prior_c > 0) {
          c2 = *(zGlob++);
          if (c >= prior_c && c <= c2)
            seen = 1;
          prior_c = 0;
        } else {
          if (c == c2) {
            seen = 1;
          }
          prior_c = c2;
        }
        c2 = *(zGlob++);
      }
      if (c2 == 0 || (seen ^ invert) == 0)
        return 0;
    } else {
      if (c != (*(z++)))
        return 0;
    }
  }
  return *z == 0;
}
```