user: 请将以下的汇编代码转换成C语言代码：

```asm
<fnmatch>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,0x20(%rsp)
  mov    %edx,0x18(%rsp)
  movzbl (%rdi),%ebx
  test   %bl,%bl
  je     L462
  mov    %rdi,%rbp
  lea    0x1(%rdi),%r12
  mov    %rsi,%r15
  mov    %edx,%esi
  mov    %edx,%r13d
  and    $0x10,%r13d
  mov    %edx,%eax
  and    $0x2,%eax
  mov    %eax,0x28(%rsp)
  mov    %edx,%eax
  shr    $0x2,%eax
  and    $0x1,%eax
  mov    %al,0x2e(%rsp)
  mov    %edx,%eax
  shr    %eax
  xor    $0x1,%eax
  and    $0x1,%eax
  mov    %al,0x2d(%rsp)
  mov    %edx,%eax
  and    $0x1,%eax
  mov    %al,(%rsp)
  and    $0x1,%esi
  mov    %esi,0x1c(%rsp)
  mov    %r15,0x10(%rsp)
  jmp    L1283
L467:
  mov    0x10(%rsp),%rsi
  cmp    %rsi,0x20(%rsp)
  je     L1345
  cmpl   $0x0,0x1c(%rsp)
  je     L11
  cmpb   $0x2f,-0x1(%rsi)
  je     L1173
  mov    %r12,%rbp
  jmp    L1239
L741:
  mov    %r12,%rbp
  mov    $0x5c,%ebx
  jmp    L583
L973:
  mov    %r12,%rbp
L583:
  mov    0x10(%rsp),%rax
  movzbl (%rax),%eax
L1312:
  movsbl %bl,%ebx
  cmp    %eax,%ebx
  jne    L203
L1239:
  addq   $0x1,0x10(%rsp)
  lea    0x1(%rbp),%r12
  movzbl 0x0(%rbp),%ebx
  test   %bl,%bl
  je     L1217
L1283:
  test   %r13d,%r13d
  je     L1208
  movzbl %bl,%r14d
  mov    %r14d,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L767
  mov    %r14d,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
L767:
  cmp    $0x5b,%bl
  je     L1035
  jg     L37
  cmp    $0x2a,%bl
  je     L983
  cmp    $0x3f,%bl
  jne    L935
L1269:
  mov    0x10(%rsp),%rax
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L689
  mov    0x1c(%rsp),%ecx
  mov    %ecx,%eax
  test   %ecx,%ecx
  je     L600
  cmp    $0x2f,%dl
  je     L1233
L600:
  cmpb   $0x0,0x2e(%rsp)
  je     L706
  cmp    $0x2e,%dl
  je     L467
L706:
  mov    %r12,%rbp
  jmp    L1239
L983:
  mov    0x10(%rsp),%r15
  testb  $0x4,0x18(%rsp)
  je     L419
  cmpb   $0x2e,(%r15)
  je     L17
L419:
  lea    0x2(%rbp),%r12
  movzbl 0x1(%rbp),%ebx
  cmp    $0x3f,%bl
  je     L777
  cmp    $0x2a,%bl
  jne    L506
L777:
  mov    0x18(%rsp),%edx
  and    $0x1,%edx
L1068:
  mov    %edx,%eax
  test   %edx,%edx
  je     L1054
  cmpb   $0x2f,(%r15)
  je     L1173
L1054:
  cmp    $0x3f,%bl
  je     L1036
L1359:
  add    $0x1,%r12
  movzbl -0x1(%r12),%ebx
  add    $0x1,%r15
  cmp    $0x3f,%bl
  je     L1068
  cmp    $0x2a,%bl
  je     L1068
L506:
  mov    $0x0,%eax
  test   %bl,%bl
  je     L1173
  testb  $0x2,0x18(%rsp)
  jne    L345
  cmp    $0x5c,%bl
  je     L369
L345:
  mov    %ebx,%ebp
L224:
  test   %r13d,%r13d
  je     L500
  movzbl %bpl,%r14d
  mov    %r14d,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L500
  mov    %r14d,%edi
  call   <tolower@plt>
  mov    %eax,%ebp
L500:
  lea    -0x1(%r12),%rax
  mov    %rax,(%rsp)
  movzbl (%r15),%r12d
  test   %r12b,%r12b
  je     L288
  mov    0x18(%rsp),%eax
  and    $0xfffffffb,%eax
  mov    %eax,0x8(%rsp)
  jmp    L1009
L17:
  cmp    %r15,0x20(%rsp)
  je     L1384
  mov    0x18(%rsp),%eax
  and    $0x1,%eax
  je     L419
  cmpb   $0x2f,-0x1(%r15)
  jne    L419
  jmp    L1173
L1036:
  cmpb   $0x0,(%r15)
  jne    L1359
  mov    $0x1,%eax
  jmp    L1173
L369:
  movzbl (%r12),%ebp
  jmp    L224
L849:
  movzbl %r12b,%r12d
L1248:
  movsbl %bpl,%eax
  cmp    %r12d,%eax
  je     L322
L1125:
  add    $0x1,%r15
  movzbl (%r15),%r12d
  test   %r12b,%r12b
  je     L671
L1009:
  cmp    $0x5b,%bl
  je     L322
  test   %r13d,%r13d
  je     L849
  movzbl %r12b,%r14d
  mov    %r14d,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L849
  mov    %r14d,%edi
  call   <tolower@plt>
  mov    %eax,%r12d
  jmp    L1248
L322:
  mov    0x8(%rsp),%edx
  mov    %r15,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <fnmatch>
  test   %eax,%eax
  jne    L1125
  jmp    L1173
L671:
  mov    $0x1,%eax
L1173:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L1035:
  mov    0x10(%rsp),%rcx
  movzbl (%rcx),%edx
  test   %dl,%dl
  je     L379
  cmpb   $0x0,0x2e(%rsp)
  je     L20
  cmp    $0x2e,%dl
  jne    L20
  cmp    %rcx,0x20(%rsp)
  je     L258
  mov    0x1c(%rsp),%esi
  mov    %esi,%eax
  test   %esi,%esi
  je     L20
  cmpb   $0x2f,-0x1(%rcx)
  je     L1173
L20:
  movzbl 0x1(%rbp),%eax
  cmp    $0x21,%al
  sete   %cl
  cmp    $0x5e,%al
  sete   %al
  add    $0x2,%rbp
  or     %al,%cl
  mov    %cl,0x2f(%rsp)
  cmovne %rbp,%r12
  lea    0x1(%r12),%rbp
  movzbl (%r12),%ebx
  movzbl %dl,%r15d
  jmp    L1112
L609:
  lea    0x1(%rbp),%rax
  movzbl 0x0(%rbp),%r12d
  test   %r13d,%r13d
  jne    L1092
  mov    %r12d,%ebx
  mov    %rax,%rbp
  jmp    L662
L1092:
  mov    %rax,%rbp
L66:
  movzbl %r12b,%r14d
  mov    %r14d,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L272
  mov    %r14d,%edi
  call   <tolower@plt>
  mov    %eax,%r12d
L272:
  test   %bl,%bl
  je     L1356
  lea    0x1(%rbp),%rax
  mov    %rax,0x8(%rsp)
  movzbl 0x0(%rbp),%ebx
  movzbl %bl,%r14d
  mov    %r14d,%edi
  call   <isupper@plt>
  test   %eax,%eax
  jne    L578
  mov    %rbp,%rax
  mov    0x8(%rsp),%rbp
  jmp    L605
L578:
  mov    %r14d,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  mov    %rbp,%rax
  mov    0x8(%rsp),%rbp
  jmp    L605
L998:
  movzbl 0x1(%rax),%r14d
  cmp    $0x5d,%r14b
  je     L1225
  lea    0x2(%rax),%rbx
  cmp    $0x5c,%r14b
  jne    L645
  cmpb   $0x0,0x2d(%rsp)
  jne    L331
L645:
  test   %r14b,%r14b
  je     L160
  test   %r13d,%r13d
  je     L727
  movzbl %r14b,%ebp
  mov    %ebp,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L727
  mov    %ebp,%edi
  call   <tolower@plt>
  mov    %eax,%r14d
L727:
  lea    0x1(%rbx),%rbp
  movzbl (%rbx),%ebx
  jmp    L1133
L331:
  lea    0x3(%rax),%rbx
  movzbl 0x2(%rax),%r14d
  jmp    L645
L1225:
  mov    %r12d,%r14d
  jmp    L1133
L574:
  cmp    $0x5d,%bl
  je     L1063
  test   %bl,%bl
  je     L6
  movzbl 0x2d(%rsp),%ecx
  jmp    L814
L712:
  cmpb   $0x0,0x2f(%rsp)
  jne    L1239
  mov    $0x1,%eax
  jmp    L1173
L1250:
  cmp    $0x5d,%al
  je     L475
  test   %al,%al
  je     L38
L1060:
  mov    %rdx,%rbp
L814:
  lea    0x1(%rbp),%rdx
  movzbl 0x0(%rbp),%eax
  cmp    $0x5c,%al
  jne    L1250
  test   %cl,%cl
  je     L1250
  lea    0x2(%rbp),%rdx
  jmp    L1060
L475:
  mov    %rdx,%rbp
L1063:
  cmpb   $0x0,0x2f(%rsp)
  je     L1239
  mov    $0x1,%eax
  jmp    L1173
L935:
  movsbl %bl,%ebx
  mov    0x10(%rsp),%rax
  movzbl (%rax),%ebp
  mov    %ebp,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L742
  mov    %ebp,%edi
  call   <tolower@plt>
  jmp    L656
L11:
  mov    %r12,%rbp
  jmp    L1239
L1217:
  mov    0x10(%rsp),%r15
L930:
  movzbl (%r15),%ecx
  mov    $0x0,%eax
  test   %cl,%cl
  je     L1173
  mov    0x18(%rsp),%edx
  shr    $0x3,%edx
  cmp    $0x2f,%cl
  sete   %al
  and    %edx,%eax
  xor    $0x1,%eax
  movzbl %al,%eax
  jmp    L1173
L462:
  mov    0x20(%rsp),%r15
  jmp    L930
L689:
  mov    $0x1,%eax
  jmp    L1173
L1233:
  mov    $0x1,%eax
  jmp    L1173
L1345:
  mov    $0x1,%eax
  jmp    L1173
L203:
  mov    $0x1,%eax
  jmp    L1173
L1384:
  mov    $0x1,%eax
  jmp    L1173
L288:
  mov    $0x1,%eax
  jmp    L1173
L379:
  mov    $0x1,%eax
  jmp    L1173
L258:
  mov    $0x1,%eax
  jmp    L1173
L179:
  mov    $0x1,%eax
  jmp    L1173
L160:
  mov    $0x1,%eax
  jmp    L1173
L6:
  mov    $0x1,%eax
  jmp    L1173
L38:
  mov    $0x1,%eax
  jmp    L1173
L34:
  mov    $0x1,%eax
  jmp    L1173
L1356:
  mov    $0x1,%eax
  jmp    L1173
L197:
  mov    $0x1,%eax
  jmp    L1173
L37:
  cmp    $0x5c,%bl
  jne    L935
  cmpl   $0x0,0x28(%rsp)
  jne    L127
  lea    0x2(%rbp),%r12
  movzbl 0x1(%rbp),%ebx
  movzbl %bl,%ebp
  mov    %ebp,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L1163
  mov    %ebp,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  jmp    L1163
L1208:
  cmp    $0x5b,%bl
  je     L1035
  jg     L1016
  cmp    $0x2a,%bl
  je     L983
  cmp    $0x3f,%bl
  je     L1269
L887:
  movsbl %bl,%ebx
L742:
  mov    0x10(%rsp),%rax
  movzbl (%rax),%eax
L656:
  cmp    %ebx,%eax
  jne    L34
  mov    %r12,%rbp
  jmp    L1239
L1016:
  cmp    $0x5c,%bl
  jne    L887
  cmpl   $0x0,0x28(%rsp)
  je     L853
L127:
  test   %r13d,%r13d
  je     L741
  mov    $0x5c,%ebx
L1163:
  mov    0x10(%rsp),%rax
  movzbl (%rax),%ebp
  mov    %ebp,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L973
  mov    %ebp,%edi
  call   <tolower@plt>
  mov    %r12,%rbp
  jmp    L1312
L853:
  movzbl 0x1(%rbp),%ebx
  lea    0x2(%rbp),%rbp
  jmp    L583
L1306:
  movsbl %r12b,%r12d
  cmp    %r15d,%r12d
  jg     L145
L592:
  mov    %r15d,%eax
L654:
  movsbl %r14b,%r14d
  cmp    %eax,%r14d
  jge    L574
L145:
  cmp    $0x5d,%bl
  je     L712
L1112:
  cmp    $0x5c,%bl
  jne    L215
  cmpb   $0x0,0x2d(%rsp)
  jne    L609
L215:
  mov    %ebx,%r12d
  test   %r13d,%r13d
  jne    L66
  test   %bl,%bl
  je     L197
L662:
  movzbl 0x0(%rbp),%edx
  mov    %rbp,%rax
  lea    0x1(%rbp),%rbp
  mov    %ebx,%r12d
  mov    %edx,%ebx
L605:
  cmpb   $0x0,(%rsp)
  je     L594
  cmp    $0x2f,%bl
  je     L179
L594:
  mov    %r12d,%r14d
  cmp    $0x2d,%bl
  je     L998
L1133:
  test   %r13d,%r13d
  je     L1306
  mov    %r15d,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L1014
  mov    %r15d,%edi
  call   <tolower@plt>
  movsbl %r12b,%r12d
  cmp    %eax,%r12d
  jg     L145
  mov    %r15d,%r12d
L1084:
  mov    %r12d,%edi
  call   <tolower@plt>
  jmp    L654
L1014:
  movsbl %r12b,%r12d
  cmp    %r15d,%r12d
  jg     L145
  mov    %r15d,%r12d
  mov    %r15d,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L592
  jmp    L1084
```

