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

```asm
<PINT_dotconf_find_wild_card>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x28,%rsp
  mov    %rsi,0x10(%rsp)
  mov    %rdx,(%rsp)
  mov    %rdi,0x8(%rsp)
  call   <strlen@plt>
  test   %r15,%r15
  je     L139
  test   %eax,%eax
  mov    0x8(%rsp),%r9
  mov    %eax,%r14d
  jle    L139
  cmpq   $0x0,(%rsp)
  setne  %dl
  test   %rbx,%rbx
  setne  %al
  test   %al,%dl
  je     L139
  test   %rbp,%rbp
  je     L139
  lea    D0(%rip),%rsi
  mov    %r9,%rdi
  mov    %r9,0x8(%rsp)
  call   <strcspn@plt>
  mov    %eax,%r12d
  cmp    %eax,%r14d
  jle    L139
  mov    0x8(%rsp),%r9
  movslq %eax,%rcx
  lea    0x1(%rax),%r15d
  lea    (%r9,%rcx,1),%r13
  mov    %r13,%r8
  cmp    %r13,%r9
  jne    L85
  jmp    L133
  nopl   0x0(%rax,%rax,1)
L15:
  sub    $0x1,%r8
  sub    $0x1,%r15d
  cmp    %r8,%r9
  je     L133
L85:
  cmpb   $0x2f,(%r8)
  jne    L15
L122:
  lea    0x1(%r15),%edi
  mov    %r9,0x18(%rsp)
  mov    %r12d,%r14d
  mov    %r8,0x8(%rsp)
  sub    %r15d,%r14d
  call   <malloc@plt>
  mov    (%rsp),%rcx
  lea    0x1(%r14),%edi
  mov    %rax,(%rcx)
  call   <malloc@plt>
  mov    (%rsp),%rcx
  mov    %rax,(%rbx)
  mov    (%rcx),%rdi
  test   %rax,%rax
  je     L139
  test   %rdi,%rdi
  mov    0x8(%rsp),%r8
  mov    0x18(%rsp),%r9
  je     L139
  mov    %r15d,%edx
  mov    %r9,%rsi
  mov    %r8,0x8(%rsp)
  call   <strncpy@plt>
  mov    (%rsp),%rax
  movslq %r15d,%rdx
  mov    0x8(%rsp),%r8
  mov    (%rax),%rax
  add    $0x1,%r8
  movb   $0x0,(%rax,%rdx,1)
L70:
  mov    (%rbx),%rdi
  mov    %r14d,%edx
  mov    %r8,%rsi
  movslq %r14d,%r14
  call   <strncpy@plt>
  mov    (%rbx),%rax
  mov    0x10(%rsp),%rbx
  movb   $0x0,(%rax,%r14,1)
  mov    %r13,0x0(%rbp)
  movzbl 0x0(%r13),%eax
  mov    %al,(%rbx)
  addq   $0x1,0x0(%rbp)
L99:
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L133:
  cmpb   $0x2f,(%r8)
  je     L122
  mov    $0x1,%edi
  mov    %r8,0x8(%rsp)
  mov    %r12d,%r14d
  call   <malloc@plt>
  mov    (%rsp),%rcx
  mov    %rax,(%rcx)
  lea    -0x1(%r15),%eax
  sub    %eax,%r14d
  lea    0x1(%r14),%edi
  call   <malloc@plt>
  mov    (%rsp),%rcx
  mov    %rax,(%rbx)
  mov    (%rcx),%rsi
  test   %rsi,%rsi
  je     L139
  test   %rax,%rax
  mov    0x8(%rsp),%r8
  je     L139
  movslq %r15d,%rdx
  movb   $0x0,(%rsi,%rdx,1)
  jmp    L70
L139:
  mov    $0xffffffff,%r12d
  jmp    L99
```

tool_calls: name: extract_symbolic_data
arguments: tag: D0
data_type: string

tool: D0: *?

assistant: ```c
int PINT_dotconf_find_wild_card(char *filename, char *wildcard, char **path, char **pre, char **ext) {
  int retval = -1;
  int prefix_len = 0;
  int tmp_count = 0;
  char *tmp = 0;
  int found_path = 0;
  int len = strlen(filename);
  if (wildcard != NULL && len > 0 && path != NULL && pre != NULL && ext != NULL) {
    prefix_len = strcspn(filename, "*?");
    if (prefix_len < len) {
      tmp = filename + prefix_len;
      tmp_count = prefix_len + 1;
      while (tmp != filename && *(tmp) != '/') {
        tmp--;
        tmp_count--;
      }
      if (*(tmp) == '/') {
        *path = (char *)malloc(tmp_count + 1);
        found_path = 1;
      } else
        *path = (char *)malloc(1);
      *pre = (char *)malloc((prefix_len - (tmp_count - (found_path ? 0 : 1))) + 1);
      if (*path && *pre) {
        if (found_path)
          strncpy(*path, filename, tmp_count);
        (*path)[tmp_count] = '\0';
        strncpy(*pre, (tmp + (found_path ? 1 : 0)), (prefix_len - (tmp_count - (found_path ? 0 : 1))));
        (*pre)[(prefix_len - (tmp_count - (found_path ? 0 : 1)))] = '\0';
        *ext = filename + prefix_len;
        *wildcard = (**ext);
        (*ext)++;
        retval = prefix_len;
      }
    }
  }
  return retval;
}
```