user: 请从给定的汇编指令推导出C源代码：

```asm
<PINT_dotconf_find_wild_card>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r15
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%r14
  mov    %rcx,%rbp
  mov    %rcx,(%rsp)
  mov    %r8,%r13
  mov    %r8,0x10(%rsp)
  call   <strlen@plt>
  test   %r15,%r15
  je     L28
  mov    %eax,%ebx
  test   %eax,%eax
  jle    L28
  test   %r14,%r14
  setne  %dl
  test   %rbp,%rbp
  setne  %al
  test   %al,%dl
  je     L106
  test   %r13,%r13
  je     L106
  lea    D4(%rip),%rsi
  mov    %r12,%rdi
  call   <strcspn@plt>
  mov    %eax,%r13d
  cmp    %eax,%ebx
  jle    L49
  movslq %eax,%r15
  add    %r12,%r15
  lea    0x1(%rax),%ebp
  mov    %r15,%rbx
  cmp    %r15,%r12
  je     L176
L79:
  cmpb   $0x2f,(%rbx)
  je     L9
  sub    $0x1,%rbx
  sub    $0x1,%ebp
  cmp    %rbx,%r12
  jne    L79
L176:
  cmpb   $0x2f,(%rbx)
  je     L9
  mov    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,(%r14)
  lea    -0x1(%rbp),%eax
  mov    %r13d,%esi
  sub    %eax,%esi
  mov    %esi,0x1c(%rsp)
  lea    0x1(%rsi),%edi
  call   <malloc@plt>
  mov    (%rsp),%rcx
  mov    %rax,(%rcx)
  cmpq   $0x0,(%r14)
  je     L92
  test   %rax,%rax
  je     L92
  mov    $0x0,%eax
L126:
  movslq %ebp,%rbp
  mov    (%r14),%rdx
  movb   $0x0,(%rdx,%rbp,1)
  and    $0x1,%eax
  lea    (%rbx,%rax,1),%rsi
  mov    0x1c(%rsp),%r14d
  mov    %r14d,%edx
  mov    (%rsp),%rbx
  mov    (%rbx),%rdi
  call   <strncpy@plt>
  movslq %r14d,%rax
  mov    (%rbx),%rdx
  movb   $0x0,(%rdx,%rax,1)
  mov    0x10(%rsp),%rcx
  mov    %r15,(%rcx)
  movzbl (%r15),%eax
  mov    0x8(%rsp),%rdx
  mov    %al,(%rdx)
  addq   $0x1,(%rcx)
L12:
  mov    %r13d,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L9:
  lea    0x1(%rbp),%edi
  call   <malloc@plt>
  mov    %rax,(%r14)
  mov    %r13d,%eax
  sub    %ebp,%eax
  mov    %eax,0x1c(%rsp)
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    (%rsp),%rcx
  mov    %rax,(%rcx)
  mov    (%r14),%rdi
  test   %rax,%rax
  je     L155
  test   %rdi,%rdi
  je     L155
  mov    %ebp,%edx
  mov    %r12,%rsi
  call   <strncpy@plt>
  mov    $0x1,%eax
  jmp    L126
L155:
  mov    $0xffffffff,%r13d
  jmp    L12
L92:
  mov    $0xffffffff,%r13d
  jmp    L12
L28:
  mov    $0xffffffff,%r13d
  jmp    L12
L106:
  mov    $0xffffffff,%r13d
  jmp    L12
L49:
  mov    $0xffffffff,%r13d
  jmp    L12
```

tool_calls: name: unpack_data
arguments: data_label: D4
type_guessed: string

tool: D4: *?

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;
}
```