user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<wild_match_per>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %rsi,%rsi
  je     L133
  mov    %rdi,%r13
  mov    %rsi,%rbx
  test   %rdi,%rdi
  jne    L359
L133:
  mov    $0x0,%ebp
L397:
  mov    %ebp,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L359:
  movzbl (%rsi),%edx
  mov    $0x0,%ebp
  test   %dl,%dl
  je     L397
  movl   $0x0,0x8(%rsp)
  mov    $0x0,%r14d
  mov    $0x0,%r15d
  mov    $0x0,%ebp
  mov    $0x0,%r12d
  jmp    L437
L325:
  cmp    $0x7e,%al
  jne    L59
  cmp    $0x20,%dl
  je     L109
  test   %r12,%r12
  je     L445
  lea    -0x1(%r12),%r13
  mov    %r15d,%r14d
  jmp    L211
L287:
  lea    0x1(%r13),%rbp
L78:
  mov    %rbp,%rax
  add    $0x1,%rbp
  cmpb   $0x25,-0x1(%rbp)
  je     L78
  add    $0x2,%rax
  cmpb   $0x5c,0x0(%rbp)
  cmove  %rax,%rbp
  cmpb   $0x0,(%rbx)
  je     L328
L382:
  movsbl 0x0(%rbp),%edi
  call   <toupper@plt>
  mov    %eax,%r12d
  movsbl (%rbx),%edi
  call   <toupper@plt>
  cmp    %eax,%r12d
  je     L64
  cmpb   $0x20,(%rbx)
  je     L377
  add    $0x1,%rbx
  cmpb   $0x0,(%rbx)
  jne    L382
L328:
  mov    $0x0,%edx
L395:
  lea    0x1(%r15,%r14,1),%ecx
  or     0x0(%rbp),%dl
  mov    $0x0,%eax
  cmove  %ecx,%eax
  mov    %eax,%ebp
  jmp    L397
L64:
  mov    %r13,%r12
  mov    %rbp,%r13
  mov    $0x1,%ebp
  jmp    L211
L272:
  add    $0x1,%r13
  add    $0x1,%rbx
L211:
  movzbl (%rbx),%edx
  test   %dl,%dl
  je     L3
L437:
  movzbl 0x0(%r13),%eax
  test   %al,%al
  je     L3
  cmp    $0x3f,%al
  je     L272
  jg     L325
  cmp    $0x25,%al
  je     L287
  cmp    $0x2a,%al
  jne    L212
  lea    0x1(%r13),%rax
  cmpb   $0x0,0x1(%r13)
  je     L448
  mov    %rax,%r13
  movl   $0x1,0x8(%rsp)
  jmp    L211
L109:
  add    $0x1,%rbx
  cmpb   $0x20,-0x1(%rbx)
  je     L109
  add    $0x1,%r13
  add    $0x1,%r14d
  jmp    L211
L448:
  lea    0x1(%r15,%r14,1),%ebp
  jmp    L397
L59:
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%r13
L212:
  cmpl   $0x0,0x8(%rsp)
  jne    L332
  movsbl 0x0(%r13),%edi
  call   <toupper@plt>
  mov    %eax,0xc(%rsp)
  movsbl (%rbx),%edi
  call   <toupper@plt>
  cmp    %eax,0xc(%rsp)
  je     L424
  test   %r12,%r12
  je     L365
L343:
  lea    -0x1(%r12),%r13
  mov    %r15d,%r14d
  jmp    L211
L332:
  cmpb   $0x0,(%rbx)
  je     L2
L110:
  movsbl 0x0(%r13),%edi
  call   <toupper@plt>
  mov    %eax,%ebp
  movsbl (%rbx),%edi
  call   <toupper@plt>
  cmp    %eax,%ebp
  je     L103
  add    $0x1,%rbx
  cmpb   $0x0,(%rbx)
  jne    L110
L2:
  mov    %r14d,%r15d
  mov    %r13,%rbp
  mov    $0x0,%r14d
  jmp    L328
L103:
  cmpb   $0x0,(%rbx)
  je     L90
  movsbl 0x0(%r13),%edi
  call   <toupper@plt>
  mov    %eax,%ebp
  movsbl (%rbx),%edi
  call   <toupper@plt>
  cmp    %eax,%ebp
  je     L67
  mov    %r14d,%r15d
  mov    %r13,%r12
  mov    $0x0,%ebp
  jmp    L343
L3:
  test   %ebp,%ebp
  je     L397
  mov    %r13,%rbp
  jmp    L395
L445:
  mov    $0x0,%ebp
  jmp    L397
L365:
  mov    0x8(%rsp),%ebp
  jmp    L397
L90:
  mov    %r14d,%r15d
  mov    %r13,%rbp
  mov    $0x0,%r14d
  jmp    L328
L180:
  mov    %r13,%rbp
  jmp    L328
L377:
  movzbl (%rbx),%edx
  mov    %r13,%r12
  mov    %rbp,%r13
  mov    $0x0,%ebp
  jmp    L437
L67:
  mov    %r14d,%r15d
  mov    %r13,%r12
  mov    $0x0,%r14d
L424:
  add    $0x1,%r14d
  cmpb   $0x1,0x0(%r13)
  sbb    $0xffffffffffffffff,%r13
  cmpb   $0x0,(%rbx)
  je     L180
  add    $0x1,%rbx
  movl   $0x0,0x8(%rsp)
  mov    $0x1,%ebp
  jmp    L211
```

assistant: ```c
int wild_match_per(char *wild, char *matchtext) {
  char *fallback = 0;
  int match = 0, saved = 0, count = 0, wildcard = 0;
  if (!matchtext || !wild)
    return 0;
  while (*matchtext && *wild) {
    switch (*wild) {
    case '%':
      fallback = wild++;
      match = 1;
      while ((*(wild++) == '%'))
        ;
      if (*wild == '\\')
        wild++;
      while (*matchtext && (toupper(*wild) != toupper(*matchtext)))
        if (*matchtext == ' ') {
          match = 0;
          break;
        } else
          matchtext++;
      break;
    case '?':
      wild++;
      matchtext++;
      break;
    case '~':
      wild++;
      if (*matchtext != ' ') {
        count = saved;
        if (!fallback)
          return 0;
        wild = fallback - 1;
        break;
      }
      while ((*(matchtext++) == ' '))
        ;
      count++;
      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;
      }
      count++;
      wildcard = 0;
      match = 1;
      if (*wild)
        wild++;
      if (*matchtext)
        matchtext++;
    }
  }
  return (!match || *wild || *matchtext) ? 0 : (count + saved + 1);
}
```