user: Translate the below assembly code into C programming language:

```asm
<path_has_filename>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x40(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <ch_is_slash@plt>
  test   %rax,%rax
  je     L57
  mov    -0x10(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <get_front_of_slashes@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jne    L22
  mov    $0x0,%eax
  jmp    L98
L22:
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x20(%rbp)
L57:
  mov    -0x40(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x22(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
L74:
  movzbl -0x22(%rbp),%eax
  cmp    -0x21(%rbp),%al
  je     L80
  mov    $0x0,%eax
  jmp    L98
L80:
  subq   $0x1,-0x20(%rbp)
  subq   $0x1,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jne    L33
  mov    -0x18(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jae    L132
  cmpq   $0x0,-0x50(%rbp)
  je     L133
  mov    -0x50(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
L133:
  mov    $0x1,%eax
  jmp    L98
L132:
  mov    $0x0,%eax
  jmp    L98
L33:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x22(%rbp)
  cmpb   $0x2f,-0x22(%rbp)
  jne    L175
  mov    -0x18(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jae    L166
  cmpq   $0x0,-0x50(%rbp)
  je     L25
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x50(%rbp),%rax
  mov    %rdx,(%rax)
L25:
  mov    $0x1,%eax
  jmp    L98
L166:
  mov    $0x0,%eax
  jmp    L98
L175:
  mov    -0x18(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jae    L176
  mov    $0x0,%eax
  jmp    L98
L176:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
  jmp    L74
L98:
  leave
  ret
```

assistant: ```c
bool path_has_filename(const char *__attribute__((nonnull)) const path, const uint64_t path_length, const char *__attribute__((nonnull)) const filename, const uint64_t filename_length, const char **const filename_out) {
  const char *const path_back = path + (path_length - 1);
  const char *path_iter = path_back;
  if (ch_is_slash(*path_back)) {
    const char *const row_front = get_front_of_slashes(path, path_back);
    if (row_front == path) {
      return false;
    }
    path_iter = row_front - 1;
  }
  const char *filename_iter = filename + (filename_length - 1);
  char path_ch = *path_iter;
  char filename_ch = *filename_iter;
  do {
    if (path_ch != filename_ch) {
      return false;
    }
    --path_iter;
    --filename_iter;
    if (path_iter == path) {
      if (filename_iter < filename) {
        if (filename_out != NULL) {
          *filename_out = path_iter;
        }
        return true;
      }
      return false;
    }
    path_ch = *path_iter;
    if (path_ch == '/') {
      if (filename_iter < filename) {
        if (filename_out != NULL) {
          *filename_out = path_iter + 1;
        }
        return true;
      }
      return false;
    }
    if (filename_iter < filename) {
      return false;
    }
    filename_ch = *filename_iter;
  } while (true);
  return true;
}
```