user: What would the C source look like for the assembly code provided here:

```asm
<fdt_path_offset_namelen>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <fdt_ro_probe_@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L9
  mov    -0x24(%rbp),%eax
  jmp    L112
L9:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L18
  mov    -0x8(%rbp),%rax
  sub    -0x20(%rbp),%rax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <memchr@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L125
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L125:
  mov    -0x18(%rbp),%rax
  sub    -0x20(%rbp),%rax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fdt_get_alias_namelen@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jne    L1
  mov    $0xfffffffb,%eax
  jmp    L112
L1:
  mov    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fdt_path_offset@plt>
  mov    %eax,-0x28(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L18
L62:
  addq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jne    L127
  mov    -0x28(%rbp),%eax
  jmp    L112
L127:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L62
  mov    -0x8(%rbp),%rax
  sub    -0x20(%rbp),%rax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <memchr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L115
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x10(%rbp)
L115:
  mov    -0x10(%rbp),%rax
  sub    -0x20(%rbp),%rax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%esi
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <fdt_subnode_offset_namelen@plt>
  mov    %eax,-0x28(%rbp)
  cmpl   $0x0,-0x28(%rbp)
  jns    L15
  mov    -0x28(%rbp),%eax
  jmp    L112
L15:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L18:
  mov    -0x20(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jb     L127
  mov    -0x28(%rbp),%eax
L112:
  leave
  ret
```

assistant: ```c
int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen) {
  const char *end = path + namelen;
  const char *p = path;
  int offset = 0;
  {
    int err_;
    if ((err_ = fdt_ro_probe_(fdt)) != 0)
      return err_;
  };
  if (*path != '/') {
    const char *q = memchr(path, '/', end - p);
    if (!q)
      q = end;
    p = fdt_get_alias_namelen(fdt, p, q - p);
    if (!p)
      return -5;
    offset = fdt_path_offset(fdt, p);
    p = q;
  }
  while (p < end) {
    const char *q;
    while (*p == '/') {
      p++;
      if (p == end)
        return offset;
    }
    q = memchr(p, '/', end - p);
    if (!q)
      q = end;
    offset = fdt_subnode_offset_namelen(fdt, offset, p, q - p);
    if (offset < 0)
      return offset;
    p = q;
  }
  return offset;
}
```