assistant: ```c
int fnmatch(pattern, string, flags) const char *pattern;
const char *string;
int flags;
{
  register const char *p = pattern, *n = string;
  register char c;
  while ((c = *p++) != '\0') {
    c = ((flags & (1 << 4)) && (1 && isupper((unsigned char)c)) ? tolower((unsigned char)c) : ((unsigned char)c));
    switch (c) {
    case '?':
      if (*n == '\0')
        return 1;
      else if ((flags & (1 << 0)) && *n == '/')
        return 1;
      else if ((flags & (1 << 2)) && *n == '.' && (n == string || ((flags & (1 << 0)) && n[-1] == '/')))
        return 1;
      break;
    case '\\':
      if (!(flags & (1 << 1))) {
        c = *p++;
        c = ((flags & (1 << 4)) && (1 && isupper((unsigned char)c)) ? tolower((unsigned char)c) : ((unsigned char)c));
      }
      if (((flags & (1 << 4)) && (1 && isupper((unsigned char)*n)) ? tolower((unsigned char)*n) : ((unsigned char)*n)) != c)
        return 1;
      break;
    case '*':
      if ((flags & (1 << 2)) && *n == '.' && (n == string || ((flags & (1 << 0)) && n[-1] == '/')))
        return 1;
      for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
        if (((flags & (1 << 0)) && *n == '/') || (c == '?' && *n == '\0'))
          return 1;
      if (c == '\0')
        return 0;
      {
        char c1 = (!(flags & (1 << 1)) && c == '\\') ? *p : c;
        c1 = ((flags & (1 << 4)) && (1 && isupper((unsigned char)c1)) ? tolower((unsigned char)c1) : ((unsigned char)c1));
        for (--p; *n != '\0'; ++n)
          if ((c == '[' || ((flags & (1 << 4)) && (1 && isupper((unsigned char)*n)) ? tolower((unsigned char)*n) : ((unsigned char)*n)) == c1) && fnmatch(p, n, flags & ~(1 << 2)) == 0)
            return 0;
        return 1;
      }
    case '[': {
      register int not ;
      if (*n == '\0')
        return 1;
      if ((flags & (1 << 2)) && *n == '.' && (n == string || ((flags & (1 << 0)) && n[-1] == '/')))
        return 1;
      not = (*p == '!' || *p == '^');
      if (not )
        ++p;
      c = *p++;
      for (;;) {
        register char cstart = c, cend = c;
        if (!(flags & (1 << 1)) && c == '\\')
          cstart = cend = *p++;
        cstart = cend = ((flags & (1 << 4)) && (1 && isupper((unsigned char)cstart)) ? tolower((unsigned char)cstart) : ((unsigned char)cstart));
        if (c == '\0')
          return 1;
        c = *p++;
        c = ((flags & (1 << 4)) && (1 && isupper((unsigned char)c)) ? tolower((unsigned char)c) : ((unsigned char)c));
        if ((flags & (1 << 0)) && c == '/')
          return 1;
        if (c == '-' && *p != ']') {
          cend = *p++;
          if (!(flags & (1 << 1)) && cend == '\\')
            cend = *p++;
          if (cend == '\0')
            return 1;
          cend = ((flags & (1 << 4)) && (1 && isupper((unsigned char)cend)) ? tolower((unsigned char)cend) : ((unsigned char)cend));
          c = *p++;
        }
        if (((flags & (1 << 4)) && (1 && isupper((unsigned char)*n)) ? tolower((unsigned char)*n) : ((unsigned char)*n)) >= cstart && ((flags & (1 << 4)) && (1 && isupper((unsigned char)*n)) ? tolower((unsigned char)*n) : ((unsigned char)*n)) <= cend)
          goto matched;
        if (c == ']')
          break;
      }
      if (!not )
        return 1;
      break;
    matched:;
      while (c != ']') {
        if (c == '\0')
          return 1;
        c = *p++;
        if (!(flags & (1 << 1)) && c == '\\')
          ++p;
      }
      if (not )
        return 1;
    } break;
    default:
      if (c != ((flags & (1 << 4)) && (1 && isupper((unsigned char)*n)) ? tolower((unsigned char)*n) : ((unsigned char)*n)))
        return 1;
    }
    ++n;
  }
  if (*n == '\0')
    return 0;
  if ((flags & (1 << 3)) && *n == '/')
    return 0;
  return 1;
}
```