user: Converte this assembly snippet into its equivalent C code:

```asm
<wildcard_match>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L249
L231:
  movl   $0x0,-0x14(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x2a,%eax
  je     L2
  cmp    $0x3f,%eax
  jne    L245
  jmp    L2
L19:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L290
  movl   $0x1,-0x14(%rbp)
  jmp    L126
L290:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  jne    L281
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L163
  mov    $0x0,%eax
  jmp    L173
L163:
  addq   $0x1,-0x28(%rbp)
L126:
  addq   $0x1,-0x30(%rbp)
L2:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L19
  jmp    L267
L281:
  nop
L267:
  cmpl   $0x0,-0x14(%rbp)
  je     L245
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L303
  mov    $0x1,%eax
  jmp    L173
L180:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L171
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <wildcard_match>
  test   %eax,%eax
  je     L171
  mov    $0x1,%eax
  jmp    L173
L171:
  addq   $0x1,-0x28(%rbp)
L303:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L180
  mov    $0x0,%eax
  jmp    L173
L245:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  je     L55
  mov    $0x0,%eax
  jmp    L173
L213:
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  je     L55
  mov    $0x0,%eax
  jmp    L173
L55:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L201
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L201
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  je     L201
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L213
L201:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L249
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L249
  mov    $0x0,%eax
  jmp    L173
L249:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L231
  mov    $0x1,%eax
L173:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int wildcard_match(char *str, char *mask) {
  int multi_wild = 0;
  while (*mask) {
    multi_wild = 0;
    switch (*mask) {
    case '*':
    case '?':
      while (*mask) {
        if (*mask == '*')
          multi_wild = 1;
        else if (*mask == '?') {
          if (!*str)
            return 0;
          str++;
        } else
          break;
        mask++;
      }
      if (multi_wild) {
        if (!*mask)
          return 1;
        while (*str) {
          if ((*str == *mask) && wildcard_match((str + 1), (mask + 1)))
            return 1;
          str++;
        }
        return 0;
      }
    default:
      if (tolower(*mask) != tolower(*str))
        return 0;
      while ((*mask) && (*str) && (*mask != '?') && (*mask != '*'))
        if (tolower(*mask++) != tolower(*str++))
          return 0;
      if ((*str) && (!*mask))
        return 0;
    }
  }
  return 1;
}
```