user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<__ls_my_files>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <readdir@plt>
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L6
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <assert@plt>
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <closedir@plt>
  mov    -0x10(%rbp),%rax
  jmp    L2
L6:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <is_my_file@plt>
  test   %eax,%eax
  jne    L34
  mov    -0x58(%rbp),%rdi
  mov    -0x50(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0x40(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <__ls_my_files>
  jmp    L2
L34:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <number_from_filename@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jl     L35
  mov    -0x48(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jge    L28
L35:
  mov    -0x58(%rbp),%rdi
  mov    -0x50(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0x40(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <__ls_my_files>
  jmp    L2
L28:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  lea    -0x2c(%rbp),%rdi
  mov    -0x50(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0x40(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <__ls_my_files>
  mov    %rax,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x2c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%rax
L2:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L7
  call   <__stack_chk_fail@plt>
L7:
  leave
  ret
```

assistant: ```c
long *__ls_my_files(DIR *dir, long start_at, long end_at, int *pcount, int *pindex) {
  struct dirent *entry;
  const char *filename;
  long number, *ret;
  int my_index;
  entry = readdir(dir);
  if (!entry) {
    ret = malloc(sizeof(long) * (*pcount + 1));
    assert(ret);
    *pindex = *pcount - 1;
    ret[*pcount] = -1;
    closedir(dir);
    return ret;
  }
  filename = entry->d_name;
  if (!is_my_file(filename))
    return __ls_my_files(dir, start_at, end_at, pcount, pindex);
  number = number_from_filename(filename);
  if (number < start_at || end_at < number)
    return __ls_my_files(dir, start_at, end_at, pcount, pindex);
  (*pcount)++;
  ret = __ls_my_files(dir, start_at, end_at, pcount, &my_index);
  ret[my_index] = number;
  *pindex = my_index - 1;
  return ret;
}
```