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

```asm
<abasename>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strxnullorempty@plt>
  test   %rax,%rax
  je     L45
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <astrcpy@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L96
L45:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <astrcpy@plt>
  mov    $0x2f,%edx
  mov    $0x5c,%esi
  mov    %rax,%rdi
  call   <strxreplace@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L12
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <astrcpy@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L96
L12:
  mov    -0x10(%rbp),%rax
  lea    D32(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strxequals@plt>
  test   %rax,%rax
  jne    L118
  mov    -0x10(%rbp),%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strxequals@plt>
  test   %rax,%rax
  jne    L118
  mov    -0x10(%rbp),%rax
  lea    D33(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strxequals@plt>
  test   %rax,%rax
  je     L11
L118:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <astrcpy@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L96
L11:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L78
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L78:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  mov    %rax,-0x8(%rbp)
L43:
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L2
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x10(%rbp),%rax
  mov    $0x0,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <astrmid@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L96
L2:
  subq   $0x1,-0x8(%rbp)
  jmp    L43
L96:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    $0x128,%esi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <mu__free@plt>
  mov    -0x18(%rbp),%rax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D45
datatype: string
name: extract_symbolic_data
arguments: data_label: D32
datatype: string
name: extract_symbolic_data
arguments: data_label: D33
datatype: string
name: extract_symbolic_data
arguments: data_label: D38
datatype: string

tool: D45: .

tool: D32: /

tool: D33: ..

tool: D38: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/astring.c

assistant: ```c
char *abasename(const char *path) {
  char *result = NULL;
  char *tmp = NULL;
  size_t ii;
  if (strxnullorempty(path)) {
    result = astrcpy(".");
  } else {
    tmp = strxreplace(astrcpy(path), '\\', '/');
    if (strchr(tmp, '/') == NULL) {
      result = astrcpy(path);
    } else if (strxequals(tmp, "/") || strxequals(tmp, ".") || strxequals(tmp, "..")) {
      result = astrcpy(tmp);
    } else {
      if (tmp[strlen(tmp) - 1] == '/')
        tmp[strlen(tmp) - 1] = '\0';
      ii = strlen(tmp);
      while (ii >= 0) {
        if (tmp[ii] == '/') {
          result = astrmid(tmp, ii + 1, 0);
          break;
        }
        ii--;
      }
    }
  }
  mu__free("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/astring.c", 296, tmp);
  return result;
}
```