user: Converte this assembly snippet into its equivalent C code:

```asm
<get_displayname_auth>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %rdi,-0xb8(%rbp)
  mov    %rsi,-0xc0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x98(%rbp)
  movq   $0x0,-0x90(%rbp)
  movl   $0x0,-0x9c(%rbp)
  mov    -0xb8(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x88(%rbp)
  cmpq   $0x0,-0x88(%rbp)
  je     L97
  mov    -0x88(%rbp),%rax
  mov    $0x6,%edx
  lea    D17(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L97
  mov    -0x88(%rbp),%rax
  sub    -0xb8(%rbp),%rax
  mov    %eax,-0x9c(%rbp)
L97:
  cmpl   $0x0,-0x9c(%rbp)
  jle    L16
  mov    -0x9c(%rbp),%eax
  add    $0x1,%eax
  cltq
  jmp    L53
L16:
  mov    $0x0,%eax
L53:
  mov    -0xb8(%rbp),%rdx
  lea    (%rax,%rdx,1),%rdi
  lea    -0x90(%rbp),%r8
  lea    -0xa4(%rbp),%rsi
  lea    -0xa8(%rbp),%rcx
  lea    -0x98(%rbp),%rdx
  lea    -0xac(%rbp),%rax
  mov    %r8,%r9
  mov    %rsi,%r8
  mov    %rax,%rsi
  call   <parse_displayname@plt>
  test   %eax,%eax
  jne    L52
  mov    $0x0,%eax
  jmp    L82
L52:
  mov    -0xac(%rbp),%eax
  mov    %eax,-0x80(%rbp)
  mov    -0x98(%rbp),%rcx
  mov    -0xac(%rbp),%eax
  lea    -0xa0(%rbp),%rdi
  mov    -0x9c(%rbp),%edx
  mov    -0xb8(%rbp),%rsi
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <get_address_info@plt>
  mov    %rax,-0x78(%rbp)
  mov    -0x78(%rbp),%rax
  test   %rax,%rax
  je     L56
  mov    -0xa0(%rbp),%eax
  mov    %eax,-0x70(%rbp)
  movb   $0x0,-0x30(%rbp)
  mov    -0xa8(%rbp),%edx
  lea    -0x30(%rbp),%rax
  lea    D8(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  test   %rax,%rax
  jg     L78
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x78(%rbp)
  jmp    L56
L78:
  mov    -0x48(%rbp),%rdx
  lea    -0x30(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <copystring@plt>
  mov    %eax,-0x40(%rbp)
L56:
  mov    -0x98(%rbp),%rax
  test   %rax,%rax
  je     L101
  mov    -0x98(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L101:
  mov    -0x90(%rbp),%rax
  test   %rax,%rax
  je     L84
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L84:
  mov    -0x78(%rbp),%rax
  test   %rax,%rax
  je     L123
  mov    -0x80(%rbp),%edx
  mov    -0xc0(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x78(%rbp),%rdx
  mov    -0xc0(%rbp),%rax
  mov    %rdx,0x8(%rax)
  mov    -0x70(%rbp),%edx
  mov    -0xc0(%rbp),%rax
  mov    %edx,0x10(%rax)
  mov    -0x40(%rbp),%edx
  mov    -0xc0(%rbp),%rax
  mov    %edx,0x40(%rax)
  mov    -0x48(%rbp),%rdx
  mov    -0xc0(%rbp),%rax
  mov    %rdx,0x38(%rax)
  mov    -0xc0(%rbp),%rax
  movq   $0x0,0x30(%rax)
  mov    -0xc0(%rbp),%rax
  movq   $0x0,0x28(%rax)
  mov    -0xc0(%rbp),%rax
  movq   $0x0,0x20(%rax)
  mov    -0xc0(%rbp),%rax
  movq   $0x0,0x18(%rax)
  mov    $0x1,%eax
  jmp    L82
L123:
  mov    $0x0,%eax
L82:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L65
  call   <__stack_chk_fail@plt>
L65:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D17
data_type: string
name: retrieve_data
arguments: label: D8
data_type: string

tool: D17: /unix:

tool: D8: %d

assistant: ```c
Bool get_displayname_auth(char *displayname, Xauth *auth) {
  int family;
  char *host = NULL, *rest = NULL;
  int dpynum, scrnum;
  char *cp;
  int len;
  Xauth proto;
  int prelen = 0;
  cp = strchr(displayname, '/');
  if (cp && strncmp(cp, "/unix:", 6) == 0)
    prelen = (cp - displayname);
  if (!parse_displayname(displayname + ((prelen > 0) ? prelen + 1 : 0), &family, &host, &dpynum, &scrnum, &rest)) {
    return 0;
  }
  proto.family = family;
  proto.address = get_address_info(family, displayname, prelen, host, &len);
  if (proto.address) {
    char buf[40];
    proto.address_length = len;
    buf[0] = '\0';
    sprintf(buf, "%d", dpynum);
    proto.number_length = strlen(buf);
    if (proto.number_length <= 0) {
      free(proto.address);
      proto.address = NULL;
    } else {
      proto.number = copystring(buf, proto.number_length);
    }
  }
  if (host)
    free(host);
  if (rest)
    free(rest);
  if (proto.address) {
    auth->family = proto.family;
    auth->address = proto.address;
    auth->address_length = proto.address_length;
    auth->number = proto.number;
    auth->number_length = proto.number_length;
    auth->name = NULL;
    auth->name_length = 0;
    auth->data = NULL;
    auth->data_length = 0;
    return 1;
  } else {
    return 0;
  }
}
```