user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<Tcl_StringMatch>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  movzbl (%rsi),%edx
  test   %dl,%dl
  jne    L181
L245:
  cmpb   $0x0,(%rbx)
  sete   %al
  movzbl %al,%eax
  jmp    L191
L115:
  mov    $0x1,%eax
  cmpb   $0x0,0x1(%rsi)
  je     L191
  lea    0x1(%rsi),%rbp
  jmp    L118
L125:
  add    $0x1,%rbx
L118:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <Tcl_StringMatch>
  test   %eax,%eax
  jne    L339
  cmpb   $0x0,(%rbx)
  jne    L125
  jmp    L191
L257:
  lea    0x1(%rsi),%rax
  movzbl 0x1(%rsi),%edx
  cmp    $0x5d,%dl
  je     L36
  test   %dl,%dl
  jne    L87
L36:
  mov    $0x0,%eax
  jmp    L191
L310:
  lea    0x2(%rax),%rsi
L61:
  lea    0x1(%rsi),%rax
  movzbl 0x1(%rsi),%edx
  cmp    $0x5d,%dl
  je     L13
  test   %dl,%dl
  je     L13
L87:
  cmp    %dl,%cl
  je     L222
  mov    %rax,%rsi
  cmpb   $0x2d,0x1(%rax)
  jne    L61
  movzbl 0x2(%rax),%esi
  test   %sil,%sil
  je     L361
  cmp    %sil,%cl
  jg     L372
  cmp    %dl,%cl
  jge    L222
L372:
  cmp    %sil,%cl
  jl     L310
  cmp    %dl,%cl
  jg     L310
L222:
  movzbl (%rax),%edx
  cmp    $0x5d,%dl
  je     L295
  test   %dl,%dl
  je     L295
L88:
  add    $0x1,%rax
  movzbl (%rax),%edx
  cmp    $0x5d,%dl
  je     L295
  test   %dl,%dl
  jne    L88
  jmp    L295
L113:
  cmp    (%rax),%cl
  jne    L240
L295:
  lea    0x1(%rax),%rsi
  add    $0x1,%rbx
  movzbl 0x1(%rax),%edx
  test   %dl,%dl
  je     L245
L181:
  movzbl (%rbx),%ecx
  test   %cl,%cl
  jne    L25
  cmp    $0x2a,%dl
  jne    L120
L25:
  cmp    $0x2a,%dl
  je     L115
  cmp    $0x3f,%dl
  je     L312
  cmp    $0x5b,%dl
  je     L257
  mov    %rsi,%rax
  cmp    $0x5c,%dl
  jne    L113
  lea    0x1(%rsi),%rax
  cmpb   $0x0,0x1(%rsi)
  jne    L113
  mov    $0x0,%eax
  jmp    L191
L312:
  mov    %rsi,%rax
  jmp    L295
L120:
  mov    $0x0,%eax
  jmp    L191
L339:
  mov    $0x1,%eax
  jmp    L191
L361:
  mov    $0x0,%eax
  jmp    L191
L13:
  mov    $0x0,%eax
L191:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L240:
  mov    $0x0,%eax
  jmp    L191
```

assistant: ```c
int Tcl_StringMatch(const char *string, const char *pattern) {
  char c2;
  while (1) {
    if (*pattern == 0) {
      if (*string == 0) {
        return 1;
      } else {
        return 0;
      }
    }
    if ((*string == 0) && (*pattern != '*')) {
      return 0;
    }
    if (*pattern == '*') {
      pattern += 1;
      if (*pattern == 0) {
        return 1;
      }
      while (1) {
        if (Tcl_StringMatch(string, pattern)) {
          return 1;
        }
        if (*string == 0) {
          return 0;
        }
        string += 1;
      }
    }
    if (*pattern == '?') {
      goto thisCharOK;
    }
    if (*pattern == '[') {
      pattern += 1;
      while (1) {
        if ((*pattern == ']') || (*pattern == 0)) {
          return 0;
        }
        if (*pattern == *string) {
          break;
        }
        if (pattern[1] == '-') {
          c2 = pattern[2];
          if (c2 == 0) {
            return 0;
          }
          if ((*pattern <= *string) && (c2 >= *string)) {
            break;
          }
          if ((*pattern >= *string) && (c2 <= *string)) {
            break;
          }
          pattern += 2;
        }
        pattern += 1;
      }
      while ((*pattern != ']') && (*pattern != 0)) {
        pattern += 1;
      }
      goto thisCharOK;
    }
    if (*pattern == '\\') {
      pattern += 1;
      if (*pattern == 0) {
        return 0;
      }
    }
    if (*pattern != *string) {
      return 0;
    }
  thisCharOK:
    pattern += 1;
    string += 1;
  }
}
```