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

```asm
<fpattern_submatch>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  movzbl (%rdi),%ebx
  mov    %rsi,0x10(%rsp)
  test   %bl,%bl
  je     L202
  add    $0x1,%rsi
  mov    %rdi,%r12
  mov    %rsi,%rbp
L435:
  mov    %rbp,0x10(%rsp)
  movsbl -0x1(%rbp),%r15d
  lea    -0x1(%rbp),%rsi
  lea    0x1(%r12),%r14
  cmp    $0x3f,%bl
  je     L490
  jg     L160
  cmp    $0x21,%bl
  je     L459
  cmp    $0x2a,%bl
  jne    L483
  mov    $0x1,%eax
  test   %r15b,%r15b
  je     L196
  nopw   0x0(%rax,%rax,1)
L395:
  movslq %eax,%rdx
  add    $0x1,%rax
  cmpb   $0x0,-0x1(%rsi,%rax,1)
  jne    L395
L430:
  lea    (%rsi,%rdx,1),%rbx
  sub    $0x2,%rbp
L418:
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <fpattern_submatch>
  mov    %eax,%r15d
  test   %eax,%eax
  jne    L470
  sub    $0x1,%rbx
  cmp    %rbp,%rbx
  jne    L418
L417:
  add    $0x28,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L483:
  cmp    $0x1a,%bl
  jne    L219
  cmp    $0x2e,%r15b
  je     L180
  mov    $0x1,%eax
  test   %r15b,%r15b
  je     L180
  nopl   0x0(%rax)
L465:
  movzbl (%rsi,%rax,1),%edx
  movslq %eax,%rcx
  add    $0x1,%rax
  test   %dl,%dl
  je     L114
  cmp    $0x2e,%dl
  jne    L465
L114:
  lea    (%rsi,%rcx,1),%rbx
  sub    $0x2,%rbp
L203:
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <fpattern_submatch>
  mov    %eax,%r15d
  test   %eax,%eax
  jne    L470
  sub    $0x1,%rbx
  cmp    %rbp,%rbx
  jne    L203
  jmp    L417
  nopl   (%rax)
L160:
  cmp    $0x5b,%bl
  je     L76
  cmp    $0x5c,%bl
  jne    L219
  movsbl 0x1(%r12),%r14d
  mov    %r15d,%edi
  call   <tolower@plt>
  mov    %r14d,%edi
  mov    %eax,%ebx
  call   <tolower@plt>
  cmp    %eax,%ebx
  jne    L21
  test   %r14d,%r14d
  je     L21
  add    $0x2,%r12
L393:
  movzbl (%r12),%ebx
  add    $0x1,%rbp
  test   %bl,%bl
  jne    L435
L202:
  mov    0x10(%rsp),%rax
  xor    %r15d,%r15d
  cmpb   $0x0,(%rax)
  sete   %r15b
  jmp    L417
  nopl   0x0(%rax,%rax,1)
L219:
  mov    %r15d,%edi
  call   <tolower@plt>
  movsbl %bl,%edi
  mov    %eax,%r12d
  call   <tolower@plt>
  cmp    %eax,%r12d
  jne    L21
L251:
  mov    %r14,%r12
  jmp    L393
  nopl   0x0(%rax)
L459:
  xor    %r15d,%r15d
  cmpb   $0x0,0x1(%r12)
  je     L417
  mov    %r14,%rdi
  xor    %r15d,%r15d
  call   <fpattern_submatch>
  test   %eax,%eax
  sete   %r15b
  jmp    L417
  nopl   (%rax)
L76:
  movzbl 0x1(%r12),%r13d
  cmp    $0x21,%r13b
  je     L497
  cmp    $0x5d,%r13b
  je     L21
  test   %r13b,%r13b
  je     L21
  movl   $0x0,0x18(%rsp)
  movl   $0x1,0x1c(%rsp)
  jmp    L291
  nopl   (%rax)
L476:
  add    $0x1,%r14
  mov    %r9d,%r12d
L26:
  mov    %r9d,0xc(%rsp)
  test   %r13b,%r13b
  je     L21
  mov    %r15d,%edi
  call   <tolower@plt>
  mov    0xc(%rsp),%edi
  mov    %eax,%ebx
  call   <tolower@plt>
  cmp    %eax,%ebx
  jl     L308
  mov    %r12d,%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  mov    0x18(%rsp),%eax
  cmovle 0x1c(%rsp),%eax
  mov    %eax,0x18(%rsp)
L308:
  cmp    $0x5d,%r13b
  je     L366
L291:
  xor    %eax,%eax
  cmp    $0x5c,%r13b
  sete   %al
  add    %rax,%r14
  movzbl (%r14),%eax
  test   %al,%al
  je     L21
  movzbl 0x1(%r14),%r13d
  movsbl %al,%r9d
  cmp    $0x2d,%r13b
  jne    L476
  movsbl 0x2(%r14),%r12d
  lea    0x2(%r14),%rax
  cmp    $0x5c,%r12b
  jne    L309
  movsbl 0x3(%r14),%r12d
  lea    0x3(%r14),%rax
L309:
  test   %r12b,%r12b
  je     L363
  movzbl 0x1(%rax),%r13d
  lea    0x1(%rax),%r14
  jmp    L26
  nop
L490:
  test   %r15d,%r15d
  jne    L251
  jmp    L417
  xchg   %ax,%ax
L366:
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  jne    L403
  nopl   0x0(%rax,%rax,1)
L21:
  xor    %r15d,%r15d
  jmp    L417
  nopl   0x0(%rax,%rax,1)
L470:
  mov    $0x1,%r15d
  jmp    L417
  nopl   0x0(%rax,%rax,1)
L497:
  movzbl 0x2(%r12),%r13d
  lea    0x2(%r12),%r14
  cmp    $0x5d,%r13b
  je     L270
  test   %r13b,%r13b
  je     L21
  movl   $0x1,0x18(%rsp)
  movl   $0x0,0x1c(%rsp)
  jmp    L291
L363:
  mov    0x18(%rsp),%edx
  test   %edx,%edx
  je     L21
  movzbl (%rax),%r13d
  mov    %rax,%r14
L270:
  test   %r13b,%r13b
  je     L21
L403:
  lea    0x1(%r14),%r12
  jmp    L393
L196:
  xor    %edx,%edx
  jmp    L430
L180:
  xor    %ecx,%ecx
  jmp    L114
```

