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

```asm
<wild_match>:
  endbr64
  test   %rsi,%rsi
  je     L33
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %rdi,%rdi
  je     L153
  movzbl (%rsi),%ecx
  mov    %rsi,%rbx
  test   %cl,%cl
  je     L153
  movl   $0x0,0xc(%rsp)
  xor    %ebp,%ebp
  xor    %r14d,%r14d
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  jmp    L247
  nopw   0x0(%rax,%rax,1)
L156:
  add    $0x1,%r15
  add    $0x1,%rbx
L128:
  movzbl (%rbx),%ecx
  test   %cl,%cl
  je     L136
L247:
  movzbl (%r15),%eax
  test   %al,%al
  je     L136
  cmp    $0x2a,%al
  je     L195
  cmp    $0x3f,%al
  je     L156
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%r15
  test   %ebp,%ebp
  jne    L252
  movsbl (%r15),%edi
  call   <toupper@plt>
  movsbl (%rbx),%edi
  mov    %eax,0x8(%rsp)
  call   <toupper@plt>
  cmp    %eax,0x8(%rsp)
  je     L200
  test   %r12,%r12
  je     L153
L17:
  lea    -0x1(%r12),%r15
  mov    %r14d,%r13d
  jmp    L128
  nopl   0x0(%rax,%rax,1)
L28:
  movsbl (%r15),%edi
  call   <toupper@plt>
  movsbl (%rbx),%edi
  mov    %eax,%r12d
  call   <toupper@plt>
  cmp    %eax,%r12d
  je     L149
  add    $0x1,%rbx
L252:
  cmpb   $0x0,(%rbx)
  jne    L28
L14:
  xor    %ebp,%ebp
L48:
  xor    %ecx,%ecx
L53:
  or     (%r15),%cl
  lea    0x1(%r13,%rbp,1),%eax
  je     L125
L153:
  xor    %eax,%eax
L125:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L195:
  cmpb   $0x0,0x1(%r15)
  lea    0x1(%r15),%rax
  je     L170
  mov    %rax,%r15
  mov    $0x1,%ebp
  jmp    L128
  nopl   0x0(%rax)
L149:
  cmpb   $0x0,(%rbx)
  je     L14
  movsbl (%r15),%edi
  call   <toupper@plt>
  movsbl (%rbx),%edi
  mov    %eax,%r12d
  call   <toupper@plt>
  cmp    %eax,%r12d
  je     L197
  movl   $0x0,0xc(%rsp)
  mov    %r13d,%r14d
  mov    %r15,%r12
  jmp    L17
  nopl   0x0(%rax)
L200:
  lea    0x1(%r13),%ebp
  mov    %r14d,%r13d
L188:
  cmpb   $0x1,(%r15)
  sbb    $0xffffffffffffffff,%r15
  cmpb   $0x0,(%rbx)
  je     L48
  mov    %r13d,%r14d
  movl   $0x1,0xc(%rsp)
  mov    %ebp,%r13d
  add    $0x1,%rbx
  xor    %ebp,%ebp
  jmp    L128
  nopl   0x0(%rax)
L197:
  mov    %r15,%r12
  jmp    L188
  nopl   (%rax)
L136:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  je     L153
  mov    %r13d,%ebp
  mov    %r14d,%r13d
  jmp    L53
  nopw   0x0(%rax,%rax,1)
L33:
  xor    %eax,%eax
  ret
L170:
  lea    0x1(%r14,%r13,1),%eax
  jmp    L125
```

assistant: ```c
int wild_match(char *wild, char *matchtext) {
  char *fallback = 0;
  int match = 0, count = 0, saved = 0, wildcard = 0;
  if (!matchtext || !wild)
    return 0;
  while (*matchtext && *wild) {
    switch (*wild) {
    case '?':
      wild++;
      matchtext++;
      break;
      while ((*(matchtext++) == ' '))
        ;
      break;
    case '*':
      if (!*++wild)
        return (count + saved + 1);
      wildcard = 1;
      break;
    default:
      if (*wild == '\\')
        wild++;
      if (wildcard) {
        saved = count;
        match = count = 0;
        fallback = wild;
        while (*matchtext && (toupper(*wild) != toupper(*matchtext)))
          matchtext++;
        if (!*matchtext) {
          match = 1;
          break;
        }
      }
      if (toupper(*wild) != toupper(*matchtext)) {
        if (!fallback)
          return 0;
        count = saved;
        wild = fallback - 1;
        break;
      }
      wildcard = 0;
      count++;
      match = 1;
      if (*wild)
        wild++;
      if (*matchtext)
        matchtext++;
    }
  }
  return (!match || *wild || *matchtext) ? 0 : (count + saved + 1);
}
```