assistant: ```c
int fpattern_submatch(const char *pat, const char *fname) {
  int fch;
  int pch;
  int i;
  int yes, match;
  int lo, hi;
  while (*pat != '\0') {
    fch = *fname;
    pch = *pat;
    pat++;
    switch (pch) {
    case '?':
      if (fch == '\0')
        return (0);
      fname++;
      break;
    case '*':
      i = 0;
      while (fname[i] != '\0')
        i++;
      while (i >= 0) {
        if (fpattern_submatch(pat, fname + i))
          return (1);
        i--;
      }
      return (0);
    case '\x1A':
      i = 0;
      while (fname[i] != '\0' && fname[i] != '.')
        i++;
      while (i >= 0) {
        if (fpattern_submatch(pat, fname + i))
          return (1);
        i--;
      }
      return (0);
    case '\\':
      pch = *pat;
      if (tolower(fch) != tolower(pch) || pch == '\0')
        return (0);
      fname++;
      pat++;
      break;
    case '[':
      yes = 1;
      if (*pat == '!') {
        pat++;
        yes = 0;
      }
      match = !yes;
      while (*pat != ']' && *pat != '\0') {
        if (*pat == '\\')
          pat++;
        if (*pat == '\0')
          break;
        lo = *pat++;
        hi = lo;
        if (*pat == '-') {
          pat++;
          if (*pat == '\\')
            pat++;
          if (*pat == '\0')
            break;
          hi = *pat++;
        }
        if (*pat == '\0')
          break;
        if (tolower(fch) >= tolower(lo) && tolower(fch) <= tolower(hi))
          match = yes;
      }
      if (!match)
        return (0);
      if (*pat == '\0')
        return (0);
      fname++;
      pat++;
      break;
    case '!':
      if (*pat == '\0')
        return (0);
      i = fpattern_submatch(pat, fname);
      return !i;
    default:
      if (tolower(fch) != tolower(pch))
        return (0);
      fname++;
      break;
    }
  }
  if (*fname != '\0')
    return (0);
  return (1);
}
```